11 Reed-Solomon Codes: Society For Industrial and Applied Mathematics (1) - This Paper Described A New
11 Reed-Solomon Codes: Society For Industrial and Applied Mathematics (1) - This Paper Described A New
Reed-Solomon Codes
Introduction
In 1960, Irving Reed and Gus Solomon published a paper in the Journal of the
Society for Industrial and Applied Mathematics [1]. This paper described a new
class of error-correcting codes that are now called Reed-Solomon (R-S) codes.
These codes have great power and utility, and are today found in many
applications from compact disc players to deep-space applications. This article is
an attempt to describe the paramount features of R-S codes and the fundamentals
of how they work.
Reed-Solomon codes are nonbinary cyclic codes with symbols made up of m-bit
sequences, where m is any positive integer having a value greater than 2. R-S (n, k)
codes on m-bit symbols exist for all n and k for which
where k is the number of data symbols being encoded, and n is the total number of
code symbols in the encoded block. For the most conventional R-S (n, k) code,
Reed-Solomon codes achieve the largest possible code minimum distance for any
linear code with the same encoder input and output block lengths. For nonbinary
codes, the distance between two codewords is defined (analogous to Hamming
distance) as the number of symbols in which the sequences differ. For Reed-
Solomon codes, the code minimum distance is given by [2]
dmin = n - k + 1 (3)
The code is capable of correcting any combination of t or fewer errors, where t can
be expressed as [3]
- 1 n - k
t = d min = 2 (4)
2
where x means the largest integer not to exceed x. Equation (4) illustrates that
for the case of R-S codes, correcting t symbol errors requires no more than 2t parity
symbols. Equation (4) lends itself to the following intuitive reasoning. One can say
that the decoder has n - k redundant symbols to “spend,” which is twice the amount
of correctable errors. For each error, one redundant symbol is used to locate the error,
and another redundant symbol is used to find its correct value.
Reed-Solomon Codes
Why R-S Codes Perform Well Against Burst Noise
Consider an (n, k) = (255, 247) R-S code, where each symbol is made up of m = 8
bits (such symbols are typically referred to as bytes). Since n - k = 8, Equation (4)
indicates that this code can correct any four symbol errors in a block of 255.
Imagine the presence of a noise burst, lasting for 25-bit durations and disturbing
one block of data during transmission, as illustrated in Figure 3.
Figure 3
Data block disturbed by 25-bit noise burst.
In this example, notice that a burst of noise that lasts for a duration of 25
contiguous bits must disturb exactly four symbols. The R-S decoder for the
(255, 247) code will correct any four-symbol errors without regard to the type of
damage suffered by the symbol. In other words, when a decoder corrects a byte, it
replaces the incorrect byte with the correct one, whether the error was caused by
one bit being corrupted or all eight bits being corrupted. Thus if a symbol is wrong,
it might as well be wrong in all of its bit positions. This gives an R-S code a
tremendous burst-noise advantage over binary codes, even allowing for the
interleaving of binary codes. In this example, if the 25-bit noise disturbance had
occurred in a random fashion rather than as a contiguous burst, it should be clear
that many more than four symbols would be affected (as many as 25 symbols
might be disturbed). Of course, that would be beyond the capability of the
(255, 247) code.
Reed-Solomon Codes
Finite Fields
In order to understand the encoding and decoding principles of nonbinary codes,
such as Reed-Solomon (R-S) codes, it is necessary to venture into the area of finite
fields known as Galois Fields (GF). For any prime number, p, there exists a finite
field denoted GF( p) that contains p elements. It is possible to extend GF( p) to a
field of pm elements, called an extension field of GF( p), and denoted by GF( pm),
where m is a nonzero positive integer. Note that GF( pm) contains as a subset the
elements of GF( p). Symbols from the extension field GF(2m) are used in the
construction of Reed-Solomon (R-S) codes.
The binary field GF(2) is a subfield of the extension field GF(2m), in much the
same way as the real number field is a subfield of the complex number field.
Reed-Solomon Codes
Besides the numbers 0 and 1, there are additional unique elements in the extension
field that will be represented with a new symbol α. Each nonzero element in
GF(2m) can be represented by a power of α. An infinite set of elements, F, is
formed by starting with the elements {0, 1, α}, and generating additional elements
by progressively multiplying the last entry by α, which yields the following:
To obtain the finite set of elements of GF(2m) from F, a condition must be imposed
on F so that it may contain only 2m elements and is closed under multiplication.
The condition that closes the set of field elements under multiplication is
characterized by the irreducible polynomial shown below:
m − 1)
α(2 + 1=0
or equivalently
m −1)
α(2 = 1 = α0 (10)
Using this polynomial constraint, any field element that has a power equal to or
greater than 2m - 1 can be reduced to an element with a power less than 2m - 1, as
follows:
m+ m −1)
α(2 n)
= α(2 αn+1 = αn+1 (11)
Thus, Equation (10) can be used to form the finite sequence F* from the infinite
sequence F as follows:
F ∗ = 0, 1, α, α 2 , . . . , α 2 − 2 , α 2 −1 , α 2 , . . .
m m m
(12)
= 0, α 0 , α1 , α 2 , . . . , α 2 − 2 , α 0 , α1 , α 2 , . . .
m
Therefore, it can be seen from Equation (12) that the elements of the finite field,
GF(2m), are as follows:
GF(2m ) = { 0, α , α , α , . . . , α
0 1 2 2m − 2
} (13)
Reed-Solomon Codes
Addition in the Extension Field GF(2m)
Each of the 2m elements of the finite field, GF(2m), can be represented as a distinct
polynomial of degree m - 1 or less. The degree of a polynomial is the value of its
highest-order exponent. We denote each of the nonzero elements of GF(2m) as a
polynomial, ai (X ), where at least one of the m coefficients of ai (X ) is nonzero.
For i = 0,1,2,…,2m - 2,
Consider the case of m = 3, where the finite field is denoted GF(23). Figure 7
shows the mapping (developed later) of the seven elements {αi} and the zero
element, in terms of the basis elements {X 0, X 1, X 2} described by Equation (14).
Since Equation (10) indicates that α0 = α7, there are seven nonzero elements or a
total of eight elements in this field. Each row in the Figure 7 mapping comprises a
sequence of binary values representing the coefficients ai, 0, ai, 1, and ai, 2 in
Equation (14). One of the benefits of using extension field elements {αi} in place
of binary elements is the compact notation that facilitates the mathematical
representation of nonbinary encoding and decoding processes. Addition of two
elements of the finite field is then defined as the modulo-2 sum of each of the
polynomial coefficients of like powers,
Figure 7
Mapping field elements in terms of basis elements for GF(8) with f(x) = 1 + x + x3.
Reed-Solomon Codes
A Primitive Polynomial Is Used to Define the Finite Field
A class of polynomials called primitive polynomials is of interest because such
functions define the finite fields GF(2m) that in turn are needed to define R-S
codes. The following condition is necessary and sufficient to guarantee that a
polynomial is primitive. An irreducible polynomial f(X ) of degree m is said to be
primitive if the smallest positive integer n for which f(X ) divides X n + 1 is
n = 2m - 1. Note that the statement A divides B means that A divided into B yields a
nonzero quotient and a zero remainder. Polynomials will usually be shown low
order to high order. Sometimes, it is convenient to follow the reverse format (for
example, when performing polynomial division).
a. 1+X+X4
b. 1+X+X2+X3+X4
Solution
a. We can verify whether this degree m = 4 polynomial is primitive by
m
determining whether it divides X n + 1 = X (2 −1) + 1 = X 15 + 1, but does
not divide X n + 1, for values of n in the range of 1 ≤ n < 15. It is easy to
verify that 1 + X + X 4 divides X 15 + 1 [3], and after repeated
computations it can be verified that 1 + X + X 4 will not divide X n + 1 for
any n in the range of 1 ≤ n < 15. Therefore, 1 + X + X 4 is a primitive
polynomial.
Reed-Solomon Codes
correspond to f(X ) = 0 must be found. The familiar binary elements, 1 and 0, do
not satisfy (are not roots of) the polynomial f(X ) = 1 + X + X 3, since f(1) = 1 and
f(0) = 1 (using modulo-2 arithmetic). Yet, a fundamental theorem of algebra states
that a polynomial of degree m must have precisely m roots. Therefore for this
example, f(X ) = 0 must yield three roots. Clearly a dilemma arises, since the three
roots do not lie in the same finite field as the coefficients of f(X ). Therefore, they
must lie somewhere else; the roots lie in the extension field, GF(23). Let α, an
element of the extension field, be defined as a root of the polynomial f(X ).
Therefore, it is possible to write the following:
f(α) = 0
1 + α + α3 = 0 (16)
α3 = –1 – α
α3 = 1 + α (17)
Thus, α3 is expressed as a weighted sum of α-terms having lower orders. In fact all
powers of α can be so expressed. For example, consider α4, where we obtain
α4 = α α3 = α (1 + α) = α + α2 (18a)
α5 = α α4 = α (α + α2) = α2 + α3 (18b)
α5 = 1 + α + α2 (18c)
α6 = α α5 = α (1 + α + α2) = α + α2 + α3 = 1 + α2 (18d)
α7 = α α6 = α (1 + α2) = α + α3 = 1 = α0 (18e)
Note that α7 = α0, and therefore the eight finite field elements of GF(23) are
Reed-Solomon Codes
Table 1
Some Primitive Polynomials
m m
3 1+X+X3 14 1 + X + X 6 + X 10 + X 14
4 1+X+X4 15 1 + X + X 15
5 1+X2+X5 16 1 + X + X 3 + X 12 + X 16
6 1+X+X6 17 1 + X 3 + X 17
7 1+X3+X7 18 1 + X 7 + X 18
8 1+X2+X3+X4+X8 19 1 + X + X 2 + X 5 + X 19
9 1+X4+X9 20 1 + X 3 + X 20
10 1 + X 3 + X 10 21 1 + X 2 + X 21
11 1 + X 2 + X 11 22 1 + X + X 22
12 1 + X + X 4 + X 6 + X 12 23 1 + X 5 + X 23
13 1 + X + X 3 + X 4 + X 13 24 1 + X + X 2 + X 7 + X 24
Reed-Solomon Codes
Figure 8
Extension field elements can be represented by the contents of a binary linear feedback shift
register (LFSR) formed from a primitive polynomial.
Table 2 Table 3
Addition Table Multiplication Table
α0 α1 α2 α3 α4 α5 α6 α0 α1 α2 α3 α4 α5 α6
α0 0 α3 α6 α1 α5 α4 α2 α0 α0 α1 α2 α3 α4 α5 α6
α1 α3 0 α4 α0 α2 α6 α5 α1 α1 α2 α3 α4 α5 α6 α0
α2 α6 α4 0 α5 α1 α3 α0 α2 α2 α3 α4 α5 α6 α0 α1
α3 α1 α0 α5 0 α6 α2 α4 α3 α3 α4 α5 α6 α0 α1 α2
α4 α5 α2 α1 α6 0 α0 α3 α4 α4 α5 α6 α0 α1 α2 α3
α5 α4 α6 α3 α2 α0 0 α1 α5 α5 α6 α0 α1 α2 α3 α4
α6 α2 α5 α0 α4 α3 α1 0 α6 α6 α0 α1 α2 α3 α4 α5
Reed-Solomon Codes
Solution
The roots will be found by enumeration. Clearly, α0 = 1 is not a root because
f(α0) = 1. Now, use Table 2 to check whether α1 is a root. Since
f(α) = 1 + α + α3 = 1 + α0 = 0
α is therefore a root.
f(α2) = 1 + α2 + α6 = 1 + α0 = 0
Hence, α2 is a root.
f(α3) = 1 + α3 + α9 = 1 + α3 + α2 = 1 + α5 = α4 ≠ 0
f(α4) = α12 + α4 + 1 = α5 + α4 + 1 = 1 + α0 = 0
Yes, it is a root. Hence, the roots of f(X ) = 1 + X + X 3 are α, α2, and α4. It is not
difficult to verify that starting with any of these roots and generating higher-order
exponents yields all of the seven nonzero elements in the field. Hence, each of the
roots is a primitive element. Since our verification requires that at least one root be
a primitive element, the polynomial is primitive.
Reed-Solomon Codes
Reed-Solomon Encoding
Equation (2), repeated below as Equation (20), expresses the most conventional
form of Reed-Solomon (R-S) codes in terms of the parameters n, k, t, and any
positive integer m > 2.
The degree of the generator polynomial is equal to the number of parity symbols.
R-S codes are a subset of the Bose, Chaudhuri, and Hocquenghem (BCH) codes;
hence, it should be no surprise that this relationship between the degree of the
generator polynomial and the number of parity symbols holds, just as for BCH
codes. Since the generator polynomial is of degree 2t, there must be precisely 2t
successive powers of α that are roots of the polynomial. We designate the roots of
g(X ) as α, α2, …, α2t. It is not necessary to start with the root α; starting with any
power of α is possible. Consider as an example the (7, 3) double-symbol-error
correcting R-S code. We describe the generator polynomial in terms of its
2t = n - k = 4 roots, as follows:
g( X ) = ( X − α ) ( X − α 2 ) ( X − α3 ) ( X − α 4 )
( ) (
= X 2 − α+ α 2 X + α3 X 2 − α3 + α 4 X + α 7
)
(
= X 2 − α 4 X + α3 )(X 2
− α6 X + α0 )
( ) (
= X 4 − α 4 + α6 X 3 + α3 + α10 + α0 X 2 − α 4 + α9 X + α3 ) ( )
= X 4 − α3 X 3 + α0 X 2 − α1 X + α3
Following the low order to high order format, and changing negative signs to
positive, since in the binary field +1 = –1, g(X ) can be expressed as follows:
g(X ) = α3 + α1 X + α0 X 2 + α3 X 3 + X 4 (22)
Reed-Solomon Codes
Encoding in Systematic Form
Since R-S codes are cyclic codes, encoding in systematic form is analogous to the
binary encoding procedure [3]. We can think of shifting a message polynomial,
m(X ), into the rightmost k stages of a codeword register and then appending a
parity polynomial, p(X ), by placing it in the leftmost n - k stages. Therefore we
multiply m(X ) by X n - k, thereby manipulating the message polynomial
algebraically so that it is right-shifted n - k positions. Next, we divide X n - k m(X )
by the generator polynomial g(X ), which is written in the following form:
where q(X ) and p(X ) are quotient and remainder polynomials, respectively. As in
the binary case, the remainder is the parity. Equation (23) can also be expressed as
follows:
We demonstrate the steps implied by Equations (24) and (25) by encoding the
following three-symbol message:
010 110
{ { 111
{
α1 α3 α5
with the (7, 3) R-S code whose generator polynomial is given in Equation (22). We
first multiply (upshift) the message polynomial α1 + α3 X + α5 X 2 by X n - k = X 4,
yielding α1 X 4 + α3 X 5 + α5 X 6. We next divide this upshifted message polynomial
by the generator polynomial in Equation (22), α3 + α1 X + α0 X 2 + α3 X 3 + X 4.
Polynomial division with nonbinary coefficients is more tedious than its binary
counterpart, because the required operations of addition (subtraction) and
multiplication (division) must follow the rules in Tables 2 and 3, respectively. It is
left as an exercise for the reader to verify that this polynomial division results in
the following remainder (parity) polynomial.
p(X ) = α0 + α2 X + α4 X 2 + α6 X 3
Then, from Equation (25), the codeword polynomial can be written as follows:
U(X ) = α0 + α2 X + α4 X 2 + α6 X 3+ α1 X 4 + α3 X 5 + α5 X 6
Reed-Solomon Codes
Systematic Encoding with an (n - k)–Stage Shift Register
Using circuitry to encode a three-symbol sequence in systematic form with the
(7, 3) R-S code described by g(X ) in Equation (22) requires the implementation of
a linear feedback shift register (LFSR) circuit, as shown in Figure 9. It can easily
be verified that the multiplier terms in Figure 9, taken from left to right, correspond
to the coefficients of the polynomial in Equation (22) (low order to high order).
This encoding process is the nonbinary equivalent of cyclic encoding [3]. Here,
corresponding to Equation (20), the (7, 3) R-S nonzero codewords are made up of
2m - 1 = 7 symbols, and each symbol is made up of m = 3 bits.
Figure 9
LFSR encoder for a (7, 3) R-S code.
Here the example is nonbinary, so that each stage in the shift register of Figure 9
holds a 3-bit symbol. In the case of binary codes, the coefficients labeled g1, g2,
and so on are binary. Therefore, they take on values of 1 or 0, simply dictating the
presence or absence of a connection in the LFSR. However in Figure 9, since each
coefficient is specified by 3-bits, it can take on one of eight values.
1. Switch 1 is closed during the first k clock cycles to allow shifting the
message symbols into the (n - k)–stage shift register.
2. Switch 2 is in the down position during the first k clock cycles in order to
allow simultaneous transfer of the message symbols directly to an output
register (not shown in Figure 9).
Reed-Solomon Codes
3. After transfer of the kth message symbol to the output register, switch 1 is
opened and switch 2 is moved to the up position.
5. The total number of clock cycles is equal to n, and the contents of the
output register is the codeword polynomial p(X ) + X n - k m(X ), where
p(X ) represents the parity symbols and m(X ) the message symbols in
polynomial form.
We use the same symbol sequence that was chosen as a test message earlier:
010 110
{ { 111
{
α1 α3 α5
where the rightmost symbol is the earliest symbol, and the rightmost bit is the
earliest bit. The operational steps during the first k = 3 shifts of the encoding circuit
of Figure 9 are as follows:
INPUT QUEUE CLOCK REGISTER CONTENTS FEEDBACK
CYCLE
α1 α3 α5 0 0 0 0 0 α5
α1 α3 1 α1 α6 α5 α1 α0
α1 2 α3 0 α2 α2 α4
- 3 α0 α2 α4 α6 -
After the third clock cycle, the register contents are the four parity symbols, α0, α2,
α4, and α6, as shown. Then, switch 1 of the circuit is opened, switch 2 is toggled to
the up position, and the parity symbols contained in the register are shifted to the
output. Therefore the output codeword, U(X ), written in polynomial form, can be
expressed as follows:
6
U( X ) = ∑
n=0
un X n
U( X ) = α0 + α2 X + α4 X 2 + α6 X 3 + α1 X 4 + α3 X 5 + α5 X 6
(26)
= (100 ) + ( 001) X + ( 011) X 2 + (101) X 3 + ( 010 ) X 4 + (110 ) X 5 + (111) X 6
Reed-Solomon Codes
The process of verifying the contents of the register at various clock cycles is
somewhat more tedious than in the binary case. Here, the field elements must be
added and multiplied by using Table 2 and Table 3, respectively.
The roots of a generator polynomial, g(X ), must also be the roots of the codeword
generated by g(X ), because a valid codeword is of the following form:
Therefore, an arbitrary codeword, when evaluated at any root of g(X ), must yield
zero. It is of interest to verify that the codeword polynomial in Equation (26) does
indeed yield zero when evaluated at the four roots of g(X ). In other words, this
means checking that
This demonstrates the expected results that a codeword evaluated at any root of
g(X ) must yield zero.
Reed-Solomon Codes
Reed-Solomon Decoding
Earlier, a test message encoded in systematic form using a (7, 3) R-S code resulted
in a codeword polynomial described by Equation (26). Now, assume that during
transmission this codeword becomes corrupted so that two symbols are received in
error. (This number of errors corresponds to the maximum error-correcting
capability of the code.) For this seven-symbol codeword example, the error pattern,
e(X ), can be described in polynomial form as follows:
6
e(X ) = ∑
n =0
en X n (28)
In other words, one parity symbol has been corrupted with a 1-bit error (seen as
α2), and one data symbol has been corrupted with a 3-bit error (seen as α5). The
received corrupted-codeword polynomial, r(X ), is then represented by the sum of
the transmitted-codeword polynomial and the error-pattern polynomial as follows:
r( X ) = U( X ) + e( X ) (30)
Following Equation (30), we add U(X ) from Equation (26) to e(X ) from Equation
(29) to yield r(X ), as follows:
= α 0 + α 2 X + α 4 X 2 + α 0 X 3 + α 6 X 4 + α3 X 5 + α 5 X 6 (31)
In this example, there are four unknowns—two error locations and two error
values. Notice an important difference between the nonbinary decoding of r(X )
that we are faced with in Equation (31) and binary decoding; in binary decoding,
the decoder only needs to find the error locations [3]. Knowledge that there is an
error at a particular location dictates that the bit must be “flipped” from 1 to 0 or
vice versa. But here, the nonbinary symbols require that we not only learn the error
locations, but also determine the correct symbol values at those locations. Since
there are four unknowns in this example, four equations are required for their
solution.
Reed-Solomon Codes
Syndrome Computation
The syndrome is the result of a parity check performed on r to determine whether r
is a valid member of the codeword set [3]. If in fact r is a member, the syndrome S
has value 0. Any nonzero value of S indicates the presence of errors. Similar to the
binary case, the syndrome S is made up of n - k symbols, {Si} (i = 1, … , n - k).
Thus, for this (7, 3) R-S code, there are four symbols in every syndrome vector;
their values can be computed from the received polynomial, r(X ). Note how the
computation is facilitated by the structure of the code, given by Equation (27) and
rewritten below:
From this structure it can be seen that every valid codeword polynomial U(X ) is a
multiple of the generator polynomial g(X ). Therefore, the roots of g(X ) must also
be the roots of U(X ). Since r(X ) = U(X ) + e(X ), then r(X ) evaluated at each of
the roots of g(X ) should yield zero only when it is a valid codeword. Any errors
will result in one or more of the computations yielding a nonzero result. The
computation of a syndrome symbol can be described as follows:
where r(X ) contains the postulated two-symbol errors as shown in Equation (29).
If r(X ) were a valid codeword, it would cause each syndrome symbol Si to equal 0.
For this example, the four syndrome symbols are found as follows:
S1 = r(α) = α0 + α3 + α6 + α 3 + α10 + α8 + α11
= α0 + α3 + α6 + α3 + α 2 + α1+ α 4 (33)
= α3
S2 = r(α 2 ) = α0 + α 4 + α8 + α6 + α14 + α13 + α17
= α0 + α 4 + α1+ α6 + α0 + α 6 + α 3 (34)
= α5
S3 = r(α3 ) = α0 + α5 + α10 + α 9 + α18 + α18 + α 23
= α 0 + α5 + α 3 + α 2 + α 4 + α 4 + α 2 (35)
= α6
S4 = r(α 4 ) = α0 + α6 + α12 + α12 + α 22 + α 23 + α 29
= α0 + α6 + α5 + α5 + α1+ α 2 + α1 (36)
=0
Reed-Solomon Codes
The results confirm that the received codeword contains an error (which we
inserted), since S≠0.
Solution
Si = r ( X ) = r (αi ) i = 1, 2, L , n − k
X = αi
Si =
U( X ) + e( X ) X = αi
= U (αi ) + e (αi )
e(X ) = α2 X 3 + α5 X 4
Therefore,
S 1 = e(α1 ) = α5 + α9
= α5 + α 2
= α3
S2 = e(α2 ) = α8 + α13
= α1+ α6
= α5
continues ¾
Reed-Solomon Codes
¾ continued
S3 = e(α3 ) = α11+ α17
= α4 + α3
= α6
S4 = e(α 4 ) = α14 + α 21
= α0 + α0
=0
These results confirm that the syndrome values are the same, whether obtained by
evaluating e(X ) at the roots of g(X ), or r(X ) at the roots of g(X ).
Error Location
Suppose there are ν errors in the codeword at location X j1 , X j2 , ... , X jν . Then,
the error polynomial e(X ) shown in Equations (28) and (29) can be written as
follows:
e( X ) = e j X j1 + e j2 X j2 + ... + e jν X jν (37)
1
The indices 1, 2, … ν refer to the first, second, …, νth errors, and the index j refers
to the error location. To correct the corrupted codeword, each error value e jl and
its location X jl , where l = 1, 2, ..., ν, must be determined. We define an error
locator number as βl = α jl . Next, we obtain the n - k = 2t syndrome symbols by
substituting αi into the received polynomial for i = 1, 2, … 2t:
S1 = r(α) = e j β1 + e j β2 +...+ e jν βν
1 2
•
•
•
S2t = r(α2t ) = e j β12t + e j β22t +...+ e jν βν2t
1 2
Reed-Solomon Codes
There are 2t unknowns (t error values and t locations), and 2t simultaneous
equations. However, these 2t simultaneous equations cannot be solved in the usual
way because they are nonlinear (as some of the unknowns have exponents). Any
technique that solves this system of equations is known as a Reed-Solomon
decoding algorithm.
Once a nonzero syndrome vector (one or more of its symbols are nonzero) has
been computed, that signifies that an error has been received. Next, it is necessary
to learn the location of the error or errors. An error-locator polynomial, σ(X ), can
be defined as follows:
σ( X ) = ( 1 + β1 X ) ( 1 + β2 X ) ... ( 1 + βν X )
(39)
= 1 + σ1 X + σ2 X 2 +... + σν X ν
The roots of σ(X ) are 1/β1, 1/β2, … ,1/βν. The reciprocal of the roots of σ(X ) are
the error-location numbers of the error pattern e(X ). Then, using autoregressive
modeling techniques [7], we form a matrix from the syndromes, where the first t
syndromes are used to predict the next syndrome. That is,
S1 S2 S3 ... St – 1 St σt –St + 1
S2 S3 S4 ... St St + 1 σt – 1 –St + 2
• • •
• • = • (40)
• • •
St – 1 St St + 1 ... S2t – 3 S2t – 2 σ2 –S2t – 1
Reed-Solomon Codes
We apply the autoregressive model of Equation (40) by using the largest
dimensioned matrix that has a nonzero determinant. For the (7, 3) double-symbol-
error correcting R-S code, the matrix size is 2 × 2, and the model is written as
follows:
S S2 σ2 S3
1 = (41)
S2
S3 σ1 S4
α3 α5 σ2 α6
= (42)
α5
α6 σ1 0
To solve for the coefficients σ1 and σ2 and of the error-locator polynomial, σ(X ),
we first take the inverse of the matrix in Equation (42). The inverse of a matrix [A]
is found as follows:
cofactor A
Inv A
=
det A
Therefore,
α3 α5
det = α3α6 − α5α5 = α9 + α10 (43)
α5 6
α
= α 2 + α 3 = α5
α 3 α5 α 6 α
5
cofactor = (44)
α α α5
5 6
α
3
Reed-Solomon Codes
α 6 α5
α3 α5 α5 α3 6
−5 α α5
Inv = = α 5
α
5
α6 α5 α α3
(45)
α6 α5 α8 α 7 α1 α 0
= α2 = =
α
5
α 3 α7 α5 α 0 α5
Safety Check
If the inversion was performed correctly, the multiplication of the original matrix
by the inverted matrix should yield an identity matrix.
α3 α5 α1 α0 α 4 + α5 α3 + α10 1 0
5 0 = = (46)
α α 6 α α5 α6 + α6 α5 + α11 0 1
Continuing from Equation (42), we begin our search for the error locations by
solving for the coefficients of the error-locator polynomial, σ(X ).
σ 2 α1 α0 α 6 α 7 α 0
= 0 = = (47)
σ 1 α α5 0 α 6 α 6
σ( X ) = α0 + σ1 X + σ2 X 2
(48)
= α0 + α6 X + α0 X 2
The roots of σ(X ) are the reciprocals of the error locations. Once these roots are
located, the error locations will be known. In general, the roots of σ(X ) may be one
or more of the elements of the field. We determine these roots by exhaustive
Reed-Solomon Codes
testing of the σ(X ) polynomial with each of the field elements, as shown below.
Any element X that yields σ(X ) = 0 is a root, and allows us to locate an error.
σ(α0) = α0 + α6 + α0 = α6 ≠ 0
σ(α1) = α0 + α7 + α2 = α2 ≠ 0
σ(α2) = α0 + α8 + α4 = α6 ≠ 0
σ(α2) = α0 + α8 + α4 = α6 ≠ 0
As seen in Equation (39), the error locations are at the inverse of the roots of the
polynomial. Therefore σ(α3) = 0 indicates that one root exits at 1/βl = α3. Thus,
βl = 1/α3 = α4. Similarly, σ(α4) = 0 indicates that another root exits at 1/βl′ = α4.
Thus, βl′ = 1/α4 = α3, where l and l′ refer to the first, second, …, νth error.
Therefore, in this example, there are two-symbol errors, so that the error
polynomial is of the following form:
e ( X ) = e j X j1 + e j X j2 (49)
1 2
The two errors were found at locations α3 and α4. Note that the indexing of the
error-location numbers is completely arbitrary. Thus, for this example, we can
j j j
designate the βl = α l values as β1 = α 1 = α3 and β = α 2 = α 4 .
2
Error Values
An error had been denoted e jl , where the index j refers to the error location and the
index l identifies the lth error. Since each error value is coupled to a particular
location, the notation can be simplified by denoting e jl , simply as el . Preparing to
determine the error values e1 and e2 associated with locations β1 = α3 and β2 = α4,
Reed-Solomon Codes
any of the four syndrome equations can be used. From Equation (38), let’s use S1
and S2.
β β2 e S
12 1 = 1 (51)
β1 β2 2 e2 S2
α3 α4 e1 α3
= (52)
α6 α8 e2 α5
To solve for the error values e1 and e2, the matrix in Equation (52) is inverted in the
usual way, yielding
α1
α4
6
α3 α4 α 3
α
Inv =
α 6 α1 α 3α1 − α 6α 4
α1 α4
6
α α3 1 α4
−6 α
1 α4
1 α
= 4 = α = α 6 (53)
α + α3 α 6 α 3 α α 3
α 2 α5 α 2 α 5
= 7 =
α α 4 α 0 α 4
Reed-Solomon Codes
Correcting the Received Polynomial with Estimates of the Error Polynomial
From Equations (49) and (54), the estimated error polynomial is formed, to yield
the following:
e$ ( X ) = e1 X j1 + e2 X j2
(55)
= α2 X 3 + α5 X 4
The demonstrated algorithm repairs the received polynomial, yielding an estimate
of the transmitted codeword, and ultimately delivers a decoded message. That is,
Since the message symbols constitute the rightmost k = 3 symbols, the decoded
message is
010 110
{ { 111
{
α1 α3 α5
which is exactly the test message that was chosen earlier for this example. For
further reading on R-S coding, see the collection of papers in reference [8].
Reed-Solomon Codes
References
[1] Reed, I. S. and Solomon, G., “Polynomial Codes Over Certain Finite
Fields,” SIAM Journal of Applied Math., vol. 8, 1960, pp. 300-304.
[5] Berlekamp, E. R., Peile, R. E., and Pope, S. P., “The Application of Error
Control to Communications,” IEEE Communications Magazine, vol. 25, no.
4, April 1987, pp. 44-57.
[6] Hagenauer, J., and Lutz, E., “Forward Error Correction Coding for Fading
Compensation in Mobile Satellite Channels,” IEEE JSAC, vol. SAC-5, no. 2,
February 1987, pp. 215-225.
[7] Blahut, R. E., Theory and Practice of Error Control Codes (Reading, MA:
Addison-Wesley, 1983).
[8] Wicker, S. B. and Bhargava, V. K., ed., Reed-Solomon Codes and Their
Applications (Piscataway, NJ: IEEE Press, 1983).
Reed-Solomon Codes