Vous êtes sur la page 1sur 3

UNIVERSITY OF ST ANDREWS School of Mathematics and Statistics MT4516 Finite Mathematics: Solutions 3.

1. Consider the linear code C given 1 1 H= 1 1 1 0 by the parity check matrix 1 1 0 0 0 0 1 0 0 0 0 1

Use syndromes and coset leaders to decode the received words: 110001, 111011 and 001110 . H is in standard form, so a generator matrix 1 0 0 1 G= 0 1 0 1 0 0 1 1 is 1 1 1 0 . 0 0

The codewords are all linear combinations of the rows of G: C = {000000, 100111, 010110, 001100, 110001, 101011, 011010, 111101}. We nd the coset leaders: 000000 100000 010000 001000 000010 000001 101000 100010 100111 000111 110111 101111 100101 100110 001111 000101 010110 110110 000110 011110 010100 010111 111110 110100 001100 101100 011100 000100 001110 001101 100100 101110 110001 010001 100001 111001 110011 110000 011001 010011 101011 001011 111011 100011 101001 101010 000011 001001 011010 111010 001010 010010 011000 011011 110010 111000 111101 011101 101101 110101 111111 111100 010101 011111

Coset leaders and syndromes are: Coset leader 000000 100000 010000 001000 Syndrome 000T 111T 110T 100T Coset leader 000010 000001 101000 100010 Syndrome 010T 001T 011T 101T

w = 110001. Syndrome is 000T , add w + 000000 = 110001. Decode as 110. w = 111011. Syndrome is 110T , add w + 010000 = 101011. Decode as 101. w = 001110. Syndrome is 010T , add w + 000010 = 001100. Decode as 001. 2. Let C be a binary code with 1 0 G= 0 0 generator matrix 0 0 0 1 0 1 1 0 0 1 0 1 0 1 0 0 1 1 0 0 1 0 1 1

(i) Find a parity check matrix for C. G is in standard form, so a parity check matrix 1 1 0 0 1 0 H= 0 0 1 1 0 1 1 1 1 1 0 0

is 0 0 . 1

(ii) Compute the syndromes of the words 0000000, 1000000, 0010000, 0000100, 0000010, 0000001, 1000010, 0000110. Prove that they are coset leaders. a1 a2 a3 a4 Word = 0000000 = 1000000 = 0010000 = 0000100 Syndrome 000T 101T 011T 100T a5 a6 a7 a8 Word = 0000010 = 0000001 = 1000010 = 0000110 Syndrome 010T 001T 111T 110T

All of a1 , . . . , a8 belong to dierent cosets, because their syndromes are dierent. a1 , . . . , a6 must be coset leaders, since a1 has weight zero (the smallest possible) and a2 , . . . , a6 have weight 1 (the next smallest possible). There are only two words of weight 1 which are not coset leaders. The syndrome of 0100000 is 101T , so 0100000 is in the same coset as a2 . The syndrome of 0001000 is 011T , so 0001000 is in the same coset as a3 . Therefore the leaders of the remaining cosets have weight at least 2. (iii) Decode the following received w = 1101011, syndrome 000T , add w = 0110111, syndrome 001T , add w = 0111000, syndrome 101T , add words: 1101011, 0110111, 0111000. w + 0000000 = 1101011, decode as 1101. w + 0000001 = 0110110, decode as 0110. w + 1000000 = 1111000, decode as 1111.

3. For x, y Zn 2 , with x = x1 x2 . . . xn and y = y1 y2 . . . yn , dene the dot product of x and y by x y = x1 y1 + x2 y2 + + x n yn . Prove that this operation satises x y = y x, x (y + z) = x y + x z. We note that x y = x1 y1 + + xn yn = y1 x1 + + yn xn = y x x(y +z ) = x1 (y1 +z1 )+ +xn (yn +zn ) = x1 y1 + +xn yn +x1 z1 + +xn zn = xy +xz For a linear code C Zn 2 , dene its dual by C = {w Zn 2 : v w = 0 for all v C}. Prove the following statements. (i) C is a linear code. To show that C is a linear code we only have to show that it is closed under addition, since the only scalars are 0 and 1 so closure under scalar multiplication is immediate. Let a, b C , then v a = v b = 0 for all v C . So v (a + b) = 0 for all v C . So a + b C . (ii) If G is a generator matrix for C then G is a parity check matrix for C . w C v w = 0 for all v C v w = 0 for every basis vector v of C GwT = 0 since the rows of G are basis vectors (iii) If C has dimension m then C has dimension n m. If dim(C ) = m then a generator matrix for C has size m n, so a parity check matrix for C has size m n. Therefore a generator matrix for C has size (n m) n, and so dim(C ) = n m.

(iv) If H is a parity check matrix for C then H is a generator matrix for C . Let b1 , . . . , bnm be the rows of H . Since Hv T = 0 for all v C it follows that bi v = 0 for 1 i n m and for all v C . Hence b1 , . . . , bnm C . The vectors b1 , . . . , bnm are linearly independent, in a space of dimension n m. Therefore they form a basis for C and so H is a generator matrix for C . 4. Let C be the code with parity check 0 1 1 1 1 1 1 0 1 0 1 0 1 1 0 matrix 0 0 1 0 . 0 1

For each x = x1 . . . x7 C dene x = x1 . . . x7 x8 Z8 2 , where x8 = x1 + . . . + x7 , and let C = {x : x C}. Prove that C is a linear code. Prove that C is self-dual, i.e. that C = C. To show that C is a linear code, we must show that it is a subspace of Z8 2 . To do this we only need to show that it is closed under addition. Let x = (x1 , . . . , x8 ) C and let y = (y1 , . . . , y8 ) C . Then x + y = (x1 + y1 , . . . , x8 + y8 ) Z8 2. Since C is a linear code, (x1 + y1 , . . . , x7 + y7 ) C . Since x1 + x7 = x8 and y1 + + y7 = y8 it follows that x1 + y1 + x7 + y7 = x8 + y8 . Hence x + y C , as required. The given parity check matrix is in 1 0 G= 0 0 standard form, so a generator matrix for C is 0 0 0 0 1 1 1 0 0 1 1 0 0 1 0 1 0 1 0 0 1 1 1 1

A generator matrix for C is therefore 1 0 0 0 1 0 G= 0 0 1 0 0 0

0 0 0 1

0 1 1 1

1 1 0 1

1 0 1 1

1 1 . 1 0

One may check that G(G)T = 0. This means that if a1 , a2 , a3 , a4 are the rows of G then ai aj = 0 for 1 i j 4, and hence that if v is any vector in C then v ai = 0 for 1 i 4. Therefore C C . By Q3(iii) we have dim(C ) = 8 dim(C ) = 4 = dim(C ). Therefore C = C . Another approach: Compute the codewords for C from G. By Q3(ii), G is a parity check matrix for C . Therefore one can compute a generator matrix for C , and use this to get the codewords of C . One can then check that C = C .

Vous aimerez peut-être aussi