fsamp-sol

13
EE 387 December 10, 2012 Algebraic Error-Control Codes Handout #30 Sample Final Examination Solutions 1.  True/false questions.  Briey justify each answer. a. Every group of order 8 has a subgroup of order 4. b. There is no way to dene  × to make  { 0, 1, 2, 3}  with modulo 4 addition into a eld. c. Every linear block code has at least one systemati c gene rator matri x  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) =  g 0  +  g 1 x + g 2 x 2 + ··· + g nk x nk and the (n, k) cyclic code gen era ted by the reciprocal poly nomial ˜ g(x) =  x nk g 1 0  g (x 1 ) have the same weight distribution. f. Ever y (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  e rro rs. The Berlekamp-Massey algorithm at step  k  ≥  2ν  + 1 will always have discrepancy (k) = 0. Solution a. True. Since 8 = 2 3 , the or der of ev er y el ement of the gro up 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  a 2 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 dene a eld. c. False. The code generated by the follo wi ng mat rix does not have a systematic generator matrix. G = 1 1 0 0 0 0 1 1 However, the equivalent code obtained by exchanging the two inner columns is systematic. d. True. A systematic gen er ator 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 th e minimum distanc e 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 re ciprocal poly nomial 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 en d of step 2ν  the rst 2ν  partial syndromes have been used to determine the error locator polynomial. The discrepancy is zero at subsequent steps because the error locator polynomial coecients satisfy the linear equations  S  j Λ ν +S  j +1 Λ ν 1 +··· +S  j +ν 1 Λ 1 +S  j +ν  = 0 where 2ν < j  ≤  2t.

description

aaa

Transcript of fsamp-sol

  • EE 387 December 10, 2012Algebraic 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 + g1x + g2x2 + + gnkx

    nk and the (n, k)cyclic code generated by the reciprocal polynomial g(x) = xnkg10 g(x

    1) have the sameweight 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. TheBerlekamp-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 bethe largest order. If m = 8 then the group is cyclic with generator a, hence the subgroupgenerated by a2 has order 4. If m = 2 then the group is commutative, and the subgroupgenerated 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 22 = (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 generatormatrix.

    G =

    [1 1 0 00 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 rowdetermines 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 kcolumns of its check matrix is nonsingular, so n k erasures can be corrected by solving alinear 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 thecodewords 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 weightdistribution.

    g. True. By the end of step 2 the first 2 partial syndromes have been used to determine theerror locator polynomial. The discrepancy is zero at subsequent steps because the error locatorpolynomial coefficients satisfy the linear equations Sj+Sj+11+ +Sj+11+Sj+ = 0where 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 9991.

    c. In GF(1009) how many primitive elements are there?

    Solution

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

    9991012 = (10)10121008 = (10)4 = 1000 10 = 9 10 = 90 = 919 .

    b. Use the extended Euclidean algorithm.

    ri Qi ai bi1009 0 1999 1 010 1 1 19 99 100 991 1 101 100

    Therefore 9991 = 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 numberof primitive elements is given by the Euler phi function.

    (1008) = (16 63) = (24 32 7) =1

    22

    36

    7 1008 =

    8

    166

    96

    7 1008 = 288 .

    3. Computations in GF(26). The finite field GF(26) can be defined by the primitive polynomialp(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 theproduct 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), thatis, 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 64i 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.

    Mb =

    0 1 0 0 1 00 0 1 0 0 11 0 0 1 0 11 1 0 0 1 11 1 1 0 0 00 1 1 1 0 0

    y0 = a2 a3 a4y1 = a0 a3 a4 a5y2 = a1 a4 a5y3 = a2 a5y4 = a0 a3y5 = 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 010101 11010 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 shiftingthe 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 = 403 = 403 = 37, that is, log = 37.

    At most 7 scaler multiplications are needed. Alternatively, 7 scaler multiplications could beperformed 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 lowsignal-to-noise ratio and corresponding raw error rate 102.

    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 thereceived sequence has 4 ones and 4 zeroes. Suppose the decoder outputs a random bit in thissituation. Find the bit error rate after decoding.

    b. A more knowledgeable engineer proposes a more efficient coding scheme, the Reed-Mullercode R(1, 5), which is a (32,6) binary linear block code with minimum distance 16. This codehas 62 codewords of weight 16 and two other codewords, the zero vector and the all onesvector. Estimate the bit error rate after decoding. Assume a systematic encoder. State anysimplifying assumptions.(8

    2

    )= 28

    (83

    )= 56

    (84

    )= 70

    (328

    )= 10518300

    (329

    )= 28048800

    (3210

    )= 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 thedecoder will be correct exactly half the time (assuming the information bit is equally likelyto be 0 and 1.) The probability of miscorrection equals the bit error rate after decoding:

    Pmc =12

    (84

    )(102)4(0.99)4 +

    (85

    )(102)5(0.99)3 + +

    (88

    )(102)8

    35 108 0.9606 + 56 1010 0.9703 + 28 1012 0.9801 = 3.42 107 ,

    since the probability of 7 or 8 errors is negligible.

    b. The cooked error rate depends on both the encodersystematic vs. nonsystematicand thedecodercomplete vs. incomplete or bounded distance. If the encoder is nonsystematic, thenany miscorrection results in a wrong codeword, which causes on average half of the decodedinformation bits to be wrong. If the encoder is systematic, then decoder failure introduces noadditional errors.

    A bounded-distance decoder will fail when there are 8 errors and fail or miscorrect whenthere are 9 or more errors. For a nonsystematic encoder, 8 or more errors result in incorrectlydecoding on average 3 of the 6 information bits, so the error rate after decoding is

    Pe =12

    ((328

    )(102)8(0.99)24 +

    (329

    )(102)9(0.99)25 + +

    (3232

    )(102)32

    ) 1

    2(8.2640 1010 + 2.2260 1011) = 4.24 1010

    A complete decoder can correct most errors of weight 8. The probability of miscorrecting8 errors is the probabilty that the error pattern distance 8 from a codeword of weight 16:

    62 (168

    )(102)8(0.99)24 = 62 12870 1016 0.7857 = 6.27 1011

    For this more powerful (but in general not feasible) decoder, half the message bits are wrongwith probability about 6 1011, so the bit error rate after decoding is around 3 1011.

    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, weobtain the prime polynomial (u+ 1)2 + b = u2 + 2u+ (b+ 1) with linear coefficient 2, whichis nonzero in every field of characteristic greater than 2.

    Counting argument. There are (q1)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

    (q12

    )+ (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 = a2u2 + a2u+ 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 zeroonly 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 polynomialx2 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 q3 nonzero values of GF(q) are paired withtheir 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+1is at most 3 + (q 3)/2 = (q + 3)/2. Thus if q > 3 then the number of prime polynomials isat least (q 3)/2 > 0.

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

    i i

    0 [ 1 0 ] = 11 [ 0 1 ] = z2 [ 3 4 ] = 3 + 4z3 [ 2 4 ] = 2 + 4z4 [ 2 3 ] = 2 + 3z5 [ 4 4 ] = 4 + 4z6 [ 2 0 ] = 27 [ 0 2 ] = 2z8 [ 1 3 ] = 1 + 3z9 [ 4 3 ] = 4 + 3z

    10 [ 4 1 ] = 4 + z11 [ 3 3 ] = 3 + 3z12 [ 4 0 ] = 413 [ 0 4 ] = 4z14 [ 2 1 ] = 2 + z15 [ 3 1 ] = 3 + z16 [ 3 2 ] = 3 + 2z17 [ 1 1 ] = 1 + z18 [ 3 0 ] = 319 [ 0 3 ] = 3z20 [ 4 2 ] = 4 + 2z21 [ 1 2 ] = 1 + 2z22 [ 1 4 ] = 1 + 4z23 [ 2 2 ] = 2 + 2z

    u (u2 + u)

    0

    18

    1

    6

    2

    19

    3

    17

    4

    3

    5

    6

    6

    12

    7

    16

    8

    24

    9

    16

    10

    23

    11

    8

    12 0

    13

    23

    14

    17

    15

    13

    16

    24

    17

    19

    18

    18

    19

    15

    20

    15

    21

    8

    22

    13

    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 minimalpolynomial 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 minimalpolynomial 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 leastcommon multiple of the minimal polynomials over GF(5) of the first two powers of , i.e.,m1(x) and m2(x). Both minimal polynomials have degree 2.

    The minimal polynomials can be computed in several ways. The direct method is to multiplythe linear factors using GF(25) arithmetic.

    m1(x) = (x )(x a5) = x2 ( + 5)x+ 6

    = x2 ([ 0 1 ] + [ 4 4 ])x+ 2 = x2 4x+ 2 = x2 + x+ 2

    m2(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 m1(x) = x2 + b1x+ b0 :

    0 = m1(1) = 2 + b1 + b0

    [0

    0

    ]=

    [3

    4

    ]+ b1

    [0

    1

    ]+ b0

    [1

    0

    ]

    b0 = 3 = 2

    b1 = 4 = 1

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

    For m2(x) = x2 + c1x+ c0, we obtain another system of linear equations:

    0 = m2(2) = 2 + c1 + c0

    [0

    0

    ]=

    [2

    3

    ]+ c1

    [3

    4

    ]+ c0

    [1

    0

    ]

    3c1 + c0 = 2 = 3

    4c1 = 3 = 2

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

    The generator polynomial is the product of the minimal polynomials.

    g(x) = m1(x)m2(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 minimumdistance 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-Solomoncode. 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 + 11x3 + 20x2 + 16x+ 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 cancorrect 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 + 1x + 2x

    2 can be found by solving the following system oflinear equations.

    M2

    [2

    1

    ]=

    [S1 S2

    S2 S3

    ][2

    1

    ]=

    [S3

    S4

    ]

    [0 16

    16 15

    ][2

    1

    ]=

    [15

    8

    ]=

    [3

    20

    ]

    Since detM2 = S1S3 S22 =

    32 = 20 6= 0, we can solve for 1,2 in the above set ofequations. The first row of M2 yields

    161 = 3 1 =

    316 = 11 .

    Using this value of 1, the second row of M2 gives

    20 = 162 + 151 =

    162 + 1511 = 162 +

    26 = 162 + 2 ,

    and we can solve for 2:

    2 = 16(20 2

    )= 8

    ([ 4 2 ] [ 3 4 ]

    )= 8([ 1 3 ]) = 88 = 16 .

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

    f. We solve the quadratic equation by a change of variables. Let x = (1/2)u = 5u = 19u.

    Then

    (x) = 16x2 + 11x+ 1

    = 16(19u)2 + 11(19u) + 1

    = 6u2 + 6u+ 1 = 6(u2 + u+ 18) .

    The zeroes can be found by looking for elements u such that (u2 + u) = 18. From thetable, we find that u1 =

    0 and u2 = 18, so x1 =

    190 = 19 and x2 = 1918 = 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.[Y1

    Y2

    ]=

    [X1 X2

    X21 X22

    ]1[

    S1

    S2

    ]

    =

    [5 11

    10 22

    ]1[

    0

    16

    ]= 21

    [22 23

    22 5

    ][0

    16

    ]=

    [18

    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 Forneys formula. First we compute the coefficients of the error evaluatorpolynomial.

    0 = S1 = 0

    1 = S2 + S11 = 16

    Thus (x) = 16x. We also calculate the derivative of the error locator polynomial.

    (x) = 216x+ 11 = (16 + 16)x+ 11 = 22x+ 11.

    Then we use Forneys algorithm.

    Y1 = (X11 )

    (X11 )=

    165

    22 + 115=

    11

    5= 6 = 18 = [ 3 0 ]

    Y2 = (X12 )

    (X12 )=

    1611

    22 + 1111=

    5

    17= 12 = 0 = [ 1 0 ]

    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 interleavingfive codewords of the (3,1) repetition code. Let C2 be the binary cyclic code whose codewordsare listed in the following table.

    000000000000000 010000111011001 100001110110010 110001001101011000011101100101 010011010111100 100010011010111 110010100001110000100110101111 010100001110110 100101000011101 110101111000100000111011001010 010111100010011 100110101111000 110110010100001001001101011110 011001010000111 101000011101100 111000100110101001010000111011 011010111100010 101011110001001 111011001010000001101011110001 011101100101000 101100101000011 111100010011010001110110010100 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 104.

    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 104.

    Solution

    a. Each information bit is repeated twicefive 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.

    G = [ I5 I5 | I5 ] =

    1 0 0 0 0 1 0 0 0 0 1 0 0 0 00 1 0 0 0 0 1 0 0 0 0 1 0 0 00 0 1 0 0 0 0 1 0 0 0 0 1 0 00 0 0 1 0 0 0 0 1 0 0 0 0 1 00 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 atleast 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 isbinomial. Thus there are

    (5k

    )codewords of weight 3k . The weight enumerator is

    A(x) =5

    k=0

    (5

    k

    )x3k = 1 + 5x3 + 10x6 + 10x9 + 5x12 + x15 .

    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 oflength 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 miscorrectedbecause both of those bits are in the same codeword. Therefore the burst error correctingability of C1 is exactly 5.

    e. An interleaved 3-bit codeword is miscorrected if 2 errors occur in those 3 bits. From thebinomial distribution we obtain the following probability p of an incorrect 3-bit codeword.

    p =(32

    )(104)2(1 104) +

    (33

    )(104)3 = 3(104)2(0.9999) + 1012 = 3.0000 108 .

    The probability that at least one inner codeword is miscorrected is

    1 (1 p)5 =5

    i=1

    (5i

    )pi(1 p)5i 5p(1 p)4 = 1.50 107 .

    f. The generator polynomial is the code polynomial of smallest degree, which is the codewordwith 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 ofthe first nonzero codeword in the list.)

    g. The number of codewords is M = 32. Therefore the rate of C2 is R =1nlog2M =

    515

    = 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 minimumweight is 111011001010000, the generator polynomial. The weight enumerator of C2 can alsobe 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 isthe 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, bythe Rieger bound, the burst error correcting ability is at most (n k)/2 = 5. Therefore theburst 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 anuncorrectable error is

    Pue =15i=4

    (15

    i

    )(104)i(1 104)15i

    (15

    4

    )1016(1 104)11 = 1365 1016 0.9989 = 1.36 1013 .

    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 codebased on powers of . Hint: 4095 = 315 13 = 65 63.

    c. Find the number of check symbols nk used by a narrow-sense double error correcting binaryBCH 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 belongto any proper subfield (GF(26) or GF(24)), so its minimal polynomial over GF(2) is thedimension 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 thushas 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 generatorpolynomial is the sum of the degrees of its factors, namely, 12+12+6 = 30. The blocklengthof 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 adouble 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 doesnot belong to a proper subfield, and its minimal polynomial has degree 12. However, 3 hasorder 45/3 = 15, so 3 belongs to GF(24) and its minimal polynomial is of degree 4. Thedegree 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 BCHcode is 2t+ 1, where t is the number of factors of the generator polynomial

    g(x) = lcm(f1(x), f3(x), . . . , f2t1(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, theconjugacy 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 ofblocklength 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 theminimum 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 ofconjugacy 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, whichis prime. In general, if p is prime then GF(2p) has no subfield except GF(2). However, notevery element of GF(2p) GF(2) need be primitive; e.g., GF(211) has elements of orders 23and 89.

    b. Using the conjugacy classes found in part (a), we list the exponents of the zeroes of the factorsof the generator polynomials of narrow-sense t-error-correcting codes for t = 1, . . . , 8.

    t Conjugacy class n k1 {1, 2, 4, 8, 16} 52 {3, 6, 12, 24, 17} 103 {5, 10, 20, 9, 18} 154 {7, 14, 28, 25, 19} 205 206 {11, 22, 13, 26, 21} 257 258 {15, 30, 29, 27, 23} 30

    Rows 5 and 7 are empty because the corresponding conjugacy classes were listed in rows 3and 4. For t = 1, . . . , 4, the BCH bound guarantees that 5t check bits are sufficient to correctt errors. But for t = 5, no additional check bits are needed because the 9 and 10 areconjugates of 5. Similarly, 13 is a conjugate of 11, so the narrow-sense BCH code for t = 6is guaranteed to correct 7 errors.

    c. The BCH bound says that the minimum distance of a BCH code is at least one more thanthe number of consecutive powers of that are zeroes of the generator polynomial g(x) =lcm(f1(x), . . . , f2t1(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 Minimumclass powers distance

    1 {1, 2, 4, 8, 16} 2 32 {3, 6, 12, 24, 17} 4 53 {5, 10, 20, 9, 18} 6 74 {7, 14, 28, 25, 19} 10 115 10 116 {11, 22, 13, 26, 21} 14 157 14 158 {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 tothe BCH bound.

    10.Extended Reed-Solomon code. Let C be the linear block code over GF(4) with the followingparity-check matrix.

    H =

    [1 1 1 1 00 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 0 1 1 1 0 0 1 1 0

    0 1 0 0 0 0 01 0 1 0 1 0 1

    1

    0 1 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. Thereforethe 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 aHamming code over GF(4).

    b. We obtain a systematic parity-check matrix of the form [ I | P T ] by adding the second rowof H to the first row.

    H =

    [1 0 10 1 1

    ] G =

    1 0 0 0 1 01 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 ]HT = [ 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 lastcolumn and that the error magnitude is 1, that is, e = [ 0 0 0 0 1 ]. The resulting codewordestimate is

    c = r e = [ 1 1 1 1 1 ] [ 0 0 0 0 1 ] = [ 1 1 1 1 0 ] .

    Note that c is the sum of the first two rows of G, that is, c = [ 1 1 ]G.

    d. If C were cyclic, then its generator polynomial must be of degree 2, and the first row ofthe 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 nota 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 multiplicativeorder 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