Linear Cyclic Codes. Polynomial Word 1 + x + x x 4 + x 5 + x x + x f(x) = q(x)h(x) + r(x),

Similar documents
Linear Cyclic Codes. Polynomial Word 1 + x + x x 4 + x 5 + x x + x

MATH3302 Coding Theory Problem Set The following ISBN was received with a smudge. What is the missing digit? x9139 9

Outline. MSRI-UP 2009 Coding Theory Seminar, Week 2. The definition. Link to polynomials

3. Coding theory 3.1. Basic concepts

Generator Matrix. Theorem 6: If the generator polynomial g(x) of C has degree n-k then C is an [n,k]-cyclic code. If g(x) = a 0. a 1 a n k 1.

Chapter 5. Cyclic Codes

7.1 Definitions and Generator Polynomials

B. Cyclic Codes. Primitive polynomials are the generator polynomials of cyclic codes.

ECEN 604: Channel Coding for Communications

Cyclic Codes. Saravanan Vijayakumaran August 26, Department of Electrical Engineering Indian Institute of Technology Bombay

Section IV.23. Factorizations of Polynomials over a Field

Binary Linear Codes G = = [ I 3 B ] , G 4 = None of these matrices are in standard form. Note that the matrix 1 0 0

Cyclic codes: overview

x n k m(x) ) Codewords can be characterized by (and errors detected by): c(x) mod g(x) = 0 c(x)h(x) = 0 mod (x n 1)

Coding Theory and Applications. Solved Exercises and Problems of Cyclic Codes. Enes Pasalic University of Primorska Koper, 2013

Polynomials. Chapter 4

EE 229B ERROR CONTROL CODING Spring 2005

Fault Tolerance & Reliability CDA Chapter 2 Cyclic Polynomial Codes

Objective: To become acquainted with the basic concepts of cyclic codes and some aspects of encoder implementations for them.

MTH310 EXAM 2 REVIEW

Abstract Algebra: Chapters 16 and 17

Homework 8 Solutions to Selected Problems

Introduction to finite fields

EE512: Error Control Coding

EE512: Error Control Coding

Cyclic codes. Vahid Meghdadi Reference: Error Correction Coding by Todd K. Moon. February 2008

ELG 5372 Error Control Coding. Lecture 12: Ideals in Rings and Algebraic Description of Cyclic Codes

MATH 431 PART 2: POLYNOMIAL RINGS AND FACTORIZATION

Information Theory. Lecture 7

be any ring homomorphism and let s S be any element of S. Then there is a unique ring homomorphism

LECTURE NOTES IN CRYPTOGRAPHY

Algebra Review 2. 1 Fields. A field is an extension of the concept of a group.

: Error Correcting Codes. November 2017 Lecture 2

Chapter 4. Remember: F will always stand for a field.

: Coding Theory. Notes by Assoc. Prof. Dr. Patanee Udomkavanich October 30, upattane

Know the meaning of the basic concepts: ring, field, characteristic of a ring, the ring of polynomials R[x].

U + V = (U V ) (V U), UV = U V.

A family Of Cyclic Codes Over Finite Chain Rings

Negacyclic and Constacyclic codes over finite chain rings June 29, 2008

Coding Theory: Linear-Error Correcting Codes Anna Dovzhik Math 420: Advanced Linear Algebra Spring 2014

ϕ : Z F : ϕ(t) = t 1 =

COMMUTATIVE RINGS. Definition 3: A domain is a commutative ring R that satisfies the cancellation law for multiplication:

Mathematical Foundations of Cryptography

Polynomial Rings. i=0. i=0. n+m. i=0. k=0

g(x) = 1 1 x = 1 + x + x2 + x 3 + is not a polynomial, since it doesn t have finite degree. g(x) is an example of a power series.

Finite Fields and Error-Correcting Codes

Algebra. Modular arithmetic can be handled mathematically by introducing a congruence relation on the integers described in the above example.

March Algebra 2 Question 1. March Algebra 2 Question 1

A Brief Encounter with Linear Codes

Solutions of Exam Coding Theory (2MMC30), 23 June (1.a) Consider the 4 4 matrices as words in F 16

The Golay codes. Mario de Boer and Ruud Pellikaan

Groups, Rings, and Finite Fields. Andreas Klappenecker. September 12, 2002

Lecture 7: Polynomial rings

On Irreducible Polynomial Remainder Codes

Chapter 6 Reed-Solomon Codes. 6.1 Finite Field Algebra 6.2 Reed-Solomon Codes 6.3 Syndrome Based Decoding 6.4 Curve-Fitting Based Decoding

Idempotent Generators of Generalized Residue Codes

Finite Fields. Mike Reiter

where c R and the content of f is one. 1

( 3) ( ) ( ) ( ) ( ) ( )

0 Sets and Induction. Sets

: Error Correcting Codes. October 2017 Lecture 1

MATH32031: Coding Theory Part 15: Summary

Cyclic codes. I give an example of a shift register with four storage elements and two binary adders.

Polynomial Rings. i=0

Notes for Math 345. Dan Singer Minnesota State University, Mankato. August 23, 2006

Combinatória e Teoria de Códigos Exercises from the notes. Chapter 1

Mathematics Department

Rings. EE 387, Notes 7, Handout #10


A field F is a set of numbers that includes the two numbers 0 and 1 and satisfies the properties:

+ 1 3 x2 2x x3 + 3x 2 + 0x x x2 2x + 3 4

Coding Theory ( Mathematical Background I)

7.4: Integration of rational functions

Lecture 12. Block Diagram

1. Algebra 1.5. Polynomial Rings

Irreducible Polynomials over Finite Fields

Math 547, Exam 2 Information.

Chapter 6. BCH Codes

Course MA2C02, Hilary Term 2013 Section 9: Introduction to Number Theory and Cryptography

Error Correction Review

Duadic Codes over Finite Commutative Rings

Algebra for error control codes

Binary Primitive BCH Codes. Decoding of the BCH Codes. Implementation of Galois Field Arithmetic. Implementation of Error Correction

CSE 20: Discrete Mathematics

Discrete Mathematics and Probability Theory Spring 2016 Rao and Walrand Discussion 6B Solution

MATH 361: NUMBER THEORY FOURTH LECTURE

MATH/MTHE 406 Homework Assignment 2 due date: October 17, 2016

Rings. Chapter Definitions and Examples

Mathematical Olympiad Training Polynomials

The extended Golay code

CHAPTER 10: POLYNOMIALS (DRAFT)

Reverse Berlekamp-Massey Decoding

MATH3302. Coding and Cryptography. Coding Theory

CYCLIC SIEVING FOR CYCLIC CODES

Information redundancy

Course 2BA1: Trinity 2006 Section 9: Introduction to Number Theory and Cryptography

Mathematical Journal of Okayama University

We saw in the last chapter that the linear Hamming codes are nontrivial perfect codes.

Lecture 6: Finite Fields

Rings. Chapter 1. Definition 1.2. A commutative ring R is a ring in which multiplication is commutative. That is, ab = ba for all a, b R.

Transcription:

Coding Theory Massoud Malek Linear Cyclic Codes Polynomial and Words A polynomial of degree n over IK is a polynomial p(x) = a 0 + a 1 + + a n 1 x n 1 + a n x n, where the coefficients a 1, a 2,, a n are element of IK with a n = 1 The set of all polynomials p(x) over IK is denoted by IK[x] Elements of IK[x] are added and multiplied in the usual fashion except that since 1 + 1 = 0, we have x k + x k = 0 This implies that p(x) 2 = (a 0 + a 1 x + + a n 1 x n 1 + a n x n ) 2 = a 0 + a 2 x 2 + + a n 1 x 2n 2 + a n x 2n The polynomial p(x) = a 0 + a 1 x + + a n 1 x n 1 of degree at most n 1 over IK may be regarded in general as the word a 0 a 1 a n 1 of length n in IK n For example in n = 7, Polynomial Word 1 + x + x 4 1100100 1 + x 4 + x 5 + x 6 1000111 1 + x + x 3 1101000 If v IK n, then we denote by v(x) its corresponding polynomial For example, if v = 00101111, then v(x) = x 2 + x 4 + x 5 + x 6 + x 7 Division Algorithm Let f(x) and h(x) be in IK[x] with h(x) 0 Then there exists a unique polynomials q(x) and r(x) in IK[x] such that where r(x) = 0 or degree r(x) degree h(x) f(x) = q(x)h(x) + r(x), The polynomial q(x) is called quotient, and r(x) is called the remainder The procedure for finding the quotient and the remainder when f(x) is divided into h(x) is the familiar long division process, but with the arithmetic in IK among the coefficients Also note that since p(x) = p(x), if f(x) = q(x)h(x) + r(x), then r(x) = q(x)h(x) + f(x) We say that f(x) modulo h(x) is r(x) if r(x) is the remainder when f(x) is divided by h(x); we shall write f(x) g(x) mod h(x) if and only if they have the same remainder when divided by h(x); that is if [f(x) g(x)] is divisible by h(x) Theorem 1 If f(x) g(x) mod h(x) then for any p(x), and f(x) + p(x) g(x) + p(x) mod h(x) f(x)p(x) g(x)p(x) mod h(x) The proof follows from the fact that f(x) g(x) 0 mod h(x) A polynomial p(x) of degree greater than one is called reducible, if it is divisible by a polynomial of degree at least one; otherwise we say p(x) is irreducible In general 1 + x is a factor of f(x) if and only if 1 is a root of f(x); that is, if and only if f(1) = 0 Similarly x is a factor of g(x) if and only if g(0) = 0 However finding other irreducible factors of a

Massoud Malek Linear Cyclic Codes Page 2 polynomial is more difficult and at this point is simply a matter of trial and error For n 2, the polynomials p n (x) = 1+x n are reducible These polynomials are important tools for our investigation Since 1 + x 2n = (1 + x n ) 2, we only need to find the factors of 1 + x n, where n is odd Here is a list of all the factors of x n + 1 for 3 n 31, n odd Factorization of 1 + x n n Factorization 3 (1 + x)(1 + x + x 2 ) 5 (1 + x)(1 + x + x 2 + x 3 + x 4 ) 7 (1 + x)(1 + x + x 3 )(1 + x 2 + x 3 ) 9 (1 + x)(1 + x + x 2 )(1 + x 3 + x 6 ) 11 (1 + x)(1 + x + x 9 + x 10 ) 13 (1 + x)(1 + x + x 11 + x 12 ) 15 (1 + x)(1 + x + x 2 )(1 + x + x 4 )(1 + x + x 2 + x 3 + x 4 )(1 + x 3 + x 4 ) 17 (1 + x)(1 + x + x 2 + x 4 + x 6 + x 7 + x 8 )(1 + x 3 + x 4 + x 5 + x 8 ) 19 (1 + x)(1 + x + x 17 + x 18 ) 21 (1 + x)(1 + x + x 2 )(1 + x 2 + x 3 )(1 + x + x 3 ) (1 + x 2 + x 4 + x 5 + x 6 )(1 + x + x 2 + x 4 + x 6 ) 23 (1 + x)(1 + x + x 5 + x 6 + x 7 + x 9 + x 11 ) (1 + x 2 + x 4 + x 5 + x 6 + x 10 + x 11 ) 25 (1 + x)(1 + x + x 2 + x 3 + x 4 )(1 + x 5 + x 10 + x 15 + x 20 ) 27 (1 + x)(1 + x + x 2 )(1 + x 3 + x 6 )(1 + x 9 + x 18 ) 29 (1 + x)(1 + x + + x 27 + x 28 ) 31 (1 + x)(1 + x 2 + x 5 )(1 + x 3 + x 5 )(1 + x + x 2 + x 3 + x 5 ) (1 + x + x 2 + x 4 + x 5 )(1 + x + x 3 + x 4 + x 5 )(1 + x 2 + x 3 + x 4 + x 5 ) Table 1 Idempotent Polynomials We denote by R n, the ring of all polynomials modulo 1 + x n A polynomial I(x) R n is called idempotent, if I(x) 2 I(x) mod 1 + x n For example, x 3 +x 6 mod 1+x 9 is an idempotent It is easy to show that if u(x) and v(x) are idempotents, so is their sum u(x) + v(x) and product u(x)v(x) mod 1 + x n Thus we need to construct only a basic set of idempotent polynomial To obtain this basic set for an odd n, we need to partition Z n = {0, 1,, n 1} into classes called cyclotomic cosets Let Ĉi = {s = 2 j i mod n : j = 0, 1,, r} For example, for n = 9, Ĉ 0 = {0}, Ĉ 1 = {1, 2, 4, 8, 7, 5}, Ĉ 3 = {3, 6} Next for each class Ĉi we form a polynomial c i (x) = j Ĉ i x j We claim that c i (x) is an idempotent in R n To see this note that, c i (x) 2 = c i (x 2 ) = x 2j = x k mod (1 + x n ) j Ĉ i k Ĉ i since if j Ĉi, then so is 2j mod n In R 9 all the idempotents are generated by I 1 (x) = 1, I 2 (x) = x 3 + x 6, and I 3 (x) = x + x 2 + x 4 + x 5 + x 7 + x 8

Massoud Malek Linear Cyclic Codes Page 3 There are exactly 7 different idempotents To obtain an idempotent in R n for even n = 2m, first we find an idempotent I(x) of R m, then J(x) = I(x) 2 mod n will be an idempotent in R n For example, I(x) = x + x 2 + x 3 + x 4 is an idempotent in R 5, hence J(x) = I(x) 2 = x 2 + x 4 + x 6 + x 8 is an idempotent in R 10 Exercises Find a basic set of idempotents in (a) : R 7, (b) : R 11, (c) : R 12 The Euclidean Algorithm The greatest common divisor (or gcd) of two polynomials f(x), g(x) IK[x] is the polynomial d(x) IK[x] of largest degree such that f(x) = q 1 (x)d(x) and g(x) = q 2 (x)d(x) In which case we will denote this by gcd(f(x), g(x)) = d(x) Given f(x), g(x) IK[x] with degree f(x) degree g(x) and g(x) 0 Step 1 Initialize r 0 (x) = f(x), r 1 (x) = g(x), i = 1 Step 2 While r i (x) > 0, divide r i (x) > 0 into r i 1 (x) and let r i+1 (x) be the remainder That is r i+1 = r i 1 (x) mod r i (x) Increment i and repeat Step 3 r i (x) = 0 Then gcd(f(x), g(x)) = r i 1 (x) Using induction one can prove the following: Theorem 2 If gcd(f(x), g(x)) = d(x), then there exist polynomials t(x), s(x) IK[x] such that t(x)f(x) + s(x)g(x) = d(x) Example 1 If f(x) = x 2 + x 3 + x 6 + x 7 and g(x) = 1 + x 3 + x 4 + x 5, then find gcd(f(x), g(x)) Set i = 0, r 0 (x) = f(x) and r 1 (x) = g(x) Dividing r 1 (x) into r 0 (x) yields, x 7 + x 6 + x 3 + x 2 = (x 5 + x 4 + x 3 + 1)(1 + x 2 ) + (x 4 + 1) Thus r 2 (x) = 1 + x 4 and q 2 (x) = 1 + x 2 Dividing r 2 (x) into r 1 (x) yields, Thus r 3 (x) = 1 + x 2 and q 3 (x) = 1 + x Next 1 + x 3 + x 4 + x 5 = (1 + x 4 )(1 + x) + (x + x 3 ) x + x 3 = (1 + x 2 )(x) + 0, so r 5 (x) = 0 Since the last nonzero remainder is r 4 (x) = 1+x 2, r 4 (x) is the required common divisor of f(x) and g(x): 1 + x 2 = gcd(x 2 + x 3 + x 6 + x 7, 1 + x 3 + x 4 + x 5 ) Exercises Find the greatest common divisor of each of the following pairs of polynomials (a) f(x) = 1 + x + x 5 + x 6 + x 7, g(x) = 1 + x + x 3 + x 5 (b) f(x) = 1 + x + x 2 + x 3 + x 4, g(x) = x + x 3 + x 4

Massoud Malek Linear Cyclic Codes Page 4 Polynomial Construction of Cyclic Codes We now begin the study of a class of codes, called cyclic codes These codes have a slick representation in terms of polynomials Cyclic codes are an important class of codes for many reasons One is that they can be efficiently encoded by means of shift registers There are also decoding schemes utilizing shift registers Many important codes such as the Golay codes, the Hamming codes, and BCH codes can be represented as cyclic codes Furthermore, much is known theoretically about cyclic codes, which enhances their practical applications Let v be a word of length n and let P n be a full cycle permutation matrix obtained from the identity matrix I n by moving its first row to the last row The cyclic shift σ(v), of v is the word vp n ; that is the word obtained from v by moving its last digit to the beginning of the word, all other digits moving one position to the right For example v 01101 000111 1101 σ(v) 10110 1000111 1110 A code C is said to be a cyclic code, if the cyclic shift of each codeword is also a codeword For example, the linear code C = {000, 110, 011, 101} is cyclic To see that we compute σ(v) for all v C σ(000) = 000, σ(110) = 011, σ(011) = 101, and σ(101) = 110 The linear code C 1 = {0000, 1100, 0011, 1111} is not cyclic but C 2 = {0000, 1010, 0101, 1111} which is equivalent to C 1 is cyclic The codes IK and {θ} are also cyclic; they are called improper cyclic codes Otherwise, the code is a proper cyclic code Note that the cyclic shift σ(v) = vp n is a linear transformation Hence to construct a cyclic code, we pick a word, v, form a set S consisting of v and all of its cyclic shifts, S = {v, σ(v), σ(v 2 ),, σ(v n 1 } = {v, vp n, vp 2 n,, vp n 1 n } and define C to be the linear span of S; that is C =< S > C is called the smallest linear cyclic code containing v For example, if v = 0101, then S = {0101, 1010, } and C =< S >= {0000, 0101, 1010, 1111} We say v is a generator of the linear cyclic code C Note that σ(v) is also a generator of C In general we choose the generator to be the codeword, where its corresponding polynomial v(x) has the least degree In all that follows, we assume that the corresponding polynomial v(x) to a generator word has the least degree We shall prove that this polynomial is unique If v is a codeword of a linear cyclic code of length n, then σ(v) corresponds to the polynomial xv(x) mod (1+x n ) For cyclic codes we refer to the codewords in C and polynomials in C(x) We can now restate the definition of cyclic codes in terms of polynomials: Given a word v of length n, the cyclic shifts of v corresponds to the polynomials x i v(x) mod (1 + x n ) for i = 1, 2,, n 1 To construct a linear cyclic code of length n and dimension k, one must find a factor of 1 + x n having degree n k Of course there may be several choices or none for given n and k There is also the question of minimum distance; a question which is not settled in general

Massoud Malek Linear Cyclic Codes Page 5 Example 2 Let n = 7 and v = 0001011 Then v(x) = 1 + x + x 3 Word Polynomial ( mod (1 + x 7 ) ) 1101000 v(x) = 1 + x + x 3 0110100 xv(x) = x + x 2 + x 4 0011000 x 2 v(x) = x 2 + x 3 + x 5 0001101 x 3 v(x) = x 3 + x 4 + x 6 1000110 x 4 v(x) = x 4 + x 5 + x 7 1 + x 4 + x 5 mod (1 + x 7 ) 0100011 x 5 v(x) = x 5 + x 6 + x 8 x + x 5 + x 6 mod (1 + x 7 ) 1010001 x 6 v(x) = x 6 + x 7 + x 8 1 + x 2 + x 6 mod (1 + x 7 ) Lemma 1 Let C be a cyclic code of length n and let v C Then for any polynomial p(x), is a codeword of C(x) c(x) p(x)v(x) mod (1 + x n ) Proof Let p(x) = a 0 + a 1 x + + x m and p be its corresponding word in IK n, then from p(x)v(x) = a 0 v(x)+a 1 xv(x)+ +x m v(x), we obtain the word c = pv = a 0 v +σ(v)+ +a m σ m (v) of length n This word c must be a codeword of the linear cyclic code C Thus we conclude that c(x) p(x)v(x) mod (1 + x n ) is a codeword of C(x) Theorem 3 Let C be a cyclic code of length n, then: (i) Among all the nonzero codewords of C, there is a unique codeword g such that g(x) has minimum degree (ii) g(x) divides any polynomial in C(x) (iii) If degree g(x) = n k, then the codewords g, σ(g),, σ k 1 (g) corresponding to the polynomials g(x), xg(x),, x k 1 g(x) form a basis for C (iv) C has dimension k Proof (i) : Suppose there are two polynomials g(x) and g (x) of minimum degree Now suppose that this minimum degree is n k, then a contradiction follows from the facts that h(x) = g(x) + g (x) C(x) and x n k + x n k = 0 (ii) : Let c(x) C(x), then by the Division Algorithm, we have c(x) = g(x)q(x) + r(x) which implies that r(x) = g(x)q(x) + c(x) Lemma 1 and the fact that C is linear imply that r(x) C(x) Since all the members of C(x) have higher degrees than g(x), we conclude that r(x) = 0 (iii) : First we show the linear independence Suppose for some α 0, α 1,, α k 1, α 0 g + α 1 σ(g) + + α k 1 σ k 1 g = θ Then α 0 g(x) + α 1 xg(x) +, α k 1 x k 1 g(x) 0 mod (1 + x n ) Since the word associated to the polynomial 1 + x n has length n + 1, we conclude that α 0 = α 1 = = α k 1 = 0 Since g(x) divides any polynomial in c(x) C(x), we have c(x) = a(x)g(x), where a(x) = a 0 +a 1 x+ +a k 1 x k 1 Thus c(x) = a 0 g(x)+a 1 xg(x)+ +a k 1 x k 1 g(x) and g(x), xg(x),, x k 1 g(x) is a basis for C(x) Obviously (iv) follows from (iii) Theorem 4 Let C be a linear cyclic code of length n (i) g(x) is the generator polynomial for C of length n, if and only if g(x) divides 1 + x n (ii) There is a unique idempotent polynomial which generates the code Proof (i) : By the Division Algorithm, 1 + x n = g(x)q(x) + r(x) with r(x) = 0 or the degree of r(x) is less than the degree of g(x) Equivalently r(x) = g(x)q(x) + (1 + x n ) But we have

Massoud Malek Linear Cyclic Codes Page 6 r(x) = g(x)q(x) + (1 + x n ) g(x)q(x) mod (1 + x n ) Thus r(x) C(x) Since g(x) has minimum degree, we conclude that r(x) = 0 (ii) : We prove it for odd n Suppose g(x)h(x) = 1 + x n Then gcd ( g(x), h(x) ) = 1 and by Euclidean Algorithm, there exists polynomials t(x), s(x) IK[x] such that Multiplying both sides by t(x)g(x) gives, 1 = t(x)g(x) + s(x)h(x) t(x)g(x) = [t(x)g(x)] 2 + [t(x)s(x)(1 + x n ) [t(x)g(x)] 2 mod (1 + x n ) Thus t(x)g(x) is an idempotent in R n and g(x) = gcd (t(x)g(x), 1 + x n ) Corollary 41 The generator polynomial g(x) for the smallest cyclic code of length n containing the word v ( polynomial v(x) ) is the greatest common divisor of v(x) and 1 + x n Proof If g(x) is the generator polynomial then g(x) divides both v(x) and 1 + x n Since C is the smallest linear cyclic code containing v, g(x) must be in {v(x), xv(x),, x n 1 v(x)}, thus we have g(x) p(x)v(x) mod (1 + x n ) or equivalently Theorem 2 then completes the proof g(x) = p(x)v(x) + q(x)(1 + x n ) Remark According to theses theorems and the above corollary, in order to construct a linear cyclic code of length n, we simply need to factorize 1 + x n and choose one or a product of some of its factors as a generator polynomial Since 1 + x generates a code which contains almost every word in IK n, it would be hard to detect errors with the code, so there is no much use for a code with g(x) = 1 + x Also note that for n = 3, 5, 11, 13, 19, and 29, codes not generated by 1 + x will have only two codewords consisting of all zeros or all ones Thus we may delete those rows in Table 1 and replace the table with the following smaller table Factorization of 1 + x n n Factorization 7 (1 + x)(1 + x + x 3 )(1 + x 2 + x 3 ) 9 (1 + x)(1 + x + x 2 )(1 + x 3 + x 6 ) 15 (1 + x)(1 + x + x 2 )(1 + x + x 4 )(1 + x + x 2 + x 3 + x 4 )(1 + x 3 + x 4 ) 17 (1 + x)(1 + x + x 2 + x 4 + x 6 + x 7 + x 8 )(1 + x 3 + x 4 + x 5 + x 8 ) 21 (1 + x)(1 + x + x 2 )(1 + x 2 + x 3 )(1 + x + x 3 ) (1 + x 2 + x 4 + x 5 + x 6 )(1 + x + x 2 + x 4 + x 6 ) 23 (1 + x)(1 + x + x 5 + x 6 + x 7 + x 9 + x 11 ) (1 + x 2 + x 4 + x 5 + x 6 + x 10 + x 11 ) 25 (1 + x)(1 + x + x 2 + x 3 + x 4 )(1 + x 5 + x 10 + x 15 + x 20 ) 27 (1 + x)(1 + x + x 2 )(1 + x 3 + x 6 )(1 + x 9 + x 18 ) 31 (1 + x)(1 + x 2 + x 5 )(1 + x 3 + x 5 )(1 + x + x 2 + x 3 + x 5 ) (1 + x + x 2 + x 4 + x 5 )(1 + x + x 3 + x 4 + x 5 )(1 + x 2 + x 3 + x 4 + x 5 ) Table 2

Massoud Malek Linear Cyclic Codes Page 7 A good choice for a linear cyclic code of length n is the one that has a dimension k n/2 So we should also omit all the factors with a degree larger than n/2 such as 1 + x 5 + x 10 + x 15 + x 20 in 1 + x 25 or 1 + x 9 + x 18 in 1 + x 27 Theorem 4 also tells us that each linear cyclic code contains exactly one idempotent Here is a list of cyclotomic cosets for some of the values of n: n = 7 : Ĉ 0 = {0}, Ĉ 1 = {1, 2, 4}, Ĉ 3 = {3, 5, 6} n = 9 : Ĉ 0 = {0}, Ĉ 1 = {1, 2, 4, 5, 7, 8}, Ĉ 3 = {3, 6} n = 15 : Ĉ 0 = {0}, Ĉ 1 = {1, 2, 4, 8}, Ĉ 3 = {3, 6, 9, 12}, Ĉ 5 = {5, 10}, Ĉ 7 = {7, 11, 13, 14} n = 23 : Ĉ 0 = {0}, Ĉ 1 = {1, 2, 3, 4, 6, 8, 9, 12, 13, 16, 18}, Ĉ 5 = {5, 7, 10, 11, 14, 15, 17, 19, 20, 21, 22} Example 3 Let n = 8 and v = 11011000, ie v(x) = 1 + x + x 3 + x 4 The greatest common divisor of 1 + x 8 and v(x) is g(x) = 1 + x 2 Thus g = 10100000 generates the smallest cyclic code C containing v Note that C has dimension 8 2 = 6 The following matrix 1 0 1 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0 0 0 0 1 G = 1 0 0 1 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 1 0 0 1 0 is a generator matrix of C but is not in RREF form An alternative way of finding a generator matrix is to create a matrix M using v and σ i (v), i = 1, 2,, 8 Then simple row reduction will produce a generator matrix Exercises Find the generator polynomial for the smallest linear cyclic code containing that word (a) : v = 0110110, (b) : v = 0101100 Polynomial Encoding and Decoding Let C be a linear cyclic code of length n and dimension k (so its generator polynomial g(x) has degree n k) The k information digits a = (a 0, a 1,, a k 1 ) to be encoded can be thought of as a polynomial a(x) = a 0 +a 1 x+ a k 1 x k 1 called information or message polynomial Encoding consists simply multiplying a(x) by g(x); that is, a(x) is encoded as v(x) a(x)g(x) mod (1 + x n ) So instead of storing the entire k n generator matrix, one only has to store the generator polynomial, which is a significant improvement in terms of complexity of encoding The inverse operation to polynomial multiplication is polynomial division Hence finding the message corresponding to the closest codeword to the received code w(x) = v(x)+u(x) consists of dividing w(x) by g(x), thus recovering the message a(x) The syndrome polynomial, s(x), is defined by s(x) w(x) mod g(x) Assuming g(x) has degree n k, then s(x) will have degree less than n k and will correspond to a binary word s of length n k Since w(x) = v(x) + u(x) and v(x) = a(x)g(x) we have that s(x) u(x) mod g(x) We see that the syndrome polynomial is dependent only on the error Parity-check matrix We can define an n (n k) matrix H, where the i th row r i is the word of length n k corresponding to r i (x) x i mod g(x) i = 0, 1, n 1 It turns out that

Massoud Malek Linear Cyclic Codes Page 8 this matrix is a parity-check matrix for the code For, if w is a received word then n 1 w(x) = v(x) + u(x) wh = (v + u)h = (v i + u i )r i n 1 n 1 n 1 (v i + u i )r i (x) v i x i mod g(x) u i x i mod g(x) i=0 i=0 0 mod g(x) + u(x) mod g(x) = s(x) Then s(x) = 0 if and only if w(x) C(x), so H is a parity-check matrix Example 4 Let n = 7, and g(x) = 1 + x + x 3, then n k = 3 We produce H as follows: i=0 i=0 r(x) g(x) = 1 + x + x 3 H r 0 (x) = 1 mod g(x) = 1 1 0 0 r 1 (x) = x mod g(x) = x 0 1 0 r 2 (x) = x 2 mod g(x) = x 2 0 0 1 r 3 (x) = x 3 mod g(x) = 1 + x 1 1 0 r 4 (x) = x 4 mod g(x) = x + x 2 0 1 1 r 5 (x) = x 5 mod g(x) = 1 + x + x 2 1 1 1 r 6 (x) = x 6 mod g(x) = 1 + x 2 1 0 1 Note that H is a parity-check matrix of a Hamming code If w = 1000011 w(x) = 1+x 5 +x 6 is received, then wh = s = 110 or s(x) 1 + x 5 + x 6 mod (1 + x + x 3 ) To construct a Hamming code of length 15, we use g(x) = 1 + x + x 4 For n = 23, the polynomial g(x) = 1 + x + x 5 + x 6 + x 7 + x 9 + x 11 generates a Golay code Finally, if n = 15, then g(x) = 1 + x 4 + x 6 + x 7 + x 8 generates a 2-error correcting code called BCH code Exercises Find a parity-check matrix for a linear cyclic code of length n with generator g(x): (a) n = 6, g(x) = 1 + x 3 (b) n = 9, g(x) = 1 + x 3 + x 6 Algorithm for Decoding Linear Cyclic Codes Rather than construct a standard decoding array (SDA) for a cyclic code of length n and distance d = 2t + 1 or 2t + 2, we use an algorithm that utilizes the symmetries inherent in cyclic codes It is important to note that if degree u(x) < degree g(x) then the syndrome polynomial s(x) = u(x) We also note that u(x) is a coset leader for a cyclic code of length n, so is x i u(x) mod (1 + x n ) Algorithm Step 1 Calculate the syndrome polynomial s(x) = w(x) mod g(x) Step 2 For each i 0, calculate s i s i (x) = x i s(x) mod g(x) until a syndrome s i is found with wt(s j ) t The most likely error polynomial is u(x) = x n j s j (x) mod (1 + x n ) Remark This decoding algorithm will only correct error pattern u(x) where, for some i, x i u(x) mod (1 + x n ) has degree at most n k It is quite possible that there are error patterns of weight at most t that do not satisfy this property Such error patterns are correctable by the codes, but the closest codeword is not found by this algorithm However, by slightly modifying this algorithm, we can use it to correct burst error patterns

Massoud Malek Linear Cyclic Codes Page 9 Example 5 Let n = 7 and g(x) = 1+x+x 3 be the generator polynomial for 1 error-correcting Hamming code If w = 0011000 w(x) = x 2 + x 3 is received, then s(x) w(x) mod g(x) x 2 + x 3 mod (1 + x + x 3 ) 1 + x + x 2 is the syndrome polynomial We next compute s 1 (x) xs(x) mod g(x) x(1 + x + x 2 ) mod g(x) 1 + x 2 s 2 (x) x 2 s(x) mod g(x) x(1 + x 2 ) mod g(x) 1 which has weight one So j = 2 and therefore u(x) = x 7 2 s 2 (x) mod (1 + x 7 ) x 5 Thus v(x) = w(x) + u(x) = (x 2 + x 3 ) + x 5 0011010 is the most likely codeword Exercises The polynomial g(x) = 1 + x 4 + x 6 + x 7 + x 8 generates a 2-error-correcting linear cyclic code of length 15 Decode the following received words: (a) w = 110001101000101 (b) w = 001111101001001 Dual Cyclic Codes Another important fact about cyclic codes is that the dual codes are also cyclic To find the generator of the Dual of the linear cyclic code C of length n generated by the polynomial g(x), first we find a polynomial h(x) of degree k such that g(x)h(x) = 1 + x n, then we define the generator polynomial of C as g (x) = x k h(x 1 ) Note that g (x) is a polynomial of degree k since every single factor of 1 + x n has a nonzero constant part and the degree of h(x) is exactly k To prove that g (x) = x k h(x 1 ) is the generator of the dual code C, we need to relate the product of polynomials and the inner product (dot product) of vectors Lemma 2 Consider the following polynomials a(x) = a 0 + a 1 x + a 2 x 2 + + a n 2 x n 2 + a n 1 x n 1 and b(x) = b 0 + b 1 x + b 2 x 2 + + b n 2 x n 2 + b n 1 x n 1 Then c(x) = a(x)b(x) 0 mod(1 + x n ), if and only if a = a 0 a 1 a n 2 a n 1 is orthogonal to b = b 0 b 1 b n 2 b n 1 and every cyclic shift of this word Proof The proof is computational and for simplicity we give it for n = 7 although the general proof is similar We can express the fact that a = a 0 a 1 a 6 is orthogonal to the vector b = b 0 b 1 b 6 and all its cyclic shifts by the following equations: a 0 b 6 + a 1 b5 + + a 6 b 0 = 0 a 0 b 0 + a 1 b6 + + a 6 b 1 = 0 = a 0 b 5 + a 1 b4 + + a 6 b 6 = 0 We compute now c(x) = a(x)b(x) 0 mod(1 + x 7 ) For the purpose of our proof, we write the coefficients of the powers of x in the order x 6, x 0 = 1, x, x 2, x 3, x 4, x 5 Then c(x) =(a 0 b 6 + a 1 b5 + + a 6 b 0 )x 6 + (a 0 b 0 + a 1 b6 + + a 6 b 1 ) + + (a 0 b 5 + a 1 b4 + + a 6 b 6 ) 5 The proof follows since these coefficients equal the dot product above

Massoud Malek Linear Cyclic Codes Page 10 Theorem 5 If C is a linear cyclic code of length n generated by the polynomial g(x), then C is generated by the polynomial g (x) = x k h(x 1 ), where g(x)h(x) = 1 + x n Proof Since g(x)h(x) = 1 + x n, we have g(x 1 )h(x 1 ) = 1 + (x 1 ) n and 1 + x n = x n [1 + (x 1 ) n ] = g(x 1 )h(x 1 ) = [x n k g(x 1 )][x k h(x 1 )] Thus x k h(x 1 ) is a factor of 1 + x n, having degree k and hence the generator polynomial for the linear cyclic code C Lemma 3 The Linear cyclic code generated by g(x) = 1 + x is the n 1 dimensional code C of all even words of length n Proof Note that 1 + x n = (1 + x)(1 + x + + x n 1 ) If g(x) = 1 + x, then since h(x) = 1 + x + + x n 1 = xh(x 1 ), the dual code C consists of the zero vector and the all-one vector h Clearly any word is orthogonal to h if and only if it has even weight Theorem 6 A linear cyclic code C =< g(x) > contains only even weight words if and only if 1 + x divides g(x) Proof The proof follows from Lemma 3 and the fact that C 1 =< g 1 (x) > < g 2 (x) >= C 2, if and only if g 2 (x) divides g 1 (x) Corollary 61 A linear cyclic code C = < g(x) > is self-dual, if 1 + x divides g(x) Proof In a self-dual code, all weights are even Clearly the converse need not hold Parity-check matrix Suppose g(x) is a generator polynomial for a linear cyclic code C of length n and dimension k If g(x)h(x) = 1 + x n where h(x) = h 0 + h 1 x + + h k x k, then the following matrix is a parity-check matrix: h k h k 1 h 0 0 0 0 0 h k h k 1 h 0 0 0 0 0 h k h k 1 h 0 Example 6 Let n = 7 and g(x) = 1+x+x 3 be the generator polynomial for 1 error-correcting Hamming code By long division we obtain h(x) = 1 + x + x 2 + x 4 The generator for C is g (x) = x 4 h(x) = x 4 (1 + x 1 + x 2 + x 4 ) = 1 + x 2 + x 3 + x 4 which corresponds to g = 1011100 Clearly gg = (11010000)(1011100) = 0 and σ k (g)g = 0 Note that g (x) h(x) Exercises Find a parity-check matrix for the dual of the linear cyclic code of length n with generator g(x): (a) n = 6, g(x) = 1 + x + x 2 (b) n = 9, g(x) = 1 + x 3 + x 6