# Soft Decision Decoding with Cyclic Information Set and the Decoder Architecture for Cyclic Codes
## 2 Metrics for the Proposed Soft Decision Decoding  
In this paper, for cyclic codes, a binary phase shift keying (BPSK) constellation is transmitted over an additive white Gaussian noise (AWGN) channel. Soft decision decoding metrics commonly used include the likelihood function, Euclidean distance, correlation, correlation discrepancy, etc. In the proposed decoding algorithm, the correlation discrepancy is adopted as the decoding metric [12].  
Let \(\mathbf{r}=(r_{0},r_{1},\ldots,r_{n-1})\) denote the received soft information sequence and \(\mathbf{v}=(v_{0},v_{1},\ldots,v_{n-1})\) represent an arbitrary codeword, where \(n\) is the code length. The log-likelihood function of \(\mathbf{r}\) is expressed as  
\[\log P(\mathbf{r}|\mathbf{v})=\sum_{i=0}^{n-1}\log P(r_{i}|v_{i}). \tag{1}\]  
If the log-likelihood function is used as the decoding metric, the soft decision ML decoding algorithm selects the codeword \(\mathbf{v}\) with the largest \(\log P(\mathbf{r}|\mathbf{v})\).  
For the AWGN channel with a bilateral power spectral density of \(N_{0}/2\), the conditional probability \(P(\mathbf{r}|\mathbf{v})\) is given by  
\[P(\mathbf{r}|\mathbf{v})=\frac{1}{\left(\pi N_{0}\right)^{-\pi/2}}\exp\left[-\sum_{i= 0}^{n-1}\left(r_{i}-c_{i}\right)^{2}/N_{0}\right], \tag{2}\]  
where \(c_{i}\) is a BPSK symbol mapped by \(v_{i}\), satisfying \(c_{i}=1-2v_{i}\)[12], i.e.,  
\[\begin{cases}c_{i}=-1,&v_{i}=1,\\ c_{i}=1,&v_{i}=0,\end{cases} \tag{3}\]  
where \(\mathbf{c}=(c_{0},c_{1},\cdots,c_{n-1})\) is a symbol sequence for BPSK modulation mapped by \(\mathbf{v}\). The summation term in (2) is called the squared Euclidean distance between the received sequence \(\mathbf{r}\) and the codeword \(\mathbf{c}\). It is denoted as \(d_{E}^{2}(\mathbf{r},\mathbf{c})\), i.e.,  
\[d_{E}^{2}(\mathbf{r},\mathbf{c})=\sum_{i=0}^{n-1}\left(r_{i}-c_{i}\right)^{2}. \tag{4}\]  
Obviously, to maximize \(\log P(\mathbf{r}|\mathbf{v})\) is equivalent to minimizing \(d_{E}^{2}(\mathbf{r},\mathbf{c})\). Extend the expression on the right side of (4), that is,  
\[d_{E}^{2}(\mathbf{r},\mathbf{c})=\sum_{i=0}^{n-1}r_{i}^{2}+n-2\sum_{i=0}^{n-1}r_{i} \cdot c_{i}. \tag{5}\]  
Define the summation term as a correlation between \(\mathbf{r}\) and \(\mathbf{c}\), denoted as \(m(\mathbf{r},\mathbf{c})\)[12], that is,  
\[m(\mathbf{r},\mathbf{c})=\sum_{i=0}^{n-1}r_{i}\cdot c_{i}. \tag{6}\]  
Then, it can be rewritten as [12]  
\[m(\mathbf{r},\mathbf{c})=\sum_{i=0}^{n-1}|r_{i}|-2\sum_{x_{i}\cdot c_{i}<0}|r_{i}|. \tag{7}\]Similarly, finding the maximum value of \(m(\mathbf{r},\mathbf{c})\) is equivalent to finding the minimum value of the second summation term in (7). Define the summation term as the correlation discrepancy between \(\mathbf{r}\) and \(\mathbf{c}\), denoted as \(\lambda(\mathbf{r},\mathbf{c})\)[12], i.e.,  
\[\lambda(\mathbf{r},\mathbf{c})=\sum_{i:\mathbf{r}_{1}:\mathbf{c}_{i}<0}|r_{i}|=\sum_{i:u_{i} \oplus\mathbf{r}_{i}=1}|r_{i}|, \tag{8}\]  
where \(u_{i}\) is the hard decision result of \(r_{i}\), satisfying  
\[\begin{cases}u_{i}=-1,&r_{i}\geq 0,\\ u_{i}=1,&r_{i}<0,\end{cases} \tag{9}\]  
\(\mathbf{u}=(u_{0},u_{1},\cdots,u_{n-1})\) is the binary sequence obtained after hard decision for \(\mathbf{r}\).