ON SELF-DUAL CYCLIC CODES OF LENGTH p a OVER GR( p 2 , s )

. In this paper, cyclic codes over the Galois ring GR( p 2 ,s ) are studied. The main result is the characterization and enumeration of Hermitian self-dual cyclic codes of length p a over GR( p 2 ,s ). Combining with some known results and the standard Discrete Fourier Transform decomposition, we arrive at the characterization and enumeration of Euclidean self-dual cyclic codes of any length over GR( p 2 ,s ).


Introduction
Cyclic and self-dual codes over finite fields have been extensively studied for both theoretical and practical reasons (see [7,11], and references therein). In [6], it has been proven that some binary non-linear codes such as the Kerdock, Preparata, and Goethals codes are the Gray image of linear cyclic codes over Z 4 . After that the concepts of cyclic and self-dual codes have been extended and studied over the ring Z 4 (see [1,3,4]). Later on, the study of cyclic and self-dual codes has been generalized to codes over Z p r and Galois rings (see [5,9,10,12,13]).
In [3], the structure of cyclic a codes of oddly even length (2m, where m is odd) over Z 4 has been studied via the Discrete Fourier Transform decomposition. This idea has been extended to the case of all even lengths in [4]. A remarkable structural decomposition of cyclic codes over Z 4 are given in [3,4]. However, due to a misinterpretation of the orthogonality in [3,Lemma 6] and [4,Equation (21)], some results in [3,4] concerning Euclidean self-dual cyclic codes over Z 4 are erroneous.
Using a spectral approach and a generalization of the results in [3,4], the structure of cyclic codes over Z p e , for any prime p, has been studied in [5]. A nice classification of cyclic and Euclidean self-dual cyclic codes of length p a over GR(p 2 , s) has been given using a different approach in [9,10,12].
In this paper, we focus on the characterization and enumeration of Hermitian self-dual cyclic codes of length p a over GR(p 2 , s) and their application to the enumeration of Euclidean self-dual cyclic codes of any length over GR(p 2 , s). Using the standard Discrete Fourier Transform decomposition viewed as an extension of [5], a cyclic code C of any length n = mp a over GR(p 2 , s) can be viewed as a product of cyclic codes of length p a over some Galois extensions of GR(p 2 , s). Euclidean self-dual cyclic codes can be characterized based on this decomposition. Applying some known results concerning cyclic and Euclidean self-dual cyclic codes of length p a in [9,10] and our result on Hermitian self-dual cyclic codes of length p a , the number of Euclidean self-dual cyclic codes of arbitrary length over GR(p 2 , s) can be determined.
The paper is organized as follows. Some preliminary concepts and results are recalled in Section 2. In Section 3, we prove the main result concerning the number of Hermitian self-dual cyclic codes of length p a over GR(p 2 , s). An application to the enumeration of Euclidean self-dual cyclic codes of any length over GR(p 2 , s) is discussed in Section 4 together with corrections of [3,4] . A conclusion is provided in Section 5.

Preliminaries
In this section, we recall some definitions and basic properties of cyclic codes over the Galois ring GR(p 2 , s).

2.1.
Cyclic codes over GR(p 2 , s). For a prime p and a positive integer s, the Galois ring GR(p 2 , s) is the Galois extension of the integer residue ring Z p 2 of degree s. Let ξ be an element in GR(p 2 , s) that generates the Teichmüller set T s of GR(p 2 , s). In other words, T s = {0, 1, ξ, ξ 2 , . . . , ξ p s −2 }. Then every element in GR(p 2 , s) has a unique p-adic expansion of the form where a, b ∈ T s . If s is even, let¯denote the automorphism on GR(p 2 , s) defined by For more details concerning Galois rings, we refer the readers to [14].
A cyclic code of length n over GR(p 2 , s) is a GR(p 2 , s)-submodule of the GR(p 2 , s)module (GR(p 2 , s)) n which is invariant under the cyclic shift. It is well known that every cyclic code C of length n over GR(p 2 , s) can be regarded as an ideal in the quotient polynomial ring GR(p 2 , s)[X]/ X n − 1 . Precisely, its is represented by the polynomial representation For a given cyclic code C of length n over GR(p 2 , s), denote by C ⊥E the Euclidean dual of C defined with respect to the form In addition, if s is even, we can also consider the Hermitian dual C ⊥H of C defined with respect to the form The goal of this paper is to characterize and enumerate self-dual codes over the Galois ring GR(p 2 , s). For convenience, let N (GR(p 2 , s), n), N E (GR(p 2 , s), n), and N H (GR(p 2 , s), n) denote the numbers of cyclic codes, Euclidean self-dual cyclic codes, and Hermitian self-dual cyclic codes of length n over GR(p 2 , s), respectively.

2.2.
Some results on cyclic codes of length p a over GR(p 2 , s). In this subsection, we recall some results concerning cyclic and Euclidean self-dual cyclic codes of length p a over GR(p 2 , s) in terms of ideals in GR(p 2 , s)[X]/ X p a − 1 .
In [9], it has been shown that all the ideals in GR(p 2 , s)[X]/ X p a − 1 have a unique representation.
and h j is an element in the Teichmüller set T s for all j.
The integer i 1 in Proposition 2.1 is called the first torsion index of C.
Corollary 2.3. The number of all cyclic codes of length p a over GR(p 2 , s) is Combining the results in [9,10,12], the complete enumeration of Euclidean selfdual cyclic codes of length p a over GR(p 2 , s) can be summarized as follows.
If p is an odd prime, then the number of Euclidean self-dual cyclic codes of length p a over GR(p 2 , s) is 3. Hermitian self-dual cyclic codes of length p a over GR(p 2 , s) In this section, we assume that s is even and focus on characterizing and enumerating Hermitian self-dual cyclic codes of length p a over GR(p 2 , s).
It has been proven in [12,Theorem 2] that the Euclidean dual of the cyclic code C in (2.2) is of the form and the empty sum is regarded as zero. For each subset A of GR(p 2 , s)[X]/ X p a − 1 , let A denote the set where¯is the automorphism defined in (2.1). Since it is well know that C ⊥H = C ⊥E , we have If C = C ⊥H , then |C| = (p s ) p a which implies that i 0 + i 1 = p a . Then we can write (3.1) If i 1 = 0, then pGR(p 2 , s)[X]/ X p a − 1 is the only Hermitian self-dual cyclic code of length p a over GR(p 2 , s). Next, we assume that i 1 ≥ 1.
By the unique representation of C = C ⊥H , (2.2), and (3.1), we have For a matrix V , denote by V T the transpose of V . Then (3.2) forms a matrix equation Therefore, the cyclic code C in (2.2) is Hermitian self-dual if and only if the matrix equation (3.4) has a solution in F i1 p s . Moreover, the number of Hermitian self-dual cyclic codes of length p a over GR(p 2 , s) with first torsion degree i 1 equals the number of solutions of (3.4) in F i1 p s . From (3.3), we observe that M (p a , i 1 ) has the following properties. For 1 ≤ j, i ≤ i 1 , let m ij denote the entry in the ith row and jth column of M (p a , i 1 ). Then, for and hence, , then b i = 0 for all 1 ≤ i ≤ i 1 , and hence, the result follows.
Theorem 26]) and the fact that In order to determine the number of solutions of (3.4) in F i1 p s , we recall two maps which are important tools.

The trace map Tr
It is well know that Tr is F p s/2 -linear and it is not difficult to see that Ψ is also F p s/2 -linear. If p = 2, then Tr = Ψ. In general, we have the following properties.
Lemma 3.2. Let Tr and Ψ be defined as above. Then the following statements hold.
Proof. Statements i and ii follow immediately from the definitions. We note that, for each a ∈ Ψ(F p s ) and Similarly, for each a ∈ Tr(F p s ) and b ∈ F p s , b ∈ Tr −1 (a) if and only if b+ker(Tr) = Tr −1 (a). Since Tr is a surjective F p s/2 -linear map from F p s to F p s/2 , we have and hence, statement iv follows. Proof. From [10], M (p a , i 1 ) has 4 presentations depending on the parity of p and i 1 . We therefore separate the proof into 4 cases. Case 1. p is odd and i 1 = 2µ 1 + 1 is odd.
From [10], the matrix M (p a , i 1 ) can be written as where * denotes an entry of M (p a , i 1 ) defined in (3.3).
From (3.4) and (3.7), we have This implies that (3.4) has a solution if and only if the right hand sides of (3.8) and (3.10) are in F p s/2 and the right hand side of (3.9) is in Ψ(F p s ). In this case, we have By Lemma 3.2, it suffices to show that the images under Ψ of the right hand sides of (3.8) and (3.10) are 0 and the image under the trace map of the right hand side of (3.9) is 0.
Case 2. p is odd and i 1 = 2µ 1 is even.
From [10], we have From (3.4) and (3.13), we have This implies that (3.4) has a solution if and only if the right hand side of (3.14) is in Ψ(F p s ) and the right hand side of (3.15) is in F p s/2 . In this case, by Lemma 3.2, the number of solutions of (3.4) is p si1/2 . By Lemma 3.2, it is sufficient to show that the image under the trace map of the right hand side of (3.14) and the image under Ψ of the right hand side of (3.15) are 0. Using computations similar to those in (3.11) and (3.12), the desired properties can be concluded.
From [10], we have where * denotes an entry of M (p a , i 1 ) defined in (3.3).
Form [10], we have  4. Euclidean self-dual cyclic codes of arbitrary length over GR(p 2 , s) In this section, we focus on cyclic codes of any length n over GR(p 2 , s). We generalize the decomposition in [4] (see also [3] and [5]) to this case. Combining with the results in [9], [10], and in the previous section, we characterize and enumerate Euclidean self-dual cyclic codes of any length n over GR(p 2 , s).
Write n = mp a , where p m and a ≥ 0. Let R p 2 (u, s) := GR(p 2 , s)[u]/ u p a − 1 . Let be an involution on R p 2 (u, s) that fixes GR(p 2 , s) and that maps u i to u −i (mod p a ) for all 0 ≤ i < p a , and extend naturally to GR(p 2 , sν)[u]/ u p a − 1 for all positive integers ν. It is not difficult to verify that the map Φ : The following lemma is an obvious generalization of [4, Lemma 5.1]. 4.1. Decomposition. We generalize the Discrete Fourier Transform decomposition for cyclic codes over Z 4 in [4] to cyclic codes over GR(p 2 , s) as follows.
Let M be the multiplicative order of p s modulo m and let ζ denote a primitive mth root of unity in GR(p 2 , sM ). The Discrete Fourier Transform of Define The p s -cyclotomic coset S p s (h) is said to be self-inverse if S p s (−h) = S p s (h), or equivalently, −h ∈ S p s (h). In this case, the size m h of S p s (h) is 1 or even (see [8,Remark 2.6]). Moreover, we have −h = h if m h = 1, and −h = p sm h /2 h otherwise. We note that S p s (0) and S p s ( m 2 ) (if m is even) are self-inverse. Remark 1. We have the following observations for the coefficients of the Discrete Fourier Transform.
where¯is a natural extension of (2.1), i.e.,¯fixes u and maps a + pb to a p se + pb p se .
Let J 0 , J 1 , and J 2 be complete sets of representatives of p s -cyclotomic cosets in I 0 , I 1 , and I 2 , respectively. Without loss of generality, we assume that J 2 is chosen such that h ∈ J 2 if and only if −h ∈ J 2 .
The following lemma is a straightforward extension of [4, Theorem 3.2 and Corollary 3.3].
If C is a cyclic code of length n = mp a over GR(p 2 , s), then C is isomorphic to

4.2.
Euclidean self-dual cyclic codes. In this subsection, we consider the Euclidean dual of cyclic codes of length n = mp a over GR(p 2 , s). The characterization and enumeration of Euclidean self-dual cyclic codes of length n are established, where p is a prime such that p m and a ≥ 0. Let By (4.1) and (4.2), we conclude the lemma.
Based on the isomorphism defined in Lemma 4.3, we determine the Euclidean duals of cyclic codes over GR(p 2 , s) as follows.
Proposition 4.5. Let C be a cyclic code of length n = mp a over GR(p 2 , s) decomposed as in (4.3), i.e., Moreover, C is Euclidean self-dual if and only if C j is Euclidean self-dual for all j ∈ J 0 , C h is Hermitian self-dual for all h ∈ J 1 , and C k = C ⊥E m−k (mod m) for all k ∈ J 2 .
Proof. Let D be a cyclic code of length n = mp a over GR(p 2 , s) such that Consider m = 1 in Lemma 4.1, we have the following facts. For each positive integer ν and a, b ∈ R p 2 (u, sν), we have a, b E = 0 if a b = 0, and a, b H = 0 if a b = 0. Therefore, by Lemmas 4.1 and 4.4, we have D ⊆ C ⊥E . The equality follows from their cardinalities.
The second part is clear.
Since J 2 has been chosen such that h ∈ J 2 if and only if −h ∈ J 2 , we can write J 2 as a disjoint union Corollary 4.6. The number of Euclidean self-dual codes of length n = mp a over GR(p 2 , s) is where δ(m) = 1 if m is odd, 2 if m is even, and the empty product is regarded as 1.
Proof. From Proposition 4.5, a code C decomposed as in (4.5) is Euclidean self-dual if and only if C j is Euclidean self-dual for all j ∈ J 0 , C h is Hermitian self-dual for all h ∈ J 1 , and C k = C ⊥E m−k (mod m) for all k ∈ J 2 . The number of Euclidean (resp., Hermitian) self-dual cyclic codes of length p a corresponding to J 0 (resp., J 1 ) is j∈J0 N E (GR(p 2 , s), p a ) (resp., h∈J1 N H (GR(p 2 , sm h ), p a ).) The number of choices of cyclic codes of length p a corresponding to J 2 is k∈J 2 N (GR(p 2 , sm k ), p a ).
Since C k = C ⊥E m−k (mod m) for all k ∈ J 2 , there is only one possibility for codes corresponding to J 2 .
Therefore, the number of Euclidean self-dual codes of length n = mp a over GR(p 2 , s) is Since |J 0 | = 1 if m is odd and |J 0 | = 2 if m is even, the result follows.
For a ≥ 1, the numbers N E , N H , and N have been determined in Corollary 2.3, Proposition 2.4, and Theorem 3.4, respectively.
Therefore, the number in Corollary 4.6 is completely determined. Some examples of the numbers of Euclidean self-dual cyclic codes of small lengths over Z 4 , Z 9 , and GR(4, 2) are given in Table 1. In general, the numbers of Euclidean self-dual cyclic codes of any length over GR(p 2 , s), where p is a prime and s is a positive integer, can be computed using the formula in Corollary 2.3, Proposition 2.4, Theorem 3.4, and Corollary 4.6.

4.3.
A note on Euclidean self-dual cyclic codes of even length over Z 4 . In this subsection, we reconsider cyclic codes of even length over Z 4 which have been studied in [3] and [4]. This case can be viewed as a special case of the previous two subsections where p = 2 and s = 1. We discovered that [3, Lemma 7, Lemma 9, and Corollary 2] and [4, Lemma 5.2, Corollary 5.4, Proposition 5.8, Corollary 5.9, and Section 6] contain some errors. The detailed discussion and corrections of such errors are as follows.
Let n be an even positive integer written as n = m2 a , where m is odd and a ≥ 1. Then, in the decomposition (4.3), we have J 0 = {0} and every cyclic code C of length n over Z 4 can be viewed as where C 0 , C k , and C k are cyclic codes of length 2 a over appropriate Galois extensions of Z 4 .
We note that all the errors in [3] and [4] are caused by misinterpretation of the orthogonality in [3, Lemma 6] and [4,Equation (21)] (see also (4.4)). This effects the components in the decomposition of the Euclidean dual of C in (4.7) that relates to the 2-cyclotomic cosets of elements in J 1 . The errors are pointed out in terms of our notations. The readers may refer to the original statements via the number cited. The corrections to these are discussed as well.
The Euclidean dual of C in (4.7).
The Euclidean dual of C in (4.7) can be viewed as a special case of Proposition 4.5, where p = 2 and s = 1, i.e., The number of Euclidean self-dual cyclic codes over Z 4 .
Since the determination of the Euclidean dual of a cyclic code in [3] and [4] is not correct, in [3, Lemma 9] and [4,Proposition 5.8], an incorrect statement about the number of Euclidean self-dual cyclic codes of length n = m2 a over Z 4 has been proposed as follows.  where the empty product is regarded as 1.

Conclusion
The complete characterization and enumeration of Hermitian self-dual cyclic codes of length p a over GR(p 2 , s) has been established. Using the Discrete Fourier Transform decomposition, we have characterized the structure of Euclidean selfdual cyclic codes of any length over GR(p 2 , s). The enumeration of such codes has been given through this decomposition, our results on Hermitian self-dual codes, and some known results on cyclic codes of length p a over GR(p 2 , s). Based on the established characterization and enumeration, we have corrected mistakes in some earlier results on Euclidean self-dual cyclic codes of even length over Z 4 in [3] and [4].