monic polynomial of the minimal degree in C, which must be a divisor of XN â 1 by ... Let C be a (linear) cyclic code
ON MODULAR CYCLIC CODES STEVEN T. DOUGHERTY AND YOUNG HO PARK Abstract. We study cyclic codes of arbitrary length N over the ring of integers modulo M . We first reduce this to the study of cyclic codes of length N = pk n (n prime to p) over the ring Zpe for prime divisors p of N . We then use the discrete Fourier transform to obtain an isomorphism γ between Zpe [X]/hX N − 1i and a direct sum ⊕i∈I Si of certain local rings which are ambient spaces for codes of length pk over certain Galois rings, where I is the complete set of representatives of p-cyclotomic cosets modulo n. Via this isomorphism we may obtain all codes over Zpe from the ideals of Si . The inverse isomorphism of γ is explicitly determined, so that the polynomial representations of the corresponding ideals can be calculated. The general notion of higher torsion codes is defined and the ideals of Si are classified in terms of the sequence of their torsion codes.
1. Introduction Cyclic codes are a widely studied family of codes that are very important from both a theoretical and an applied standpoint. Cyclic codes over Zpe of length N where p does not divide N are a well understood object, see [4, 7] for example and the references therein. Cyclic codes over Z4 of odd length were studied in [12], of length 2k were studied in [1] and of length 2n were studied in [2]. In [5], this work was completed by studying cyclic codes of length 2k n. Cyclic codes of length N over a ring R are identified with the ideals of R[X]/hX N − 1i by identifying the vectors with the polynomials of degree less than N . Cyclic codes over a finite field Fq are well-known [11]. Indeed every cyclic code C over Fq is generated by a nonzero monic polynomial of the minimal degree in C, which must be a divisor of X N − 1 by the minimality of degree. Since Fq [X] is a UFD, cyclic codes over Fq are completely determined by the factorization of X N − 1 whether or not N is prime to the characteristic of the field, even though when they are not relatively prime we are in the repeated root case [9, 3]. This is more or less true for cyclic codes over Zpe if the length N is prime to p, since X N − 1 Date: November 22, 2004. 2000 Mathematics Subject Classification. 94B15, 94B05, 11T71, 14H20. Key words and phrases. Cyclic codes, constacyclic codes, Galois rings, discrete Fourier transforms, local rings, torsion codes. The second author would like to thank the Department of Mathematics, University of Scranton for their hospitality while writing this paper during his stay in 2004. The research of the second author is accomplished with Research Fund provided by Kangwon National University, Support for 2003 Faculty Research Abroad. 1
2
STEVEN T. DOUGHERTY AND YOUNG HO PARK
factors uniquely over Zpe by Hensel’s Lemma in this case. In fact, all cyclic codes over Zpe of length prime to p have the form hf0 , pf1 , p2 f2 , . . . , pe−1 fe−1 i, where fe−1 | fe−2 | · · · | f0 | X N − 1 [4, 7]. It is also shown that these ideals are principal: hf0 , pf1 , p2 f2 , . . . , pe−1 fe−1 i = hf0 + pf1 + p2 f2 + · · · + pe−1 fe−1 i. Therefore, cyclic codes of length N prime to p are again easily determined by the unique factorization of X N − 1. The reason that the case when the characteristic of the ring divides the length N is more difficult is that in this case we do not have a unique factorization of X N − 1. We begin with some definitions. A code C of length N over a ring R is said to be constacyclic if there exists a unit u ∈ R such that (c0 , c1 , . . . , cN −1 ) ∈ C ⇒ (ucN −1 , c0 , c1 , . . . , cN −2 ) ∈ C. If u = 1, then C is a cyclic code. In general linear constacyclic codes are identified with ideals of R[X]/hX N − ui by the identification (c0 , c1 , . . . , cN −1 ) 7→ c0 + c1 X + c2 X 2 + · · · + cN −1 X N −1 .
(1)
In this paper, all codes are linear and the ambient space RN for constacyclic codes of length N over R is identified with R[X]/hX N − ui. Let C be a (linear) cyclic code of length N over the ring ZM , where M and N are arbitrary positive integers. First we use the Chinese Remainder Theorem to decompose the code C, i.e. an ideal of ZM [X]/hX N − 1i, into a direct sum of ideals over Zpei i according to the prime r factorization of M = pe11 pe22 . . . per as follows. For each prime divisor pi of M , let C (pi ) = C (mod pei i ). By the Chinese Remainder Theorem, we have an isomorphism r M ψM : C ' C (pi )
(2)
i=1
by the map ψM (v) = (v (mod pe11 ), v (mod pe22 ), . . . , v (mod perr )). Conversely, if C (pi ) are cyclic codes over Zpei i then the Chinese Remainder Theorem again gives us a cyclic code C = CRT (C (p1 ) , C (p2 ) , . . . , C (pr ) ), called a Chinese product [6], over ZM such that ψM (C) = ⊕ri=1 C (pi ) . Therefore, it is enough to study cyclic codes over the rings Zpe for a prime p. Fix a prime p and write N = pk n, p not dividing n. We shall examine cyclic codes over Zpe of length N . In our case the factorization of X N − 1 is not unique so we take the discrete Fourier transform approach which is a generalization of the approach in [2, 5]. We define an isomorphism between Zpe [X]/hX N − 1i and a direct sum, ⊕i∈I Spe (mi , u), of certain local rings. This shows that any cyclic code over Zpe can be described by a direct sum of ideals
ON MODULAR CYCLIC CODES
3
within this decomposition. We also give the inverse isomorphism so that the corresponding ideal in Zpe [X]/hX N − 1i can be computed explicitly. This will clarify the correspondence of ideals described in [2, 5]. The ideals of local rings that occur are classified in the final section. 2. Cyclic codes over Zpe Let p be a prime. Throughout this paper we let R = Zpe and write RN = Zpe [X]/hX N − 1i, so that RN = RN after the identification (1). We shall consider cyclic codes over R of length N = pk n, where p does not divide n. By introducing an auxiliary variable u, we break the k equation X N − 1 = 0 into two equations X n − u = 0 and up − 1 = 0. Taking the equation k up − 1 = 0 into account, we first introduce the ring k
R = Zpe [u]/hup − 1i. There is a natural R-module isomorphism Ψ : Rn → RN defined by Ψ(a0 , a1 , . . . , an−1 ) = (a00 , a10 , . . . , a0n−1 , a01 , a11 , . . . , an−1 , . . . , a0pk −1 , a1pk −1 , . . . , an−1 ) 1 pk −1 where ai = ai0 + ai1 u + · · · + aipk −1 up
k −1
(3)
∈ R for 0 ≤ i ≤ n − 1. Note that u is a unit in R and
p Ψ(uan−1 , a0 , . . . , an−2 ) = Ψ(an−1 + a0n−1 u + · · · + apn−1 k −2 u pk −1
k −1
, a0 , . . . , an−2 )
n−2 0 = (an−1 , a0 , . . . , an−2 , a0n−1 , a01 , . . . , a1n−2 , . . . , apn−1 k −2 , apk −1 , . . . , apk −1 ). 0 pk −1 0
Hence the constacyclic shift by u in Rn corresponds to a cyclic shift in RN . As before we identify Rn with R[X]/hX n − ui, which takes the equation X n − u = 0 into account. If we view Ψ as a map from R[X]/hX n − ui to RN , we have that k −1 k −1 n−1 pX n−1 pX X X Ψ aij uj X i = aij X i+jn . (4) i=0
j=0
i=0 j=0
Since Ψ is an R-module isomorphism, (4) simplifies to Ψ(uj X i ) = X i+jn for 0 ≤ i ≤ n − 1 and 0 ≤ j ≤ pk − 1. Let 0 ≤ i1 , i2 ≤ n − 1 and 0 ≤ j1 , j2 ≤ pk − 1. Write i1 + i2 = δ1 n + i, and j1 + j2 = δ2 pk + j such that 0 ≤ i ≤ n − 1 and 0 ≤ j ≤ pk − 1. Clearly k k δi = 0 or 1. Since up = 1, X n = u in R[X]/hX n − ui and X p n = 1 in R[X]/hX N − 1i we have that Ψ(uj1 X i1 uj2 X i2 ) = Ψ(uj1 +j2 X i1 +i2 ) = Ψ(uj+δ1 X i ) = X i+(j+δ1 )n = X i+δ1 n X jn = X i1 +i2 X (j1 +j2 )n = Ψ(uj1 X i1 )Ψ(uj2 X i2 ).
4
STEVEN T. DOUGHERTY AND YOUNG HO PARK
By the R-linearity property of Ψ, it follows that Ψ is a ring homomorphism. Consequently, we have the following: Lemma 2.1. Ψ is an R-algebra isomorphism between R[X]/hX n − ui and R[X]/hX N − 1i. Furthermore, the cyclic codes over R of length N correspond to constacyclic codes of length n over R via the map Ψ. Ψ
R[X]/hX n − ui −−−→ R[X]/hX N − 1i
Ψ
Rn −−−→ RN The ring R is shortly proved to be a finite local ring, and hence the regular polynomial n X − u has a unique factorization in R[X] X n − u = g1 g2 . . . gl
(5)
into monic, irreducible and pairwise relatively prime polynomials gi ∈ R[X], and by the Chinese Remainder Theorem R[X]/hX n − ui ' R[X]/hg1 i ⊕ · · · ⊕ R[X]/hgl i.
(6)
This isomorphism will give us a decomposition of RN via the map Ψ. However the corresponding decomposition of RN seems difficult to manage. We will examine this isomorphism in more detail later. Instead we will use the discrete Fourier transform to obtain another decomposition, which is more natural and manageable. 3. Extension rings R = Zpe is a local ring with maximal ideal pZpe and residue field Zp . Let µ : Zpe [X] → Zp [X],
µ(f ) = f (mod p)
denote the ring homomorphism that maps f to f (mod p). Let m be a positive integer. A Galois extension GR(pe , m) of Zpe of degree m is called a Galois ring. GR(pe , m) can be realized as GR(pe , m) = Zpe [X]/hh(X)i ' Z[X]/hpe , h(X)i for any monic irreducible polynomial h(X) of degree m over Z. The Galois extensions are unique and simple. To present a primitive element of GR(pe , m), we construct GR(pe , m) as ¯ Let h(X) ¯ follows. Let Fpm be the field of pm elements with the primitive root ζ. ∈ Zp [X] be the irreducible polynomial of ζ over Zp . Then ¯ ¯ Fpm = Zp [X]/hh(X)i = Zp [ζ], m ¯ ¯ where ζ¯ = X + hh(X)i. We have X p −1 − 1 = h(X)¯ g (X) for some g¯ ∈ Zp [X]. By Hensel’s ¯ µ(g) = Lemma [10], there exist monic polynomials h(X), g(X) ∈ Zpe [X] such that µ(h) = h, ¯ deg g = deg g¯ and g¯, deg h = deg h,
Xp
m −1
− 1 = h(X)g(X).
ON MODULAR CYCLIC CODES
5
An explicit algorithm, involving the Euclidean algorithm, for computing h and g can be found in [8]. Since h(X) is basic irreducible, i.e. µ(h(X)) is irreducible over Zp , GR(pe , m) = Zpe [X]/hh(X)i is a Galois extension of Zpe of degree m. To simplify notations a little, set S = GR(pe , m). S is also a local ring with maximal ideal pS and residue field Fpm . In fact, S is a finite chain ring since every ideal in S has the form pi S for 0 ≤ i ≤ m. Let ζ = X + hh(X)i ∈ S. Then ζ is a root of h(X) and S = R[ζ]. The map µ naturally extends to the canonical projection ¯ µ : S = Zpe [X]/hh(X)i → S/pS = Fpm = Zp [X]/hh(X)i, ¯ f + hh(X)i 7→ µ(f ) + hh(X)i ¯ Since ζ j = 1 implies ζ¯j = 1, it is clear that ζ is a primitive (pm − 1)th root so that µ(ζ) = ζ. of unity. Hence m Tm = {0, 1, ζ, . . . , ζ p −2 } ' Fpm is a complete set, known as Teichm¨ uller set, of coset representatives of S modulo pS and any a ∈ S can be uniquely written by its p-adic expansion a = a0 + a1 p + a2 p2 + · · · + ae−1 pe−1 with ai ∈ Tm . Slightly abusing notation, we sometimes write µ(a) = a0 . In particular, µ(ζ) = ζ in this convention. Note that a is a unit iff µ(a) 6= 0 by the following lemma. Lemma 3.1. Suppose a − b is nilpotent in a ring. Then a is a unit iff b is a unit. Elements of S can also be written in the ζ-adic expansion b0 + b1 ζ + b2 ζ 2 + · · · + bm−1 ζ m−1 with bi ∈ R. The Galois group of isomorphisms of GR(pe , m) over R is isomorphic to the Galois group Gal(Fpm /Zp ) of the residue fields, which is a cyclic group of order m generated by the Frobenius automorphism. The Frobenius automorphism of Fpm over Zp is determined by the action ζ¯ 7→ ζ¯p and it lifts to the Frobenius automorphism Fr of GR(pe , m) over R by the ¯ it is clear that Lifting Theorem (Theorem XV.2 in [10]). Since µ(ζ) = ζ, Fr(ζ) = ζ p , Thus Fr
Pe−1
r=0
ar p
r
=
Pe−1
r=0
Fr(a) = a for a ∈ R.
apr pr (ai ∈ Tm ) in p-adic expansion, and
Fr
m−1 X i=0
bi ζ
i
=
m−1 X i=0
bi ζ ip ,
(bi ∈ R)
(7)
6
STEVEN T. DOUGHERTY AND YOUNG HO PARK
in ζ-adic expansion. We recall that l | m iff GR(pe , l) ⊂ GR(pe , m). Moreover, the Galois group of GR(pe , m) over GR(pe , l) is generated by Frl and hence GR(pe , l) = {a ∈ GR(pe , m) | Frl (a) = a}. We denote by ζ[l] the (pl − 1)-th root of unity ζ (p
m −1)/(pl −1)
(8)
.
¯ Example 3.2. A root ζ¯ of h(X) = X 3 + 2X + 1 ∈ Z3 [X] is a primitive element in the field ¯ F33 (see Fig. 4.5 in [11]). The polynomial h(X) lifts to h(X) = X 3 + 12X 2 + 20X + 1 over 26 3 Z27 , which divides X −1, and hence GR(3 , 3) = Z33 [ζ], where ζ is a root of h(X) ∈ Z27 [X]. Since ζ 3 = −1 + 7ζ + 15ζ 2 and ζ 6 = 7 + 16ζ + 19ζ 2 , the Frobenius map is given by Fr(a + bζ + cζ 2 ) = (a − b + 7c) + (7b + 16c)ζ + (15b + 19c)ζ 2 and it is straightforward to verify Fr(rs) = Fr(r) Fr(s) for all r, s ∈ GR(33 , 3). Next, we define another extension ring k
S = Spe (m, u) = GR(pe , m)[u]/hup − 1i of S = GR(pe , m). For an appropriate m, this S will be the ambient space for codes of length pk over the Galois ring which contains the n-th root of unity. Note that k
k
S = Zpe [ζ][u]/hup − 1i = Zpe [u]/hup − 1i[ζ] = R[ζ]. We will shortly prove that S and R are local rings. Thus we have the following commutative diagram of local rings R = R[u]/hup − 1i −−−→ S = R[ζ] = S[u]/hup − 1i x x k
R = Zpe
k
−−−→
S = R[ζ]
where arrows indicate extensions. k Since up − 1 is monic, the division algorithm implies that every element s of S may be uniquely represented by a polynomial in u of degree less than pk , or by its translation s = s(u) = s0 + s1 (u − 1) + s2 (u − 1)2 + · · · + spk −1 (u − 1)p
k −1
(9)
with si ∈ S. Note that s0 = s(1). The map µ naturally extends to S → (S/pS)[u]/(up − 1) by the additional property µ(u) = u: k
µ
k −1 pX
pk −1
si (u − 1)i =
i=0
X
µ(si )(u − 1)i .
(10)
i=0
Note that this map gives the natural isomorphism k
k
S/pS ' (S/pS)[u]/hup − 1i = Fpm [u]/h(u − 1)p i,
(11)
ON MODULAR CYCLIC CODES
7
and hence we may view µ as a map from S to S/pS. We also extend the Frobenius automorphism Fr to S by setting Fr(u) = u, i.e. Fr
k −1 pX
pk −1 i
si (u − 1)
=
X
Fr(si )(u − 1)i .
i=0
i=0
In passing, we warn that p remains prime in S, but it is no longer a prime in S. This can k be seen by the facts that S/pS = Fpm is a field, but S/pS = Fpm [u]/h(u − 1)p i is not an integral domain. Theorem 3.3. (i) s ∈ S, written as in (9), is a unit iff µ(s0 ) 6= 0. (ii) S is a local ring with maximal ideal hp, u − 1i and residue field Fpm . (iii) R is a local ring with maximal ideal hp, u − 1i and residue field Zp . (iv) S = R[ζ] is a Galois extension of R. In particular, the set of elements in S fixed by Fr is R, i.e. SFr = {s ∈ S | Fr(s) = s} = R. Proof. (i) By Lemma 3.1, s = x + py is a unit in S iff x is a unit in S. If x is a unit in S, then clearly µ(x) is a unit in S/pS. Conversely, if µx is a unit in S/pS, then xx0 = 1 + ps for some x0 , s ∈ S which implies that xx0 is a unit in S, and then x is a unit in S. Hence s is a unit iff µ(s) is a unit. Note that µ(u − 1) = u − 1 is nilpotent in S/pS. If s = s0 + (u − 1)s0 in the (u − 1)-adic expansion, then µ(s) = µ(s0 ) + (u − 1)µ(s0 ). Hence µ(s) is a unit in S/pS iff µ(s0 ) is a unit in S/pS iff µ(s0 ) 6= 0. k (ii) As before S/pS = Fpm [u]/h(u − 1)p i, and hence S/hp, u − 1i ' Fpm is a field, which implies that hp, u − 1i is a maximal ideal. Furthermore, elements not in the ideal hp, u − 1i are exactly those elements s with µ(s0 ) 6= 0. By (i), they are exactly the units. Thus hp, u − 1i is the unique maximal ideal. (iii) The proof is similar to (ii). (iv) It follows from the fact that S is unramified, i.e. the maximal ideal of S = R[ζ] is generated by the maximal ideal of R. As usual, the trace map from Spe (m, u) to R is defined by Tm (z) =
m−1 X
Frr (z).
(12)
r=0
4. Discrete Fourier Transforms From now on we fix m to be the order of p modulo n. Then n | pm − 1 and hence the Galois ring GR(pe , m) contains a primitive nth root ζn of unity, i.e. ζn = ζ (p
m −1)/n
,
where ζ is the (pm − 1)th root of unity as before. Again we set k
S = Spe (m, u) = Zpe [ζ][u]/hup − 1i.
8
STEVEN T. DOUGHERTY AND YOUNG HO PARK
As always, we identify vectors with polynomials. Definition 4.1. Let c = (cj ) ∈ RN = Zpe [X]/hX N − 1i. The discrete Fourier transform of c is the vector cˆ = (ˆ c0 , cˆ1 , · · · , cˆn−1 ) ∈ Sn = S[Z]/hZ n − 1i, where cˆi =
N −1 X
cj uj ζnij = c(uζ i )
j=0
for all integers i. The reciprocal polynomial of cˆ(Z) Mc (Z) =
n−1 X
cˆn−i Z i ∈ Sn
i=0
is called the Mattson-Solomon polynomial of c. In matrix notation, c0 cˆ0 1 1 1 ... 1 c cˆ1 1 uζn (uζn )2 . . . (uζn )N −1 1 2 2 2 2 N −1 c2 . cˆ2 = 1 uζn (uζn ) . . . (uζn ) . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ... 1 uζnn−1 (uζnn−1 )2 . . . (uζnn−1 )N −1 cN −1 cˆn−1 Note that the i-th coefficient of the vector Mc is Mc,i = cˆn−i = c(uζnn−i ).
(13)
Let n0 be the multiplicative inverse of n mod pk , i.e. nn0 ≡ 1 (mod pk ). For each 0 ≤ t ≤ n − 1, we define a permutation πt of the set {0, 1, . . . , pk − 1} as πt (`) ≡ (` − t)n0
(mod pk ),
i.e. πt (t + `n) = `. This permutation induces a Zpe -isomorphism πt : S → S given by πt (a0 + a1 u + · · · + apk −1 up
k −1
k −1)
) = a0 uπt (0) + a1 uπt (1) + · · · + apk −1 uπt (p
,
where aj ∈ Zpe [ζ]. For any s = s(u) ∈ S, we have that 0
0
πt s(u) = u−n t s(un ),
πt−1 s(u) = ut s(un ).
Theorem 4.2 (Inversion formula). Let c ∈ RN . Then c is recovered from Mc by 1 2 n−1 c=Ψ π0 Mc (1), π1 Mc (ζn ), π2 Mc (ζn ), . . . , πn−1 Mc (ζn ) . n
(14)
ON MODULAR CYCLIC CODES
9
Proof. For 0 ≤ t ≤ n − 1, we have that Mc (ζnt )
=
n−1 X
cˆi ζn−it
=
i=0
=
N −1 X j=0
n−1 N −1 X X
cj uj ζnij ζn−it
i=0 j=0
cj u
j
n−1 X
pk −1
ζni(j−t)
=n
i=0
X
ct+`n ut+`n
`=0
= n(ct ut + ct+n ut+n + ct+2n ut+2n + · · · + ct+(pk −1)n ut+(p
k −1)n
)
pk −1
= nπt−1 (ct + ct+n u + ct+2n u2 + · · · + ct+(pk −1)n u ). Pn−1 ij Here we used the well-known fact that i=0 ζn = 0 unless j ≡ 0 (mod n).
We make Sn into a ring by defining the product A ∗ B = (A0 B0 , A1 B1 , . . . , An−1 Bn−1 ) for two elements A = (A0 , A1 , . . . , An−1 ), B = (B0 , B1 , . . . , Bn−1 ) in Sn . (Sn , ∗) is not only a ring but also a Zpe -algebra with componentwise addition and multiplication, and the obvious scalar multiplication a(A0 , A1 , . . . , An−1 ) = (aA0 , aA1 , . . . , aAn−1 ). We give a fundamental properties of the Mattson-Solomon polynomials. Theorem 4.3. Let c, d ∈ RN . Then P i (i) M0 = 0 and M1 (Z) = n−1 i=0 Z . (ii) Mac (Z) = aMc (Z) for a ∈ Zpe . (iii) Mc+d (Z) = Mc (Z) + Md (Z). (iv) Mcd (Z) = Mc (Z) ∗ Md (Z). Proof. (i)–(iii) are straightforward. (iv) Write c(X)d(X) = e(X) + (X N − 1)q(X). Since (uζni )N − 1 = 0, the assertion follows from (13). We view M as a map M : RN → Sn sending c to Mc (Z). We would like to determine the image space of RN under this map. For all 0 ≤ i ≤ n − 1, we have that cˆip =
N −1 X
ci ) cj (uζnpi )j = Fr(ˆ
(15)
j=0
and Mc,ip =
N −1 X
cj (uζnpi )n−j = Fr(Mc,i ),
j=0
where subscripts are calculated mod n. Let A = {(A0 , A1 , · · · , An−1 ) ∈ Sn | Aip = Fr(Ai ) for all i}. It is easy to see that A is a Zpe -subalgebra of Sn .
(16)
10
STEVEN T. DOUGHERTY AND YOUNG HO PARK
Lemma 4.4. Let A(Z) = A0 + A1 Z + · · · + An−1 Z n−1 ∈ S[Z]/hZ n − 1i be a polynomial of degree less than n. If A(ζnt ) = 0 for all 0 ≤ t ≤ n − 1, then A(Z) = 0. Proof. We have 0 A0 1 1 1 ... 1 2 n−1 A1 1 ζn 0 (ζn ) . . . (ζn ) 2 2 2 n−1 A2 0 . 1 ζn2 (ζ ) . . . (ζ ) = n n . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ... ... 1 ζnn−1 (ζnn−1 )2 . . . (ζnn−1 )n−1 0 AN −1 Q The determinant of the Vandermonde matrix is 0≤i