ISSN 2148-838Xhttp://dx.doi.org/10.13069/jacodesmath.560406 J. Algebra Comb. Discrete Appl. 6(2) • 75–94 Received: 2 January 2019 Accepted: 16 April 2019 Journal of Algebra Combinatorics Discrete Structures and Applications Self-dual and complementary dual abelian codes over Galois rings∗ Research Article Somphong Jitman, San Ling Abstract: Self-dual and complementary dual cyclic/abelian codes over finite fields form important classes of linear codes that have been extensively studied due to their rich algebraic structures and wide appli- cations. In this paper, abelian codes over Galois rings are studied in terms of the ideals in the group ring GR(pr, s)[G], where G is a finite abelian group and GR(pr, s) is a Galois ring. Characterizations of self-dual abelian codes have been given together with necessary and sufficient conditions for the existence of a self-dual abelian code in GR(pr, s)[G]. A general formula for the number of such self- dual codes is established. In the case where gcd(|G|, p) = 1, the number of self-dual abelian codes in GR(pr, s)[G] is completely and explicitly determined. Applying known results on cyclic codes of length pa over GR(p2, s), an explicit formula for the number of self-dual abelian codes in GR(p2, s)[G] are given, where the Sylow p-subgroup of G is cyclic. Subsequently, the characterization and enumer- ation of complementary dual abelian codes in GR(pr, s)[G] are established. The analogous results for self-dual and complementary dual cyclic codes over Galois rings are therefore obtained as corollaries. 2010 MSC: 94B15, 94B05, 16A26 Keywords: Abelian codes, Galois rings, Self-dual codes, Complementary dual codes, Codes over rings 1. Introduction Algebraically structured codes over finite fields with self-duality and complementary duality are important families of linear codes that have been extensively studied for both theoretical and practical reasons (see [1], [3], [11], [13], [15], [21], [26], [27], and references therein). Codes over finite rings have been interesting since it was proven that some binary non-linear codes such as the Kerdock, Preparata, and Goethal codes are the Gray images of linear codes over Z4 [10]. Algebraically structured codes such ∗ S. Jitman was supported by the Thailand Research Fund and Silpakorn University under Research Grant RSA6280042. S. Ling was supported by Nanyang Technological University Research Grant M4080456. Somphong Jitman(Corresponding Author); Department of Mathematics, Faculty of Science, Silpakorn University, Nakhon Pathom 73000, Thailand (email: sjitman@gmail.com). San Ling; Division of Mathematical Sciences, School of Physical and Mathematical Sciences, Nanyang Techno- logical University, Singapore 637371, Republic of Singapore (email: lingsan@ntu.edu.sg). 75 https://orcid.org/0000-0003-1076-0866 https://orcid.org/0000-0002-1978-3557 S. Jitman, S. Ling / J. Algebra Comb. Discrete Appl. 6(2) (2019) 75–94 as cyclic, constacyclic, and abelian codes have extensively been studied over Zpr, Galois rings, and finite chain rings in general (see [7],[18], and references therein). The characterization and enumeration of Euclidean self-dual cyclic codes over finite fields have been established in [11] and generalized to Euclidean and Hermitian self-dual abelian codes over finite fields in [13] and [15], respectively. Over some finite rings, a characterization of self-dual cyclic, constacyclic and abelian codes has been done (see, for example, [1], [7],[16], [17], [24], and [26]). In [1], [5], [4] and [23], characterization and enumeration of Euclidean and Hermitian self-dual cyclic codes over finite chain rings have been discussed. Euclidean complementary dual cyclic codes over finite fields have been studied in [27]. Recently, they have been generalized to Euclidean and Hermitian complementary dual abelian codes over finite fields in [3]. The complete characterization and enumeration of complementary dual abelian codes over finite fields have been established in the said paper. In this paper, we focus on abelian codes over Galois rings GR(pr,s), i.e., ideals in the group ring GR(pr,s)[G] of an abelian group G over a Galios ring GR(pr,s). Specifically, we study self-dual and complementary dual abelian codes in GR(pr,s)[G] with respect to both the Euclidean and Hermitian inner products. We characterize such self-dual abelian codes and determine necessary and sufficient conditions for the existence of a self-dual abelian code in GR(pr,s)[G]. We give a formula for the number of self-dual abelian codes in GR(pr,s)[G]. Under the restriction i) gcd(|G|,p) = 1; or ii) r = 2 and the Sylow p-subgroup of G is cyclic, the numbers of self-dual abelian codes in GR(pr,s)[G] are explicitly determined. Subsequently, the characterization and enumeration of complementary dual abelian codes in GR(pr,s)[G] are given. The number of complementary dual abelian codes in GR(pr,s)[G] is shown to be independent of r and the Sylow p-subgroup of G. We note that the Hermitian duality is meaningful only when s is even. Since we study Euclidean and Hermitian self-dual codes in parallel, the assumption that s is even is included whenever we refer to the Hermitian duality. The paper is organized as follows. In Section 2, we recall and prove some basic results for group rings, abelian codes, and their duals. In Section 3, we present the characterization and a general set up for the enumeration of self-dual abelian codes in GR(pr,s)[G]. The complete enumeration of Euclidean and Hermitian self-dual abelian codes in GR(pr,s)[G] is given in the special cases where i) gcd(p, |G|) = 1; and ii) r = 2 and the Sylow p-subgroup of G is cyclic. In Section 4, the characterization and enumeration of complementary dual abelian codes in GR(pr,s)[G] are given. 2. Preliminaries In this section, we recall some definitions and basic properties of abelian codes and prove some results on their Euclidean and Hermitian duals. 2.1. Abelian codes For a finite commutative ring R with identity and a finite abelian group G, written additively, let R[G] denote the group ring of G over R. The elements in R[G] will be written as ∑ g∈G αgY g, where αg ∈ R. The addition and the multiplication in R[G] are given as in the usual polynomial rings over R with the indeterminate Y , where the indices are computed additively in G. By convention, Y 0 = 1 is the identity of R, where 0 is the additive identity of G. An abelian code in R[G] is defined to be an ideal of R[G]. If G = {g1,g2, . . . ,gn} is an abelian group of order n, it is not dificult to see that the map π : R[G] → Rn defined by ∑n i=1 αgiY gi 7→ (αg1,αg2, . . . ,αgn) is an R-module isomorphism. Hence, an abelian code C in R[G] can be viewed as an R-submodule π(C) in Rn. Precisely, π(C) is a linear code of length n over R. If G is cyclic of order n, an abelian code in R[G] becomes a classical cyclic code of length n over R. In this case, an abelian code will be referred to as a cyclic code. It is well known that a cyclic code of length n over R can also be regarded as an ideal 76 S. Jitman, S. Ling / J. Algebra Comb. Discrete Appl. 6(2) (2019) 75–94 in the quotient polynomial ring R[X]/〈Xn − 1〉. From now on, we focus on the case where the ring is a Galois ring GR(pr,s), a Galois extension of degree s of an integer residue ring Zpr. Let ξ be an element in GR(pr,s) that generates a Teichmüller set Ts of GR(pr,s). In other words, Ts = {0, 1,ξ,ξ2, . . . ,ξp s−2}. Then every element in GR(pr,s) has a unique p-adic expansion of the form α = α0 + α1p + · · · + αr−1pr−1, where αi ∈ Ts for all i = 0, 1, . . . ,r − 1. In the case where s is even, the map ¯ : GR(pr,s) → GR(pr,s) defined by α = α ps/2 0 + α ps/2 1 p + · · · + α ps/2 r−1 p r−1 (1) is a ring automorphism on GR(pr,s). For more details on Galois rings, we refer the readers to [25]. Let P be the Sylow p-subgroup of G and let A be a complementary subgroup of P in G. Then G ∼= A×P . Let R := GR(pr,s)[A]. Then the map Φ : GR(pr,s)[G] →R[P ] given by Φ( ∑ a∈A ∑ b∈P αa+bY a+b) = ∑ b∈P αb(Y )Y b, where αb(Y ) = ∑ a∈A αa+bY a ∈R, is a well-known ring isomorphism (see [19, Section 3.2, Exercise 4]). Then Φ induces a one-to-one correspondence between the ideals in GR(pr,s)[G] and the ideals in R[P ]. Since an abelian code is an ideal in a group ring, the above discussion can be interpreted in terms of abelian codes as follows. Lemma 2.1. The map Φ induces a one-to-one correspondence between the abelian codes in GR(pr,s)[G] and the abelian codes in R[P]. An abelian code C in GR(pr,s)[G] is said to be Euclidean self-dual (resp., Euclidean complementary dual) if C = C⊥E (resp., C∩C⊥E = {0}), where C⊥E is the dual of C with respect to the form 〈u,v〉E := ∑ g∈G αgβg, where u = ∑ g∈G αgY g and v = ∑ g∈G βgY g. Define an involution ̂ on R to be the GR(pr,s)-module homomorphism that fixes GR(pr,s) and sends Y a to Y −a for all a ∈ A. An abelian code D in R[P ] is said to be -̂self-dual if D = D ⊥̂, where D ⊥̂ is the dual of D with respect to the form 〈x,y〉̂ := ∑ b∈P xb(Y )ŷb(Y ), where x = ∑ b∈P xb(Y )Y b and y = ∑ b∈P yb(Y )Y b. In addition, if s is even, an abelian code C in GR(pr,s)[G] is said to be Hermitian self-dual (resp., Hermitian complementary dual) if C = C⊥H (resp., C ∩C⊥H = {0}), where C⊥H is the dual of C with respect to the form 〈u,v〉H := ∑ g∈G αgβg, where u = ∑ g∈G αgY g and v = ∑ g∈G βgY g. 77 S. Jitman, S. Ling / J. Algebra Comb. Discrete Appl. 6(2) (2019) 75–94 Define an involution ˜ on R to be the GR(pr,s)-module homomorphism that sends α to α for all α ∈ GR(pr,s) and sends Y a to Y −a for all a ∈ A. An abelian code D in R[P ] is said to be ∼-self-dual if D = D⊥∼, where D⊥∼ is the dual of D with respect to the form 〈x,y〉∼ := ∑ b∈P xb(Y )ỹb(Y ), where x = ∑ b∈P xb(Y )Y b and y = ∑ b∈P yb(Y )Y b. Similarly to the finite field case, the following relations among the above forms can be verified using arguments similar to those in [13, Proposition 2.4] and [15, Proposition 2.4]. Lemma 2.2. Let r and s be positive integers and let p be a prime number. Let G ∼= A×P be as above and u,v ∈ GR(pr,s)[G]. Then the following statements hold. i) 〈Y gu,v〉E = 0 for all g ∈ G if and only if 〈Y bΦ(u), Φ(v)〉̂ = 0 for all b ∈ P. ii) If s is even, then 〈Y gu,v〉H = 0 for all g ∈ G if and only if 〈Y bΦ(u), Φ(v)〉∼ = 0 for all b ∈ P. The next corollary follows immediately. Corollary 2.3. Let r and s be positive integers and let p be a prime number. Let C be an abelian code in GR(pr,s)[G]. Then the following statements hold. i) Φ(C) ⊥̂ = Φ(C⊥E ). In particular, C is Euclidean self-dual if and only if Φ(C) is ̂-self-dual. ii) If s is even, then Φ(C)⊥∼ = Φ(C⊥H ). In particular, C is Hermitian self-dual if and only if Φ(C) is ∼-self-dual. Therefore, to study Euclidean and Hermitian self-dual abelian codes in GR(pr,s)[G], it is sufficient to consider ̂-self-dual and ∼-self-dual abelian codes in R[P ], respectively. 2.2. Decomposition and dualities Recall that p represents a prime number, s is a positive integer, and A is a finite abelian group such that gcd(p, |A|) = 1. For coprime positive integers i,j, let ordi(j) denote the multiplicative order of j modulo i. Fora ∈ A, denote by ord(a) the additive order ofa inA. For each a ∈ A, a ps-cyclotomic class of A containing a is defined to be the set Sps(a) :={psi ·a | i = 0, 1, . . .} = {psi ·a | 0 ≤ i < ordord(a)(ps)}, where psi · a := ∑psi j=1 a in A. A p s-cyclotomic class Sps(a) is said to be of type I if a = −a, type II if Sps(a) = Sps(−a) and a 6= −a, or type III if Sps(−a) 6= Sps(a). If s is even, a ps-cyclotomic class Sps(a) is said to be of type II′ if Sps(a) = Sps(−ps/2 ·a) or type III′ if Sps(−ps/2 ·a) 6= Sq(a), where −ps/2 ·a denotes ps/2 · (−a). Remark 2.4. We have the following facts for the ps-cyclotomic classes of A (see [13, Remark 2.5] and [15, Remark 2.6]). 1. A ps-cyclotomic class of type I has cardinality one. 2. Sps(0) is a ps-cyclotomic class of both types I and II ′. 3. If a ps-cyclotomic class of type II exists, then its cardinality is even. Moreover, if Sps(a) is a ps-cyclotomic class of type II of cardinality 2ν, then −a = psν ·a. 78 S. Jitman, S. Ling / J. Algebra Comb. Discrete Appl. 6(2) (2019) 75–94 4. A ps-cyclotomic class of A of type II′ has odd cardinality. Moreover, if Sps(a) is a ps-cyclotomic class of type II′ of cardinality ν, then −a = psν/2 ·a and −ps/2 ·a = ps(ν+1)/2 ·a. Assume that A has cardinality m and exponent M. By the Fundamental Theorem of finite abelian groups, A can be written as a direct product of finite cyclic groups A = ∏N i=1 Zmi, where Zmi = {0, 1, . . . ,mi − 1} denotes the additive cyclic group of order mi ≥ 2 for all 1 ≤ i ≤ N. Then an element b ∈ A can be written as b = (b1,b2, . . . ,bN ), where bi ∈ Zmi. For each h ∈ A, let γh : A → Z be defined by γh(b) = N∑ i=1 bihi(M/mi), (2) where the sum is a rational sum. Let µ be the order of ps modulo M. Denote by ζ a primitive Mth root of unity in GR(pr,sµ). For a given c = ∑ a∈A caY a ∈R := GR(pr,s)[A], its Discrete Fourier Transform (DFT) is c̆ = ∑ h∈A c̆hY h, where c̆h = ∑ a∈A caζ γh(a) ∈ GR(pr,sµ). (3) Moreover, if Sps(h) has cardinality ν, then it is not difficult to verify that c̆h is contained in a subring of GR(pr,sµ) which is isomorphic to GR(pr,sν). Using this DFT, the decomposition of R := GR(pr,s)[A], where gcd(p, |A|) = 1, has been given in [18] in terms of the mix-radix representation of the elements in A. In order to utilize the decomposition in [18] for characterizing self-dual codes, we need to consider a suitable rearrangement of the terms in the decomposition. 2.2.1. Euclidean case For the Euclidean self-duality, we consider the rearrangement based on the ps-cyclotomic classes of types I − III as follows. Assume that A contains L ps-cyclotomic classes. Without loss of generality, let {a1,a2, . . . ,aL} be a set of representatives of the ps-cyclotomic classes such that {ai | i = 1, 2, . . . , tI}, {atI+j | j = 1, 2, . . . , tII} and {atI+tII+k,atI+tII+tIII+k = −atI+tII+k | k = 1, 2, . . . , tIII} are sets of repre- sentatives of ps-cyclotomic classes of types I,II, and III, respectively, where L = tI + tII + 2tIII. From the definition, |Sps(ai)| = 1 for all i = 1, 2, . . . , tI. From Remark 2.4, the order of the ps-cyclotomic classes of type II is even order. For j = 1, 2, . . . , tII, let 2ej denote the cardinality of Sps(atI+j). For k = 1, 2, . . . , tIII, Sps(atI+tII+k) and Sps(atI+tII+tIII+k) have the same cardinality and denote it by fk. Rearranging the terms in the decomposition in [18] based on the ps-cyclotomic classes of A of types I− III, we have R∼= ( tI∏ i=1 GR(pr,s) ) ×   tII∏ j=1 GR(pr, 2sej)  × ( tIII∏ k=1 (GR(pr,sfk) × GR(pr,sfk)) ) , (E1) where GR(pr, 2sej) is induced by Sps(atI+j) for all j = 1, 2, . . . , tII and GR(p r,sfk) × GR(pr,sfk) is induced by (Sps(atI+tII+k), Sps(−atI+tII+k)) for all k = 1, 2, . . . , tIII. For more details and the explicit isomorphism, the readers may refer to [18, Section II]. It follows that R[P ] ∼= ( tI∏ i=1 GR(pr,s)[P ] ) ×   tII∏ j=1 GR(pr, 2sej)[P ]  × ( tIII∏ k=1 (GR(pr,sfk)[P] × GR(pr,sfk)[P ]) ) . (E2) 79 S. Jitman, S. Ling / J. Algebra Comb. Discrete Appl. 6(2) (2019) 75–94 Therefore, by Lemma 2.1, every abelian code in GR(pr,s)[G] ∼= R[P ] can be written in the form C ∼= ( tI∏ i=1 Ui ) ×   tII∏ j=1 Vj  × ( tIII∏ k=1 (Wk ×W ′k) ) , (E3) where Ui is an abelian code in GR(pr,s)[P ], Vj is an abelian code in GR(pr, 2sej)[P], and Wk,W ′k are abelian codes in GR(pr,sfk)[P ] for all i = 1, 2, . . . , tI, j = 1, 2, . . . , tII, and k = 1, 2, . . . , tIII. The Euclidean dual of C in (E3) can be viewed to be of the form C⊥E ∼= ( tI∏ i=1 U⊥Ei ) ×   tII∏ j=1 V ⊥Hj  × ( tIII∏ k=1 ( (W ′k) ⊥E ×W⊥Ek )) . (E4) The detailed justification for (E4) is provided in Appendix A.1. 2.2.2. Hermitian case In the case where s is even, we consider the other rearrangement of the decomposition of R in terms of the ps-cyclotomic classes of A of types II′ and III′. Let {b1 = 0,b2, . . . ,bL} denote a set of representatives of the ps-cyclotomic classes such that {bj | j = 1, 2, . . . , tII′} and {btII′+k,btII′+tIII′+k = −ps/2 · btII′+k | k = 1, 2, . . . , tIII′} represent p s-cyclotomic classes of types II′ and III′, respectively, where L = tII′ + 2tIII′. For j = 1, 2, . . . , tII′, let éj denote the cardinality of Sps(bj). For k = 1, 2, . . . , tIII′, Sps(btII′+k) and Sps(btII′+tIII′+k) have the same cardinality and denote it by f́k. Rearranging the terms in the decomposition in [18] based on the ps-cyclotomic classes of A of types II′ and III′, we have R∼=   tII′∏ j=1 GR(pr,séj)  × ( tIII′∏ k=1 ( GR(pr,sf́k) × GR(pr,sf́k) )) , (H1) where GR(pr,séj) is induced by Sps(bj) for all j = 1, 2, . . . , tII′ and GR(pr,sf́k)×GR(pr,sf́k) is induced by ( Sps(btII′+k),Sps(−p s/2 · btII′+k) ) for all k = 1, 2, . . . , tIII′. Consequently, R[P ] ∼=   tII′∏ j=1 GR(pr,séj)[P ]  × ( tIII′∏ k=1 ( GR(pr,sf́k)[P ] × GR(pr,sf́k)[P ] )) , (H2) and, by Lemma 2.1, every abelian code in GR(pr,s)[G] ∼= R[P ] can be viewed as C ∼=   tII′∏ j=1 Ej  × ( tIII′∏ k=1 (Fk ×F ′k) ) , (H3) where Ej is an abelian code in GR(pr,séj)[P ] and Fk,F ′k are abelian codes in GR(p r,sf́k)[P ] for all j = 1, 2, . . . , tII′ and k = 1, 2, . . . , tIII′. Then the Hermitian dual of C in (H3) has the form C⊥H ∼=   tII′∏ j=1 E⊥Hj  × ( tIII′∏ k=1 ( (F ′k) ⊥E ×F⊥Ek )) . (H4) The detailed discussion for (H4) is provided in Appendix A.2. 80 S. Jitman, S. Ling / J. Algebra Comb. Discrete Appl. 6(2) (2019) 75–94 3. Self-dual abelian codes in GR(pr, s)[G] In this section, we characterize and enumerate Euclidean and Hermitian self-dual abelian codes in GR(pr,s)[G]. We determine necessary and sufficient conditions for the existence of self-dual abelian codes in GR(pr,s)[G] in Subsection 3.1 and followed by general results for the enumeration of such self-dual codes in Subsection 3.2. Some special cases will be discussed in Subsections 3.3 and 3.4. 3.1. The existence of self-dual abelian codes The characterizations of Euclidean and Hermitian self-dual abelian codes in GR(pr,s)[G] are given as follows. From (E3) and (E4), the characterization of Euclidean self-dual abelian codes in GR(pr,s)[G] is given in the next proposition. Proposition 3.1. Let r and s be positive integers and let p be a prime number. An abelian code C in GR(pr,s)[G] is Euclidean self-dual if and only if, in the decomposition (E3), i) Ui is Euclidean self-dual for all i = 1, 2, . . . , tI, ii) Vj is Hermitian self-dual for all j = 1, 2, . . . , tII, and iii) W ′k = W ⊥E k for all k = 1, 2, . . . , tIII. The characterization of Hermitian self-dual abelian codes in GR(pr,s)[G] follows immediately from (H3) and (H4). Proposition 3.2. Let r and s be positive integers such that s is even and let p be a prime number. Then an abelian code C in GR(pr,s)[G] is Hermitian self-dual if and only if, in the decomposition (H3), i) Ej is Hermitian self-dual for all j = 1, 2, . . . , tII′, and ii) F ′k = F ⊥E k for all k = 1, 2, . . . , tIII′. Necessary and sufficient conditions for the existence of Euclidean and Hermitian self-dual abelian codes in GR(pr,s)[G] are given as follows. The conditions for the Euclidean case have been proven in [26, Theorem 1.1]. Here, we provide an alternative constructive proof. Proposition 3.3. Let r and s be positive integers and let p be a prime number. Let G be a finite abelian group. Then there exists a Euclidean self-dual abelian code in GR(pr,s)[G] if and only if one of the following statements holds, i) r is even, or ii) p = 2 and |G| is even. In addition, if s is even, then the conditions are equivalent to the existence of a Hermitian self-dual abelian code in GR(pr,s)[G]. Proof. Assume that G is decomposed as G = A⊕P , where p - |A| and P is the Sylow p-subgroup of G of order pa, where a ≥ 0. From (E3), assume that the code C ∼= ( tI∏ i=1 Ui ) ×   tII∏ j=1 Vj  × ( tIII∏ k=1 (Wk ×W ′k) ) 81 S. Jitman, S. Ling / J. Algebra Comb. Discrete Appl. 6(2) (2019) 75–94 is Euclidean self-dual in GR(pr,s)[G]. Then, by Proposition 3.1, U1 is Euclidean self-dual in GR(pr,s)[P]. It follows that |U1| = (ps)rp a/2 and rpa/2 is an integer. Hence, r is even, or p = 2 and a ≥ 1. For the converse, if r is even, then pr/2GR(pr,s)[G] is Euclidean self-dual. Assume that r is odd, p = 2 and |G| is even. Let r′ = dr 2 e. Then |P | = 2a with a ≥ 1 and r = 2r′ − 1. Since the order of P is even, P contains an element x of order 2. Define C ∼= ( tI∏ i=1 ( 2r ′ GR(2r,s)[P ] + 2r ′−1GR(2r,s)[P ](Y x + 1) )) ×   rII∏ j=1 ( 2r ′ GR(2r, 2sej)[P] + 2 r′−1GR(2r, 2sej)[P](Y x + 1) ) × ( tIII∏ k=1 (GR(2r,sfk)[P ] ×{0}) ) . We prove that C is Euclidean self-dual. By Proposition 3.1, it is sufficient to show that U := 2r ′ GR(2r,s)[P ] + 2r ′−1GR(2r,s)[P ](Y x + 1) is Euclidean self-dual and Vj := 2 r′GR(2r, 2sej)[P ] + 2 r′−1GR(2r, 2sej)[P ](Y x + 1) is Hermitian self-dual for all j = 1, 2 . . . , tII. Let u = 2r ′ e + 2r ′−1e′(Y x + 1) and v = 2r ′ f + 2r ′−1f′(Y x + 1) be elements in U, where e, e′, f, and f′ are in GR(2r,s)[P ]. Since r = 2r′ − 1 and x = −x, we have 〈u,v〉E = 〈2r ′ e, 2r ′ f〉E + 〈2r ′ e, 2r ′−1f′(Y x + 1)〉E + 〈2r ′−1e′(Y x + 1), 2r ′ f〉E + 〈2r ′−1e′(Y x + 1), 2r ′−1f′(Y x + 1)〉E = 2r−1〈e′(Y x + 1),f′(Y x + 1)〉E = 2r−1 ( 〈e′Y x,f′Y x〉E + 〈e′Y x,f′〉E + 〈e′,f′Y x〉E + 〈e′,f′〉E ) = 2r−1 ( 2〈e′,f′〉E + 2〈e′Y x,f′〉E ) = 0. It is not difficult to verify that |U| = |2r ′ GR(2r,s)[P ]||2r ′−1GR(2r,s)[P ](Y x + 1)| |(2r′GR(2r,s)[P ]) ∩ (2r′−1GR(2r,s)[P ](Y x + 1))| = (2s)(r ′−1)2a(2s)r ′2a/2 (2s)(r ′−1)2a/2 = (2 s)r2 a−1 . Therefore, U is Euclidean self-dual. Using arguments similar to the above, we can see that Vj is Hermitian self-dual for all j = 1, 2 . . . , tII. For the Hermitian case, we assume that s is even. The proof of the sufficiency is similar to the Euclidean case, except that (H3) and Proposition 3.2 are applied instead of (E3) and Proposition 3.1 . For the converse, if r is even, then pr/2GR(pr,s)[G] is Hermitian self-dual. Assume that r is odd, p = 2 and |G| is even. Then P contains an element x of order 2. Let r′ = dr 2 e and define C ∼=  rII′∏ j=1 ( 2r ′ GR(2r,séj)[P ] + 2 r′−1GR(2r,séj)[P](Y x + 1) )× ( tIII′∏ k=1 ( GR(2r,sf́k)[P ] ×{0} )) . By arguments similar to those in the proof of the Euclidean case, we can verity that 2r ′ GR(2r,séj)[P ] + 2r ′−1GR(2r,séj)[P ](Y x + 1) is Hermitian self-dual for all j = 1, 2, . . . , tII′. Therefore, C is Hermitian self-dual by Proposition 3.2. 82 S. Jitman, S. Ling / J. Algebra Comb. Discrete Appl. 6(2) (2019) 75–94 3.2. Enumeration of self-dual abelian codes We aim to characterize and enumerate Euclidean and Hermitian self-dual cyclic and abelian codes over Galois rings. For convenience, we fix the following notations. • NC(GR(pr,s),n) – the number of cyclic codes of length n over GR(pr,s), • NEC(GR(pr,s),n) – the number of Euclidean self-dual cyclic codes of length n over GR(pr,s), • NHC(GR(pr,s),n) – the number of Hermitian self-dual cyclic codes of length n over GR(pr,s), • NA(GR(pr,s)[G]) – the number of abelian codes in GR(pr,s)[G], • NEA(GR(pr,s)[G]) – the number of Euclidean self-dual abelian codes in GR(pr,s)[G], • NHA(GR(pr,s)[G]) – the number of Hermitian self-dual abelian codes in GR(pr,s)[G], where s is assumed to be even in cases of NHC(GR(pr,s),n) and NHA(GR(pr,s)[G]). To determine the numbers of Euclidean and Hermitian self-dual abelian codes, we need some group- theoretic and number-theoretic results. For completeness, we recall the following results. For a finite group A and a positive integer d, let NA(d) denote the number of elements in A of order d. The explicit expression of NA(d) is completely determined in [2]. Let q be a prime power and let j be a positive integer. The pair (j,q) is said to be oddly good if j divides qt + 1 for some odd integer t ≥ 1, and evenly good if j divides qt + 1 for some even integer t ≥ 2. It is said to be good if it is oddly good or evenly good, and bad otherwise. The characterization of good and oddly-good pairs of integers can be found in [12], [11], [13], [15], and [20]. Let χ and λ be functions defined on the pair (j,q), where j is a positive integer, as follows. χ(j,q) = { 0 if (j,q) is good, 1 otherwise, (4) and λ(j,q) = { 0 if (j,q) is oddly good, 1 otherwise. (5) The following two lemmas are extended from the case where q is a power of 2 in [13] and [15] and the proof is omitted. The readers may refer to [13, Lemma 4.5] and [15, Lemma 7] for the idea of the proofs. Lemma 3.4. Let s be a positive integer and let p be a prime number. Let A be a finite abelian group such that gcd(|A|,p) = 1 and let h ∈ A. Then Sps(h) is of type III if and only if (ord(h),ps) is bad. Lemma 3.5. Let s be an even positive integer and let p be a prime number. Let A be a finite abelian group such that gcd(|A|,p) = 1 and let h ∈ A\{0}. Then Sps(h) is of type III′ if and only if (ord(h),ps/2) is evenly good or bad. Utilizing the decomposition in Section 2 and the discussion above, we obtain the following formulas for the numbers of Euclidean and Hermitian self-dual abelian codes in GR(pr,s)[G], where G is an arbitrary finite abelian group. Without loss of generality, we assume that G = A⊕P , where P is a finite abelian p-group and A is a finite abelian group such that p - |A|. Theorem 3.6. Let p be a prime and let s,r be integers such that 1 ≤ s and 1 ≤ r. Let A be a finite abelian group of exponent M such that p - M and let P be a finite abelian p-group. Then NEA(GR(pr,s)[A⊕P ]) = (NEA(GR(pr,s)[P ])) ∑ d|M,ordd(p s)=1 (1−χ(d,ps))NA(d) × ∏ d|M ordd(p s) 6=1 (NHA(GR(pr,s · ordd(ps))[P ])) (1−χ(d,ps)) NA(d) ordd(p s) × ∏ d|M (NA(GR(pr,s · ordd(ps))[P ])) χ(d,ps) NA(d) 2ordd(p s) . 83 S. Jitman, S. Ling / J. Algebra Comb. Discrete Appl. 6(2) (2019) 75–94 In addition, if s is even, then NHA(GR(pr,s)[A⊕P ]) = ∏ d|M (NHA(GR(pr,s · ordd(ps))[P])) (1−λ(d,p s 2 )) NA(d) ordd(p s) × ∏ d|M (NA(GR(pr,s · ordd(ps))[P ])) λ(d,p s 2 ) NA(d) 2ordd(p s) . Proof. First, we consider the Euclidean case. From (E3) and Proposition 3.1, it is sufficient to count the numbers of Euclidean self-dual abelian codes Ui’s, the numbers of Hermitian self-dual abelian codes Vi’s, and the numbers of abelian codes Wi’s which correspond to the ps-cyclotomic classes of types I, II, and III, respectively. From [14, Remark 2.5], we note that the elements in A of the same order are partitioned into ps- cyclotomic classes of the same type. For each divisor d of M, a ps-cyclotomic class containing an element of order d has cardinality ordd(ps), and hence, the number of such ps-cyclotomic classes is NA(d) ordd(ps) . For each divisor d of M, we consider the following 3 cases. Case 1. χ(d,ps) = 0 and ordd(ps) = 1. By Lemma 3.4, every ps-cyclotomic class of A containing an element of order d is of type I. Since there are NA(d) ordd(ps) such ps-cyclotomic classes, the number of Euclidean self-dual abelian codes Ui’s corresponding to d is (NEA(GR(pr,s · ordd(ps))[P ])) NA(d) ordd(p s) = (NEA(GR(pr,s)[P])) (1−χ(d,ps))NA(d) . Case 2. χ(d,ps) = 0 and ordd(ps) 6= 1. By Lemma 3.4, every ps-cyclotomic class of A containing an element of order d is of type II. Since there are NA(d) ordd(ps) such ps-cyclotomic classes, the number of Hermitian self-dual abelian codes Vi’s corresponding to d is (NHA(GR(pr,s · ordd(ps))[P ])) NA(d) ordd(p s) = (NHA(GR(pr,s · ordd(ps))[P ])) (1−χ(d,ps)) NA(d) ordd(p s) . Case 3. χ(d,ps) = 1. By Lemma 3.4, every ps-cyclotomic class of A containing an element of order d is of type III. Since there are NA(d) ordd(ps) such ps-cyclotomic classes, the number of abelian codes Wi’s corresponding to d is (NA(GR(pr,s · ordd(ps))[P ])) NA(d) ordd(p s) (NA(GR(pr,s · ordd(ps))[P ])) χ(d,ps) NA(d) 2ordd(p s) . Since d runs over all divisors of M, we conclude the desired result. For the Hermitian case, by Proposition 3.2, it suffices to count the numbers of Hermitian self-dual abelian codes Ei’s and the numbers of abelian codes Fi’s in (H3) which correspond to the ps-cyclotomic classes of types II′ and III′, respectively. Considering the cases where λ(d,p s 2 ) = 1 and where λ(d,p s 2 ) = 0, the desired result can be obtained similarly to the Euclidean case, where Lemma 3.5 is applied instead of Lemma 3.4. Note that, if A is a cyclic group, the exponent M is just the cardinality of A and NA(d) is just φ(d), where φ is an Euler’s totient function. In Theorem 3.6, if P is cyclic of order pa, then the values NA,NEA and NHA may be replaced by NC,NEC, and NHC, respectively. In general, these values are not known in the literature. Some special cases where i) gcd(p, |G|) = 1; and ii) r = 2 and the Sylow p-subgroup of G is cyclic are discussed in the following subsections. 84 S. Jitman, S. Ling / J. Algebra Comb. Discrete Appl. 6(2) (2019) 75–94 3.3. Self-dual abelian codes in GR(pr, s)[A], gcd(p, |A|) = 1 In this subsection, we complete the enumeration of Euclidean and Hermitian self-dual abelian codes in GR(pr,s)[A], where gcd(p, |A|) = 1, or equivalently, GR(pr,s)[A] is a principal ideal group ring (see Proposition 3.7). If A is cyclic, this case is identical with that of simple root cyclic codes. Proposition 3.7. Let p be a prime number and let r,s be positive integers. Let G be a finite abelian group. Then one of the following statements holds. i) If r = 1, then GR(pr,s)[G] ∼= Fps[G] is a principal ideal ring if and only if the Sylow p-subgroup of G is cyclic. ii) If r ≥ 2, then GR(pr,s)[G] is a principal ideal ring if and only if gcd(p, |G|) = 1. For r = 1, the statement has been proven in [9]. For r ≥ 2, using notion of morphic rings (see the definition in [6]), it has been shown that Zpr [G] is principal ideal if and only if gcd(p, |G|) = 1 (see [8, Theorem 1.2] and [6, Theorem 3.12 and Corollary 3.13]). The statements can be extended naturally to the case of GR(pr,s)[G]. The enumerations of Euclidean and Hermitian self-dual abelian codes in a principal ideal group ring GR(pr,s)[A] is given as follows. Theorem 3.8. Let p be a prime and let s,r be positive integers. Let A be a finite abelian group of exponent M such that gcd(p, |A|) = 1. Then NEA(GR(pr,s)[A]) =  (1 + r) ∑ d|M χ(d,ps) NA(d) 2ordd(p s) if r is even, 0 if r is odd. In addition, if s is even, then NHA(GR(pr,s)[A]) =  (1 + r) ∑ d|M λ(d,ps/2) NA(d) 2ordd(p s) if r is even, 0 if r is odd. Proof. In GR(pr,s), every ideal can be regarded as an abelian code in GR(pr,s)[G] with G = {0}, and we have the following facts. i) The number of abelian codes in GR(pr,s) is r + 1. ii) If r is odd, then there are neither Euclidean self-dual abelian codes nor Hermitian self-dual abelian codes in GR(pr,s). iii) If r is even, then rr/2GR(pr,s) is the only Euclidean self-dual abelian code and it is the only Hermitian self-dual abelian code if s is even. The above results hold true for any Galois extension of GR(pr,s). By considering P = {0} in Theorem 3.6, the result follows immediately. Note that, if A is cyclic, M and NA(d) can be replaced by the cardinality of A and φ(d), respectively, where φ is the Euler’s totient function. If A is cyclic of order n with gcd(n,p) = 1, then the number of Euclidean self-dual cyclic codes of length n over GR(pr,s) obtained in Theorem 3.8 is a special case of [1, Theorem 5.7] by viewing GR(pr,s) as a finite chain ring of depth r. 85 S. Jitman, S. Ling / J. Algebra Comb. Discrete Appl. 6(2) (2019) 75–94 3.4. Self-dual abelian codes in GR(p2, s)[A⊕Cpa] In this section, we restrict our study to the case where r = 2 and P = Cpa, a cyclic group of order pa. The enumerations of Euclidean and Hermitian self-dual abelian codes in GR(p2,s)[A⊕Cpa] can be obtained as an application of Theorem 3.6 and some known results on cyclic codes of length pa over GR(p2,s). We recall some results on cyclic codes of length pa over GR(p2,s). The next lemma follows immedi- ately from [16, Corollary 3.9] and [16, Theorem 3.6]. Lemma 3.9. The number of cyclic codes of length pa over GR(p2,s) is NC(GR(p2,s),pa) = 2 pa−1∑ d=0 ps(min{b d 2 c,pa−1}+1) − 1 ps − 1 + ps(p a−1+1) − 1 ps − 1 . (6) Proposition 3.10 ([17, Corollary 3.5]). The number of Euclidean self-dual cyclic codes of length 2a over GR(22,s) is NEC(GR(22,s), 2a) =   1 if a = 1, 1 + 2s if a = 2, 1 + 2s + 22s+1 ( (2s)(2 a−2−1)−1 2s−1 ) if a ≥ 3. If p is an odd prime, then the number of Euclidean self-dual cyclic codes of length pa over GR(p2,s) is NEC(GR(p2,s),pa) = 2 ( (ps) (pa−1+1) /2 − 1 ps − 1 ) . Proposition 3.11 ([14, Theorem 3.5]). Let p be a prime and let s,a be positive integers such that s is even. Then the number of Hermitian self-dual cyclic codes of length pa over GR(p2,s) is NHC(GR(p2,s),pa) = pa−1∑ i1=0 psi1/2 = ps(p a−1+1)/2 − 1 ps/2 − 1 . Remark 3.12. For cyclic codes of length pa over GR(p2,s), the numbers NC, NEC, and NHC have already been determined in Lemma 3.9, Proposition 3.10, and Proposition 3.11, respectively. Combining these results and Theorem 3.6, the numbers NEA(GR(p2,s)[A ⊕ Cpa]) and NHA(GR(p2,s)[A ⊕ Cpa]) are explicitly determined. The numbers of Euclidean and Hermitian self-dual cyclic codes of arbitrary length n over GR(p2,s) can be obtained as a corollary of Remark 3.12. Some parts of the formulas can be simplified as in the next corollary. Corollary 3.13. Let p be a prime and let s,n be positive integers. Write n = mpa, where a ≥ 0 and p - m. Then NEC(GR(p2,s),n) = ( NEC(GR(p2,s),pa) )η(m) × ∏ d|m d6∈{1,2} ( NHC(GR(p2,s · ordd(ps)),pa) )(1−χ(d,ps)) φ(d) ordd(p s) × ∏ d|m ( NC(GR(p2,s · ordd(ps)),pa) )χ(d,ps) φ(d) 2ordd(p s) , 86 S. Jitman, S. Ling / J. Algebra Comb. Discrete Appl. 6(2) (2019) 75–94 where η(m) = { 1 if m is odd, 2 if m is even. In addition, if s is even, then NHC(GR(p2,s),n) = ∏ d|m ( NHC(GR(p2,s · ordd(ps)),pa) )(1−λ(d,ps2 )) φ(d) ordd(p s) × ∏ d|m ( NC(GR(p2,s · ordd(ps)),pa) )λ(d,ps2 ) φ(d) 2ordd(p s) . Proof. Setting r = 2 and A a cyclic group of order m in Theorem 3.6, the exponent of A is m and NA(d) is just φ(d), where φ is the Euler’s function. Note that Sps(0) is the only ps-cyclotomic class of A of type I if m is odd, and Sps(0) and Sps(m2 ) are the only ps-cyclotomic classes of A of type I if m is even. Therefore, the values of η(m) follows. 4. Complementary dual abelian codes in GR(pr, s)[G] In this section, the characterization and enumeration of complementary dual abelian codes in the group ring GR(pr,s)[G] are given based on the decomposition in Section 2 and the theory of local group rings. 4.1. Characterization and enumeration of complementary dual abelian codes in GR(pr, s)[P ] In this subsection, we focus on complementary dual abelian codes and direct summand ideals in each component of GR(pr,s)[P ] in the decompositions (E1) and (H1), where P is a finite abelian p-group. First, we recall some useful definitions and properties in ring theory. For a finite commutative ring R with identity, the Jacobson radical of R, denoted by Jac(R), is defined to be the intersection of all maximal ideals of R. The ring R is said to be local if it has a unique maximal ideal. A local group ring has been characterized in the following lemma. Lemma 4.1 ([22, Theorem]). Let R be a commutative ring with identity and let G be a finite abelian group. Then R[G] is local if and only if R is local, G is a p-group and p ∈ Jac(R). Proposition 4.2. Let p be a prime number and let r,s be positive integers. Let P be a finite abelian p-group. Then GR(pr,s)[P ] is a local group ring. Proof. Since the ideal 〈p〉 is the unique maximal ideal of GR(pr,s), the ring GR(pr,s) is local. More- over, p ∈ 〈p〉 = Jac(GR(pr,s). By Lemma 4.1, GR(pr,s)[P ] is a local group ring. By Proposition 4.2, GR(pr,s)[P ] is local. Denote by M the maximal ideal of GR(pr,s)[P]. The char- acterizations of the Euclidean and Hermitian complementary dual abelian codes and the direct summands in a local group ring GR(pr,s)[P ] are given in the following theorems. Theorem 4.3. Let p be a prime number and let r,s be positive integers. Let P be a finite abelian p-group. Then {0} and GR(pr,s)[P ] are the only Euclidean complementary dual abelian codes in GR(pr,s)[P ]. 87 S. Jitman, S. Ling / J. Algebra Comb. Discrete Appl. 6(2) (2019) 75–94 Proof. Clearly, {0} and GR(pr,s)[P ] are Euclidean complementary dual abelian codes in GR(pr,s)[P]. Let C be an abelian code in GR(pr,s)[P ] such that {0} ( C ( GR(pr,s)[P ]. Then C ⊆ M. It follows that M⊥E ⊆ C⊥E ⊆ M which implies M⊥E ⊆ C ⊆ M. Hence, {0} 6= M⊥E ⊆ C∩C⊥E ⊆ M. Consequently, C is not Euclidean complementary dual. Therefore, the ideals {0} and GR(pr,s)[P ] are the only Euclidean complementary dual abelian codes in GR(pr,s)[P ]. It is not difficult to see that the proof of Theorem 4.3 is independent of the inner product. Hence, we have the following corollary. Corollary 4.4. Let p be a prime number and let r,s be positive integers such that s is even. Let P be a finite abelian p-group. Then {0} and GR(pr,s)[P ] are the only Hermitian complementary dual abelian codes in GR(pr,s)[P ]. Theorem 4.5. Let p be a prime number and let r,s be positive integers. Let P be a finite abelian p-group. Then ideals {0} and GR(pr,s)[P ] are the only direct summands in GR(pr,s)[P ]. Proof. Clearly, {0} and GR(pr,s)[P ] are direct summands in GR(pr,s)[P]. Let {0} ( C ( GR(pr,s)[P ] be an ideal in GR(pr,s)[P ]. Suppose that C is a direct summand. Then there exists an ideal C′ in GR(pr,s)[P] such that C ∩ C′ = {0} and C + C′ = GR(pr,s)[P ]. Since M is the maximal ideal in GR(pr,s)[P], we have C ⊆ M and C′ ⊆ M. Hence, C + C′ ⊆ M ( GR(pr,s)[P], a contradiction. Therefore, the ideals {0} and GR(pr,s)[P ] are the only direct summands in GR(pr,s)[P ]. The above results can be summarized as follows. Corollary 4.6. Let p be a prime number and let r,s be positive integers. Let P be a finite abelian p-group. Then the following statements hold. 1. The number of Euclidean complementary dual abelian codes in GR(pr,s)[P ] is 2. 2. If s is even, the number of Hermitian complementary dual abelian codes in GR(pr,s)[P ] is 2. 3. The number of direct summand ideals in GR(pr,s)[P ] is 2. 4.2. Characterization and enumeration of complementary dual abelian codes in GR(pr, s)[G] In this subsection, we focus on the characterization and enumeration of complementary dual abelian codes in GR(pr,s)[G], where G is an arbitrary finite abelian group. Using the decompositions in Section 2 and results in the previous subsection, the characterization and enumeration of such complementary dual codes are given independent of r and the Sylow p-subgroup of G. Recall that G ∼= A×P , where P is the Sylow p-subgroup of G and A is its complement subgroup. The group ring GR(pr,s)[G] is viewed as GR(pr,s)[G] ∼= R[P ], where R = GR(pr,s)[A]. Using the decomposition of GR(pr,s)[G] in (E2), the characterization of a Euclidean complementary dual abelian code in GR(pr,s)[G] can be concluded via (E3) and (E4) as follows. Proposition 4.7. Let p be a prime number and let r,s be positive integers. Let A be finite abelian group such that p - |A| and let P be a finite abelian p-group. Then an abelian code C in GR(pr,s)[A × P ] decomposed as in (E3) is Euclidean complementary dual if and only if the following statements hold. 1. Ui is Euclidean complementary dual for all i = 1, 2, . . . ,rI. 2. Vj is Hermitian complementary dual for all j = 1, 2, . . . ,rII. 3. Wk ∩ (W ′k) ⊥E = {0} and W ′k ∩W ⊥E k = {0} for all k = 1, 2, . . . ,rIII. 88 S. Jitman, S. Ling / J. Algebra Comb. Discrete Appl. 6(2) (2019) 75–94 The next corollary follows immediately from Theorem 4.3, Proposition 4.7, and Corollary 4.4. Corollary 4.8. Let p be a prime number and let r,s be positive integers. Let A be finite abelian group such that p - |A| and let P be a finite abelian p-group. Then an abelian code C in GR(pr,s)[A × P ] decomposed as in (E3) is Euclidean complementary dual if and only if the following statements hold. 1. Ui ∈{{0}, GR(pr,s)[P ]} for all i = 1, 2, . . . ,rI. 2. Vj ∈{{0}, GR(pr, 2sej)[P ]} for all j = 1, 2, . . . ,rII. 3. (Wk,W ′k) ∈{({0},{0}), (GR(p r,sfk)[P], GR(p r,sfk)[P])} for all k = 1, 2, . . . ,rIII. From Corollary 4.8, it is not difficult to see that the number of Euclidean complementary dual abelian codes in GR(pr,s)[A×P ] is independent of r and the group P and it can be determined in the following corollary. Corollary 4.9. Let p be a prime number and let r,s be positive integers. Let A be finite abelian group such that p - |A| and let P be a finite abelian p-group. If the exponent of A is M and GR(pr,s)[A×P ] is decomposed as in (E2), then the number of Euclidean complementary dual abelian codes in GR(pr,s)[A× P ] is 2rI+rII+rIII = 2 ∑ d|M (1−χ(d,ps)) NA(d) ordd(p s) + ∑ d|M χ(d,ps) NA(d) 2ordd(p s) , where NA(d) denote the number of elements in A of order d. Proof. The first part follows from Corollary 4.8. The equality can be derived similar to the proof of Theorem 3.6. Using the decomposition of GR(pr,s)[G] in (H2), the characterization of a Hermitian complementary dual abelian code in GR(pr,s)[G] can be concluded via (H3) and (H4) in the following proposition. Proposition 4.10. Let p be a prime number and let r,s be positive integers such that s is even. Let A be finite abelian group such that p - |A| and let P be a finite abelian p-group. Then an abelian code C in GR(pr,s)[A × P] decomposed as in (H3) is Hermitian complementary dual if and only if the following statements hold. 1. Ej is Hermitian complementary dual for all j = 1, 2, . . . ,r′II. 2. Fk ∩ (F ′k) ⊥E = {0} and F ′k ∩F ⊥E k = {0} for all j = 1, 2, . . . ,rIII′. The following result follows directly from Proposition 4.10 and Corollary 4.4. Corollary 4.11. Let p be a prime number and let r,s be positive integers such that s is even. Let A be finite abelian group such that p - |A| and let P be a finite abelian p-group. Then an abelian code C in GR(pr,s)[A × P] decomposed as in (H3) is Hermitian complementary dual if and only if the following statements hold. 1. Ej ∈{{0}, GR(pr,séj)[P]} for all j = 1, 2, . . . ,r′II. 2. (Fk,F ′k) ∈{({0},{0}), (GR(p r,sf́k)[P ], GR(p r,sf́k)[P ])} for all k = 1, 2, . . . ,rIII′. From Corollary 4.11, the number of Hermitian complementary dual abelian codes in GR(pr,s)[A×P ] is independent of r and the group P and it is given in the following corollary. 89 S. Jitman, S. Ling / J. Algebra Comb. Discrete Appl. 6(2) (2019) 75–94 Corollary 4.12. Let p be a prime number and let r,s be positive integers such that s is even. Let A be finite abelian group such that p - |A| and let P be a finite abelian p-group. If the exponent of A is M and GR(pr,s)[A×P ] is decomposed as in (H2), then the number of Hermitian complementary dual abelian codes in GR(pr,s)[A×P ] is 2rI′+rII′ = 2 ∑ d|M (1−λ(d,p s 2 )) NA(d) ordd(p s) + ∑ d|M λ(d,p s 2 ) NA(d) 2ordd(p s) , where NA(d) denote the number of elements in A of order d. Proof. The first part follows from Corollary 4.11. The equality can be derived similar to the proof of Theorem 3.6. 5. Conclusion Self-dual and complementary dual abelian codes in GR(pr,s)[G], a group ring of a finite abelian group G over a Galois ring GR(pr,s), have been studied with respect to the Euclidean and Hermitian inner products. We have characterized such self-dual codes as well as determined necessary and sufficient conditions for GR(pr,s)[G] to contain a Euclidean (resp, Hermitian) self-dual abelian code. For any finite abelian group G and Galois ring GR(pr,s), the enumerations of such self-dual codes have been given. In the case where gcd(|G|,p) = 1, the enumeration has been completed by restricting the Sylow p-subgroup to be {0}. Applying some known results on cyclic codes of length pa over GR(p2,s), we have determined explicitly the numbers of Euclidean and Hermitian self-dual abelian codes in GR(p2,s)[G] if the Sylow p-subgroup of G is cyclic. As corollaries, analogous results on Euclidean and Hermitian self-dual cyclic codes over GR(pr,s) have been concluded. Subsequently, the characterization and enumeration of complementary dual abelian codes in GR(pr,s)[G] have been given. The number of complementary dual abelian codes in GR(pr,s)[G] has been shown to be independent of r and the Sylow p-subgroup of G. It would be interesting to study the unknown terms in Theorem 3.6 and extend the results to abelian codes over finite chain rings or the case where the Sylow p-subgroup of the group is not cyclic. Appendix A In this appendix, we discuss the Euclidean and Hermitian duals of abelian codes in GR(pr,s)[G]. First, we recall that G ∼= A×P , where P is the Sylow p-subgroup of G and A is a complementary subgroup of P in G. The group ring R := GR(pr,s)[A] is decomposed as in (E1) or (H1), and GR(pr,s)[G] ∼= R[P]. A.1. Euclidean duality Let ψ denote the isomorphism in (E1). For each element x ∈R, we can write ψ(x) = (x1, . . . ,xrI,y1, . . . ,yrII,z1,z ′ 1, . . . ,zrIII,z ′ rIII ), (7) where xi ∈ GR(pr,s), yj ∈ GR(pr, 2sej), and zk,z′k ∈ GR(p r,sfk) for all i = 1, 2, . . . ,rI, j = 1, 2, . . . ,rII, and k = 1, 2, . . . ,rIII. We are going to view x̂ defined in Section 2 in terms of (7). We note that, for c = ∑ a∈A caY a ∈ GR(p2,s)[A], we have ĉ = ∑ a∈A caY −a = ∑ a∈A c−aY a. 90 S. Jitman, S. Ling / J. Algebra Comb. Discrete Appl. 6(2) (2019) 75–94 Then ˘̂c = ∑ a∈A d̆aY a, where d̆a = ∑ h∈A c−hζ γa(h). From (3), we can see that, if Sps(h) is of type I, then d̆h = c̆h, (8) and if Sps(h) is of type II with cardinality 2ν, then −h = psν ·h by Remark 2.4. It follows that d̆h = ∑ a∈A c−aζ γh(a) = ∑ a∈A caζ γ−h(a) = ∑ a∈A caζ γpsν·h(a) = ∑ a∈A ca ( ζγh(a) )psν = θ(c̆h), (9) where θ(α) = αp sν 0 + α psν 1 p + · · · + α psν r−1p r−1 for all α = α0 + α1p + · · · + αr−1pr−1. Therefore, by the isomorphism ψ (see also [18]), the following properties are obtained. 1. From (8), the involution ̂ induces the identity automorphism on GR(pr,s). 2. From (9), the involution ̂ induces the ring automorphism ¯ on GR(pr, 2sej) as defined in (1), i.e., α = α p sej 0 + α p sej 1 p + · · · + α p sej r−1 p r−1 for all α = α0 + α1p + · · · + αr−1pr−1 in GR(pr, 2sej), where αi ∈T2sej for all i = 0, 1, . . . ,r − 1. 3. For each pair (z,z′) ∈ GR(pr,sfk) × GR(pr,sfk), we have ̂ψ−1(z,z′) = ψ−1(z′,z). From the discussion, we have ψ(x̂) = (x1, . . . ,xrI,y1, . . . ,yrII,z ′ 1,z1, . . . ,z ′ rIII ,zrIII ), where ¯ is induced as above in an appropriate Galois extension. Proposition A.1. Let x = ∑ b∈P xbY b and u = ∑ b∈P ubY b be elements in R[P]. Decomposing xb,ub using (7), we have ψ(xb) = (xb,1, . . . ,xb,rI,yb,1, . . . ,yb,rII,zb,1,z ′ b,1, . . . ,zb,rIII,z ′ b,rIII ) and ψ(ub) = (ub,1, . . . ,ub,rI,vb,1, . . . ,vb,rII,wb,1,w ′ b,1, . . . ,wb,rIII,w ′ b,rIII ). Then ψ(〈x,u〉̂) = ψ (∑ b∈P xbûb ) = ∑ b∈P ψ(xb)ψ(ûb) = (∑ b∈P xb,1ub,1, . . . , ∑ b∈P xb,rIub,rI, ∑ b∈P yb,1vb,1, . . . , ∑ b∈P yb,rIIvb,rII, ∑ b∈P zb,1w ′ b,1, ∑ b∈P z′b,1wb,1, . . . , ∑ b∈P zb,rIIIw ′ b,rIII , ∑ b∈P z′b,rIIIwb,rIII ) . 91 S. Jitman, S. Ling / J. Algebra Comb. Discrete Appl. 6(2) (2019) 75–94 In particular, 〈x,u〉̂ = 0 if and only if ψ(〈x,u〉̂) = 0, or equivalently,∑ b∈P xb,jub,j = 0 for all j = 1, 2, . . . ,rI, ∑ b∈P yb,jṽb,j = 0 for all j = 1, 2, . . . ,rII, and ∑ b∈P zb,jw ′ b,j = 0 = ∑ b∈P z′b,jwb,j for all j = 1, 2, . . . ,rIII. Using the orthogonality in Proposition A.1, the Euclidean dual of C in (E3) can be viewed to be of the form C⊥E ∼= ( tI∏ i=1 U⊥Ei ) ×   tII∏ j=1 V ⊥Hj  × ( tIII∏ k=1 ( (W ′k) ⊥E ×W⊥Ek )) . (10) A.2. Hermitian duality Let ψ denote the isomorphism in (H1). Then each element x ∈R, we can write ψ(x) = (x1, . . . ,xtII′ ,y1,y ′ 1, . . . ,ytIII′ ,y ′ tIII′ ), (11) where xj ∈ GR(pr,séj) and yk,y′k ∈ GR(p r,sf́k) for all j = 1, 2, . . . , tII′ and k = 1, 2, . . . , tIII′. We note that, for c = ∑ a∈A caY a ∈ GR(pr,s)[A], we have c̃ = ∑ a∈A caY −a = ∑ a∈A c−aY a, where α0 + pα1 + · · · + pr−1αr−1 = α ps/2 0 + pα ps/2 1 + · · · + p r−1α ps/2 r−1 . Then ˘̃c = ∑ a∈A w̆aY a, where w̆a = ∑ h∈A c−hζ γa(h). From (3), if Sps(h) is of type II ′ with cardinality ν, then −a = psν/2 · a by Remark 2.4. Since ν is odd, we have w̆h = ∑ a∈A c−aζ γh(a) = ∑ a∈A caζ γ−h(a) = ∑ a∈A caζ γ psν/2·h (a) = ∑ a∈A ca ( ζγh(a) )psν/2 = θ(c̆h), (12) where θ(α) = αp sν/2 0 + α psν/2 1 p + · · · + α psν/2 r−1 p r−1 for all α = α0 + α1p + · · · + αr−1pr−1. By the isomorphism ψ (see also [18]), we have the following properties. 1. By (12), the involution ˜ induces the ring automorphism ¯ on GR(pr,séj) as defined in (1), i.e., α = α p séj/2 0 + α p séj/2 1 p + · · · + α p séj/2 r−1 p r−1 for all α = α0 + α1p + · · · + αr−1pr−1 in GR(pr,séj), where ai ∈Tséj for all i = 0, 1, . . . ,r − 1. 2. For each pair (z,z′) ∈ GR(pr,sf́k) × GR(pr,sf́k), we have ˜ψ−1(z,z′) = ψ−1(z′,z). Hence, x̃ defined in Section 2 can be viewed in terms of (11) as ψ(x̃) = (x1, . . . ,xtII′ ,y ′ 1,y1, . . . ,y ′ rII ,ytIII′ ). where ¯ is induced as above in an appropriate Galois extension. 92 S. Jitman, S. Ling / J. Algebra Comb. Discrete Appl. 6(2) (2019) 75–94 Proposition A.2. Let x = ∑ b∈P xbY b and u = ∑ b∈P ubY b be elements in R[P]. Decomposing xb,ub using (11), we have ψ(xb) = (xb,1, . . . ,xb,tII′ ,yb,1,y ′ b,1, . . . ,yb,tIII′ ,y ′ b,tIII′ ) and ψ(ub) = (ub,1, . . . ,ub,tII′ ,vb,1,v ′ b,1, . . . ,vb,tIII′ ,v ′ b,tIII′ ). Then ψ(〈x,u〉∼) = ψ (∑ b∈P xbũb ) = ∑ b∈P ψ(xb)ψ(ũb) = (∑ b∈P xb,1ub,1, . . . , ∑ b∈P xb,tII′ub,tII′ , ∑ b∈P yb,1v ′ b,1, ∑ b∈P y′b,1vb,1, . . . , ∑ b∈P yb,tIII′v ′ b,tIII′ , ∑ b∈P y′b,tIII′vb,tIII′ ) . In particular, 〈x,u〉∼ = 0 if and only if ψ(〈x,u〉∼) = 0, or equivalently,∑ b∈P xb,jub,j = 0 for all j = 1, 2, . . . , tII′ and ∑ b∈P yb,kv ′ b,k = 0 = ∑ b∈P y′b,kvb,k for all k = 1, 2, . . . , tIII′. Using the orthogonality in Proposition A.2, the Hermitian dual of C in (H3) can be viewed of the form C⊥H ∼=   tII′∏ j=1 E⊥Hj  × ( tIII′∏ k=1 ( (F ′k) ⊥E ×F⊥Ek )) . (13) Acknowledgment: The authors would like to thank anonymous referees for useful comments. References [1] A. Batoul, K. Guenda, T. A. Gulliver, On self-dual cyclic codes over finite chain rings, Des. Codes Cryptogr. 70(3) (2014) 347–358. [2] S. Benson, Students ask the darnedest things: A result in elementary group theory, Math. Mag. 70(3) (1997) 207–211. [3] A. Boripan, S. Jitman, P. Udomkavanich, Characterization and enumeration of complementary dual abelian codes, J. Appl. Math. Comput. 58(1–2) (2018) 527–544. [4] A. Boripan, S. Jitman, P. Udomkavanich, Self-conjugate-reciprocal irreducible monic factors of xn−1 over finite fields and their applications, Finite Fields Appl. 55 (2019) 78–96. [5] B. Chen, S. Ling, G. Zhang, Enumeration formulas for self-dual cyclic codes, Finite Fields Appl. 42 (2016) 1–22. [6] J. Chen, Y. Li, Y. Zhou, Morphic group rings, J. Pure Appl. Algebra 205(3) (2006) 621–639. [7] H.Q. Dinh, S. R. López-Permouth, Cyclic and negacyclic codes over finite chain rings, IEEE Trans. Inform. Theory 50(8) (2004) 1728–1744. [8] T. J. Dorsey, Morphic and principal-ideal group rings, J. Algebra 318(1) (2007) 393–411. [9] J. L. Fisher, S. K. Sehgal, Principal ideal group rings, Comm. Algebra 4(4) (1976) 319–325. [10] A. R. Hammons, P.V. Kumar, A. R. Calderbank, N. J. A. Sloane, P. Solé, The Z4 linearity of Kerdock, Preparata, Goethals and related codes, IEEE Trans. Inform. Theory 40(2) (1994) 301–319. 93 https://doi.org/10.1007/s10623-012-9696-0 https://doi.org/10.1007/s10623-012-9696-0 https://doi.org/10.1080/0025570X.1997.11996535 https://doi.org/10.1080/0025570X.1997.11996535 https://doi.org/10.1007/s12190-017-1155-7 https://doi.org/10.1007/s12190-017-1155-7 https://doi.org/10.1016/j.ffa.2018.09.004 https://doi.org/10.1016/j.ffa.2018.09.004 https://doi.org/10.1016/j.ffa.2016.06.007 https://doi.org/10.1016/j.ffa.2016.06.007 https://doi.org/10.1016/j.jpaa.2005.07.021 https://doi.org/10.1109/TIT.2004.831789 https://doi.org/10.1109/TIT.2004.831789 https://doi.org/10.1016/j.jalgebra.2007.09.005 https://doi.org/10.1080/00927877608822109 https://doi.org/10.1109/18.312154 https://doi.org/10.1109/18.312154 S. Jitman, S. Ling / J. Algebra Comb. Discrete Appl. 6(2) (2019) 75–94 [11] Y. Jia, S. Ling, C. Xing, On self-dual cyclic codes over finite fields, IEEE Trans. Inform. Theory 57(4) (2011) 2243–2251. [12] S. Jitman, Good integers and some applications in coding theory, Cryptogr. Commun. 10(4) (2018) 685–704 and S. Jitman, Correction to: Good integers and some applications in coding theory, Cryp- togr. Commun. 10(6) (2018) 1203–1203. [13] S. Jitman, S. Ling, H. Liu, X. Xie, Abelian codes in principal ideal group algebras, IEEE Trans. Inform. Theory 59(5) (2013) 3046–3058. [14] S. Jitman, S. Ling, E. Sangwisut, On self-dual cyclic codes of length pa over GR(p2,s), Adv. Math. Commun 10(2) (2016) 255–273. [15] S. Jitman, S. Ling, P. Solé, Hermitian self-dual abelian codes, IEEE Trans. Inform. Theory 60(3) (2014) 1496–1507. [16] H. M. Kiah, K. H. Leung, S. Ling, Cyclic codes over GR(p2,m) of length pk, Finite Fields Appl. 14(3) (2008) 834–846. [17] H. M. Kiah, K. H. Leung, S. Ling, A note on cyclic codes over GR(p2,m) of length pk, Des. Codes Cryptogr. 63(1) (2012) 105–112. [18] T. Kiran, B. S. Rajan, Abelian codes over Galois rings closed under certain permutations, IEEE Trans. Inform. Theory 49(9) (2003) 2242–2253. [19] C. P. Milies, S. K. Sehgal, An Introduction to Group Rings, Lecture Notes in Mathematics vol. 1. Kluwer Academic Publishes, London, 2002. [20] P. Moree, On the divisors of ak + bk, Acta Arithm. 80 (1997) 197–212. [21] G. Nebe, E. M. Rains, N. J. A. Sloane, Self-Dual Codes and Invariant Theory, Algorithms and Computation in Mathematics vol. 17, Springer-Verlag, Berlin 2006. [22] W. K. Nicholson, Local group rings, Canad. Math. Bull. 15(1) (1972) 137–138. [23] A. Sălăgean, Repeated-root cyclic and negacyclic codes over a finite chain ring, Discrete Appl. Math. 154(2) (2006) 413–419. [24] R. Sobhani, M. Esmaeili, A note on cyclic codes over GR(p2,m) of length pk, Finite Fields Appl. 15(3) (2009) 387–391. [25] Z. X. Wan, Lectures on Finite Fields and Galois Rings, World Scientific, New Jersey, 2003. [26] W. Willems, A note on self-dual group codes, IEEE Trans. Inform. Theory 48(12) (2002) 3107–3109. [27] X. Yang, J. L. Massey, The condition for a cyclic code to have a complementary dual, Discrete Math. 126(1–3) (1994) 391–393. 94 https://doi.org/10.1109/TIT.2010.2092415 https://doi.org/10.1109/TIT.2010.2092415 https://doi.org/10.1007/s12095-018-0314-5 https://doi.org/10.1007/s12095-018-0314-5 https://doi.org/10.1007/s12095-018-0314-5 https://doi.org/10.1109/TIT.2012.2236383 https://doi.org/10.1109/TIT.2012.2236383 http://dx.doi.org/10.3934/amc.2016004 http://dx.doi.org/10.3934/amc.2016004 https://doi.org/10.1109/TIT.2013.2296495 https://doi.org/10.1109/TIT.2013.2296495 https://doi.org/10.1016/j.ffa.2008.02.003 https://doi.org/10.1016/j.ffa.2008.02.003 https://doi.org/10.1007/s10623-011-9538-5 https://doi.org/10.1007/s10623-011-9538-5 https://doi.org/10.1109/TIT.2003.815816 https://doi.org/10.1109/TIT.2003.815816 https://mathscinet.ams.org/mathscinet-getitem?mr=1896125 https://mathscinet.ams.org/mathscinet-getitem?mr=1896125 https://doi.org/10.4064/aa-80-3-197-212 https://mathscinet.ams.org/mathscinet-getitem?mr=2209183 https://mathscinet.ams.org/mathscinet-getitem?mr=2209183 https://doi.org/10.4153/CMB-1972-025-1 https://doi.org/10.1016/j.dam.2005.03.016 https://doi.org/10.1016/j.dam.2005.03.016 https://doi.org/10.1016/j.ffa.2009.01.004 https://doi.org/10.1016/j.ffa.2009.01.004 https://doi.org/10.1142/5350 https://doi.org/10.1109/TIT.2002.805076 https://doi.org/10.1016/0012-365X(94)90283-6 https://doi.org/10.1016/0012-365X(94)90283-6 Introduction Preliminaries Self-dual abelian codes in GR(pr,s)[G] Complementary dual abelian codes in GR(pr,s)[G] Conclusion Appendix A References