Algorithm 94. Error Trapping Decoding for Cyclic Codes.
Let \(C\) be a \(t\)-error correcting cyclic \([n,k]_q\) code with generator polynomial \(g(x)\text{.}\) Let \(s_i(x)\) denote the syndrome of \(x^i y(x)\) for a received word \(\vec{y}\text{.}\)
Let \(e(x)\) be an error pattern, \(w_H(\vec{e})\leq t\text{,}\) containing a cyclic run of at least \(k\) 0s. Then we can decode the received vector \(y(x)=c(x)+e(x)\) to \(c(x)\) as follows.
-
Compute the syndrome \(s_0(x)\) of \(y(x)\) from the division algorithm\begin{equation*} y(x)=q(x)g(x)+s_0(x)\text{.} \end{equation*}
-
Set \(i=0.\)
-
If \(w_H(s_i(x))\leq t\text{,}\) then set \(e(x)=x^{n-i}(\vec{s}_i,\vec{0})\text{,}\) and decode to \(y(x)-e(x)\text{.}\)
-
Set \(i=i+1\text{.}\)
-
If \(i=n\) then stop; the error pattern is not trappable.
-
If \(\deg(s_{i-1}(x))\lt n-k-1,\) then set \(s_i(x)=x s_{i-1}(x)\text{.}\) Otherwise, set \(s_i(x)=x s_{i-1}(x)-s_{n-k-1} g(x)\text{,}\) where \(s_{n-k-1}\) is the leading coefficient of \(s_{i-1}(x)\text{.}\)
-
Go to step 3.
