1. Decoding for a BCH Code.
Let \(\alpha\) be a primitive element in \(E=\GF(2^m)\) and let \(C_{\mathrm{BCH}}\) be a narrow-sense primitive BCH code of length \(n=2^m-1\) over \(F=\GF(2)\) whose parity-check matrix is obtained by representing each entry in
\begin{equation*}
\begin{bmatrix}
1 \amp \alpha \amp \alpha^2 \amp \dots \amp \alpha^{n-1}\\
1 \amp \alpha^3 \amp \alpha^6 \amp \dots \amp \alpha^{3(n-1)}
\end{bmatrix}
\end{equation*}
as a column vector in \(F^m\text{.}\)
(a)
Show that
\begin{equation*}
C_{\mathrm{BCH}}=C_{\RS} \cap F^n
\end{equation*}
where \(C_{\RS}\) is an \([n,n-4,5]\) narrow-sense RS code over \(E\text{.}\)
Solution.
An \([n,n-4,5]\) narrow-sense RS code over \(E\) has roots \(\alpha,\alpha^2,\alpha^3,\alpha^4\text{.}\) Now, for any \(c(x)\in F[x]\) we have that \(c(\alpha)=0\) implies \(c(\alpha^2)=0=c(\alpha^4)\) as these are conjugate elements over \(F\text{.}\) So we have
\begin{align*}
C_{\BCH} \amp = \{ \vec{c} \in F^n \mid c(\alpha)=c(\alpha^3)=0\}\\
\amp = \{\vec{c}\in F^n \mid c(\alpha)=c(\alpha^2)=c(\alpha^3)=c(\alpha^4)=0\} \\
\amp =C_{\RS}\cap F^n\text{.}
\end{align*}
(b)
Suppose that a codeword \(\vec{c}\) of \(C_{\mathrm{BCH}}\) has been transmitted and a word \(\vec{y}\in F^n\) with at most two errors has been received. Let \(\transpose{(S_0\, S_1\, S_2\, S_3)}\) be the syndrome \(H_{\RS}\transpose{\vec{y}}\text{,}\) where \(H_{\RS}\) is the canonical parity-check matrix of the code \(C_{\RS}\) from part a). Show that \(S_1=S_0^2\) and \(S_3=S_0^4\text{.}\)
Solution.
Let \(y(x)\) be the polynomial in \(F[x]\) with coefficients given by \(\vec{y}\text{.}\) Then we have
\begin{equation*}
\transpose{(S_0\, S_1\, S_2\, S_3)}= H_{\RS}\transpose{\vec{y}} = \transpose{(y(\alpha)\,\, y(\alpha^2)\,\, y(\alpha^3)\,\, y(\alpha^4))}\text{.}
\end{equation*}
It follows immediately from the linearity of the Frobenius automorphism over \(F\) that
\begin{equation*}
S_1=y(\alpha^2)=(y(\alpha))^2=S_0^2
\end{equation*}
and
\begin{equation*}
S_3=y(\alpha^4)=(y(\alpha))^4=S_0^4\text{.}
\end{equation*}
(c)
Now assume that exactly two errors have occurred. Show that the EEP is the constant polynomial \(\Gamma(x)=S_0\text{.}\)
Solution.
If two errors have occurred then \(\vec{y}=\vec{e}_i+\vec{e}_j\) with ones in positions \(i\) and \(j\) and zeros elsewhere (\(0\leq i\lt j \leq n-1\)). Now we have
\begin{align*}
\Gamma(x) \amp =\sum_{j\in J} e_j v_j \prod_{m\in J\setminus\{j\}} (1-\alpha_{m} x) \\
\amp = e_i v_i (1-\alpha_j x)+e_jv_j(1-\alpha_i x)\\
\amp = \alpha^i (1+\alpha^j x)+\alpha^j(1+\alpha_i x)\\
\amp = \alpha^i + \alpha^j\\
\amp = S_0
\end{align*}
(d)
Again assume that exactly two errors have occurred. Derive from the key equation expressions for the coefficients of the ELP \(\Lambda(x)=1+\Lambda_1 x + \Lambda_2 x^2\text{.}\) Write these expressions in terms of \(S_0\) and \(S_2\) only. Compare the result with the polynomial in Decoding Algorithm for the Double-Error-Correcting Alternant Code over GF(2).
Solution.
From the key equation and parts (b) and (c) we have
\begin{align*}
S_0 \amp \equiv (1+\Lambda_1 x+ \Lambda_2 x^2)(S_0+S_0^2 x + S_2 x^2 + S_0^4 x^3) \pmod{x^4}\\
\amp \equiv S_0 + (S_0^2+S_0\Lambda_1) x + (S_2+\Lambda_1 S_0^2 + S_0\Lambda_2) x^2 + (S_0^4+\Lambda_1 S_2+\Lambda_2 S_0^2)x^3 \pmod{x^4}\text{.}
\end{align*}
From this it follows that
\begin{equation*}
\begin{cases}
S_0^2+S_0\Lambda_1 = 0 \\
S_2+\Lambda_1 S_0^2 + S_0\Lambda_2 = 0 \\
S_0^4+\Lambda_1 S_2 + \Lambda_2 S_0^2 = 0
\text{.}\end{cases}
\end{equation*}
Now we have that \(S_0=\alpha^i+\alpha^j\) is not zero since exactly two errors have occurred. Therefore the first equation gives
\begin{equation*}
\Lambda_1=S_0\text{.}
\end{equation*}
Substituting this into the second equation gives
\begin{equation*}
\Lambda_2 = \frac{S_2 + S_0^3}{S_0}=S_0^2+\frac{S_2}{S_0}.
\end{equation*}
The third equation is consistent with these two:
\begin{equation*}
S_0^4+ S_0S_2 +S_0(S_2+S_0^3)=0\text{.}
\end{equation*}
So the error locator polynomial is \(\Lambda(x)=1+S_0 x + \left(S_0^2+\frac{S_2}{S_0}\right)x^2. \) The polynomial in Decoding Algorithm for the Double-Error-Correcting Alternant Code over GF(2) is the reverse polynomial of this, but this is just because that polynomial is the product \((x+\alpha^i)(x+\alpha^j)\) while this one is \((1+\alpha^i x)(1+\alpha^j x)\text{.}\)
