Constacyclic Codes over Finite Chain Rings of Characteristic p

Let R be a finite commutative chain ring of characteristic p with invariants p, r, and k. In this paper, we study λ-constacyclic codes of an arbitrary length N over R, where λ is a unit of R. We first reduce this to investigate constacyclic codes of length ps (N = n1 ps, p n1) over a certain finite chain ring CR(uk, rb) of characteristic p, which is an extension of R. Then we use discrete Fourier transform (DFT) to construct an isomorphism γ between R[x]/ < xN − λ > and a direct sum ⊕b∈IS(rb) of certain local rings, where I is the complete set of representatives of p-cyclotomic cosets modulo n1. By this isomorphism, all codes over R and their dual codes are obtained from the ideals of S(rb). In addition, we determine explicitly the inverse of γ so that the unique polynomial representations of λ-constacyclic codes may be calculated. Finally, for k = 2 the exact number of such codes is provided.


Introduction
The class of constacyclic codes plays an important role in coding theory and has been a primary area of study (see [1][2][3][4][5][6][7][8][9]). In the literature, most research has been focused on the situation where the alphabet of these codes is a field. However, many important non-linear codes over finite fields are actually related via the Gray map to linear codes over finite rings and, particularly, over finite chain rings. Constacylic codes of arbitrary length N over a finite ring R are identified with ideals of the polynomials ring R[x]/ < x N − λ > . Let p be the characterstic of the residue field of a finite commutative chain ring R. When the length N is prime relative to p, constacyclic codes are easily determined by the unique factorization of X N − λ using Hensel's Lemma. On the other hand, case p | N yields what is called repeated-root codes, which were studied for the first time by Berman [10] in 1967 (for more details, see [2,7,11,12]).
The class of finite chain rings has been extensively used as the alphabet of constacyclic codes [8,[13][14][15][16][17][18][19][20][21][22][23][24]. This class was introduced in [23] to construct new sequences posessing optimal Hamming correlation properties, and these sequences were found to be useful in frequency hopping multiple-access (FHMA) spreading spectrum communication systems. The chain ring Z 4 has been widely considered as alphabet of cyclic codes (special types of constacyclic codes) [17][18][19]25]. Doughtry et al. [16] generalized the results to cyclic codes of length N over Z p n . Moreover, Kiah et al. [8] studied cyclic codes of length p s over GR(p 2 , r), while Zhu et al. [26] examined a special class of constacyclic codes over Z p n . Now, let R be a finite commutative chain ring of characteristic p with invariants p, r, and k. Cyclic codes and their dual codes were initially considered over R with p = 2 and k = 2 by Bonnecaze et al. [20]. Qian et al. [21] used discrete Fourier transform (DFT) to study cyclic codes over R. Moreover, Dinh [27] studied consatcyclic codes of length p s over R when k = 2. Ozger et al. [22] discussed constacyclic codes over R under the condition p = 2, k = 4. Recently, in [15], Mu Han et al. classified cyclic codes of length np s over R in case of r = 1 via DFT. Motivated by the above cited studies, the main objective of this paper is to extend the approach of Han et al. [15] and to obtain unique polynomial representations of constacyclic codes of any finite length N over R with arbitrary invariants p, r, and k. This paper is organized as follows. Section 2 gives some basic definitions of linear codes. In Section 3, we construct unique representations of constacyclic codes of length p s over R. Section 4 is devoted to establishing unique polynomial representations of constayclic codes of length N = n 1 p s over R using DFT, where p n 1 . This representation enables us to compute Hamming distance and dual codes of any such constacyclic code. We also obtain the exact number of constacyclic codes when k = 2.

Preliminaries
All rings considered in this paper are finite commutative and possess an identity. In this section, we mention some definitions and introduce notations that will be used in the subsequent discussions.

Constacyclic Codes
A code of length N over a ring R is a nonempty subset of R N , and R is referred to be the alphabet of the code. A code C is said to be linear if it is also a R-submodule of R N . For a given unit λ of R, a linear code C is said to be constacyclic or more precisely λ-constacyclic i.e., C is closed under λ-constacyclic shifts. The cyclic and negacyclic codes are obtained when λ = 1 and −1, respectively. Proposition 1 ([28,29]). A linear code C of length N is a λ-constacyclic code over R if and only if C is an ideal of R[x]/ < x N − λ >.

Finite Chain Rings of Characteristic p
A ring R is a chain ring if it is local and its Jacobson radical J(R) is principal. Every finite chain ring R is associated with five invariants p, n, r, k, and m. From now on, R is a finite chain ring of characteristic p, i.e., n = 1 and m = k. In this case, R is associated with p, r, and k. We denote J(R) =< u >, k the index of nilpotency of u, and p r is the order of the residue field R/J(R). Such chain rings are uniquely determined by their invariants p, r, and k [30].
Proposition 2 ([31,32]). Let R be a finite chain ring of characteristic p with invariants p, r, k. Then, the following is the case: (i) R has a subfield F of order p r ; By Proposition 2, every unit λ of R can be uniquely written as If l is the smallest positive integer such that β l = 0, then the following is the case: where β = β l + . . . + u k−l−1 β k−l−l . Thus, every unit λ of R is of the form λ = α + u l β, where β is either 0 or a unit of R. Let the following be the case: where s = rq + t and 0 ≤ t ≤ r − 1. Then, α

Definition 1.
For any λ-constacyclic code C of length p s over R and for 0 ≤ i ≤ k − 1, we define the following codes over F: where µ is the canonical homomorphism (modulo u). Moreover, Tor i (C) is called the ith torsion code of C, µ(C) = Tor 0 (C) = Res(C) is the residue code of C, and T i (C) = T i is called the ith-torsional degree of C.

Proposition 3 ([16]
). Let C be a λ-constacyclic code over R and i be an integer such that 0 ≤ i ≤ k − 1. Then, T i (C) is α-constacyclic codes of length p s over F and Tor i (C) =< (α 0 x − 1) T i > for some 0 ≤ T i ≤ p s . Moreover, we have the following:

Remark 2.
Obviously, T i is the smallest degree amongst all the degrees of non-zero polynomials in Tor i (C).
All symbols stated above shall retain their meanings throughout the article, in addition, N = n 1 p s , (n 1 , p) = 1.

Constacyclic Codes of Length p s
In this section, we provide a unique representation for any constacyclic code of length p s over R. This representation allows us to compute Hamming distances and dual codes as well as enumerates all constacyclic codes of length p s over R, i.e., ideals of the quotient ring R α,β = R[x]/ < x p s − (α + u l β) >. Assume k 1 = k l , i.e., k 1 is the smallest positive integer greater than k l .

Proof.
Note that the following is the case.
Proof. Due to the fact that R = F ⊕ uF ⊕ . . . ⊕ u k−1 F, each element a of R has unique presentation as a = ∑ k−1 i=0 u i a i , where a 0 , a 1 , . . . , a k−1 are elements of F. This implies that for any polynomial f (x) ∈ R α,β , f (x) can be expressed uniquely as follows: where a ij s are elements of F. Due to the fact that α 0 x − 1 and u are nilpotent, f (x) is a unit if and only if a 00 = 0. Moreover, if f (x) is a zero divisor, i.e., a 00 = 0, then f (x) ∈< (α 0 x − 1), u > by Lemma 1. Thus, the ideal < (α 0 x − 1), u > consists of all zero divisors of R α,β . Therefore, R α,β is a local ring with maximal ideal < (α 0 x − 1), u >. Remark 3. If k = 1, R α,β = R α is a chain ring with maximal ideal < α 0 x − 1 > . Theorem 1. If C is a (α + u l β)-constacyclic code of length p s over R, then the following is the case: Proof. The proof will be carried out by induction.
Let C be a constacyclic code of length p s over R 1 and µ C be the restriction of µ 1 on C. Then, is either zero or a unit. We can consider deg a ≤ T 1 , and, therefore, t + deg h ≤ T 1 . Thus, C is generated by In cases when T 0 = p s , then C = ker µ C ; thus, g 0 (x) = 0. Let us assume that the hypothesis is true for k − 2 and we prove it for k − 1. Let µ k−1 be the natural homomorphism (modulo u k−1 ) from R k−1 to R k−2 . It is obvious that Ker µ k−1 =< u k−1 >. Assume C is a constacyclic code of length p s over R k−1 , and µ C is the restriction of µ k−1 on C. Then, Now, since Im µ C ∼ = C/Ker µ C is a constacyclic code of length p s over R k−2 , and by the induction step, where e 0 (x), e 1 (x), . . . , e k−1 (x) is another expression of C satisfying the conditions of the theorem. Then, the uniqueness follows from the induction step and the fact that g i (x) = e i (x) mod ker µ C for i = 0, 1, 2, . . . , k − 2.
Corollary 1. Suppose that T i < p s . Then, the smallest degree amongst the polynomials in C with leading coefficient u i is T i .

Definition 2.
Let C be a constacyclic code over R. We call the unique k-tuple of polynomials described in Theorem 1 to be the representation of C.
Next, we construct a one-to-one correspondence between cyclic and α-constacyclic codes, where α is a nonzero element of F. Consider the map Ψ : This means that Ψ is well defined and has one-to-one correspondence. It is easy to show that Ψ is a ring homomorphism. Thus, Ψ is a ring isomorphism.
In particular, C is a cyclic code of length p s over R if and only if ψ(C) is a α-constacyclic code of length p s over R. Moreover, ψ is Hamming weight preserving.

Hamming Distance and Dual Codes
Definition 3. For a nonzero linear code C, the Hamming distances of C and d(C) are defined by the following: where wt(c) is the number of nonzero components of c = (c 0 , c 1 , . . . , c N−1 ) in R N . The zero code is conventionally said to have Hamming distance 0.
Theorem 2. Let C be a constacyclic code of length p s over R. Then, Proof. For any nonzero codeword c(x) of C, we have wt(u k−1 c(x)) ≤ wt(c(x)). Then, it suffices to compute Hamming distance of u k−1 c(x), where c(x) ∈ C. As u k−1 c(x) and c(x) have the same number of nonzero coefficients, then wt(u k−1 c(x)) = wt(c(x)). Thus, d(C) = d(Tor k−1 (C)). As Tor k−1 (C) is a constacyclic code over F, its Hamming distance is completely determined (see [33], Theorem 4.11).
Next, we consider the dual codes. Given N-tuples x = (x 0 , x 1 , . . . , x N−1 ) and y = (y 0 , y 1 , . . . , y N−1 ) in R N , the inner product or dot products is defined as usual, with x · y = x 0 y 0 + x 1 y 1 + . . . + x N−1 y N−1 , which is evaluated in R. Two N-tuples x and y are called orthogonal if x · y = 0.

Definition 4.
For a linear code C over R, its dual code C ⊥ is the set of N-tuples over R that is orthogonal to all codewords of C, i.e., C ⊥ = {x | x · y = 0, ∀y ∈ C}.
The following propositions are well known [28,29,34,35]. Proposition 6. Let λ be a unit of R. Then, the dual of a λ-constacyclic code over R is a λ −1constacyclic code over R.

Proposition 7.
Let p be a prime and R be a finite chain ring of order p z . The number of codewords in any linear code C of length N over R is p e for some integer e ∈ {0, 1, . . . , zN}. Moreover, the dual code C ⊥ has p e codewords, where e + e = zN, i.e., |C| · |C ⊥ | = |R| N .
Note that in R α,β , (α + u l β) p k 1 = α p k 1 ; thus, the following is the case.

Constacyclic Codes of Length N 4.1. Exension Rings
Let r be a positive integer and let CR(u k , r ) is a monic basic irreducible of degree r over R. Note that f (x) can be chosen so that CR(u k , r ) contains (p r − 1)th root of unity. Moreover, CR(u k , r ) is a chain ring of characteristic p with maximal ideal < u > and residue field K = F p rr . By Theorem 2, Let a be the order of p modulo n 1 , then F p a contains a primitive n 1 th root ξ of unity. Assume that K is the splitting field of x n 1 − α over F p a , where α is a nonzero element of F and r = aa for some positive integer a the degree of the extension. If θ is a root of x n − α in F p r , then θξ i , for 0 ≤ i ≤ n 1 − 1 are all distinct roots of x n 1 − α in F p r ; hence, by Hensel's Lemma ( [29], Theorem XIII.4), CR(u k , r) also contains all those roots. Now x n 1 − α factors uniquely into monic irreducible polynomials over F, and then again by Hensel's Lemma, x n 1 − α factors into monic basic irreducible polynomials over R as follows.
For each 0 ≤ j ≤ n 1 − 1, there exists a unique i, 1 ≤ i ≤ m such that f i (θξ j ) = 0, and f i (x) is called the minimal polynomial of θξ j over R.
Next, we introduce another extension: of CR(u k , r ). Note that, for a suitable positive number r , S will be the alphabet of codes of length p s over R that contains nth root of unity. The results of Lemma 1 and Proposition 4 hold for the ring S. Moreover, we define the following extension of R.
Let r be the order of p modulo n 1 . Let ∼ be a relation on the set {1, 2, . . . , n 1 } defined as i ∼ j if and only if θξ i and θξ j are roots of the same minimal polynomial, i.e., there is a unique b such that f b (θξ i ) = f b (θξ j ) = 0. It is easy to show this relation is equivalence. Now, let I be the set of all classes of ∼, I b be a class containing b, and r b is the size of this class, i.e., | I b |= deg f b (x) = r b .

Discrete Fourier Transform (DFT)
DFT has been used to study repeated-root codes over finite chain rings in [3,5,6]. We employ DFT as a tool to establish the structure of (α + u l β)-constacyclic codes over R for a given length N.

Definition 5 (DFT). Let c be a vector in R
j=0 c i,j x i+jn 1 the corresponding polynomial. The DFT of c(x) is the following vector: j=0 c i,j w n i+j (α n 0 θξ b ) i , b ∈ I and n 1 n ≡ 1 (mod p s+d−1 ). Define the Mattson-Solomon polynomial of c to be the following.
The following lemma shows that if the Mattson-Solomon polynomial of c is given, then c can be recovered. Set S = R α,β = R[w]/ < w p s − (α + u l β) > . Let φ be the natural R-module isomorphism φ : S n 1 −→ R N defined by the following case.
Proof. Let 0 t n 1 − 1. Then, the following is the case.

Remark 5.
Since θξ b ∈ S(r b ), it is easy to verify thatĉ b ∈ S(r b ). Now let the following be the case. A = {(ĉ 0 ,ĉ 2 , . . . ,ĉ n 1 −1 ) ∈ S(r) n 1 |ĉ i ∈ S(r b ), i ∈ I b }. (19) Note that A with component-wise addition and multiplication is a ring. Moreover, it is clear that A ∼ = ⊕ b∈I S(r b ). Theorem 4. Let γ be the map γ : R N −→ ⊕ b∈I S(r b ), given by γ(c(x)) = (ĉ b ) b∈I . Then, γ is a ring isomorphism. In particular, if C is a constacyclic code of length N over R, then the following is the case: where C b is the constacyclic code {c((α 0 w) n θξ b ) | c(x) ∈ C} of length p s over CR(u k , r b ).
Before we obtain the structure of all constacyclic codes of length n 1 p s over R in terms of their generator polynomials, we provide the following lemma.
Lemma 3. Let f b (x) be the minimal polynomial of θξ b over R for each b ∈ I and n a positive integer such that n 1 n ≡ 1 (mod p s+d−1 ). Then, the following is the case: Then, the following is the case.
However, this is a contradiction, and this completes the proof.
Next, we introduce the polynomial representations of constacyclic codes over R. If C is a constacyclic code of length N over R. By Theorem 4, C ∼ = ⊕ b∈I C b , where C b is a constacyclic code of length p s over CR(u k , r b ), and by Theorem 1: where e i,b (w) = (α 0 w − 1) T i,b + uh i,b (w). Now, fix i and for each 0 j p s . We define F j (x) to be the product of all minimal polynomials of α b such that Tor i (C b ) =< (α 0 w − 1) j >. By Lemma 3, the following is the case: where a b (α 0 w) is a unit in S(r b ). Define the following: Theorem 5. Let C be a constacyclic code of length N over R . Then, the following is the case.
Moreover, this representation is unique.
, and then by computing the product, we obtain the result.

Remark 6.
If we choose g e (x) to have a minimal degree in the representation given by (23), we will obtain a minimal strong Gröbner basis < g 0 (x), . . . , u e g e (x) > for C. For more details about minimal strong Gröbner basis, refer to [7].
Next, we provide the enumeration of constacyclic codes of length N in terms of the length of p s . In other words, the problem of enumeration of constacyclic codes of length N over R is reduced to that of constacyclic codes of length of power of p. The proof of the following result is direct by Theorem 5.
Corollary 3. The number of distinct (α + u l β)-constacyclic codes of length N over R is the following: where N b is the number of (α + u l β)-constacyclic codes of length p s over CR(u k , r b ). Theorem 6. If k = 2, then the number of distinct (α + u l β)-constacyclic codes of length N over R is the following: where Proof. By Corollary 3, it suffices to compute N b , b ∈ I. First fix T 1 ; thus, T 0 = d b − T 1 . Let d p < p s . By Theorem 1, < (α 0 w − 1) T 0 + ue(w), (α 0 w − 1) T 1 > is a representation. Moreover, we have (p rr b ) T 1 choices for e(w) = ∑ we vary T 1 from 0 to z b , then there are 1 + p rr b + . . . + (p rr b ) z b = p rr b (z b +1) −1 p rr b −1 of (α + u l β)constacyclic codes of length p s over CR(u k , r b ). In the case when d p = p s , we have two options. If T 0 = p s , the only (α + u l β)-constacyclic code is < 0, u > with T 0 + T 1 = d p . If T 0 < p s , we use a similar discussion as before.
Remark 7. When k > 2, the enumeration of all constacyclic codes of length N over R is a tedious computation.

Torsion Codes and Hamming Distance
In this subsection, we first obtain the torsion codes of a constacyclic code C of length N over R in terms of the generators of C given in Theorem 5. Then, we reduce the Hamming distance of C to that of its (k − 1)th torsion code. (22).
Proof. First, note that u i g i (x) ∈ C; thus, < g i (x) >⊆ Tor i (C). Conversely, let h(x) ∈ Tor i (C), then by the definition of torsion codes, u i h(x) ∈ C. We make use of Lemma 4, deg h ≥ deg g i . By the division algorithm, there are r(x) and q(x) in R N such that h(x) − g i (x)q(x) = r(x), where r(x) = 0 or deg r < deg g i . As u i r(x) ∈ C, then by the minimality of deg g i , we must have r(x) = 0. In other words, h(x) ∈< g i (x) >; thus, h(x) ∈< g i (x) > . Therefore, Tor i (C) ⊆< g i (x) >, and this ends the proof.
Next, we obtain the Hamming distance of any cyclic code of length N over R.
Theorem 8. Let C be a cyclic code of length N over R. Then, d(C) = d(Tor k−1 (C)).
Proof. By the same argument as in Theorem 2, we obtain d(C) = d(Tor k−1 (C)), where

Dual Codes
Define F j (x) as in the proof of Theorem 5. Let a j be the constant of F j (x), 0 j p s .
Since ∏ p s j=0 F j (x) = x n 1 − α, then ∏ p s j=0 a j = −α. Thus, a j s are units in R and a j s are the leading coefficient of F * j (x) = x deg F j F j (x −1 ). Let the following is the case.
Note that m j (x)s are monic polynomials and ∏ p s j=0 a −1 j = −α −1 . Hence, the following is the case.
Therefore, m j (x)s are monic coprime divisors of It follows that m j (x) is the product of all minimal polynomials of α n 1 −b such that By Lemma 3, the following is the case: where a b (w) is a unit in S(r b ). Define the following case: where c i (x) = γ −1 ((a b (w)h i,b (w)) b∈I ) and h i,b (w) as in Theorem 3.

Theorem 9.
Let C be a constacyclic code of length N over R. Then, the following is the case.
Proof. By Theorem 4, C = ⊕ b∈I C b , where C b is a constcyclic code of length p s over CR(p n , rr b ). Assume that D = ⊕ b∈I C ⊥ b . By the definition of dual code, D ⊆ C ⊥ . On the other hand, we have |C b | · |C ⊥ b | = p rr b kp s . Then, |C| · |D| = p rkN ; thus, Therefore, by a similar argument to that of the proof of Theorem 5, we obtain where G i (x) is defined in (28) and 0 ≤ i ≤ k − 1. By Corollary 2 and the fact that |C ⊥ | · |C| = p rkN , we obtain |C ⊥ | = p rt , where t = Σ p s j=0 jdeg F * j .
To summarize, the results of this section provide an algorithm for constructing the representation of constacyclic codes of length N = n 1 p s from those of length p s . This algorithm consists of the following steps: Step 1: Find θ, ξ, I and all r b , b ∈ I; Step 2: Compute F j (x) for each 0 ≤ j ≤ p s when i is fixed; Step 3: Find a b (x), b ∈ I from the relation (21); Step 4: Extract b i (x) by using b i (x) = γ −1 ((a b (w)h i,b (w)) b∈I ), 0 ≤ i ≤ k − 1; Step 5: Compute the polynomials g i (x) via Equation (22).
Next, we present an example illustrating the algorithm described above.
Remark 8. The same algorithm described above can be applied to compute the generators of dual codes. The main key for performing this is to consider C ⊥ b instead of C b , where b ∈ I.

Conclusions
In this article, we have determined a unique representation of any constacyclic code of arbitrary length N over a finite chain ring of characteristic p via discrete Fourier transform (DFT). Such representations allowed us to compute Hamming distance and dual codes easily. Moreover, we managed to provide the number of constacyclic codes of length N over R in terms of that of length p s , where v p (N) = s and v p is the p-adic valuation. In particular, we provided the exact number of such codes when k = 2.