EUROPEAN JOURNAL OF PURE AND APPLIED MATHEMATICS Vol. 12, No. 4, 2019, 1701-1716 ISSN 1307-5543 – www.ejpam.com Published by New York Business Global Mass Formula for Self-Dual Codes over Galois Rings GR(p3, r) Trilbe Lizann E. Vasquez1,∗, Gaudencio C. Petalcorin, Jr.1 1 Department of Mathematics and Statistics, College of Science and Mathematics, Mindanao State University - Iligan Institute of Technology, 9200 Iligan City, Philippines Abstract. Let p be an odd prime and r a positive integer. Let GR(p3, r) be the Galois ring of characteristic p3 and cardinality p3r. In this paper, we investigate the self-dual codes over GR(p3, r) and give a method to construct self-dual codes over this ring. We establish a mass formula for self-dual codes over GR(p3, r) and classify self-dual codes over GR(p3, 2) of length 4 for p = 3, 5. 2010 Mathematics Subject Classifications: 94B05 Key Words and Phrases: Mass formula, self-dual codes, finite ring, Galois ring, classification 1. Introduction It was shown in [6] that several well-known families of non-linear binary codes can be viewed as linear codes over the ring Z4 of integers modulo 4. This discovery led to much interest and attention given to codes over the ring Zm of integers modulo m and finite rings in general. Self-dual codes are an important class of linear codes for both theoretical and practical reasons. It is a fundamental problem to classify self-dual codes, that is, to find a repre- sentative for each equivalence class of self-dual codes. However, determining the number of equivalence classes is difficult. This task will be made easier by a mass formula, which will tell us when we have a complete set of representatives from each equivalence class. Mass formula for self-dual codes over the ring Zpe for any prime p and for any positive integer e are established by the effort of many authors [1, 5, 9–11]. A classification method of self-dual codes over Zm for arbitrary integer m is given in [13]. In particular, self- dual codes of length 4 over Zp were classified in [13] for all primes p in terms of their automorphism groups. The Galois ring GR(pe, r), where p is prime, e and r are positive integers, is the unique Galois extension of Zpe of degree r. Using a similar argument in [1], the mass formula ∗Corresponding author. DOI: https://doi.org/10.29020/nybg.ejpam.v12i4.3565 Email addresses: trilbelizann.vasquez@g.msuiit.edu.ph (T.L. Vasquez), gaudencio.petalcorin@g.msuiit.edu.ph (G. Petalcorin) http://www.ejpam.com 1701 c© 2019 EJPAM All rights reserved. T. L. Vasquez, G. Petalcorin / Eur. J. Pure Appl. Math, 12 (4) (2019), 1701-1716 1702 for self-dual codes over GR(p2, 2) for odd primes p is obtained in [3]. Moreover, self-dual codes of length 4 over GR(p, 2) and GR(p2, 2) are classified in [4] for all primes p up to equivalence in terms of automorphism group. In this paper, we build on the method in [10] to establish a mass formula for self-dual codes over GR(p3, r), where p is an odd prime and r is a positive integer. Using the mass formula, we classify self-dual codes of length 4 over GR(p3, 2) for p = 3, 5. 2. Preliminaries Let p be prime and e a positive integer. The modulo p reduction mapping µ : Zpe → Zp, a 7→ ā = a (mod p) induces the following modulo p reduction mapping between polynomial rings µ : Zpe [x]→ Zp[x], f(x) = ∑ aix i 7→ f̄(x) = ∑ āix i. An irreducible polynomial f(x) in Zpe [x] is said to be basic if f̄(x) is irreducible. Let f(x) be a monic basic irreducible polynomial over Zpe [x] of degree r. We can choose f(x) so that ω = x+ 〈f(x)〉 is a primitive (pr − 1)st root of unity. The Galois ring GR(pe, r) of characteristic pe and cardinality per is defined as GR(pe, r) = Zpe [x]/〈f(x)〉 = Zpe [ω]. Every element of GR(pe, r) can be expressed uniquely in the ω-adic representation a0 + a1ω + a2ω 2 + · · ·+ ar−1ω r−1, where ai ∈ Zpe . Note that GR(pe, 1) = Zpe and GR(p, r) = Fpr , the Galois field of pr elements. The modulo p reduction can be naturally extended to µ : GR(pe, r) = Zpe [x]/〈f(x)〉 → Zp[x]/〈f̄(x)〉 = Fpr , a 7→ ā = a (mod p). Let Tpr = {0, 1, ω, . . . , ωpr−2}. Observe that the function µ|Tpr : Tpr → Fpr is one-to-one and onto. Any element of GR(pe, r) can be written uniquely in the p-adic representation b0 + pb1 + p2b2 + · · ·+ pe−1be−1, where bi ∈ Tpr . An element a ∈ GR(pe, r) is a unit if and only if ā 6= 0. For the further study of Galois rings, see [8, 16]. Let n be a positive integer and let Sn denote the collection of n-tuples over a finite set S. A code of length n over a finite field F or a finite ring R is a subspace of Fn or an R-submodule of Rn, respectively. Every element of the code is called a codeword. A matrix G is called a generator matrix for a code C if the rows of G generate all the elements of C and none of the rows can be written as a linear combination of the other rows. Two codewords x = (x1, . . . , xn) and y = (y1, . . . , yn) are orthogonal if their Euclidean inner product ∑n i=1 xiyi is zero. The dual C⊥ of a code C of length n over S consists of T. L. Vasquez, G. Petalcorin / Eur. J. Pure Appl. Math, 12 (4) (2019), 1701-1716 1703 all x ∈ Sn which are orthogonal to every codeword in C. If C ⊆ C⊥, then C is said to be self-orthogonal. If C = C⊥, then C is said to be self-dual. A code of length n and dimension k over a finite field F is called an [n, k] code and contains |F|k codewords. An [n, k] code is self-dual if and only if it is self-orthogonal and k = n 2 . We say that a generator matrix G for an [n, k] code is in standard form if G = [Ik A], where Ik denotes the k× k identity matrix and A is some k× (n− k) matrix. Let C be a code of length n over the Galois ring GR(pe, r). C has a generator matrix which, after a suitable permutation of coordinates, can be written as G =  Ik0 A0,1 A0,2 · · · A0,e−1 A0,e 0 pIk1 pA1,2 · · · pA1,e−1 pA1,e 0 0 p2Ik2 · · · p2A2,e−1 p2A2,e ... ... ... . . . ... ... 0 0 0 · · · pe−1Ike−1 pe−1Ae−1,e  (1) where Iki is the ki× ki identity matrix and the Aijs are matrices of appropriate sizes over GR(pe, r). The columns are grouped into blocks of sizes k0, k1, . . . , ke−1, ke = n− ∑e−1 i=0 ki. A code C with generator matrix G as in (1) is said to be of type {k0, k1, . . . , ke−1} and has (pr) ∑e−1 i=0 (e−i)ki codewords. The dual C⊥ of C is of type {ke, ke−1, . . . , k1}. It is known that |C||C⊥| = pern. If C is a self-dual code of type {k0, k1, . . . , ke−1}, then we must have ki = ke−i for all i. For 0 ≤ i ≤ e− 1, define Tori(C) = {v̄ : piv̄ ∈ C}, where v̄ is the image of v under the projection µ : GR(pe, r)n → Fn pr . Tori(C) is an [n, k0 + . . . + ki] code over Fpr and is called the ith torsion code of C. In particular, Tor0(C) is called the residue code and is denoted by Res(C). If C has generator matrix G in (1), then Tori(C) has a generator matrix of the form Gi =  Ik0 A0,1 A0,2 · · · A0,i−1 · · · A0,e 0 Ik1 A1,2 · · · A1,i−1 · · · A1,e ... ... ... . . . ... . . . ... 0 0 0 · · · Iki · · · Ai,e  , where A = (āij) whenever A = (aij). Two codes over GR(pe, r) are said to be equivalent if one can be obtained from the other by permuting the coordinates and (if necessary) changing the signs of certain coordinates. Thus two codes C1 and C2 of length n over GR(pe, r) are equivalent if there exists a monomial matrix P such that C2 = C1P = {cP : c ∈ C1}, where P has exactly one entry ±1 in every row and every column and all the other entries are zero. The automorphism group Aut(C) of a code C of length n over GR(pe, r) is the group of all such matrices P such that C = CP . T. L. Vasquez, G. Petalcorin / Eur. J. Pure Appl. Math, 12 (4) (2019), 1701-1716 1704 Let En be the signed symmetric group of order |En| = 2nn!. The number of codes equivalent to a code C over GR(p3, r) of length n is |En| |Aut(C)| and hence the number Np3,r(n) of distinct self-dual codes over GR(p3, r) of length n is Np3,r(n) = ∑ C |En| |Aut(C)| where the sum runs through all inequivalent self-dual codes C over GR(p3, r) of length n. An explicit formula for Np3,r(n), called the mass formula, would thus be useful for finding all inequivalent self-dual codes over GR(p3, r) of given length. For the further study of codes over finite fields and finite rings, see [7, 12]. We will need the following lemmas, the proofs of which are known. Lemma 1. [14] Let σq(n, k) be the number of self-orthogonal codes of even length n and dimension k over Fq. If char Fq 6= 2, then σq(n, k) = ( qn−k − εqn/2−k + εqn/2 − 1 ) k−1∏ i=1 (qn−2i − 1) k∏ i=1 (qi − 1) , k ≥ 2 where ε = 1 if (−1)n/2 is a square and ε = −1 if (−1)n/2 is not a square. Lemma 2. [15] Let V be an n-dimensional vector space over Fq. The number ( n k ) q of subspaces U ⊂ V of dimension k ≤ n is given by( n k ) q = (qn − 1)(qn − q) · · · (qn − qk−1) (qk − 1)(qk − q) · · · (qk − qk−1) . 3. Codes over GR(p3, r) Let C be a code of length n over GR(p3, r) and let G be a generator matrix for C. We can write G in the following form: G =  A pB p2C  = Ik A2 A3 A4 0 pIl pB3 pB4 0 0 p2Im p2C4  , (2) where Ir is the identity matrix of order r, and the other matrices have entries from GR(p3, r) and are described as follows. We write A3, B4 and A4 in their p-adic expansions T. L. Vasquez, G. Petalcorin / Eur. J. Pure Appl. Math, 12 (4) (2019), 1701-1716 1705 A3 = A30 + pA31, B4 = B40 + pB41, A4 = A40 + pA41 + p2A42, and the matrices A2, B3, C4, Aij and Bij have entries from Tpr . The columns are grouped in blocks of sizes k, l,m and h = n − (k + l + m). The code C is said to be of type {k, l,m} and has pr(3k+2l+m) codewords. The dual code C⊥ is of type {h,m, l} and has pr(3h+2m+l) codewords. If the code C has generator matrix G in (2), then the residue code Res(C) has dimension k and generator matrix T0 = A (mod p) = [ Ik A2 A30 A40 ] , (3) the first torsion code Tor1(C) has dimension k + l and generator matrix T1 = [ A B ] (mod p) = [ Ik A2 A30 A40 0 Il B3 B40 ] , (4) and the second torsion code Tor2(C) has dimension k + l +m and generator matrix T2 = AB C  (mod p) = Ik A2 A30 A40 0 Il B3 B40 0 0 Im C4  . (5) The following proposition gives a characterization of self-duality in GR(p3, r). Proposition 1. Let C be a code over GR(p3, r) with generator matrix G as in (2). Then C is self-dual if and only if k = h, l = m and the following hold: AAt ≡ 0 (mod p3) (6) ABt ≡ 0 (mod p2) (7) BBt ≡ 0 (mod p) (8) ACt ≡ 0 (mod p). (9) Proof. Suppose C is a self-dual code over GR(p3, r). We then have GGt ≡ 0 (mod p3), that is, AAt ≡ 0 (mod p3) pABt ≡ 0 (mod p3) p2BBt ≡ 0 (mod p3) p2ACt ≡ 0 (mod p3), which is equivalent to the set of conditions (6)-(9). Now, C is of type {k, l,m} and its dual code C⊥ is of type {h,m, l}. Since C is self-dual, we then have k = h and l = m. Conversely, let C be a code such that k = h, l = m and conditions (6)-(9) hold. Now, conditions (6)-(9) imply that GGt ≡ 0 (mod p3). So C is a self-orthogonal code, i.e. C ⊆ C⊥. Moreover, since k = h and l = m, we then have |C| = |C⊥|. Therefore C = C⊥. T. L. Vasquez, G. Petalcorin / Eur. J. Pure Appl. Math, 12 (4) (2019), 1701-1716 1706 Corollary 1. A self-dual code C over GR(p3, r) of type {k, l, l} is of even length n = 2(k + l). Corollary 2. Let C be a self-dual code over GR(p3, r) of length n and of type {k, l, l}. Then Res(C) is self-orthogonal, Tor1(C) is self-dual, and Tor2(C) = Res(C)⊥. Proof. Suppose C has generator matrix G as in (2). Then the torsion codes Res(C), Tor1(C) and Tor2(C) have generator matrices T0, T1 and T2 as in (3), (4) and (5) respec- tively. From conditions (6) and (7), we obtain AAt ≡ 0 (mod p) (10) ABt ≡ 0 (mod p). (11) It immediately follows from (10) that T0T t 0 ≡ 0 (mod p), and so Res(C) is self-orthogonal. Conditions (8), (10) and (11) imply that T1T t 1 ≡ 0 (mod p), so that Tor1(C) is self- orthogonal. Since C is self-dual, then dim Tor1(C) = k + l = n 2 . Thus Tor1(C) is self-dual. From Conditions (9)-(11), it follows that T2T t 0 ≡ 0 (mod p), so Tor2(C) ⊆ Res(C)⊥. From Corollary 1, dim Tor2(C) = k+2l = n−k = dim Res(C)⊥. Consequently, |Tor2(C)| = |Res(C)⊥| and so Tor2(C) = Res(C)⊥. 4. Codes over GR(p3, r) from a code over Fr p We now use Proposition 1 to construct self-dual codes over GR(p3, r) with prescribed first torsion code. We start with a self-dual [n, k + l] code C1 over Fpr with generator matrix G′ = [ A′ B′ ] = [ Ik A′2 A′30 A′40 0 Il B′3 B′40 ] , where the columns are grouped into blocks of sizes k, l, l and k. Note that 2(k + l) = n. We want to obtain the number of self-dual codes C over GR(p3, r) such that Tor1(C) = C1. Since C1 is self-dual, then G′G′t ≡ 0 (mod p) and we obtain Ik +A′2A ′ 2 t +A′30A ′ 30 t +A′40A ′ 40 t ≡ 0 (mod p) (12) A′2 +A′30B ′ 3 t +A′40B ′ 40 t ≡ 0 (mod p) (13) Il +B′3B ′ 3 t +B′40B ′ 40 t ≡ 0 (mod p). (14) Let H = [ A′30 A′40 B′3 B′40 ] and J = [ Ik −A′2 −A′2 t Il +A′2 tA′2 ] . Note that H and J are both square matrices of order k + l. From (12)-(14), we have H(−HtJ) ≡ Ik+l (mod p). Hence, H is invertible modulo p. By a permutation of columns of H, we can assume that the k × k matrix A′40 is invertible modulo p. T. L. Vasquez, G. Petalcorin / Eur. J. Pure Appl. Math, 12 (4) (2019), 1701-1716 1707 Let C0 be the k-dimensional subspace of C1 with generator matrix A′ = [ Ik A′2 A′30 A′40 ] . From (12) and (13), C0 is a self-orthogonal code and C0 ⊆ C1 ⊆ C⊥0 . Now, the dual of C⊥0 has dimension n− k = k + 2l. Hence we can write the generator matrix of C⊥0 asA′B′ C ′  = Ik A′2 A′30 A′40 0 Il B′3 B′40 0 0 Il C ′4  , where C ′4 is an l × k matrix over Fpr . We wish to find matrices A2, A3, A4, B3, B4 and C4 with entries from GR(pe, r) satis- fying conditions (6)-(9), which are equivalent to Ik +A2A t 2 +A3A t 3 +A4A t 4 ≡ 0 (mod p3) (15) A2 +A3B t 3 +A4B t 4 ≡ 0 (mod p2) (16) Il +B3B t 3 +B4B t 4 ≡ 0 (mod p) (17) A3 +A4C t 4 ≡ 0 (mod p). (18) The matrices A2, B3 and C4 are considered modulo p, A3 and B4 are considered modulo p2, and A4 modulo p3. As previously done, we write the matrices in p-adic expansion: A3 = A30 + pA31, B4 = B40 + pB41 and A4 = A40 + pA41 + p2A42, where A31, B41, A41 and A42 have entries from Tpr . Let A2, A30, A40, B3 and B40 be the matrices over Tpr such that A2 = A′2, A30 = A′30, A40 = A′40, B3 = B′3 and B40 = B′40. From (12) and (13), there exist matrices (fij) and D with entries from GR(p3, r) such that A2 +A30B t 3 +A40B t 40 = pD (19) and Ik +A2A t 2 +A30A t 30 +A40A t 40 = p(fij). (20) As in [10], B41 and C4 are uniquely determined by Bt 41 ≡ −A−1 40 (D +A31B t 3 +A41B t 40) (mod p) (21) and Ct 4 ≡ −A−1 40 A30 (mod p), (22) which are sufficient conditions for (16) and (18). Since (14) is the same as (17), we only have to look at (15). It then follows that the code C is self-dual if and only if fij + Ã30At 31 + Ã40At 41 + p(A31A t 31 +A41A t 41 + Ã40At 42) ≡ 0 (mod p2) (23) Our goal is to count the number of matrices A31, A41 and A42 satisfying (23). T. L. Vasquez, G. Petalcorin / Eur. J. Pure Appl. Math, 12 (4) (2019), 1701-1716 1708 For the remainder of this paper, we assume that p is an odd prime. Following the argument in Section 2.1 of [10], there are prkl possible choices for A31, p rk(k−1) 2 for A41 and p rk(k−1) 2 for A42. Therefore, we have prk(n 2 −1) possible choices for the matrices A31, A41 and A42. We have proved the following result, which is analogous to Proposition 2.2 of [10]. Proposition 2. Let p be an odd prime. A self-dual code over GR(p3, r) can be induced from a self-dual code C1 over Fpr . There are prk(n 2 −1) self-dual codes over GR(p3, r) of length n corresponding to each subspace of C1 of dimension k, where 0 ≤ k ≤ n 2 . For the sake of completeness, we describe the matrices A31, A41 and A42. A31 is an arbitrary k × l matrix with entries from Tpr , A41 is determined by fij + Ã30At 31 + Ã40At 41 ≡ 0 (mod p), (24) while A42 is determined by (hij) + Ã40At 42 ≡ 0 (mod p), (25) where (fij) + Ã30At 31 + Ã40At 41 + p(A31A t 31 +A41A t 41) = p(hij). (26) 5. Mass Formula and Classification Recall from Lemma 1 that σpr(n, k) is the number of self-orthogonal codes of even length n and dimension k over Fpr . Also, from Lemma 2, ( n k ) pr is the number of k- dimensional subspaces of an n-dimensional vector space over Fpr , where 0 ≤ k ≤ n. The following theorem gives the mass formula for self-dual codes over GR(p3, r). Theorem 1. Let p be an odd prime and let Np3,r(n) denote the number of distinct self-dual codes of even length n = 2m over GR(p3, r). Then Np3,r(n) = σpr (n,m) m∑ k=0 ( m k ) pr prk(n/2−1). Proof. From Lemma 1, there are σpr(n,m) self-dual codes of length n over Fpr . Let C1 be one such self-dual code. Lemma 2 tells us that there are ( m k ) pr subspaces C0 ⊆ C1 of dimension k, where 0 ≤ k ≤ m. Finally, from Proposition 2, there are prk(m−1) self-dual codes over GR(p3, r) corresponding to C0. The result immediately follows. When r = 1, Theorem 1 coincides with the result in [10] for Zp3 . We now give a classification of self-dual codes over GR(p3, 2) of length 4 for p = 3, 5. Our goal is to find a representative for each equivalence classes of codes. In defining the equivalence of codes over GR(p3, 2), we allow permutation of coordinates and (if necessary) multiplying certain coordinates by −1. All computations for this paper were done with the computer algebra package Magma [2]. T. L. Vasquez, G. Petalcorin / Eur. J. Pure Appl. Math, 12 (4) (2019), 1701-1716 1709 5.1. Building-up Using the construction method discussed in Section 4, a general way to construct self- dual codes over GR(p3, 2) of length 4 can be described. Note that a self-dual code of length 4 over GR(p3, 2) has one of the following three types: {0, 2, 2}, {1, 1, 1} or {2, 0, 0}. We start with a self-dual code C[4]p over Fp2 of length 4 with generator matrix [I2 A], where A is a 2 × 2 matrix over Fp2 and AAt ≡ −I2 (mod p). Let C[4,k]p be a self-dual code over GR(p3, 2) of length 4 and type {k, l, l} induced from C[4]p , where k = 0, 1, 2 and l = 2− k. For α ∈ Fpr , we denote by α̂ the element in Tpr such that α̂ = α. Given a matrix M = (αij) over Fpr , we denote by M̂ the matrix (α̂ij) over Tpr . Proposition 3. C[4,0]p has generator matrix mp(Â) = [ pI2 p 0 p2I2 ] . Proof. This immediately follows from the construction method discussed in Section 4, where we take k = 0 and l = 2. We now describe the generator matrix of C[4,1]p . Let a1 ∈ Fp2 . By adding a1 times the second row of the matrix [I2 A] to its first row, and permuting the last two columns whenever necessary so that the (1,4) entry is nonzero, we obtain a matrix over Fp2 of the form G = [ 1 a1 b1 c1 0 1 d1 e1 ] , where a1, b1, c1, d1, e1 ∈ Fpr and c1 6= 0. The code C[4]p is equivalent to the code with generator matrix G. Let Ĝ = [ 1 a b c 0 1 d e ] . Since c1 is nonzero, then c is a nonzero element of Tpr . Thus, c is a unit of GR(p3, 2). Proposition 4. C[4,1]p has generator matrix mp(Ĝ, x) = 1 a b+ px c+ py + p2z 0 p pd pe+ p2q 0 0 p2 p2r  , where x is an arbitrary element of Tpr and y, z, q, r ∈ Tpr such that y ≡ −(2c)−1(F + 2bx) (mod p) z ≡ −(2c)−1H (mod p) q ≡ −c−1(D + dx+ ey) (mod p) r ≡ −c−1b (mod p), with F = 1 p(1 + a2 + b2 + c2) T. L. Vasquez, G. Petalcorin / Eur. J. Pure Appl. Math, 12 (4) (2019), 1701-1716 1710 H = 1 p(F + 2bx+ 2cy + px2 + py2) D = 1 p(a+ bd+ ce) Proof. Let A2 = (a), A30 = (b), A40 = (c). From (20), we obtain pF = (1 + a2 + b2 + c2), where F = (fij). The matrices A31 = (x) and A41 = (y) satisfy (24). Hence, we have F + 2bx+ 2cy ≡ 0 (mod p) y ≡ −(2c)−1(F + 2bx) (mod p). Next, we obtain pH = (F + 2bx+ 2cy + px2 + py2) from (26), where H = (hij). The matrix A42 = (z) satisfies (25), which gives us H + 2cz ≡ 0 (mod p) z ≡ −(2c)−1H (mod p). Now, let C4 = (r). From (22), we have r ≡ c−1b (mod p). Finally, let B3 = (d), B40 = (e) and B41 = (q). We compute pD = (a+ bd+ ce) from (19). Then from (21), it follows that q ≡ −c−1(D + dx+ ey) (mod p). We now describe the generator matrix of C[4,2]p . We permute the columns of the matrix [I2 A] whenever necessary, so that the (1,1) entry of A is nonzero. We write [I2 A] = [ 1 0 s1 t1 0 1 u1 v1 ] , where s1, t1, u1, v1 ∈ Fpr and s1 6= 0. Let  = [ s t u v ] . Since s1 is nonzero, then s is a nonzero element of Tp2 , and thus, is a unit of GR(p3, 2). Also, since A has an inverse modulo p, then detA = s1v1 − t1u1 6= 0, which implies that sv − tu 6= 0 and (sv − tu)/s = v − tus−1 has an inverse modulo p. Proposition 5. C[4,2]p has generator matrix mp(Â, y12, z12) = [I2 Â+ pY + p2Z], T. L. Vasquez, G. Petalcorin / Eur. J. Pure Appl. Math, 12 (4) (2019), 1701-1716 1711 where y12 and z12 are arbitrary elements of Tp2 and Y = (yij) and Z = (zij) are matrices over Tp2 satisfying F + ˜̂ AY t ≡ 0 (mod p) H + ˜̂ AZt ≡ 0 (mod p), with F = 1 p(I2 + ÂÂt) and H = 1 p ( F + ˜̂ AY t + pY Y t ) . Proof. Let A40 = Â. From (20), we compute pF = I2 + ÂÂt, where F = (fij). Note that F is a symmetric matrix. The matrix A41 = Y = (yij), with entries from Tp2 , satisfies (24). We then have F + ˜̂ AY t ≡ 0 (mod p), that is,[ f11 f12 f12 f22 ] + [ s t u v ] [ y11 y21 y12 y22 ] + [ y11 y12 y21 y22 ] [ s u t v ] ≡ 0 (mod p). Hence Y satisfies f11 + 2sy11 + 2ty12 ≡ 0 (mod p) f22 + 2uy21 + 2vy22 ≡ 0 (mod p) f12 + sy21 + ty22 + uy11 + vy12 ≡ 0 (mod p) Observe that y11, y21 and y22 can each be expressed in terms of y12. Thus y11, y21 and y22 are determined by  and y12. Next we compute pH = F + ˜̂ AY t + pY Y t from (26), where H = (hij). The matrix A42 = Z = (zij), with entries from Tp2 , satisfies (25). Hence Z satisfies H + ˜̂ AZt ≡ 0 (mod p), that is,[ h11 h12 h12 h22 ] + [ s t u v ] [ z11 z21 z12 z22 ] + [ z11 z12 z21 z22 ] [ s u t v ] ≡ 0 (mod p). Using a similar argument as earlier, we see that z11, z21 and z22 are determined by  and z12. 5.2. Self-dual codes over GR(27, 2) We consider GR(27, 2) = Z27[ω], where ω2 + 5ω+ 26 = 0 and ω8 = 1, and F9 = Z3[ω̄], where ω̄2 + 2ω + 2 = 0 and ω̄8 = 1. T. L. Vasquez, G. Petalcorin / Eur. J. Pure Appl. Math, 12 (4) (2019), 1701-1716 1712 From [4], there exist two inequivalent self-dual codes of length 4 over F9: C[4]3 1 and C[4]3 2 with generator matrices [I2 A3,1] = [ 1 0 ω̄2 0 0 1 0 ω̄2 ] and [I2 A3,2] = [ 1 0 1 1 0 1 ω̄4 1 ] , respectively. The matrices G3,1,0 = [ 1 0 0 ω̄2 0 1 ω̄2 0 ] , G3,1,1 = [ 1 1 ω̄2 ω̄2 0 1 0 ω̄2 ] and G3,1,ω̄ = [ 1 ω̄ ω̄2 ω̄3 0 1 0 ω̄2 ] generate codes which are equivalent to C[4]3 1 , while the matrices G3,2,0 = [I2 A3,2] and G3,2,ω̄ = [ 1 ω̄ ω̄3 ω̄2 0 1 ω̄4 1 ] generate codes which are equivalent to C[4]3 2 . Table 1: Self-dual Codes of Length 4 over GR(27, 2). Type Generator Matrix No. of Codes |Aut(C)| {0, 2, 2} m3(Â3,1) 1 32 m3(Â3,2) 1 48 {1, 1, 1} m3(Ĝ3,1,0, 0) 1 16 m3(Ĝ3,1,1, 0), m3(Ĝ3,1,ω̄, 0), m3(Ĝ3,2,ω̄, 0) 3 8 m3(Ĝ3,1,0, x), where x ∈ {1, ω} 11 4 m3(Ĝ3,1,1, x), where x ∈ {1, ω, ω2, ω3} m3(Ĝ3,2,0, 0), m3(Ĝ3,2,ω̄, x), where x ∈ {1, ω2, ω3, ω5} m3(Ĝ3,1,ω̄, x), where x ∈ {1, ω}, 3 2 m3(Ĝ3,2,0, ω) {2, 0, 0} m3(Â3,1, 0, 0) 1 32 m3(Â3,2, 0, 0) 1 16 m3(Â3,1, 0, z), where z ∈ {1, ω} 33 8 m3(Â3,1, 1, z), where z ∈ {0, 1, ω, . . . , ω7} m3(Â3,1, ω, z), where z ∈ {0, 1, ω, . . . , ω7} m3(Â3,2, 0, z), where z ∈ {1, ω, ω2, ω3} m3(Â3,2, ω, z), where z ∈ {0, 1, ω, . . . , ω7} In Table 1, we give the list of inequivalent self-dual codes over GR(27, 2) of length 4. Using the mass formula in Theorem 1, we make the following computations, confirming that Table 1 gives a complete classification. N27,2(4) = σ9(4, 2) 2∑ k=0 ( 2 k ) 9 32k = 20 + 1800 + 1620 = ∑ C 24 · 4! |Aut(C)| . T. L. Vasquez, G. Petalcorin / Eur. J. Pure Appl. Math, 12 (4) (2019), 1701-1716 1713 Hence there are 55 self-dual codes of length 4 over GR(27, 2). 5.3. Self-dual codes over GR(125, 2) We consider GR(125, 2) = Z125[ω], where ω2 + 89ω + 57 = 0 and ω24 = 1, and F25 = Z5[ω̄], where ω̄2 + 4ω + 2 = 0 and ω̄24 = 1. From [4], there exist three inequivalent self-dual codes of length 4 over F25: C[4]5 1 , C[4]5 2 and C[4]5 3 with generator matrices [I2 A5,1], [I2 A5,2] and [I2 A5,3] respectively, where A5,1 = [ ω̄6 0 0 ω̄6 ] , A5,2 = [ ω̄8 ω̄4 ω̄16 ω̄8 ] and A5,3 = [ 1 ω̄21 ω̄9 1 ] , respectively. C[4]5 1 is equivalent to codes with generator matrices G5,1,0 = [ 1 0 0 ω̄6 0 1 ω̄6 1 ] , G5,1,1 = [ 1 1 ω̄6 ω̄6 0 1 0 ω̄6 ] , G5,1,ω̄ = [ 1 ω̄ ω̄6 ω̄7 0 1 0 ω̄6 ] , G5,1,ω̄2 = [ 1 ω̄2 ω̄6 ω̄8 0 1 0 ω̄6 ] and G5,1,ω̄3 = [ 1 ω̄3 ω̄6 ω̄9 0 1 0 ω̄6 ] , C[4]5 2 is equivalent to codes with generator matrices G5,2,0 = [I2 A5,2], G5,2,1 = [ 1 1 ω̄12 ω̄3 0 1 ω̄16 ω̄8 ] , G5,2,ω̄ = [ 1 ω̄ ω̄19 ω̄18 0 1 ω̄16 ω̄8 ] and G5,2,ω̄2 = [ 1 ω̄2 ω̄21 ω̄22 0 1 ω̄16 ω̄8 ] , while C[4]5 3 is equivalent to codes with generator matrices G5,3,0 = [I2 A5,3], G5,3,1 = [ 1 1 ω̄11 ω̄7 0 1 ω̄9 1 ] , G5,3,ω̄2 = [ 1 ω̄2 ω̄16 ω̄11 0 1 ω̄9 1 ] , G5,3,ω̄6 = [ 1 ω̄6 ω̄2 ω̄8 0 1 ω̄9 1 ] and G5,3,ω̄15 = [ 1 ω̄15 ω̄6 ω̄9 0 1 ω̄9 1 ] . Let J1 and J2 be subsets of T25, with J1 = {0, 1, ω, ω2, ω4, ω5, ω7, ω9, ω10, ω11, ω13, ω17} J2 = {0, 1, ω, ω2, ω4, ω5, ω6, ω7, ω10, ω11, ω15, ω16}. Table 2 gives the list of inequivalent self-dual codes over GR(125, 2) of length 4. Using the mass formula in Theorem 1, we make the following computations, confirming that Table 2 gives a complete classification. N125,2(4) = σ25(4, 2) 2∑ k=0 ( 2 k ) 25 52k = 52 + 33800 + 32500 = ∑ C 24 · 4! |Aut(C)| . Hence there are 904 self-dual codes of length 4 over GR(125, 2). T. L. Vasquez, G. Petalcorin / Eur. J. Pure Appl. Math, 12 (4) (2019), 1701-1716 1714 Table 2: Self-dual Codes of Length 4 over GR(125, 2). Type Generator Matrix No. of Codes |Aut(C)| {0,2,2} m5(Â5,1) 1 32 m5(Â5,2) 1 24 m5(Â5,3) 1 16 {1,1,1} m5(Ĝ5,1,0, 0) 1 16 m5(Ĝ5,1,1, 0), m5(Ĝ5,1,ω̄3 , 0), m5(Ĝ5,3,ω̄15 , 0) 3 8 m5(Ĝ5,2,0, 0), m5(Ĝ5,2,1, 0) 2 6 m5(Ĝ5,1,ω̄, 0), m5(Ĝ5,1,ω̄2 , 0),m5(Ĝ5,3,0, 0), 83 4 m5(Ĝ5,1,0, x), where x ∈ {1, ω, . . . , ω5}, m5(Ĝ5,1,1, x), where x ∈ {1, ω, . . . , ω11}, m5(Ĝ5,2,ω̄, x), where x ∈ {0, 1, ω, . . . , ω23}, m5(Ĝ5,3,ω̄6 , x), where x ∈ {0, 1, ω, . . . , ω23}, m5(Ĝ5,3,ω̄15 , x), where x ∈ {1, ω, . . . , ω11} m5(Ĝ5,1,ω̄, x), where x ∈ {1, ω, . . . , ω11} 133 2 m5(Ĝ5,1,ω̄2 , x), where x ∈ {1, ω, . . . , ω11} m5(Ĝ5,1,ω̄3 , x), where x ∈ {1, ω, . . . , ω5} m5(Ĝ5,2,0, x), where x ∈ {1, ω, . . . , ω7} m5(Ĝ5,2,1, x), where x ∈ {1, ω, . . . , ω7} m5(Ĝ5,2,ω̄2 , x), where x ∈ {0, 1, ω, . . . , ω23} m5(Ĝ5,3,0, x), where x ∈ {1, ω, . . . , ω11} m5(Ĝ5,3,1, x), where x ∈ {0, 1, ω, . . . , ω23} m5(Ĝ5,3,ω̄2 , x), where x ∈ {0, 1, ω, . . . , ω23} {2,0,0} m5(Â5,1, 0, 0) 1 32 m5(Â5,2, 0, 0) 1 24 m5(Â5,3, ω 21, ω3) 1 16 m5(Â5,1, 0, z), where z ∈ {1, ω, . . . , ω5} 676 8 m5(Â5,1, y, z), where y ∈ {1, ω, . . . , ω5}, z ∈ T25 m5(Â5,2, 0, z), where z ∈ {1, ω, . . . , ω7} m5(Â5,2, y, z), where y ∈ {1, ω, . . . , ω7}, z ∈ T25 m5(Â5,3, y, z), where y ∈ J1, z ∈ T25, m5(Â5,3, ω 21, z), where z ∈ J2 6. Conclusion We discussed a method to construct self-dual codes over GR(p3, r) from a self-dual code over Fpr , where p is an odd prime and r is a positive integer. This construction method led to a mass formula and classification of self-dual codes of length 4 over GR(p3, 2) for p = 3, 5. In this study, we only dealt with the case when p is an odd prime. Letting p = 2 in REFERENCES 1715 (24), we obtain fij + Ã30At 31 + Ã40At 41 ≡ 0 (mod 2). Since the diagonal entries of X̃ are all 0, then we must have fii ≡ 0 (mod 2) for each i. Hence, from (20), the diagonal entries of Ik + A2A t 2 + A30A t 30 + A40A t 40 = 2(fij) must be doubly even. Thus, in the case of p = 2, the construction algorithm becomes more complicated because we need an additional property for the self-dual codes over F2r . We are still investigating the mass formula for self-dual codes over GR(8, r). Acknowledgements This research is funded by the Department of Science and Technology - Accelerated Science and Technology Human Resource Development Program (DOST-ASTHRDP). References [1] JM Balmaceda, RA Betty, and F Nemenzo. Mass formula for self-dual codes over Zp2 . Discrete Math., 308:2984–3002, 2008. [2] W Bosma, J Cannon, and C Playoust. The Magma algebra system. I. The user language. J. Symbolic Comput., 24(3-4):235–265, 1997. Computational algebra and number theory (London, 1993). [3] W-H Choi. Mass formula for self-dual codes over Galois rings GR(p2, 2). Korean J. Math., 24 (4):751–764, 2016. [4] W-H Choi. The classification of self-dual codes over Galois rings of length 4. Bulletin of the Korean Mathematical Society, 55:1371–1387, 2018. [5] P Gaborit. Mass formulas for self-dual codes over Z4 and Fq +uFq rings. IEEE Trans. Inform. Theory, 42:1222–1228, 1996. [6] AR Hammons, PV Kumar, AR Calderbank, NJA Sloane, and P Solé. The Z4-linearity of Kerdock, Preparata, Goethals, and related codes. IEEE Trans. Inform. Theory, 40 (2):301–319, 1994. [7] WC Huffman and V Pless. Fundamentals of Error-Correcting Codes. Cambridge University Press, United Kingdom, 2004. [8] BR McDonald. Finite Rings with Identity. Marcel Dekker, Inc., New York, 1974. [9] K Nagata, F Nemenzo, and H Wada. Constructive algorithm of self-dual error- correcting codes. In 11th International Workshop on Algebraic and Combinatorial Coding Theory, pages 215–220, 2008. REFERENCES 1716 [10] K Nagata, F Nemenzo, and H Wada. The number of self-dual codes over Zp3 . Des. Codes Cryptogr., 50:291–303, 2009. [11] K Nagata, F Nemenzo, and H Wada. Mass formula and structure of self-dual codes over Z2s . Des. Codes Cryptogr., 67:293–316, 2013. [12] GH Norton and A Sălăgean. On the structure of linear and cyclic codes over a finite chain ring. AAECC, 10(3):489–506, 2000. [13] YH Park. The classification of self-dual modular codes. Finite Fields and Their Applications, 17:442–460, 2011. [14] V Pless. The number of isotropic subspaces in a finite geometry. Atti. Accad. Naz. Lincei Rendic, 39:418–421, 1965. [15] JH van Lint and RM Wilson. A Course in Combinatorics. Cambridge University Press, United Kingdom, 1993. [16] Z-X Wan. Finite Fields and Galois Rings. World Scientific Publishing Co. Pte. Ltd., Hackensack, NJ, 2012.