# Source Symbol Purging-Based Distributed Conditional Arithmetic Coding
## 3 The Calculation of the Posterior Probability
Since the side information sequence \(Y^{N}\) is only correlated with \(X^{N}\), the codeword \(CX^{N}\) is actually independent of the side information \(Y^{N}\) at the decoder side until the correct source sequence \(X^{N}\) is estimated and the context model is updated properly. Which means \(P(Y^{N}=y^{N},CX^{N})=P(Y^{N}=y^{N})P(CX^{N})\). In this way, multiplying \(P(Y^{N}=y^{N},CX^{N})\) to both sides of (1), the equality also holds. \[ \begin{split}\tilde{\Lambda}&=P(\hat{X}^{N}=\hat{ x}^{N},Y^{N}=y^{N},CX^{N})\\ &=P(\hat{X}^{N}=\hat{x}^{N}|Y^{N}=y^{N},CX^{N})\cdot P(Y^{N}=y^{N},CX^{N})=\prod_{i=1}^{N}P(\hat{X}_{i}=\hat{x}_{i},Y_{i}=y_{i},CX^{i})\end{split}  \tag{2}\]  
The above \(\tilde{\Lambda}\) can be regarded as an estimate of \(\Lambda\). At any moment \(i\) during the decoding process, the rightmost term of Equation (2) can be rewritten as \(P(\hat{X}^{i}=\hat{x}^{i},Y^{i}=y^{i},CX^{i})\) and decomposed recursively according to Equation (3) which expresses the relationships that exist among the decoded sequence \(\hat{X}^{i}\), the side information sequence \(Y^{i}\), and the codeword sequence \(CX^{i}\):  
\[\begin{split}& P(\hat{X}^{i}=x^{i},Y^{i}=y^{i},CX^{i})\\ &=P(\hat{X}_{i}=x_{i}|\hat{X}^{i-1}=\hat{x}^{i-1},Y^{i}=y^{i},CX^ {i})\\ &\cdot P(Y_{i}=y_{i}|\hat{X}^{i-1}=x^{i-1},Y^{i-1}=  
As mentioned before that the relationship between \(Y_{i}\) and \(X_{i}\) is represented by a virtual BSC channel, and \(Y_{i}\) is only related to \(X_{i}\), and independent of \(X_{i-1}\), \(X_{i+1}\), \(Y_{i-1}\) and \(Y_{i+1}\), the probability \(P(Y_{i}|\hat{X}^{i},Y^{i-1},CX^{i})\) can be represented as \(P(Y_{i}|X_{i},CX^{i})\) in (3). Since the codeword \(CX^{i}\) is independent of \(Y_{i}\), \(P(Y_{i}|\hat{X}_{i},CX^{i})\) can be further reduced to \(P(Y_{i}|\hat{X}_{i})\). In the encoding process, if the encoder uses \(X_{i-1}^{i-k}\) as the context conditions to encode \(X_{i}\), then, in the decoding process, the decoder must decode \(\hat{X}_{i-1}^{i-k}\) before they can be used as the conditions to decode \(\hat{X}_{i}\). Obviously, \(\hat{X}_{i}\) is related to \(\hat{X}_{i-1}^{i-k}\), but it is considered that \(\hat{X}_{i}\) is not related to the previously decoded symbols \(\hat{X}^{i-k-1}\). Similarly, according to the property of the BSC channel, \(\hat{X}_{i}\) is not related to \(Y^{i-1}\). Therefore, \(P(\hat{X}_{i}|\hat{X}^{i-1},Y^{i-1},\hat{CX^{i}})\) in (3) can be simplified to \(P(\hat{X}_{i}|\hat{X}_{i-k}^{i-1},CX^{i})\). The posterior probability calculation method similar to (3) has been used in [21], that is \(\lambda_{i}=logP(\hat{X}_{i}|Y_{i})+logP(\hat{X}_{i}|\hat{X}_{i-1})\), which not only calculates the probability of each \(\hat{X}_{i}\) relative to the known \(Y_{i}\), but also calculates the probability of each \(\hat{X}_{i}\) appearing under the condition \(\hat{X}_{i-1}\). This method utilizes the correlation among adjacent symbols in the source sequence to reduce the bit error rate of the decoding result. However, SPDCAC is a DSC scheme that purges the source sequence; those purged symbols are not encoded. The recovery method of the purged symbols should be different from that of other symbols. Therefore, the posterior probability calculation method of SPDCAC in different decoding cases should be considered. In the actual encoding and decoding processes, the codeword \(CX^{i}\) contains the information of the encoded symbols. In other words, when the context condition \(\hat{X}_{i-k}^{i-1}\) is known, the codeword \(CX^{i}\) must be decoded to a determined symbol \(\hat{X}_{i}\). For \(P(\hat{X}_{i}|\hat{X}_{i-k}^{i-1},CX^{i})\), if both \(\hat{X}_{i-k}^{i-1}\) and \(CX^{i}\) are known, then there must be a determined decoding result \(\hat{X}_{i}\); in this case \(P(\hat{X}_{i}|\hat{X}_{i-k}^{i-1},CX^{i})=1\). In the encoding process of SPDCAC, if a symbol \(X_{i}\) is not encoded at moment \(i\), the information of \(X_{i}\) is not included in the codeword \(CX^{i}\).