Cyclic Codes Saravanan Vijayakumaran
[email protected] Department of Electrical Engineering Indian Institute of Technology Bombay August 26, 2014 1 / 25 Cyclic Codes Definition A cyclic shift of a vector v0 v1 ··· vn−2 vn−1 is the vector vn−1 v0 v1 ··· vn−3 vn−2 . Definition An (n; k) linear block code C is a cyclic code if every cyclic shift of a codeword in C is also a codeword. Example Consider the (7; 4) code C with generator matrix 21 0 0 0 1 1 03 60 1 0 0 0 1 17 G = 6 7 40 0 1 0 1 1 15 0 0 0 1 1 0 1 2 / 25 Polynomial Representation of Vectors For every vector v = v0 v1 ··· vn−2 vn−1 there is a polynomial 2 n−1 v(X) = v0 + v1X + v2X + ··· + vn−1X Let v(i) be the vector resulting from i cyclic shifts on v (i) i−1 i n−1 v (X) = vn−i +vn−i+1X +···+vn−1X +v0X +···+vn−i−1X Example v = 1 0 0 1 1 0 1, v(X) = 1 + X 3 + X 4 + X 6 v(1) = 1 1 0 0 1 1 0, v(1)(X) = 1 + X + X 4 + X 5 v(2) = 0 1 1 0 0 1 1, v(2)(X) = X + X 2 + X 5 + X 6 3 / 25 Polynomial Representation of Vectors • Consider v(X) and v(1)(X) 2 n−1 v(X) = v0 + v1X + v2X + ··· + vn−1X (1) 2 3 n−2 v (X) = vn−1 + v0X + v1X + v2X + ··· + vn−2X h 2 n−2i = vn−1 + X v0 + v1X + v2X + ··· + vn−2X n h n−2 n−1i = vn−1(1 + X ) + X v0 + ··· + vn−2X + vn−1X n = vn−1(1 + X ) + Xv(X) • In general, v(X) and v(i)(X) are related by X i v(X) = v(i)(X) + q(X)(X n + 1) i−1 where q(X) = vn−i + vn−i+1X + ··· + vn−1X • v(i)(X) is the remainder when X i v(X) is divided by X n + 1 4 / 25 Hamming Code of Length 7 Codeword Code Polynomial 0000000 0 1000110 1 + X 4 + X 5 0100011 X + X 5 + X 6 1100101 1 + X + X 4 + X 6 0010111 X 2 + X 4 + X 5 + X 6 1010001 1 + X 2 + X 6 0110100 X + X 2 + X 4 1110010 1 + X + X 2 + X 5 0001101 X 3 + X 4 + X 6 1001011 1 + X 3 + X 5 + X 6 0101110 X + X 3 + X 4 + X 5 1101000 1 + X + X 3 0011010 X 2 + X 3 + X 5 1011100 1 + X 2 + X 3 + X 4 0111001 X + X 2 + X 3 + X 6 1111111 1 + X + X 2 + X 3 + X 4 + X 5 + X 6 5 / 25 Properties of Cyclic Codes (1) Theorem The nonzero code polynomial of minimum degree in a linear block code is unique.