You are on page 1of 8

Error Control Coding — week 4: Finite fields, cyclic codes, RS codes 1

Solutions to selected problems from Chapters 2, 6, 7


2.13 Exponents of the primitive element α of the finite field GF (2m ) generate all
m m
non-zero elements of that field: {α0 = 1, α, α2 , ..., α2 −2 , α2 −1 = 1}. Addi-
tionally, every element of the field GF (2m ) can be represented as a polynomial
a(α) = a0 + a1 α + a2 α2 .... + am−1 αm−1 ,
where polynomial coefficients are binary, ai ∈ {0, 1}. If we collect coefficients
into a vector
a = (a0 a1 ... am−1 )
we obtain equivalent binary representation of the field elements, using m bits.
To obtain these representations and establish a connection between them, we
use primitive polynomial p(x) of degree m, which generates the field GF (2m ).
In the case of GF (23 ), there are two primitive polynomials that can be used
to generate the field: p0 (x) = 1 + x + x3 and p00 (x) = 1 + x2 + x3 . Let us
use p00 (x). By setting p(α) = 0 (primitive element is a zero of the primitive
polynomial) we obtain the following relation
p(α) = 1 + α2 + α3 = 0 ⇒ α3 = α2 + 1.
From this relation we obtain the polynomial representation of all field ele-
ments:
α4 = α · α3 = α · (α2 + 1) = α3 + α = α2 + α + 1
α5 = α · α4 = α · (α2 + α + 1) = α3 + α2 + α = (α2 + 1) + α2 + α = α + 1
α6 = α · α5 = α · (α + 1) = α2 + α,
and we can also verify that α7 = 1 by
α7 = α · α6 = α · (α2 + α) = α3 + α2 = (α2 + 1) + α2 = 1.
Table 1 lists the elements of GF (23 ), with 4 equivalent representations.

αi polynomial binary (a0 a1 a2 ) decimal order


0 0 000 0 -
α0 1 100 1 1
α1 α 010 2 7
α2 α2 001 4 7
α3 2
α +1 101 5 7
α4 2
α +α+1 111 7 7
α5 α+1 110 3 7
α6 α2 + α 011 6 7

Table 1: Field elements of GF (23 ) generated by p(x) = 1 + x2 + x3

If we use the other primitive polynomial, p0 (x) = 1+x+x3 , we obtain different


representation of the field elements. Thus, when operating on the field, it is
important to know in advance which polynomial is used.
Error Control Coding — week 4: Finite fields, cyclic codes, RS codes 2

By setting p0 (α) = 0, similarly as before, we obtain the relation

p(α) = 1 + α + α3 = 0 ⇒ α3 = α + 1,

which is used to obtain polynomial representation of all field elements starting


from α3 to α6 . We have

α4 = α · α3 = α · (α + 1) = α2 + α
α5 = α · α4 = α · (α2 + α) = α3 + α2 = α2 + α + 1
α6 = α · α5 = α · (α2 + α + 1) = α3 + α2 + α = α2 + 1
α7 = 1.

Table 2 lists the elements of GF (23 ), generated with p(x) = 1 + x + x3 .

αi polynomial binary (a0 a1 a2 ) decimal order


0 0 000 0 -
α0 1 100 1 1
α1 α 010 2 7
α2 α2 001 4 7
α3 α+1 110 3 7
α4 α2 + α 011 6 7
α5 α2 + α + 1 111 7 7
α6 α2 + 1 101 5 7

Table 2: Field elements of GF (23 ) generated by p(x) = 1 + x + x3


Error Control Coding — week 4: Finite fields, cyclic codes, RS codes 3

2.13 for GF (24 )


Elements of GF (24 ) can be represented as polynomials
a(α) = a0 + a1 α + a2 α2 + a3 α3 ,
or as 4-bit long vectors (a0 a1 a2 a3 ).
There are two primitive polynomials of degree 4 that can be used to generate
the field GF (24 ); p0 (x) = x4 + x + 1 and p00 (x) = x4 + x3 + 1. For example,
let us use p0 (x). The equality p0 (α) = 0 gives us the relation
α4 + α + 1 = 0 ⇒ α4 = α + 1,
which we use (see Problem 2.13) to obtain the polynomial representation of
the field elements. Thus, we obtain the elements as shown in Table 3.
αi polynomial (a0 a1 a2 a3 ) integer order
0 0 0000 0 -
α0 1 1000 1 1
α1 α 0100 2 15
α2 α2 0010 4 15
α3 α3 0001 8 5
α4 α+1 1100 3 15
α5 α2 + α 0110 6 3
α6 α3 + α2 0011 12 5
α7 α3 + α + 1 1101 11 15
α8 α2 + 1 1010 5 15
α9 α3 + α 0101 10 5
α10 α2 + α + 1 1110 7 3
α11 α3 + α2 + α 0111 14 15
α12 α3 + α2 + α + 1 1111 15 5
α13 α3 + α2 + 1 1011 13 15
α14 α3 + 1 1001 9 15

Table 3: Field elements of GF (24 ) generated by p(x) = x4 + x + 1

2.18 We perform the division of f (x) = α3 x7 + αx6 + α7 x4 + α2 x2 + α11 x + 1 by


g(x) = x4 + α3 x2 + α5 x + 1, over GF (24 ). The field is generated by p(x) =
x4 + x + 1. Addition is performed modulo-2. The table of field elements
is given in Table 3 from the previous problem and it provides the relations
between the elements. After the division we obtain that
f (x) = (α3 x3 + αx2 + α6 x + α13 ) g(x) + (α11 x3 + α9 x2 + α9 x + α6 ) .
| {z } | {z }
quotient remainder

During the division we exploit the relations of the field elements specified by
Table 3. For example, if we want to add α7 x and α8 x we have that (α7 + α8 )
is equal to
α7 + α8 = (α3 + α + 1) + (α2 + 1) = α3 + α2 + α = α11 .
Error Control Coding — week 4: Finite fields, cyclic codes, RS codes 4

2.19 Solving the given equation system over GF (24 ) yields

x + α5 y + z = α7 (1)
x + αy + α7 z = α9 (2)
α2 x + y + α7 z = α (3)

———————————————–

(1) + (2) ⇒ (α5 + α)y + (α7 + 1)z = (α7 + α9 )


α2 · (2) + (3) ⇒ (α3 + 1)y + (α9 + α6 )z = (α11 + α)

———————————————–

α2 y + α9 z = 1 (4)
α14 y + α5 z = α6 (5)

———————————————–

(4) + α3 · (5) ⇒ (α9 + α8 )z = 1 + α9


α12 z = α7
z = α7+15−12 = α10

———————————————–

(4) ⇒ y = (1 + α9 z)α−2 = (1 + α19 )α−2 = (1 + α4 )α−2 = α−1 = α14

(1) ⇒ x = α7 + α5 y + z = α7 + α4 + α10 = α12

———————————————–
Thus, the solution is (x y z) = (α12 α14 α10 ).

6.6 Any element of GF (24 ) can be represented as a binary polynomial of degree


≤ 3,
a(α) = a0 + a1 α + a2 α2 + a3 α3 .
Multiplication of a field element by α7 yields

α7 · a(α) = a0 α7 + a1 α8 + a2 α9 + a3 α10

Using the list of the field elements of GF (24 ) given in Table 3 we obtain that
the above expression is equivalent to

α7 · a(α) = a0 (1 + α + α3 ) + a1 (1 + α2 ) + a2 (α + α3 ) + a3 (1 + α + α2 )
= (a0 + a1 + a3 ) + (a0 + a2 + a3 )α + (a1 + a3 )α2 + (a0 + a2 )α3

This relation defines the multiplication by α7 and the realization using modulo-
2 adders is illustrated in Figure ??.
Error Control Coding — week 4: Finite fields, cyclic codes, RS codes 5

a3  
 
a2 
 
a1
a0 
Figure 1: Multiplication of an element a(α) from GF (24 ) by α7

6.7 Denote any two elements of the field GF (25 ) by

a(α) = a0 + a1 α + a2 α2 + a3 α3 + a4 α4
b(α) = b0 + b1 α + b2 α2 + b3 α3 + b4 α4

Direct multiplication of two elements yields

a(α) · b(α) = a0 b0 + (a0 b1 + a1 b0 )α + (a0 b2 + a1 b1 + a2 b0 )α2 + (a0 b3 + a1 b2 + a2 b1 + a3 b0 )α3


+(a0 b4 + a1 b3 + a2 b2 + a3 b1 + a4 b0 )α4 + (a1 b4 + a2 b3 + a3 b2 + a4 b1 )α5
+(a2 b4 + a3 b3 + a4 b2 )α6 + (a3 b4 + a4 b3 )α7 + a4 b4 α8

Since the field is generated by the primitive polynomial p(x) = 1 + x2 + x5 ,


from p(α) = 0 we obtain the relations

α5 = α2 + 1
α6 = α(α2 + 1) = α3 + α
α7 = α(α3 + α) = α4 + α2
α8 = α(α4 + α2 ) = α5 + α3 = α3 + α2 + 1

After substituting these relations into the expression for a(α)·b(α), and group-
ing the terms according to the exponent of α, we obtain

a(α) · b(α) = (a0 b0 + a1 b4 + a2 b3 + a3 b2 + a4 b1 + a4 b4 ) +


+(a0 b1 + a1 b0 + a2 b4 + a3 b3 + a4 b2 )α
+(a0 b2 + a1 b2 + a2 b0 + a3 b4 + a4 b3 + a4 b4 )α2
+(a0 b3 + a1 b2 + a2 b1 + a3 b0 + a2 b4 + a3 b3 + a4 b2 + a4 b4 )α3
+(a0 b4 + a1 b3 + a2 b2 + a3 b1 + a4 b0 + a3 b4 + a4 b3 )α4

This relation defines the multiplication in the field GF (25 ) generated by


p(x) = 1 + x2 + x5 , and it can be realized by a sequential circuit using binary
delay elements and modulo-2 adders (see the book and the Problem 6.6). We
leave this as an exercise to the reader.
Error Control Coding — week 4: Finite fields, cyclic codes, RS codes 6

7.1 (extended with additional explanations)


In general, a t-error correcting (N, K) Reed-Solomon code over a field GF (q)
has the generator polynomial

g(x) = (x − ω)(x − ω 2 )...(x − ω 2t ),

where ω is the field element of order N , that is, ω N = 1. The code length N
always divides (q − 1). In practice we often have N = q − 1 and q = 2n . If
N = 2n − 1, then ω = α, where α is the primitive element of the field. Then
we have
g(x) = (x + α)(x + α2 )...(x + α2t ).
The parameters of the code satisfy N − K = 2t.
For the triple error correcting RS code over GF (24 ) from Example 7.2 from
the book, we have t = 3 and N = 24 −1 = 15. Thus, N −K = 6. We conclude
that this is the (15, 9) RS code, whose generator polynomial is

g(x) = (x + α)(x + α2 )(x + α3 )(x + α4 )(x + α5 )(x + α6 )


= α6 + α9 x + α6 x2 + α4 x3 + α14 x4 + α10 x5 + x6

The above generator polynomial is obtained assuming that the field GF (24 )
is generated with the primitive polynomial p(x) = 1 + x + x4 . Note that if the
other primitive polynomial was used to generate the field (in this case, the
possible alternative is p(x) = 1 + x3 + x4 ), we would have obtained different
generator polynomial! Thus, the form of the generator polynomial implicitly
carries the information about the primitive polynomial that generates the
field!
The code polynomial v(x) is obtained by multiplying the information polyno-
mial u(x) with the generator polynomial

v(x) = u(x)g(x) =

= (1 + α5 x + αx4 + α7 x8 )(α6 + α9 x + α6 x2 + α4 x3 + α14 x4 + α10 x5 + x6 ) =

= α6 + (α9 + α11 )x + (α6 + α14 )x2 + (α4 + α11 )x3 + (α14 + α9 + α7 )x4
+α4 x5 + α7 x6 + (1 + α13 )x8 + (α + α11 )x9
+(α + α13 )x10 + α11 x11 + α6 x12 + α2 x13 + α7 x14

= α6 + α2 x + α8 x2 + α13 x3 + α3 x4 + α4 x5 + α7 x6 + α6 x8
+α6 x9 + α12 x10 + α11 x11 + α6 x12 + α2 x13 + α7 x14

where we have used the representation of field elements from Table 3. In


vector notation, the codeword is

v = (v0 v1 ...v14 ) = (α6 α2 α8 α13 α3 α4 α7 0 α6 α6 α12 α11 α6 α2 α7 ).


Error Control Coding — week 4: Finite fields, cyclic codes, RS codes 7

The parity polynomial of the t-error correcting (N, K) RS code is the poly-
nomial h(x) = h0 + h1 x + ... + hK xK of degree K such that
g(x)h(x) = xN − 1
Thus, the parity polynomial is obtained via division h(x) = (xN − 1)/g(x).
For the RS codes over GF (2n ) with N = 2n − 1 this is equivalent to
h(x) = (x + α2t+1 )(x + α2t+2 )...(x + αN )
For the (15, 9) code from our example, the parity polynomial is obtained by
x15 + 1
h(x) = = (x + α7 )(x + α8 )...(x + α15 ).
g(x)
There are several ways to perform encoding of the RS codes:
(a) non-systematic encoding based on the generator polynomial:
the code polynomial is obtained from the information polynomial u(x)
by multiplication with the generator polynomial, v(x) = u(x)g(x)
Multiplication of the two polynomials can be realized by a sequential
circuit (an FIR filter with N − K delay elements whose input is the
information sequence and tap coefficients are the generator polynomial
coefficients g0 , g1 ,...,gN −K . In our case, this realization requires N − K =
2t = 6 delay elements.
(b) systematic encoding based on the generator polynomial:
The code polynomial in the systematic form is given by v(x) = p(x) +
x2t u(x), where the systematic bits appear as last K symbols in the
codeword, and where the polynomial p(x) specifies the parity check
symbols. Since we know that v(x) has to be divisible by g(x), i.e.,
v(x) = a(x)g(x), for some a(x), from the equality v(x) = a(x)g(x) =
p(x) + x2t u(x), we conclude that p(x) is the remainder of the division
p(x) = Rem{x2t u(x)/g(x)}. The circuit that performs the division is
shown in Figure 7.1 in the book (page 239) and it requires N − K delay
elements.
(c) systematic encoding based on the parity polynomial:
the code polynomial in the form v(x) = u(x)(xN − 1)/h(x), can be ob-
tained as the output of the linear feedback shift register, whose connec-
tion coefficients are parity polynomial coefficients h0 ,...,hK (cf. Figure
5.3). The register has K memory elements.
To perform encoding with minimum number of memory elements, we
should compare N and N −K and choose the realization with the smaller
number. In our example, N − K = 6 < K = 9, thus, realizations a) or
b) are preferred.
7.2 The generator polynomial of a double-error correcting RS code over GF (25 ),
of length N = 25 − 1 = 31 is given by
g(x) = (x + α)(x + α2 )(x + α3 )(x + α4 ),
Error Control Coding — week 4: Finite fields, cyclic codes, RS codes 8

where α is the primitive element of the field. Assuming that p(x) = x5 +x2 +1
is used to generate the field, the table of field elements is as given in Appendix
A of the book. Using this table we obtain
g(x) = α10 + α29 x + α19 x2 + α24 x3 + x4
Following the same approach, we find that the generator polynomial of the
triple error correcting code of the same length over the same field is

g(x) = (x + α)(x + α2 )(x + α3 )(x + α4 )(x + α5 )(x + α6 )


= α21 + α24 x + α16 x2 + α24 x3 + α9 x4 + α10 x5 + x6 .

You might also like