You are on page 1of 13

EE 387 December 10, 2012

Algebraic Error-Control Codes Handout #30


Sample Final Examination Solutions
1. True/false questions. Briefly justify each answer.
a. Every group of order 8 has a subgroup of order 4.
b. There is no way to define × to make {0, 1, 2, 3} with modulo 4 addition into a field.
c. Every linear block code has at least one systematic generator matrix G = [ P | I ] .
d. Every systematic linear block code has exactly one systematic generator matrix.
e. The (n, k) cyclic code generated by g(x) = g0 + g1 x + g2 x2 + · · · + gn−k xn−k and the (n, k)
cyclic code generated by the reciprocal polynomial g̃(x) = xn−k g0−1 g(x−1 ) have the same
weight distribution.
f. Every (n, k) Reed-Solomon code can correct burst erasures of length n − k.
g. Consider a t-error-correcting BCH code, and a received senseword with ν < t errors. The
Berlekamp-Massey algorithm at step k ≥ 2ν + 1 will always have discrepancy ∆(k) = 0.

Solution
a. True. Since 8 = 23 , the order of every element of the group is a power of 2. Let m be
the largest order. If m = 8 then the group is cyclic with generator a, hence the subgroup
generated by a2 has order 4. If m = 2 then the group is commutative, and the subgroup
generated by any two nonidentity elements a and b is {e, a, b, ab}, which has order 4. Finally,
if m = 4 then there exists an element of order 4, which generates a subgroup of order 4.
b. True. Since 2 = 1 + 1, by the distributive law 2 × 2 = (1 + 1)(1 + 1) = 1 + 1 + 1 + 1 = 0 mod 4.
Therefore this multiplication has zero divisors and cannot define a field.
c. False. The code generated by the following matrix does not have a systematic generator
matrix.  
1 1 0 0
G=
0 0 1 1
However, the equivalent code obtained by exchanging the two inner columns is systematic.
d. True. A systematic generator matrix of the form G = [ P | I ] is unique because each row
determines the check bits corresponding to a single nonzero message bit.
e. True. Since the minimum distance of a Reed-Solomon code is n − k + 1, every subset of n − k
columns of its check matrix is nonsingular, so n − k erasures can be corrected by solving a
linear system of equations. Burst erasures are merely a special case of random erasures.
f. True. The reciprocal polynomial is the mirror image of the generator polynomial, and the
codewords generated by g̃(x) are reversals of corresponding codewords generated by g(x).
Since mirror images have the same Hamming weight, the two codes have the same weight
distribution.
g. True. By the end of step 2ν the first 2ν partial syndromes have been used to determine the
error locator polynomial. The discrepancy is zero at subsequent steps because the error locator
polynomial coefficients satisfy the linear equations Sj Λν +Sj+1Λν−1 +· · ·+Sj+ν−1 Λ1 +Sj+ν = 0
where 2ν < j ≤ 2t.
2. Computations in GF(1009). Hint: 1009 is prime.
a. In GF(1009) find 9991012 . Hint: calculator not needed.
b. In GF(1009) find 999−1 .
c. In GF(1009) how many primitive elements are there?

Solution

a. Since β 1008 = 1 for every nonzero element β of GF(1009),


9991012 = (−10)1012−1008 = (10)4 = 1000 · 10 = −9 · 10 = −90 = 919 .

b. Use the extended Euclidean algorithm.


ri Qi ai bi
1009 − 0 1
999 − 1 0
10 1 −1 1
9 99 100 −99
1 1 −101 100
Therefore 999−1 = −101 = 908.
c. The multiplicative group of GF(1009) is cyclic of order 1008. For any fixed primitive ele-
ment α, every primitive element is of the form αi where gcd(i, 1009) = 1. Thus the number
of primitive elements is given by the Euler phi function.
1 2 6 8 6 6
φ(1008) = φ(16 · 63) = φ(24 · 32 · 7) = · · · 1008 = · · · 1008 = 288 .
2 3 7 16 9 7
3. Computations in GF(26 ). The finite field GF(26 ) can be defined by the primitive polynomial
p(x) = x6 + x5 + 1. Let α be a primitive element of GF(26 ) such that p(α) = 0.
a. Write Boolean equations or draw a logic circuit for the components (y0 , y1, . . . , y5 ) of the
product y = a · b, where b is the constant α + α4 = (0, 1, 0, 0, 1, 0) .
b. Find the reciprocal in GF(26 ) of 1 + α2 + α4 = (1, 0, 1, 0, 1, 0) .
c. Using the following incomplete table of powers of α, find the logarithm of (1, 0, 0, 1, 0, 1), that
is, the integer k such that αk = (1, 0, 0, 1, 0, 1).

Selected powers of αi in GF(26 )


i 0 8 16 24 32 40 48 56 64
αi 100000 111001 010101 101101 010110 011100 111100 000101 010000

Solution

a. The bits of the product are linear combinations of the input bits. Multiplication by b is

Page 2 of 13 EE 387, Autumn 2012


described by the following matrix over GF(2) and the corresponding Boolean equations.
 
0 1 0 0 1 0 y0 = a2 ⊕ a3 ⊕ a4
0 0 1 0 0 1 y1 = a0 ⊕ a3 ⊕ a4 ⊕ a5
 
1 0 0 1 0 1 y2 = a1 ⊕ a4 ⊕ a5
Mb =  1 1 0 0
 ⇒
 1 1 y3 = a2 ⊕ a5
1 1 1 0 0 0 y4 = a0 ⊕ a3
0 1 1 1 0 0 y5 = a1 ⊕ a2 ⊕ a3
Each row of Mb is obtained from the previous row by shifting once with feedback.
b. The extended Euclidean algorithm for gcd(1 + x2 + x4 , x6 + x5 + 1) yields the reciprocal.
ri (x) Qi (x) ai (x)
110001 − 0
10101 − 1
1010 111 111
1 10 1111
Therefore (1 + α2 + α4 )−1 = 1 + α + α2 + α3 = (1, 1, 1, 1, 0, 0) .
c. Let β = (1, 0, 0, 1, 0, 1). To find k such that αk = β, we multiply β by αj for j = 0, 1, 2, . . .
until we find βαj in the powers of α table. The successive products are obtained by shifting
the previous result one bit with feedback corresponding to x6 + x5 + 1 .
βα0 = 100101
βα1 = 110011
βα2 = 111000
βα3 = 011100 = α40
Since βα3 = α40 , we conclude that β = α40 α−3 = α40−3 = α37 , that is, logα β = 37.
At most 7 scaler multiplications are needed. Alternatively, 7 scaler multiplications could be
performed in parallel and 8 results searched for in an associative memory.

4. Repetition codes vs. Reed-Muller codes. Consider a binary communication channel with a low
signal-to-noise ratio and corresponding raw error rate 10−2 .
a. A very cautious engineer proposes to reduce the error rate by transmitting each bit 8 times.
A complete decoder for the (8,1) repetition code must make an arbitrary decision when the
received sequence has 4 ones and 4 zeroes. Suppose the decoder outputs a random bit in this
situation. Find the bit error rate after decoding.
b. A more knowledgeable engineer proposes a more efficient coding scheme, the Reed-Muller
code R(1, 5), which is a (32,6) binary linear block code with minimum distance 16. This code
has 62 codewords of weight 16 and two other codewords, the zero vector and the all ones
vector. Estimate the bit error rate after decoding. Assume a systematic encoder. State any
simplifying assumptions.
8 8 8 32 32 32
2 = 28 3 = 56 4 = 70 8 = 10518300 9 = 28048800 10 = 64512240

Sample Final Examination Solutions Page 3 of 13


Solution

a. When there are ≥ 5 errors, miscorrection occurs. When there are 4 errors, any decision by the
decoder will be correct exactly half the time (assuming the information bit is equally likely
to be 0 and 1.) The probability of miscorrection equals the bit error rate after decoding:
Pmc = 12 84 (10−2 )4 (0.99)4 + 85 (10−2)5 (0.99)3 + · · · + 88 (10−2 )8
  

≈ 35 · 10−8 · 0.9606 + 56 · 10−10 · 0.9703 + 28 · 10−12 · 0.9801 = 3.42 × 10−7 ,


since the probability of 7 or 8 errors is negligible.
b. The cooked error rate depends on both the encoder—systematic vs. nonsystematic—and the
decoder—complete vs. incomplete or bounded distance. If the encoder is nonsystematic, then
any miscorrection results in a wrong codeword, which causes on average half of the decoded
information bits to be wrong. If the encoder is systematic, then decoder failure introduces no
additional errors.
A bounded-distance decoder will fail when there are 8 errors and fail or miscorrect when
there are 9 or more errors. For a nonsystematic encoder, 8 or more errors result in incorrectly
decoding on average 3 of the 6 information bits, so the error rate after decoding is
Pe = 12 32 32 32
 −2 8 24
 −2 9 25
 −2 32 
8
(10 ) (0.99) + 9
(10 ) (0.99) + · · · + 32
(10 )
1 −10 −11 −10
≈ 2 (8.2640 × 10 + 2.2260 × 10 ) = 4.24 × 10
A complete decoder can correct most errors of weight 8. The probability of miscorrecting
8 errors is the probabilty that the error pattern distance 8 from a codeword of weight 16:
62 · 16
 −2 8
8
(10 ) (0.99)24 = 62 · 12870 · 10−16 · 0.7857 = 6.27 × 10−11
For this more powerful (but in general not feasible) decoder, half the message bits are wrong
with probability about 6 × 10−11 , so the bit error rate after decoding is around 3 × 10−11 .

5. Prime quadratic polynomials. Let GF(q) be a finite field of characteristic p > 2.


a. Show that there exists a prime polynomial over GF(q) of the form x2 + ax + b with a 6= 0.
b. Show that there exists a prime polynomial over GF(q) of the form x2 + x + b.
c. Show that there exists a prime polynomial over GF(q) of the form x2 + ax + 1.
Hint: in GF(pm ) where p > 2, every square a2 has two square roots, a and −a.

Solution

a. It was shown in class that over any finite field there is at least one prime quadratic polynomial;
call it x2 + ax + b. If a 6= 0 then there is nothing more to do. If a = 0, then x2 + b is prime
(that is, b does not have a square root in GF(q)). Using the change of variables x = u + 1, we
obtain the prime polynomial (u + 1)2 + b = u2 + 2u + (b + 1) with linear coefficient 2, which
is nonzero in every field of characteristic greater than 2.
Counting argument. There are (q − 1)2 polynomials of the form x2 + ax + b with a 6= 0, b 6= 0.
The number of polynomials of the form (x − β)(x − γ) with β 6= 0, γ 6= 0 is q−1
2
+ (q − 1) =
q(q − 1)/2 < q − 1.
b. By part (a) there exists a prime polynomial x2 + ax + b with a 6= 0. (Obviously, b 6= 0.) Since

Page 4 of 13 EE 387, Autumn 2012


a 6= 0, the change of variables x = au gives the irreducible polynomial
(au)2 + a(au) + b = a2 u2 + a2 u + b = a2 (u2 + u + b/a2 ) ,
hence u2 + u + b/a2 is prime.
Another solution uses a counting method. The polynomial f (x) = x2 + x has a multiple zero
only if f (z) = 0 and f ′ (z) = 0.
c. The case q = 3 is special. Since −1 = 2 does not have a square root in GF(3), the polynomial
x2 − 2 = x2 + 1 is prime. For q > 3 we use a counting argument. If x2 + ax + 1 is not prime,
then it has two zeroes that are reciprocals. For a = 2ora = −2 the zeroes are −1 and 1,
respectively, with multiplicity 2. The remaining q − 3 nonzero values of GF(q) are paired with
their reciprocals, and each pair (β, β −1) corresponds to a polynomial of the form x2 + ax + 1,
where a = −(β + β −1 ). Therefore the number of reducible polynomials of the form x2 + ax + 1
is at most 3 + (q − 3)/2 = (q + 3)/2. Thus if q > 3 then the number of prime polynomials is
at least (q − 3)/2 > 0.

6. BCH code over GF(5). Let α be a primitive element of GF(25) whose minimal polynomial over
GF(5) is p(x) = x2 + x + 2. Powers of α are given in the following table.

i αi u −(u2 + u)
0 [1 0] = 1 α0 α18
1 [0 1] = z α1 α6
2 [ 3 4 ] = 3 + 4z α2 α19
3 [ 2 4 ] = 2 + 4z α3 α17
4 [ 2 3 ] = 2 + 3z α4 α3
5 [ 4 4 ] = 4 + 4z α5 α6
6 [2 0] = 2 α6 α12
7 [ 0 2 ] = 2z α7 α16
8 [ 1 3 ] = 1 + 3z α8 α24
9 [ 4 3 ] = 4 + 3z α9 α16
10 [4 1] = 4 + z α10 α23
11 [ 3 3 ] = 3 + 3z α11 α8
12 [4 0] = 4 α12 0
13 [ 0 4 ] = 4z α13 α23
14 [2 1] = 2 + z α14 α17
15 [3 1] = 3 + z α15 α13
16 [ 3 2 ] = 3 + 2z α16 α24
17 [1 1] = 1 + z α17 α19
18 [3 0] = 3 α18 α18
19 [ 0 3 ] = 3z α19 α15
20 [ 4 2 ] = 4 + 2z α20 α15
21 [ 1 2 ] = 1 + 2z α21 α8
22 [ 1 4 ] = 1 + 4z α22 α13
23 [ 2 2 ] = 2 + 2z α23 α3

a. Let C1 be the narrow-sense (24, 20) BCH code over GF(5) based on the primitive element α.
Find the generator polynomial for C1 . (You may leave your answer as a product of minimal
polynomial factors.)

Sample Final Examination Solutions Page 5 of 13


b. What is the guaranteed minimum distance of the code C1 ? How many errors can C1 correct?
c. Let C2 be the narrow-sense (24, 20) BCH code over GF(25) based on the primitive element α.
Find the generator polynomial for C2 . (You may leave your answer as a product of minimal
polynomial factors.)
d. What is the guaranteed minimum distance of the code C2 ? How many errors can C2 correct?
e. The partial syndromes of a senseword over GF(25) using code C2 are S1 = 0, S2 = α16 ,
S3 = α15 , and S4 = α8 . Find the error-locator polynomial Λ(x).
f. (Bonus) Find the error locations and error magnitudes for the partial syndromes of part (e).

Solution

a. Since α is a primitive element of GF(25), it can be used to construct a code of blocklength 24.
The generator polynomial of degree 24 − 20 = 4 for a narrow-sense BCH code is the least
common multiple of the minimal polynomials over GF(5) of the first two powers of α, i.e.,
mα1 (x) and mα2 (x). Both minimal polynomials have degree 2.
The minimal polynomials can be computed in several ways. The direct method is to multiply
the linear factors using GF(25) arithmetic.
mα1 (x) = (x − α)(x − a5 ) = x2 − (α + α5 )x + α6
= x2 − ([ 0 1 ] + [ 4 4 ])x + 2 = x2 − 4x + 2 = x2 + x + 2
mα2 (x) = (x − α2 )(x − a10 ) = x2 − (α2 + α12 )x + α12
= x2 − ([ 3 4 ] + [ 4 1 ])x + 4 = x2 − 2x + 4 = x2 + 3x + 4
Another method is to solve linear equations over GF(5). For mα1 (x) = x2 + b1 x + b0 :
" # " # " # " #
0 3 0 1 b0 = −3 = 2
0 = mα1 (α1 ) = α2 + b1 α + b0 ⇔ = + b1 + b0 ⇔
0 4 1 0 b1 = −4 = 1

The solution is b1 = 1 and b0 = 2, or mα1 (x) = x2 + x + 2.


For mα2 (x) = x2 + c1 x + c0 , we obtain another system of linear equations:
" # " # " # " #
0 2 3 1 3c1 + c0 = −2 = 3
0 = mα2 (α2 ) = α2 + c1 α + c0 ⇔ = + c1 + c0 ⇔
0 3 4 0 4c1 = −3 = 2

The solution is c1 = 3 and c0 = 4, or mα2 (x) = x2 + 3x + 4.


The generator polynomial is the product of the minimal polynomials.
g(x) = mα1 (x)mα2 (x) = (x2 + x + 2)(x2 + 3x + 4) = x4 + 4x3 + 4x2 + 3.
We can use the table of powers of α to verify that α and α2 are zeroes of g(x).
b. Because α and α2 are zeroes of the generator polynomial, by the BCH bound, the minimum
distance is at least d = 2 + 1 = 3. Thus C1 can correct at least ⌊(d − 1)/2⌋ = 1 error.
c. The channel alphabet is the same as the decoder alphabet, so the BCH code is a Reed-Solomon
code. The generator polynomial is the product of minimal polynomials over GF(25) of the

Page 6 of 13 EE 387, Autumn 2012


first 4 powers of α. These minimal polynomials are linear. Therefore
g(x) = (x − α)(x − α2 )(x − α3 )(x − α4 )
= (x + α13 )(x + α14 )(x + α15 )(x + α16 ) (using α12 = −1)
= x4 + α11 x3 + α20 x2 + α16 x + α10 (tedious computation)

d. Four consecutive powers of α (i.e., α, α2 , α3 , and α4 ) are zeroes of the generator polynomial.
By the BCH bound, the minimum distance d∗ satisfies d∗ ≥ 4 + 1 = 5. Therefore C2 can
correct at least ⌊(d∗ − 1)/2⌋ = ⌊(5 − 1)/2⌋ = 2 errors.
e. Since other partial syndromes are nonzero, we know that the number of errors is not zero.
Since M1 = [ S1 ] = [ 0 ] is a singular matrix, we know that the number of errors is not one.
Thus we assume that there are two errors and that the error locator polynomial has degree 2.
The coefficients of Λ(x) = 1 + Λ1 x + Λ2 x2 can be found by solving the following system of
linear equations.
" # " #" # " # " #" # " # " #
Λ2 S1 S2 Λ 2 S3 0 α16 Λ2 α15 α3
M2 = =− ⇔ = − 8 = 20
Λ1 S2 S3 Λ 1 S4 α16 α15 Λ1 α α

Since det M2 = S1 S3 − S22 = −α32 = α20 6= 0, we can solve for Λ1 , Λ2 in the above set of
equations. The first row of M2 yields
α16 Λ1 = α3 ⇒ Λ1 = α3−16 = α11 .
Using this value of Λ1 , the second row of M2 gives
α20 = α16 Λ2 + α15 Λ1 = α16 Λ2 + α15 α11 = α16 Λ2 + α26 = α16 Λ2 + α2 ,
and we can solve for Λ2 :
Λ2 = α−16 α20 − α2 = α8 [ 4 2 ] − [ 3 4 ] = α8 ([ 1 3 ]) = α8 α8 = α16 .
 

The error locator polynomial is Λ(x) = 1 + α11 x + α16 x2 .


f. We solve the quadratic equation by a change of variables. Let x = (Λ1 /Λ2 )u = α−5 u = α19 u.
Then
Λ(x) = α16 x2 + α11 x + 1
= α16 (α19 u)2 + α11 (α19 u) + 1
= α6 u2 + α6 u + 1 = α6 (u2 + u + α18 ) .
The zeroes can be found by looking for elements u such that −(u2 + u) = α18 . From the
table, we find that u1 = α0 and u2 = α18 , so x1 = α19 α0 = α19 and x2 = α19 α18 = α13 . From
X1 = α−19 = α5 and X2 = α−13 = α11 , we see that the error locations are i1 = 5 and i2 = 11.
We can solve the 2 × 2 linear system of equations directly.
" # " #−1 " #
Y1 X1 X2 S1
=
Y2 X12 X22
S2
" #−1 " # " #" # " #
α5 α11 0 −21 α 22
α 23
0 α18
= 10 =α = .
α α22 α16 α22 α5 α16 α0

Sample Final Examination Solutions Page 7 of 13


This gives us Y1 = α18 = [ 3 0 ] = 3 and Y2 = α0 = [ 1 0 ] = 1.
Or we can use Forney’s formula. First we compute the coefficients of the error evaluator
polynomial.
Ω0 = S1 = 0
Ω1 = S2 + S1 Λ1 = α16
Thus Ω(x) = α16 x. We also calculate the derivative of the error locator polynomial.
Λ′ (x) = 2α16 x + α11 = (α16 + α16 )x + α11 = α22 x + α11 .
Then we use Forney’s algorithm.
Ω(X1−1 ) α16 α−5 α11
Y1 = − = − = − = −α6 = α18 = [ 3 0 ]
Λ′ (X1−1 ) α22 + α11 α−5 α5
Ω(X2−1 ) α16 α−11 α5
Y2 = − ′ −1 = − 22 11
= − 17 = −α12 = α0 = [ 1 0 ]
Λ (X2 ) α +α α −11 α
We get the same answer: Y1 = [ 3 0 ] = 3 and Y2 = [ 1 0 ] = 1.

7. Comparing two cyclic codes. Let C1 be the (15,5) binary linear block code formed by interleaving
five codewords of the (3,1) repetition code. Let C2 be the binary cyclic code whose codewords
are listed in the following table.
000000000000000 010000111011001 100001110110010 110001001101011
000011101100101 010011010111100 100010011010111 110010100001110
000100110101111 010100001110110 100101000011101 110101111000100
000111011001010 010111100010011 100110101111000 110110010100001
001001101011110 011001010000111 101000011101100 111000100110101
001010000111011 011010111100010 101011110001001 111011001010000
001101011110001 011101100101000 101100101000011 111100010011010
001110110010100 011110001001101 101111000100110 111111111111111
a. Describe the systematic generator matrix of C1 .
b. Find the minimum distance of C1 .
c. Find the weight enumerator A1 (x) of C1 .
d. What is the burst error correcting ability of C1 ?
e. Find the uncorrectable error probability for C1 over a channel with raw error rate 10−4 .
f. Find the generator polynomial of C2 .
g. What is the rate of C2 ?
h. What is the minimum distance of C2 ?
i. What is the burst error correcting ability of C2 ?
j. Find the uncorrectable error probability for C2 over a channel with raw error rate 10−4 .

Solution

a. Each information bit is repeated twice—five and ten bits later. Therefore the generator matrix

Page 8 of 13 EE 387, Autumn 2012


consists of three copies of the 5 × 5 identity matrix.
1 0 0 0 0 1 0 0 0 0 1 0 0 0 0
 
0 1 0 0 0 0 1 0 0 0 0 1 0 0 0
G = [ I5 I5 | I5 ] =  0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 .
 
0 0 0 1 0 0 0 0 1 0 0 0 0 1 0
0 0 0 0 1 0 0 0 0 1 0 0 0 0 1

b. Each nonzero information bit results in two nonzero check bits, so the minimum distance is at
least three. On the other hand, each row of the systematic generator matrix found in part (a)
has weight 3. Therefore d∗ = 3.
c. Each nonzero bit results in two nonzero check bits. If the number of information bits is k,
then the weight of the codeword is 3k . The weight distribution for the information bits is
binomial. Thus there are k5 codewords of weight 3k . The weight enumerator is


5  
X 5
A(x) = x3k = 1 + 5x3 + 10x6 + 10x9 + 5x12 + x15 .
k
k=0

The weight enumerator confirms that the minimum distance of C1 is 3.


d. The (3, 1) repetition code can correct single errors. The interleaved code can correct bursts of
length 5 because each error in such a burst affects only one of the five interleaved codewords.
On the other hand, a burst of length 6 that flips the first and sixth bits will be miscorrected
because both of those bits are in the same codeword. Therefore the burst error correcting
ability of C1 is exactly 5.
e. An interleaved 3-bit codeword is miscorrected if ≥ 2 errors occur in those 3 bits. From the
binomial distribution we obtain the following probability p of an incorrect 3-bit codeword.
p = 32 (10−4 )2 (1 − 10−4) + 33 (10−4 )3 = 3(10−4)2 (0.9999) + 10−12 = 3.0000 × 10−8 .
 

The probability that at least one inner codeword is miscorrected is


1 − (1 − p)5 = 5i=1 5i pi (1 − p)5−i ≈ 5p(1 − p)4 = 1.50 × 10−7 .
P 

f. The generator polynomial is the code polynomial of smallest degree, which is the codeword
with the largest number of zeroes at the right. By inspection, this is 111011001010000, hence
g2 (x) = 1 + x + x2 + x4 + x5 + x8 + x10 .
(The codewords are listed in lexicographic order, so the generator polynomial is a left shift of
the first nonzero codeword in the list.)
g. The number of codewords is M = 32. Therefore the rate of C2 is R = n1 log2 M = 15 5
= 13 .
Note that the rates of C1 and C2 are both 1/3, which justifies comparing these codes.
h. By inspection, the minimum weight is 7. Therefore d∗ = 7. In fact, one codeword of minimum
weight is 111011001010000, the generator polynomial. The weight enumerator of C2 can also
be found by examining each codeword.
A2 (x) = 1 + 15x7 + 15x8 + x15 .

i. A linear block code can correct all bursts of length ≤ l if and only if no nonzero codeword is
the sum of two bursts of length ≤ l. By examining each of the 31 nonzero codewords of C2 ,

Sample Final Examination Solutions Page 9 of 13


we can verify that no codeword is the sum of two burst of length ≤ 5. On the other hand, by
the Rieger bound, the burst error correcting ability is at most (n − k)/2 = 5. Therefore the
burst error correcting ability is 5, the same as C1 .
j. An uncorrectable error occurs when there are four or more bit errors. The probability of an
uncorrectable error is
15  
X 15
Pue = (10−4 )i (1 − 10−4 )15−i
i
i=4
 
15
≈ 10−16 (1 − 10−4 )11 = 1365 · 10−16 · 0.9989 = 1.36 × 10−13 .
4

8. Decoder alphabet GF(212 ). Let α be a primitive element of GF(4096).


a. Let β = α13 . What is the degree of the minimal polynomial over GF(2) of β ?
b. Find the parameters n and k for the narrow-sense triple error correcting binary BCH code
based on powers of β. Hint: 4095 = 315 · 13 = 65 · 63.
c. Find the number of check symbols n−k used by a narrow-sense double error correcting binary
BCH code with blocklength n = 45. Hint: 4095 = 45 · 91 = 15 · 273.

Solution

a. Since 13 is a divisor of 4095, the order of β is 4095/13 = 315. Therefore β does not belong
to any proper subfield (GF(26 ) or GF(24 )), so its minimal polynomial over GF(2) is the
dimension over GF(2) of the field GF(212 ), namely, 12.
b. The generator polynomial of a narrow-sense triple error correcting BCH code is the least com-
mon multiple of the minimal polynomials over GF(2) of β, β 2 , β 3, β 4 , β 5 , β 6. Since β 2 , β 4, β 6
are conjugates of β, β 2 , β 3, respectively, we need only consider the minimal polynomials of
β, β 3 , β 5. In part (a) we found the degree of the minimal polynomial of β. In the same way,
the order of β 3 = α39 is 4095/39 = 105, so β 3 does not belong to a proper subfield and thus
has a minimal polynomial of degree 12. However, β 5 = α65 has order 4095/65 = 63, so β 5
belongs to GF(64) and has a minimal polynomial of degree 6. The degree of the generator
polynomial is the sum of the degrees of its factors, namely, 12 + 12 + 6 = 30. The blocklength
of the code is the order of β, which is 315. The parameters of the code are (n, k) = (315, 285).
c. An element of GF(4096) of order 45 is γ = α4095/45 = α91 . The generator polynomial of a
double error correcting BCH code is the product of the minimal polynomials of γ and γ 3 ,
since γ 2 and γ 4 are conjugates of γ. The order of γ is not a divisor of 63 or of 15, so γ does
not belong to a proper subfield, and its minimal polynomial has degree 12. However, γ 3 has
order 45/3 = 15, so γ 3 belongs to GF(24 ) and its minimal polynomial is of degree 4. The
degree of the generator polynomial is n − k = 12 + 4 = 16, and the code has parameters
(n, k) = (45, 29).

9. BCH codes of blocklength 31. The design minimum distance of a t-error-correcting binary BCH
code is 2t + 1, where t is the number of factors of the generator polynomial
g(x) = lcm(f1 (x), f3 (x), . . . , f2t−1 (x)) .
The factors fi (x) of g(x) are minimal polynomials over GF(2) of αi , where α is primitive.

Page 10 of 13 EE 387, Autumn 2012


a. List the conjugacy classes of the powers of α, represented by exponents. For example, the
conjugacy class of 1 = α0 is {0} and the conjugacy class of α is {1, 2, 4, 8, 16}.
b. Find the number of check bits used by the narrow-sense binary primitive BCH codes of
blocklength 31 and design minimum distance 2t + 1 for t = 1, . . . , 6.
c. The generator polynomials of these BCH codes have zeroes other than α, . . . , α2t . List the
minimum distances guaranteed by the BCH bound for these six codes.

Solution

a. The conjugacy class of 1 = α0 is represented by {0}. The exponents of the elements of


conjugacy classes of the positive powers of α are listed below.
{1, 2, 4, 8, 16} {7, 14, 28, 25, 19}
{3, 6, 12, 24, 17} {11, 22, 13, 26, 21}
{5, 10, 20, 9, 18} {15, 30, 29, 27, 23}
All conjugacy classes have five elements because GF(32) has no nontrivial subfield. All ele-
ments of GF(32) − GF(2) are primitive because the multiplicative group has order 31, which
is prime. In general, if p is prime then GF(2p ) has no subfield except GF(2). However, not
every element of GF(2p ) − GF(2) need be primitive; e.g., GF(211 ) has elements of orders 23
and 89.
b. Using the conjugacy classes found in part (a), we list the exponents of the zeroes of the factors
of the generator polynomials of narrow-sense t-error-correcting codes for t = 1, . . . , 8.
t Conjugacy class n−k
1 {1, 2, 4, 8, 16} 5
2 {3, 6, 12, 24, 17} 10
3 {5, 10, 20, 9, 18} 15
4 {7, 14, 28, 25, 19} 20
5 − 20
6 {11, 22, 13, 26, 21} 25
7 − 25
8 {15, 30, 29, 27, 23} 30
Rows 5 and 7 are empty because the corresponding conjugacy classes were listed in rows 3
and 4. For t = 1, . . . , 4, the BCH bound guarantees that 5t check bits are sufficient to correct
t errors. But for t = 5, no additional check bits are needed because the α9 and α10 are
conjugates of α5 . Similarly, α13 is a conjugate of α11 , so the narrow-sense BCH code for t = 6
is guaranteed to correct 7 errors.
c. The BCH bound says that the minimum distance of a BCH code is at least one more than
the number of consecutive powers of α that are zeroes of the generator polynomial g(x) =
lcm(f1 (x), . . . , f2t−1 (x)). The following table lists the conjugacy classes of odd powers of α,
from which we can determine the number of consecutive powers of α that are zeroes of g(x).

Sample Final Examination Solutions Page 11 of 13


t Conjugacy Consecutive Minimum
class powers distance
1 {1, 2, 4, 8, 16} 2 3
2 {3, 6, 12, 24, 17} 4 5
3 {5, 10, 20, 9, 18} 6 7
4 {7, 14, 28, 25, 19} 10 11
5 − 10 11
6 {11, 22, 13, 26, 21} 14 15
7 − 14 15
8 {15, 30, 29, 27, 23} 30 31
The Hamming bound can be used to show that the error correcting ability is t for t = 1, 2, 3.
It can also be shown that the codes with t = 6 and t = 8 have minimum distances equal to
the BCH bound.

10.Extended Reed-Solomon code. Let C be the linear block code over GF(4) with the following
parity-check matrix.  
1 1 1 1 0
H= .
0 1 β δ 1
(Operation tables for GF(4) are provided below.)
a. Find the rate and minimum distance of C.
b. Find a systematic generator matrix for C of the form G = [ P | I ].
c. Decode the received sequence r = [ 1 1 1 1 1 ].
d. Show that this code is not cyclic. Hint: consider G found in part (b).
GF(4) operation tables
+ 0 0 β δ × 0 1 β δ β β −1
0 0 1 β δ 0 0 0 0 0 0 −
1 1 0 δ β 1 0 1 β δ 1 1
β β δ 0 1 β 0 β δ 1 β δ
δ δ β 1 0 δ 0 δ 1 β δ β

Solution

a. Obviously, n = 5 and n − k = 2, so k = 3. The rate is k/n = 3/5.


All columns of H are nonzero and no column is a scalar multiple of another column. Therefore
the smallest number of linearly dependent columns is 3, hence d∗ ≥ 3. On the other hand,
by the Singleton bound, d∗ ≤ n − k + 1 = 3. Thus the minimum distance is 3. Note: C is a
Hamming code over GF(4).
b. We obtain a systematic parity-check matrix of the form [ I | −P T ] by adding the second row
of H to the first row.
 
  δ β 1 0 0
1 0 δ β 1
H′ = ⇒ G = β δ 0 1 0 
0 1 β δ 1
1 1 0 0 1

Page 12 of 13 EE 387, Autumn 2012


c. The syndrome of r using the check matrix H is
[ 1 1 1 1 1 ] H T = [ 1+1+1+1+0 0+1+β+δ+1 ] = [ 0 1 ] .
The syndrome equals the last column of H, so we conclude that the error location is the last
column and that the error magnitude is 1, that is, ê = [ 0 0 0 0 1 ]. The resulting codeword
estimate is
ĉ = r − ê = [ 1 1 1 1 1 ] − [ 0 0 0 0 1 ] = [ 1 1 1 1 0 ] .
Note that ĉ is the sum of the first two rows of G, that is, ĉ = [ 1 1 ] G.
d. If C were cyclic, then its generator polynomial must be of degree 2, and the first row of
the systematic generator matrix G of part (b) must be the generator polynomial. But
[δ, β, 1, 0, 0] 7→ x2 + βx + δ is not a divisor of x5 + 1, which can be verified by division.
Another proof. The right cyclic shift of the codeword [ 1 1 1 1 0 ] is [ 0 1 1 1 1 ], which is not
a codeword; it fails both equations of the original H.
Another proof:
A more general argument. Over GF(4) the prime factorization of x5 + 1 is (x + 1)(x4 + x3 +
x2 + x + 1). (The zeroes of the second term belong to GF(16) because their multiplicative
order is 5.) Thus there is no generator polynomial over GF(4) of blocklength 5 and degree 2.

Sample Final Examination Solutions Page 13 of 13

You might also like