Cyclic Codes 1. Definition Linear: 𝑎 0 ,…, 𝑎 𝑛−1 ∈𝐶, 𝑏 0 ,…, 𝑏 𝑛−1 ∈𝐶 ⟹α 𝑎 0 ,…, 𝑎 𝑛−1 +β 𝑏 0 ,…, 𝑏 𝑛−1 ∈𝐶 Cyclic: 𝑐 0 ,…, 𝑐 𝑛−1 ∈𝐶⟹ 𝑐 𝑛−1 , 𝑐 0 ,…, 𝑐 𝑛−2 ∈𝐶
𝑭𝒐𝒓 𝒆𝒙𝒂𝒎𝒑𝒍𝒆: C= 𝟎 𝟎 𝟎 , 𝟎 𝟏 𝟏 , 𝟏 𝟎 𝟏 , 𝟏 𝟏 𝟎 is a 𝒏=𝟑, 𝒌=𝟐 cyclic code 𝒐𝒗𝒆𝒓 𝑮𝑭 𝟐 with 𝒒 𝒌 =𝟒 𝒄𝒐𝒅𝒆𝒘𝒐𝒓𝒅𝒔; C= 𝟎 𝟎 𝟎 , 𝟎 𝟏 𝟐 , 𝟐 𝟎 𝟏 , 𝟏 𝟐 𝟎 , 𝟎 𝟐 𝟏 , 𝟏 𝟎 𝟐 , 𝟐 𝟏 𝟎 , 𝟏 𝟏 𝟏 ,(𝟐,𝟐,𝟐) is a 𝒏=𝟑, 𝒌=𝟐 𝒄𝒚𝒄𝒍𝒊𝒄 𝒄𝒐𝒅𝒆 𝒐𝒗𝒆𝒓 𝑮𝑭 𝟑 with 𝒒 𝒌 =𝟗 𝒄𝒐𝒅𝒆𝒘𝒐𝒓𝒅𝒔.
2. Generating function 𝑐 0 ,…, 𝑐 𝑛−1 ∈𝐶→ 𝑐 0 ,…, 𝑐 𝑛−1 ∈𝐶→ 𝑐 0 + 𝑐 1 𝑥+ 𝑐 2 𝑥 2 +…+ 𝑐 𝑛−1 𝑥 𝑛−1 ∈𝐶 which is a corresponding polynomial for the codeword, Note that generating function is for codeword, not for code, and cannot generate the whole cyclic code ! from now on, codeword and polynomial are the same !
Example: C= 𝟎 𝟎 𝟎 , 𝟎 𝟏 𝟐 , 𝟐 𝟎 𝟏 , 𝟏 𝟐 𝟎 , 𝟎 𝟐 𝟏 , 𝟏 𝟎 𝟐 , 𝟐 𝟏 𝟎 , 𝟏 𝟏 𝟏 ,(𝟐,𝟐,𝟐) is a 𝟑,𝟐 𝒄𝒚𝒄𝒍𝒊𝒄 𝒄𝒐𝒅𝒆 𝒐𝒗𝒆𝒓 𝑮𝑭 𝟑 with 𝒒 𝟐 =𝟗 𝒄𝒐𝒅𝒆𝒘𝒐𝒓𝒅𝒔. The generating functions of the codewords are: 0, x+2 𝒙 𝟐 , 2+ 𝒙 𝟐 , 1+2x, 2x+ 𝒙 𝟐 , 1+2 𝒙 𝟐 , 2+x, 1+x+ 𝒙 𝟐 , 2+2x+ 𝟐𝒙 𝟐
3. Re-define Cyclic code by using generating function ⟹ 𝐶 𝑅 (𝑥)∈𝐶 Linear: 𝑎 𝑥 =𝑎 0 + 𝑎 1 𝑥+…+ 𝑎 𝑛−1 𝑥 𝑛−1 ∈𝐶, 𝑏 𝑥 =𝑏 0 + 𝑏 1 𝑥+…+ 𝑏 𝑛−1 𝑥 𝑛−1 ∈𝐶 ⟹α𝑎(𝑥)+β𝑏(𝑥)∈𝐶
4. Generator polynomial (lowest degree of nonzero codewords)
combine the conditions on “cyclic and linear” together Example: C= 𝟎 𝟎 𝟎 , 𝟎 𝟏 𝟐 , 𝟐 𝟎 𝟏 , 𝟏 𝟐 𝟎 , 𝟎 𝟐 𝟏 , 𝟏 𝟎 𝟐 , 𝟐 𝟏 𝟎 , 𝟏 𝟏 𝟏 ,(𝟐,𝟐,𝟐) is a 𝟑,𝟐 𝒄𝒚𝒄𝒍𝒊𝒄 𝒄𝒐𝒅𝒆 𝒐𝒗𝒆𝒓 𝑮𝑭 𝟑 with 𝒒 𝟐 =𝟗 𝒄𝒐𝒅𝒆𝒘𝒐𝒓𝒅𝒔. The generating functions of the codewords are: 0, x+2 𝒙 𝟐 , 2+ 𝒙 𝟐 , 1+2x, 2x+ 𝒙 𝟐 , 1+2 𝒙 𝟐 , 2+x, 1+x+ 𝒙 𝟐 , 2+2x+ 𝟐𝒙 𝟐 Generator polynomial: g(x)=1+2x or 2+x ? We need monic: 2+x need monic ! The 3rd definition of cyclic code by using generating function: combine the conditions on “cyclic and linear” together Theorem 8.2 implies C = 𝑡 𝑥 𝑔(𝑥) 𝑛 :𝑡(𝑥)∈𝐹[𝑥]
4.2 Property of Factor: Part I 𝒈(𝒙) is unique in this way 𝒈 𝒙 |𝑷 𝒙 , Otherwise 𝑃 𝑥 =𝑢 𝑥 𝑔 𝑥 +𝑣 𝑥 where 0<𝜕𝑣 𝑥 <𝜕𝑔 𝑥 ≤𝑛−1, which implies that 𝑣 𝑥 = [𝑣 𝑥 ] 𝑛 = 𝑃 𝑥 −𝑢 𝑥 𝑔 𝑥 𝑛 = [𝑃 𝑥 ] 𝑛 − [𝑢 𝑥 𝑔 𝑥 ] 𝑛 is a nonzero codeword, i.e. a contradiction. Corollary: 𝒈 𝒙 |𝒄 𝒙 where 𝒄 𝒙 is any codeword, 𝒈 𝒙 | 𝒙 𝒏 −𝟏.
4.3 Property of Factor: Part II, which is the 4th definition of cyclic code, i.e. Th. 8.3 (1) C = 𝑡 𝑥 𝑔(𝑥) 𝑛 :𝑡(𝑥)∈𝐹[𝑥] = 𝑡 𝑥 𝑔 𝑥 :𝑡 𝑥 ∈𝐹 𝑥 , 𝜕𝑡 𝑥 ≤𝑛−𝑟−1 where 𝑟=𝜕𝑔 𝑥 Proof. 𝑡 𝑥 𝑔 𝑥 :𝑡 𝑥 ∈𝐹 𝑥 , 𝜕𝑡 𝑥 ≤𝑛−1−𝑟 ⊇𝐶 because of Lemma 2 ⊇ 𝑡 𝑥 𝑔(𝑥) 𝑛 :𝑡(𝑥)∈𝐹[𝑥] because of Theorem 8.2 ⊇ 𝑡 𝑥 𝑔 𝑥 :𝑡 𝑥 ∈𝐹 𝑥 , 𝜕𝑡 𝑥 ≤𝑛−1−𝑟 𝐨𝐛𝐯𝐢𝐨𝐮𝐬𝐥𝐲 # So 𝒌= 𝒍𝒐𝒈 𝒒 𝑪 = 𝒍𝒐𝒈 𝒒 𝒒 𝒏−𝒓 =𝒏−𝝏𝒈 𝒙
5. One to one correspondence between cyclic code with length n and monic divisor of xn-1 (b) i.e. if 𝒈 𝒙 | 𝒙 𝒏 −𝟏 𝒕 𝒙 𝒈 𝒙 :𝒕 𝒙 ∈𝑭 𝒙 , 𝝏𝒕 𝒙 ≤𝒏−𝒓−𝟏 is a cyclic code.
𝒕 𝒙 𝒈(𝒙) 𝒏 = 𝒕 𝒙 𝒈 𝒙 +v 𝒙 𝒙 𝒏 −𝟏 , and 𝒈 𝒙 | 𝒙 𝒏 −𝟏, (b) If 𝒈 𝒙 | 𝒙 𝒏 −𝟏, 𝐂= 𝒕 𝒙 𝒈 𝒙 :𝒕 𝒙 ∈𝑭 𝒙 , 𝝏𝒕 𝒙 ≤𝒏−𝒓−𝟏 is a cyclic code. Proof. 𝐰𝐞 𝐨𝐧𝐥𝐲 𝐧𝐞𝐞𝐝 𝐭𝐨 𝐩𝐫𝐨𝐯𝐞 𝐭𝐡𝐚𝐭 𝑡 𝑥 𝑔 𝑥 :𝑡 𝑥 ∈𝐹 𝑥 , 𝜕𝑡 𝑥 ≤𝑛−𝑟−1 = 𝑡 𝑥 𝑔(𝑥) 𝑛 :𝑡(𝑥)∈𝐹[𝑥] since 𝑡 𝑥 𝑔(𝑥) 𝑛 :𝑡 𝑥 is a cyclic code. O𝐧𝐥𝐲 𝐧𝐞𝐞𝐝 𝐭𝐨 𝐩𝐫𝐨𝐯𝐞 𝑔 𝑥 | 𝑡 𝑥 𝑔(𝑥) 𝑛 . From the definition of mod, 𝒕 𝒙 𝒈(𝒙) 𝒏 = 𝒕 𝒙 𝒈 𝒙 +v 𝒙 𝒙 𝒏 −𝟏 , and 𝒈 𝒙 | 𝒙 𝒏 −𝟏, It is easy to see that 𝑔 𝑥 | 𝑡 𝑥 𝑔(𝑥) 𝑛 . # For example, for 𝒏=𝟑 𝐨𝐯𝐞𝐫 𝑮𝑭(𝟑), 𝑥 𝑛 −1= 𝑥−1 3 has 𝟒 factors: (1) 𝑔 𝑥 =1 (2) 𝑔 𝑥 =𝑥−1 (3) 𝑔 𝑥 = 𝑥−1 2 = 𝑥 2 +𝑥+1 (4) 𝑔 𝑥 = 𝑥−1 3 = 𝑥 3 −1=0 𝑚𝑜𝑑 𝑥 𝑛 −1. see follows.
𝑔 𝑥 =1 corresponds to C= 𝑡 𝑥 :𝑡 𝑥 ∈𝐹 𝑥 , 𝜕𝑡 𝑥 ≤2 ={(0 0 0), (1 0 0), (2 0 0), …, (2 2 2)} totally 27 codewords, i.e. whole space; (2) 𝑔 𝑥 =𝑥−1 corresponds to C= 𝑡 𝑥 (𝑥−1):𝑡 𝑥 ∈𝐹 𝑥 , 𝜕𝑡 𝑥 ≤1 ={(0 0 0), (2 1 0), (0 2 1), (1 0 2), (1 2 0), (0 1 2), (2 0 1), (1 1 1), (2 2 2)} totally 9 codewords; (3) 𝑔 𝑥 = 𝑥−1 2 = 𝑥 2 +𝑥+1 corresponds to C= 𝑡 𝑥 ( 𝑥 2 +𝑥+1):𝑡 𝑥 ∈𝐹 𝑥 , 𝜕𝑡 𝑥 ≤0 ={(0 0 0), (1 1 1), (2 2 2)} totally 3 codewords; (4) 𝑔 𝑥 = 𝑥−1 3 = 𝑥 3 −1=0 𝑚𝑜𝑑 𝑥 𝑛 −1 corresponds to C={(0 0 0)}.
6. Parity-check polynomial
7. Generator matrix and Parity-check matrix Example: for C ={(0 0 0), (2 1 0), (0 2 1), (1 0 2), (1 2 0), (0 1 2), (2 0 1), (1 1 1), (2 2 2)} over 𝐺𝐹(3) We have 𝒈 𝒙 =𝟐+𝒙, and 𝐺= 2 1 0 0 2 1
Note that the previous form of 𝐺 1 , and the relation 𝑔 𝑥 ℎ 𝑥 = 𝑥 𝑛 −1, imply that one parity check matrix can be 𝐻 1 . Example cont'd: 𝒉 𝒙 = 𝒙 𝟑 −𝟏 𝟐+𝒙 = 𝒙 𝟐 +𝒙+𝟏, and 𝒉 𝒙 = 𝒙 𝟐 +𝒙+𝟏 𝐻= 1 1 1
Encoding example by polynomials: 𝒄 𝒙 =𝒖 𝒙 𝒈(𝒙) 𝑢 𝑥 = 𝑢 0 + 𝑢 1 𝑥+…+ 𝑢 𝑘−1 𝑥 𝑘−1 𝑐 𝑥 = 𝑐 0 + 𝑐 1 𝑥+…+ 𝑐 𝑛−1 𝑥 𝑛−1 … + + + 𝑐 0 , 𝑐 1 ,…, 𝑐 𝑛−1 … × 𝑔 𝑛−𝑘 × 𝑔 𝑛−𝑘−1 × 𝑔 1 × 𝑔 0 𝑢 0 , 𝑢 1 ,…, 𝑢 𝑘−1 … Begin of output: 𝑐 𝑛−1 =𝑢 𝑘−1 𝑔 𝑛−𝑘 End of output: 𝑐 0 = 𝑢 0 𝑔 0
7. Dual code of cyclic code Dual code definition. 𝐶 ⊥ ={ 𝛼 0 , 𝛼 1 ,…, 𝛼 𝑛−1 : 𝛼 0 𝛽 0 + 𝛼 1 𝛽 1 +…+ 𝛼 𝑛−1 𝛽 𝑛−1 =0 𝑓𝑜𝑟 𝑎𝑙𝑙 ( 𝛽 0 , 𝛽 1 ,…, 𝛽 𝑛−1 )∈𝐶} Proposition 1. The dual code of cyclic code is also cyclic. Proof.
For example: 𝑔 𝑥 =𝑥−1 corresponds to a [3,2] cyclic code over GF(3) ={(0 0 0), (2 1 0), (0 2 1), (1 0 2), (1 2 0), (0 1 2), (2 0 1), (1 1 1), (2 2 2)}. We have [3,1] dual cyclic code 𝐶 ⊥ ={(0 0 0), (1 1 1), (2 2 2)} = 𝑡 𝑥 (𝑥−1) 2 :𝑡 𝑥 ∈𝐹 𝑥 , 𝜕𝑡 𝑥 ≤0 .
Proposition 2. C is a [n, k] cyclic code Proposition 2. C is a [n, k] cyclic code. The generator polynomial of is Proof. Step 1: Since generator matrix of is parity check matrix of C, so is a generator matrix of .
Proposition 3. C is a cyclic code. The parity check polynomial of is Step 2: is a generator polynomial of the dual code: 𝑔 (𝑥) ℎ (𝑥) Proposition 3. C is a cyclic code. The parity check polynomial of is 𝑔 𝑥 ℎ 𝑥 = 𝑥 𝑛 −1 ⟹𝑔 𝑥 −1 ℎ 𝑥 −1 =( 𝑥 −𝑛 −1) ⟹ [𝑥 𝑛−𝑘 𝑔 𝑥 −1 ]× [𝑥 𝑘 ℎ 𝑥 −1 ]= 𝑥 𝑛 ( 𝑥 −𝑛 −1) ⟹ 𝑔 (𝑥) ℎ (𝑥)= −(𝑥 𝑛 −1) Proof. From Prop.2, ℎ 𝑥 is generator of 𝑪 ⊥ , so 𝑔 (𝑥) is the parity check of 𝑪 ⊥ .