3 The Many Decoding Algorithms for Reed – Solomon Codes
3.1 Syndromes and error patterns
A codeword c is transmitted and the channel makes errors. If there are errors in not more than t places, where t= (dmin−1)/2 is the packing radius of the code, then the decoder should recover the codeword (or the data symbols contained in the codeword).
The vector v, which will be called the senseword , is the received word in a data communication system and is the read word in a data storage system. The senseword v is the codeword c corrupted by an error vector e. The ith component of the senseword is given by
vi= ci+ ei i= 0, . . . , n − 1,
and eiis nonzero for at most t values of i. If not more than t components are in error, then a bounded-distance decoder is one that must recover the unique codeword (or the data symbols contained in the codeword) from the senseword v. In contrast, a complete decoder must recover a codeword that is nearest to the senseword regardless of how many components are in error. For large codes, a complete decoder is neither tractable nor desirable.
We only consider codes whose alphabet is a field, so it is meaningful to define the error in the ith component of the codeword to be ei = vi − ci. Consequently, the senseword v can be regarded as the codeword c corrupted by an additive error vector e, and the error vector e is nonzero in at most t components.
A linear code over the field F, usually the finite field GF(q), is associated with a check matrix, H , such that cHT = 0 for every codeword c. Therefore
vHT = (c + e)HT = eHT.
For a general linear code, the syndrome vector s, with components called syndromes, is defined as
s= vHT = eHT.
For a linear code, the task of decoding can be decomposed into a preliminary task and a primary task. The preliminary task is to compute the syndrome vector s= vHT, which is a linear operation taking the n vector e to an(n − k) vector s. The primary task is to
139 3.1 Syndromes and error patterns
solve the equation s = eHT
for that vector e with weight not larger than t. This is the task of solving n−k equations for the n-vector e of minimum weight. The set of such n vectors of weight at most t is not a linear subspace of GF(q)n, which means that the map from the set of syndrome vectors s back to the set of error vectors e is not a linear map. To invert requires a nonlinear operation from the space of(n − k) vectors to the space of n vectors. Because every correctable error pattern must have a unique syndrome, the number of vectors in the space of syndromes that have such a solution ist
=0(q−1)n
. This number, which is not larger than qn−k, is the number of elements in the space of(n − k) vectors that have correctable error patterns as inverse images, under a bounded-distance decoder, in the n-dimensional space of error patterns.
For small binary codes, one can indeed form a table of the correctable error pat-terns and the corresponding syndromes. A fast decoder, which we call a boolean-logic decoder, consists of a logic tree that implements the look-up relationship between syn-dromes and error patterns. A boolean-logic decoder can be extremely fast, but can be used only for very simple binary codes.
For cyclic Reed–Solomon codes and other cyclic codes, it is much more convenient to use an alternative definition of syndromes in terms of the Fourier transform. The senseword v has the following Fourier transform:
Vj=
n−1
i=0
ωijvi j= 0, . . . , n − 1,
which is easily computed. By the linearity of the Fourier transform, Vj= Cj+ Ej j= 0, . . . , n − 1.
Furthermore, by the construction of the Reed–Solomon code, Cj= 0 j = 0, . . . , n − k − 1.
Hence
Vj= Ej j= 0, . . . , n − k − 1.
To emphasize that these are the n− k components of the error spectrum E that are immediately known from V , they are frequently denoted by the letter S and called (spectral) syndromes, though they are not the same as the syndromes introduced earlier.
To distinguish the two definitions, one might call the former code-domain syndromes
and the latter transform-domain syndromes. Thus the transform-domain syndrome is given by
Sj= Ej= Vj j= 0, . . . , n − k − 1.
Here we are treating the special case where j0= 0. There is nothing lost here because the modulation property of the Fourier transform tells us what happens to c when C is cyclically translated. By using the modulation property, the entire discussion holds for any value of j0.
Represented as polynomials, the error-spectrum polynomial is given by
E(x) =
n−1
j=0
Ejxj,
and the syndrome polynomial is given by
S(x) =
n−k−1
j=0
Sjxj.
The error-spectrum polynomial has degree at most n−1, and the syndrome polynomial has degree at most n− k − 1.
Because dmin= n − k + 1 for a Reed–Solomon code, the code can correct t errors, where t= (n − k)/2. Our task, then, is to solve the equation
Sj=
n−1
i=0
ωijei j= 0, . . . , n − k − 1
for the error vector e of smallest weight, given that this weight is at most t. An alternative task is to find the error transform E of blocklength n, given that Ejis equal to the known Sjfor j = 0, . . . , n − k − 1, and e has weight at most t = (n − k)/2. Any decoder that uses such syndromes in the Fourier transform domain is called a transform-domain decoder.
The first decoding step introduces, as an intermediate, an auxiliary polynomial(x) known as the locator polynomial or the error-locator polynomial. We shall see that the nonlinear relationship between the set of syndromes and the error spectrum E is replaced by a linear relationship between the syndromes Sj and the coefficients of the error-locator polynomial(x). The nonlinear operations that must show up somewhere in the decoder are confined to the relationship between(x) and the remaining com-ponents of E, and that nonlinear relationship has the simple form of a linear recursion.
The obvious linear procedure of finding the coefficients of the linear recursion from the syndromes by direct matrix inversion is known as the Peterson algorithm.
141 3.1 Syndromes and error patterns
Given the error vector e of (unknown) weightν, at most t, consider the polynomial given by
(x) =ν
=1
(1 − xωi),
where the indices ifor = 1, . . . , ν point to the ν ≤ t positions that are in error. These positions correspond to the nonzero components of e. Thenλi= (1/n)(ω−i) is equal to zero if and only if an error eioccurred at the component with index i, and this cannot hold for any(x) of smaller degree. Therefore eiλi = 0 for all i. By the convolution property of the Fourier transform, this implies that
(x)E(x) = 0 (mod xn− 1),
which confirms that(x) is indeed the error-locator polynomial. Written in terms of its coefficients, this polynomial equation becomes
ν k=0
kE(( j−k))= 0 j = 0, . . . , n − 1,
where the double parentheses on the indices denote modulo n. Because0 = 1, this equation can be rewritten as follows:
Ej= −ν
k=1
kE(( j−k)) j= 0, . . . , n − 1,
which is a simple linear recursion that the components of the error spectrum must satisfy.
The statement that the lengthν of the recursion is equal to the weight of e follows from the previous discussion. This is an instance of the linear complexity property, which was discussed in Section1.5. The error vector e has weightν at most t, so the linear complexity property says that all components of E can be cyclically produced by a linear recursion of length at most t,
Ej= −
t k=1
kE(( j−k)) j= 0, . . . , n − 1,
where(x) is the locator polynomial of the error vector e. The important reason for developing this cyclic recursion is that it is a set of linear equations relating the unknown coefficientsk and the components of E. Of the n equations contained in the above recursion, there are t equations that involve only the 2t known components of E and
the t unknown components of . These are as follows:
Et = −(1Et−1+ 2Et−2+ · · · + tE0), Et+1 = −(1Et+ 2Et−1+ · · · + tE1),
...
E2t−1 = −(1E2t−2+ 2E2t−3+ · · · + tEt−1).
These t equations, expressed in matrix form, are given by
⎡
This matrix equation can be solved for the connection coefficients j by any conve-nient computational procedure for solving matrix equations. One such procedure is the method of gaussian elimination. Because it is assumed that the error vector e has weight at most t, the matrix equation must have a solution. If the determinant of the matrix is zero, then there are fewer than t errors. This means that the leading coefficient
t is zero. If the determinant is zero, simply replace t by t− 1 in the matrix equation and solve the smaller problem in the same way. In this way, the matrix is eventually reduced to aν by ν matrix with a nonzero determinant.
Once is known, the other components of the error spectrum E can be computed, one by one, by using the following recursion:
Ej = −
t k=1
kE(( j−k)) j= 2t, . . . , n − 1.
This recursion provides the unavoidable nonlinear function that must be part of the decoding algorithm. An inverse Fourier transform then gives the error vector e. Next, componentwise subtraction yields
ci=vi− ei i= 0, . . . , n − 1.
Finally, the data symbols are recovered from the code symbols by inverting the operation used by the encoder, normally an easy calculation.
This completes the development of an elementary decoding algorithm for bounded-distance decoding of Reed–Solomon and other BCH codes. However, this is only the start of a line of development that goes much further. Locator decoding has now grown far more sophisticated, driven by a need to simplify the computations of the decoding
143 3.1 Syndromes and error patterns
Table 3.1. A representation of GF(16)
α0 = 1
α1 = z
α2 = z2
α3 = z3
α4 = z + 1
α5 = z2 + z
α6 = z3 + z2
α7 = z3 + z + 1
α8 = z2 + 1
α9 = z3 + z
α10 = z2 + z + 1
α11 = z3 + z2 + z
α12 = z3 + z2 + z + 1
α13 = z3 + z2 + 1
α14 = z3 + 1
algorithm. There are many different ways to organize the computations, using ideas from signal processing to reduce the computational burden. We shall discuss the various enhancements of the Peterson algorithm, beginning in Section3.4.
As an example of the Peterson algorithm, we shall work through the decoding of a (15, 9, 7) Reed–Solomon code over GF(16). Because n = 15 is a primitive blocklength, we can chooseω = α, where α is a primitive element of GF(16). We will choose α such thatα4+ α + 1 = 0. The field representation is as shown in Table3.1. We will choose the particular(15, 9, 7) Reed–Solomon code with the defining set {1, 2, 3, 4, 5, 6}. For this example, note that we have chosen a defining set that starts at j0= 1 rather than at j0 = 0, as was the case chosen earlier.
Suppose that the dataword, the codeword, and the senseword are, respectively, given by
d = 0, 0, 0, 0, 0, 0, 0, 0, 0,
c= 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, v= 0, 0, 0, 0, 0, 0, 0, α, 0, α5, 0, 0,α11, 0, 0,
with indices running from high to low.
The first step of decoding is to compute the Fourier transform of v; only six components are needed. This computation yields
V = −, α12, 1,α14,α13, 1,α11,−, −, −, −, −, −, −, −.
These six components are equal to the corresponding six components of E. Next, solve for from the equation
⎡
and one can conclude that the error-locator polynomial is given by
(x) = 1 + α14x+ α11x2+ α14x3.
This polynomial can be factored as follows:
(x) = (1 + α2x)(1 + α5x)(1 + α7x).
This, in turn, means that the errors are at locations i = 2, 5, and 7.