Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
III. Cyclic Codes Description of Cyclic Codes Cyclic Shift: v=(v0,v1,v2,…, vn-1) Cyclic shift of v: v(1)=(vn-1,v0,v1,…,vn-2) It means cyclically shifting the components of v one place to the right v(i)=(vn-i, vn-i+1,…, vn-1,v0,v1,…,vn-i-1): cyclically shifting v i places to the right Definition of Cyclic Codes: An (n,k) linear code C is called a cyclic code if every cyclic shift of a codeword in C is also a codeword in C © Tallal Elshabrawy 2 Code Polynomials Each codeword corresponds to a polynomial of degree n-1 or less: For a codeword v=(v0,v1,v2,…, vn-1) the corresponding code polynomial is: v(X)= v0+v1X+v2X2+…+vn-1Xn-1 Code polynomial for v(i): v(i)(X)=vn-i+vn-i+1X+…+vn-1Xi-1+v0Xi+v1Xi+1+…+vn-i-1Xn-1 © Tallal Elshabrawy 3 Example: (7,4) cyclic code Information Message Codeword Code Polynomial (0 0 0 0) (0 0 0 0 0 0 0) 0 (1 0 0 0) (1 1 0 1 0 0 0) 1+X+X3 (0 1 0 0) (0 1 1 0 1 0 0) X+X2+X4 (1 1 0 0) (1 0 1 1 1 0 0) 1+X2+X3+X4 (0 0 1 0) (0 0 1 1 0 1 0) X2+X3+X5 (1 0 1 0) (1 1 1 0 0 1 0) 1+X+X2+X5 (0 1 1 0) (0 1 0 1 1 1 0) X+X3+X4+X5 (1 1 1 0) (1 0 0 0 1 1 0) 1+X4+X5 (0 0 0 1) (0 0 0 1 1 0 1) X3+X4+X6 (1 0 0 1) (1 1 0 0 1 0 1) 1+X+X4+X6 (0 1 0 1) (0 1 1 1 0 0 1) X+X2+X3+X6 (1 1 0 1) (1 0 1 0 0 0 1) 1+X2+X6 (0 0 1 1) (0 0 1 0 1 1 1) X2+X4+X5+X6 (1 0 1 1) (1 1 1 1 1 1 1) 1+X+X2+X3+X4+X5+X6 (0 1 1 1) (0 1 0 0 0 1 1) X+X5+X6 (1 1 1 1) (1 0 0 1 0 1 1) 1+X3+X5+X6 © Tallal Elshabrawy 4 Algebraic Relation between v(X) and v(i)(X) Xiv(X)=v0Xi+v1Xi+1+…+vn-i-1Xn-1+…+vn-1Xn+i-1 Add (vn-i+vn-i+1X+…+vn-1Xi-1) twice Xiv(X)= vn-i+vn-i+1X+…+vn-1Xi-1+ v0Xi+v1Xi+1+…+vn-i-1Xn-1+…+vn-1Xn+i-1+ vn-i+vn-i+1X+…+vn-1Xi-1 Xiv(X)= vn-i+vn-i+1X+…+vn-1Xi-1+v0Xi+v1Xi+1+…+vn-i-1Xn-1+ vn-iXn+vn-i+1Xn+1+…+vn-1Xn+i-1+vn-i+vn-i+1X+…+vn-1Xi-1 =v(i)(X)+(Xn+1)(vn-i+vn-i+1X+…+vn-1Xi-1) Xiv(X)=v(i)(X)+(Xn+1)q(X) © Tallal Elshabrawy v(i)(X) is the remainder of dividing Xiv(X) by (Xn+1) 5 Theorem 1 The nonzero code polynomial of minimum degree in a cyclic code is unique Proof: Let g(X)=g0+ g1X+…+gr-1Xr-1+Xr be a non-zero code polynomial of minimal degree in C If g(X) is not unique, there a exists a code polynomial g’(X) such that: g’(X)=g’0+ g’1X+…+g’r-1Xr-1+Xr For C to be linear g(X)+g’(X) is…… a Codeword. The corresponding code polynomial is: (g0+ g’0)+(g1+ g’1)X+…+(gr-1+ g’r-1)Xr-1 with degree<r THIS CONTRADICTS THE DEFINITION THAT g(X) IS THE NON-ZERO CODE POLYNOMIAL OF MINIMUM DEGREE © Tallal Elshabrawy 6 Theorem 2 Let g(X)=g0+ g1X+…+gr-1Xr-1+Xr be a non-zero code polynomial of minimal degree in an (n,k) cyclic code C. Then g0 must be equal to 1 Proof: Suppose g0=0 g(X)=g1X+…+gr-1Xr-1+Xr If we cyclically shift g(X) 1 place to the left we get another code polynomial g’(X)=g1+g2X…+Xr-2+Xr-1 with degree<r THIS CONTRADICTS THE DEFINITION THAT g(X) IS THE NON-ZERO CODE POLYNOMIAL OF MINIMUM DEGREE Therefore g0=1 © Tallal Elshabrawy 7 From Theorems 1 & 2 The non-zero code polynomial of minimal degree in an (n,k) cyclic code C has the form: g(X)=1+ g1X+g2X2+…+gr-1Xr-1+Xr In the table for the (7,4) cyclic code in slide 4 g(X)=1+X+X3 © Tallal Elshabrawy 8 Cyclic Shifts of the Minimal Degree Polynomial g(X) The polynomials Xg(X), X2g(X),…,Xn-r-1g(X) are cyclic shifts of g(X) where: Xg(X) = g(1)(X) X2g(X) = g(2)(X) They are code : : polynomials Xn-r-1g(X) = g(n-r-1)(X) Given that Xg(X), X2g(X),…, Xn-r-1g(X) are code polynomials in a linear code v(X)= [u0+u1X+u2X2+…+un-r-1Xn-r-1]g(X) is also a code polynomial in C © Tallal Elshabrawy 9 Theorem 3 Let g(X)=1+ g1X+g2X2+…+gr-1Xr-1+Xr be the minimal degree polynomial in an (n,k) cyclic code C. A binary polynomial of degree n-1 or less is a code polynomial if and only if it is a multiple of g(X) Proof: Let v(X) be a binary polynomial of degree n-1 or less such that v(X) is a multiple of g(x). Then: v(X)= [a0+a1X+a2X2+…+an-r-1Xn-r-1]g(X). v(X) is a linear combination of code polynomials, g(X), Xg(X), …Xn-r-1g(X) v(X) is a code polynomial in C Let v(X) be a code polynomial in C v(X)=a(X)g(X)+b(X) where the degree of b(X)<r b(X)=v(x)+a(X)g(X) v(X) is a code polynomial, a(X)g(X) are code polynomials b(X) is also a code polynomial of degree<r g(X) is the minimal degree nonzero polynomial b(X)=0 v(X) is a multiple of g(X) © Tallal Elshabrawy 10 The Number of Code Polynomials From Theorem 3: A code polynomial must be a multiple of g(X) & Any multiple of g(X) is a code polynomial The number of multiples of g(X) of degree<n-1 are: n-r The number of code polynomials are 2n-r k=n-r where k is the number of information bits in the code word, r is the number of parity check bits in the codeword g(X)=1+g1X+g2X2+…+gn-k-1Xn-k-1+Xn-k © Tallal Elshabrawy 11 Theorem 4 In an (n,k) cyclic code, there exists one and only one code polynomial of degree n-k g(X)=1+g1X+g2X2+…+gn-k-1Xn-k-1+Xn-k 1. Every code polynomial is a multiple of g(X) 2. Every binary polynomial of degree n-1 or less that is multiple of g(X) is a code polynomial © Tallal Elshabrawy 12 Generator Polynomial From Theorem 4: Every code polynomial v(X) in an (n,k) cyclic code could be expressed as: v(X)= u(X)g(X) =(u0+ u1X+…+uk-1Xk-1 )g(X) If (u0, u1,…,uk-1) is the information message, v(X) represents the corresponding codeword An (n,k) cyclic code is completely specified by its non zero minimal degree code polynomial g(X) g(X) is called the generator polynomial © Tallal Elshabrawy 13 Theorem 5 The generator polynomial g(X) of an (n,k) cyclic code is a factor of Xn+1 Proof: Multiply g(X) by Xk Xkg(X) has a degree n. By dividing Xkg(X) by Xn+1 Xkg(X)=(Xn+1)+g(k)(X) g(k)(X) is a cyclic shift of g(X) and therefore is a code polynomial g(k)(X) is a multiple of g(X) g(k)(X)=a(X)g(X) Xkg(X)=(Xn+1)+a(X)g(X) (Xn+1)=[XK+a(X)]g(X) Therefore g(X) is a factor of Xn+1 © Tallal Elshabrawy 14 Theorem 6 If g(X) is a polynomial of degree n-k and is a factor of Xn+1, then g(X) generates an (n,k) cyclic code Proof: It is possible to generate 2k polynomials from linear combinations of the polynomials g(X), Xg(X), …,Xk-1g(X) v(X)=(u0+ u1X+…+uk-1Xk-1)g(X)WE HAVE A LINEAR BLOCK CODE IS THIS CODE CYCLIC? Xv(X)=vn-1(Xn+1)+v(1)(X) Since BOTH Xv(X) and (Xn+1) are divisible by g(X), v(1)(X) must be also be divisible by g(X) Therefore v(1)(X) must be a linear combination of g(X), Xg(X), …,Xk-1g(X) Therefore v(1)(X) must be a code polynomial in the (n,k) linear block code © Tallal Elshabrawy 15 Example (X7+1)=(1+X)(1+X+X3)(1+X2+X3) There are two factors of degree 3 Each factor could be used to generate a (7,4) cyclic code © Tallal Elshabrawy 16