MATH32031: Coding Theory 15 • Part 13: Cyclic Codes Rings of polynomials and quotient rings We begin by recalling some standard facts about rings of polynomials. As usual p is a prime number and Fp [x] is the ring of polynomials in variable x with coefficients from Fp , Fp [x] = { a0 + a1 x + · · · + an−1 xn−1 + an xn } where ai ∈ Fp and n = 0, 1, 2, . . .. If f (x) = a0 + a1 x + · · · + an−1 xn−1 + an xn is a polynomial and an 6= 0 then n is called the degree of f and is denoted by deg(f ). Definition. An ideal in a commutative ring R is a subset I ⊆ R which is closed under addition and is closed under multiplication by elements from R; that is, x + y ∈ I, rx ∈ I for all x, y ∈ I, r ∈ R. The quotient ring R/I has as elements the cosets as an abelian group r + I. Addition and multiplication are given by (r + I) + (s + I) = (r + s) + I, (r + I)(s + I) = rs + I for all r, s ∈ R. Recall that the ideal generated by a polynomial f ∈ Fp [x], which we denote by (f ), is the set of all multiples of f : (f ) = { f (x)g(x) | g(x) ∈ Fp [x] } = f Fp [x]). Let f ∈ Fp [x], f 6∈ Fp (that is, f does not have degree 0). We define Rf to be the quotient ring Rf = Fp [x]/(f ); Proposition 28 Let f ∈ Fp [x] be of degree deg f = m. Then Rf is an Fp -vector space with basis 1, x, . . . , xm−1 . In particular Rf has pm elements. 45 Proof. A basis is a generating set which is linearly independent. • Generation: Given any g ∈ Fp [x], write g = hf + r with either deg r < m or r = 0. Then g ≡ r (mod f ) and obviously r∈ m−1 X F p xi . i=0 • Linear independence: Suppose for contradiction that m−1 X λ i xi ≡ 0 (mod f ) i=0 with not all λi = 0. Notice that the sum cannot actually be equal to zero in Fp [x]. Thus in Fp [x] we have m−1 X λi xi = hf i=0 for some non-zero h. Now compare the degrees: deg(LHS) < m; deg(RHS) = deg h + deg f ≥ deg f = m. It follows that each element of Rf can be represented uniquely by a polynomial of degree at most m. 16 Cyclic codes With the same notation as before we set fn = xn − 1, and we write Rn for Rfn = Fp [x]/(fn ). Note that for n > 1, Rn is never a field, since fn always has the linear factor x − 1 and thus Rn has zero divisors. For a(x) ∈ Fp [x] we write a for its image in Rn (with n always clear from the context). (n) We will identify Rn with Fp by means of the distinguished basis {1, x, . . . , xn−1 } (as we can, from Proposition 28). In other words, we identify (a0 , a1 , . . . , an−1 ) ∈ Fp(n) with a(x) = a0 + a1 x + . . . + an−1 xn−1 in Rn . 46 Throughout, we speak of elements of Rn as polynomials of degree less then n; technically speaking, of course, we mean classes represented by such polynomials. If a(x) = a0 + a1 x + . . . + an−1 xn−1 in Rn = (a0 , a1 , . . . , an−1 ) under the above identification, then x · a(x) = a0 x + a1 x2 + . . . + an−1 xn . But xn = 1 in Rn , so x · a(x) = an−1 + a0 x + . . . + an−2 xn−1 = (an−1 , a0 , a1 , . . . , an−2 ). Thus multiplication by x in Rn corresponds to a cyclic rotation of the corresponding (n) vector in Fp . This motivates the next definition. (n) Definition of cyclic codes. A cyclic code in Fp is an Fp -linear code such that whenever (a0 , a1 , . . . , an−1 ) ∈ C then (an−1 , a0 , a1 , . . . , an−2 ) ∈ C. Example The binary code { (0, 0, 0), (1, 0, 1), (0, 1, 1), (1, 1, 0) } is a cyclic code. The following result reduces cyclic codes down to a very standard and familiar algebraic object. Theorem 29 A code C ⊂ Rn is a cyclic code if and only if C is an ideal in Rn . Remark. In concrete terms this means that length n cyclic codes correspond to ideals in Rn . Proof. If C is an ideal in Rn , then C closed under addition and it is certainly closed under multiplication by elements of Fp . Thus C forms a vector subspace and so is linear. Moreover, xC ⊆ C, and so, by the discussion above, C is a cyclic code. Conversely, let C be a cyclic code. We wish to prove: (a) C is an additive subgroup of Rn . (b) a(x) · C ⊂ C for any a(x) ∈ Rn . But (a) follows at once from the fact that C is a cyclic code and hence linear. The fact that is cyclic implies that x · C ⊂ P C and so xi · C ⊂ C for every i ≥ 0. If PC a(x) = ni=0 ai xi and c ∈ C then a(x)c = ni=0 ai xi c. Since each xi c ∈ C we see that a(x)c ∈ C, so (b) follows. 47