The second exam will be on Friday, October 28, 2. It will cover Sections.7,.8, 3., 3.2, 3.4 (except 3.4.), 4. and 4.2 plus the handout on calculation of high powers of an integer modulo n via successive squaring. Of course, the material is cumulative, and the listed sections depend on earlier sections, which it is assumed that you still know. Following are some of the concepts and results you should know: Know the meaning of the basic concepts: ring, field, characteristic of a ring, the ring of polynomials R[x]. The characteristic of a field is either or a prime. The number of elements in a finite field is p r, where p is a prime (equal to the characteristic of F ) and r is a positive integer. Know the division algorithm for polynomials (Theorem.8.2). Know how to use successive division (the Euclidean algorithm) to find the greatest common divisor of two polynomials with coefficients in a field. Know the meaning of reducible and irreducible for polynomials. If F is a field, and p(x) is a polynomial of degree 2 or 3, then p(x) is irreducible if and only if p(x) has no roots in F. This is not true if deg(p(x)) 4. Know how to use congruence arithmetic to make the set of congruence classes K = F [x]/(p(x)) into a field when the polynomial p(x) is irreducible. (Theorem.8.4) Know how to use an irreducible polynomial of degree r over the field Z p for a prime p to construct a field with p r elements. (Theorem.8.6) If F is a finite field, the multiplicative group F of nonzero elements of F is a cyclic group. (Theorem.8.8) An element a of a finite field F is a primitive element of F is a is a generator. An irreducible polynomial p(x) Z p [x] is primitive if x = x + (p(x)) = the congruence class of x in the field Z p [x]/(p(x)), is a primitive element of Z p [x]/(p(x)). Know the Caesar cipher, affine cipher, and the Hill cipher. decipher with each. Know how to encipher and Know how the RSA Cryptosystem is defined. Know the relationship between the public and private keys. Know how to compute powers of integers modulo n using Euler s theorem and successive squaring. Know the meaning of linear binary code of length n: subspace of the vector space (F 2 ) n ; and more generally, linear q-ary code of length n: subspace of (F q ) n. F q denotes the finite field with q elements, and elements of (F q ) n are denoted by x = x x 2 x n. C is an [n, k] code over F q if the words of C are of length n, i.e., C (F q ) n, and the dimension of C as a vector space over F q is k.
A generator matrix G for the [n, k] code C is a k n matrix whose rows form a basis of the vector space C. G is in standard form provided G = [I k : A] where I k is the k k identity matrix and A is a k (n k) matrix with entries in F q. If G is a generator matrix for an [n, k] code C, then the code words for C are: { C = xg : x (F q ) k}. In particular, the number of words in (F q ) n is q n, while the number of codewords is q k. Know what a parity check matrix for a linear code is. Know the relationship between parity check matrix and codewords: If C is an (n, k) code over (F q ) and H is a parity check matrix, then c (F q ) n is a codeword if and only if Hc =. If G = [I k : A] is a generator matrix in standard form, then a parity check matrix is H = [ A t : I n k ]. Know the definition of Hamming distance between words, minimum distance of a code C and weight of a codeword. Know the relationship between minimum distance and weight: d(c) = min {w(c) : c C, c = n }. Know what it means to say that a code is an [n, k, d] code. Know the relationship between the minimum distance d of a code C and the ability of C to detect and correct errors under maximum likelihood or nearest neighbor decoding: () C can detect t errors if d t +. (2) C can correct t errors if d 2t +. In particular, if d(c) = 3 then C is -error correcting, and if d(c) = 5 then C is 2-error correcting. Know how to use the parity check matrix H to determine the minimum distance d = d(c) of a linear code C. Specifically, d(c) = d if and only if every set of d columns of H is linearly independent, while some set of d columns of H is linearly dependent. A useful special case of this theorem is the following: If C is a binary linear code with parity check matrix H, then d(c) = 3 if and only if all of the columns of H are different, but one column is the sum of two other columns. Know how to construct a standard array for use in decoding a linear code. (See Page 79.) Know what is a syndrome (Definition 4.2.28), know how to construct a syndrome table, and how to use it to decode linear codes (page 8). Know the definition of the Hamming binary code Ham(r,2) and its parity check matrix H r. Know the definition of the Hamming q-ary code Ham(r, q) and its parity check matrix H r, q. Know the Hamming sphere packing bound (Theorem 4..4) and the definition of perfect code. The Hamming codes are perfect. (Proposition 5.) Review Exercises Be sure that you know how to do all assigned homework exercises. The following are a few supplemental exercises similar to those already assigned as homework. The exercises from the text have solutions and/or answers in the back of the text. 2
. Find all the irreducible polynomials of degree 2, 3, and 4 over Z 2. Solution. The only quadratic polynomial with no roots is p(x) = x 2 +x+, so it is the only irreducible quadratic. The only cubic polynomials with no roots in Z 2 are p (x) = x 3 + x + and p 2 (x) = x 3 + x 2 + so these are the only irreducible cubics. For a polynomial of degree 4 to be irreducible, it must have no roots and it cannot be a product of irreducible quadratics. To have no roots the polynomial must have a constant term and an odd number of nonzero terms. The possible polynomials are x 4 +x+, x 4 +x 2 +, x 4 +x 3 +, and x 4 +x 3 +x 2 +x+. But x 4 + x 2 + = (x 2 + x + ) 2 so it is reducible. Since x 2 + x + is the only irreducible quadratic, the other three polynomials cannot be a product of irreducible quadratics, and hence are irreducible. 2. Nagul-Jain, Page 46, #5 3. Nagul-Jain, Page 46, #6 4. Nagul-Jain, Page 46, #8 5. Nagul-Jain, Page 44, # 6. Nagul-Jain, Page 44, #6 7. Nagul-Jain, Page 59, #7 8. Nagul-Jain, Page 59, #8 9. Compute the minimum distance between any two of the codewords listed in each part. (a),,, (b),,,, (c),,,,, Solution. (a) d = 2; (b) d = 2; (c) d = 2. Let G = be the generator matrix for a binary code C. (a) List all of the codewords of C. (b) Give a parity check matrix for C. (c) What is the minimum distance d of C? How many errors can C detect? How many errors can it correct? (d) Compute a syndrome table for C. (e) Use the table found in the previous step to decode each of the following received messages:,,,, Solution. (a),,,,,,, (b) H = 3
(c) Since any two columns of H are different, but some set of 3 columns is linearly dependent (for example, columns, 4, and 6), Theorem V(3.) shows that d = 3. Hence this code can detect 2 errors and correct error. (d) Syndrome Table for C: Word Syndrome (e) Decoded words:,,,,. Let G = [ ] 2 2 be the generator matrix for a ternary code C. 2 (a) List all of the codewords of C. (b) Give a parity check matrix for C. (c) What is the minimum distance d of C? How many errors can C detect? How many errors can it correct? (d) Compute a syndrome table for C. (e) Use the table found in the previous step to decode each of the following received messages: 22, 2, 2222 Solution. (a), 2, 22, 22,, 2, 2, 22, 222 [ ] (b) H = 2 (c) d = 3 so C detects 2 errors and corrects error. (d) Syndrome Table for C: Word 2 2 2 2 [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ] 2 2 2 Syndrome 2 2 2 (e) Decoded words: 2, 2, 222 2. (a) Write the parity check matrix H 3 for the Hamming binary code Ham(3,2). (b) Using syndrome decoding with H 3, decode the following received words: (i) (ii) (iii) (iv) Solution. (a) H 3 =. The columns the binary representations of the numbers, 2, 3, 4, 5, 6, 7, in that order. This is not the standard form for a parity check matrix but permuting the columns is allowed to get an equivalent code. 4
(b) (i) H 3ˆy = which is the fifth column of H 3, so modify the received word by changing the 5 th digit to get. (ii) H 3ˆy = ˆ so is already a codeword. (iii) H 3ˆy = which is the third column of H 3, so change the third digit to get. (iv) H 3ˆy = which is the fifth column of H 3, so modify the received word by changing the 5 th digit to get. 3. Write down the parity check matrix H 2,7 for the 7-ary [8, 6]-Hamming code and use it to decode the received messages 352346 and 5236. Solution. H 2, 7 = [ ] 2 3 4 5 6 For decoding, compute the syndrome: if y = 352346 then H 2, 7 y T = [ ]. Thus, y is already a codeword. [ ] [ ] 3 If y = 5236 then H 2, 7 y T = = 3 = 3H 6 2 2, 7 e 4. Thus y is decoded by subtracting 3 from the 4th digit to get 5636 for the decoded string. 5