On the Hamming weight of Repeated Root Cyclic and Negacyclic Codes over Galois Rings

Repeated root Cyclic and Negacyclic codes over Galois rings have been studied much less than their simple root counterparts. This situation is beginning to change. For example, repeated root codes of length $p^s$, where $p$ is the characteristic of the alphabet ring, have been studied under some additional hypotheses. In each one of those cases, the ambient space for the codes has turned out to be a chain ring. In this paper, all remaining cases of cyclic and negacyclic codes of length $p^s$ over a Galois ring alphabet are considered. In these cases the ambient space is a local ring with simple socle but not a chain ring. Nonetheless, by reducing the problem to one dealing with uniserial subambients, a method for computing the Hamming distance of these codes is provided.


Introduction
Cyclic and negacyclic codes have been studied extensively in many contexts, beginning with their linear versions over finite fields and continuing on to the study of such codes over a finite ring alphabet A. A common element in the study of these codes is that they are precisely the submodules of the free module A n that correspond to the ideals of a suitable ring R n which is isomorphic to A n as an A-module. The ring R n is either the quotient A[x] x n −1 (for the cyclic case) or the quotient ring A[x] x n +1 (for the negacyclic case). In either case, we refer to the ring R n as the ambient space or ambient ring for the codes. While the literature on cyclic and negacylic codes over chain rings (such as Galois rings) has grown in leaps and bounds (see [4,10,11,17,18,21]), in most instances the studies have been focused only on the cases where the characteristic of the alphabet ring is coprime to the code length, the so-called simple root codes. A few of the contributions to the study of the cases where the characteristic of the alphabet ring is not coprime the the code length (repeated root codes) are [1,2,5,9,16,19]. In this paper we focus on the repeated root case where the code length is in fact a power of a prime.
Let p be a prime and consider cyclic and negacyclic codes of length p s over GR(p a , m). The study of such codes was started in [8] for the negacyclic case when p = 2 and m = 1. It was shown there that the ambient Z 2 a [x] x p s +1 is a chain ring. This result was extended to the case when m is arbitrary in [6]. The distances for most of these codes was calculated there. The chain ring structure of the ambient was heavily used to accomplish this goal.
When a = 1, the Galois ring GR(p a , m) is just the Galois field F p m . Codes over F p m were consider in [7]. There it was shown that for arbitrary p, the ambient space x p s +1 is a chain ring. Once again the chain structure of the ambient space was used to compute all the code distances. Then it was shown also in [7] that x p s −1 when p is odd, which allows all the negacyclic results to be carried over to the cyclic code case. It should be noted that over a field of characteristic 2, there is no distinction between cyclic and negacyclic codes since F 2 m [x] x p s +1 = F 2 m [x] x p s −1 . In all cases mentioned so far, the codes correspond to principal ideals. This is a consequence of the fact that the code ambients are chain rings. In the remaining cases, which comprise the primary subject of this paper, the code ambients are no longer chain rings and in fact, not even PIRs. There are three remaining cases: negacyclic codes over GR(p a , m) for odd prime p and a > 1 of length p s ; cyclic codes of the same type; cyclic codes over GR(2 a , m) for a > 1 of length p s . In this paper these remaining cases are considered and a method for computing the Hamming distance of any code is provided. Now, simple root cyclic codes over Z p m were studied in [4] where a generating set for such codes was formulated and it was also proved that these codes are principal ideals of the ambient ring. An alternative generating set was given for codes over Z 4 in [17]. This result was extended to Z p m in [10] where they also showed the connection between the two formulations. These results were in turn extended to simple root cyclic codes over Galois rings in [20].
In a series of papers ( [18], [14], [15], [13]), the idea of Gröbner basis was extended to principal ideal rings and was used to prove the existence of generating sets with certain desirable properties for cyclic and negacyclic codes over chain rings. Specifically, they showed that given this generating set, the code distance can be determined from one particular element in the generating set. In Section 3, we will use this theory to determine all minimum code distances.
For the most part, the literature preceding ( [18], [14], [15], [13]), failed to address specific distance information about cyclic and negacyclic codes. The generating sets given in [4] are based on the factorization of x n − 1. Given a factorization of x n − 1, it is still not simple to compute distances, even in light of the results in [18] mentioned earlier. To use those results in this context, the minimum weights for all principal ideals are needed. Since it was shown that simple root cyclic codes over Galois rings are principal, the results just mentioned bring us no closer to finding distances in the simple root case. In this paper however, we will show that these results can be very useful in determining distances in some multiple root codes where not all of the codes are principal. This method reduces the problem to finding distance information of related codes which are principal.
In Section 2, the necessary background on Galois rings is given together with other results that are needed throughout the paper. Section 3 considers the class of codes in GR(p a ,m)[x] x p s +1 where p is an odd prime and a > 1. In this section it is x p s +1 is a local ring with simple socle that is not a chain ring. Then a method for computing Hamming distances is shown. Section 4 examines cyclic codes. When p is odd, there is a one-one correspondence between cyclic and negacylcic codes over GR(p a , m) of length p s for odd prime p which is shown. The remainder of the section is devoted to cyclic codes over GR(2 a , m) for a > 1 of length p s . It is shown that GR(2 a ,m)[x] x 2 s −1 has a very similar structure to GR(p a ,m)[x] x p s +1 from Section 3. Again a method for computing Hamming distances is shown.

Preliminaries
In this paper, the word ring means finite commutative ring with identity. The only exception is when we talk about the (infinite) ring R[x] of polynomials with coefficients in the ring R. A local ring is a ring with a unique maximal ideal. Given a commutative ring R, the Jacobson radical of R, denoted by J(R), is the intersection of all maximal ideals of R and the socle of R, denoted by soc(R), is the sum of all minimal ideals of R. A polynomial f (x) ∈ R[x] is regular if it is not a zero divisor. The following is a characterization of regular polynomials in polynomial rings over local rings.
Lemma 2.1 (Theorem XIII.2, [12]). Let R be a finite local commutative ring and where f (x) = a 0 + · · · + a n x n for a i ∈ R. The following are equivalent: (1) f is a regular polynomial.
(3) a i is a unit for some 0 ≤ i ≤ n.
Polynomial rings over local rings admit a division algorithm for certain polynomials.
A chain ring is a ring whose ideals are linearly ordered by inclusion. The following characterization of chain rings is well-known: Lemma 2.3. Let R be a finite commutative ring. The following are equivalent: (1) R is a chain ring.
(2) R is a local principal ideal ring.
(3) R is a local ring with maximal ideal that is principal.
Galois rings constitute a very important family of finite chain rings. They can be defined as follows: f (x) . It is well-known that different choices of m and a yield nonisomorphic Galois rings while, on the other hand, distinct choices of f (x) with the same degree m yield the same Galois ring up to isomorphism. We now list a few pertinent details about these rings. For a more detailed account of the theory of Galois rings including proofs of the results we mention here, see [12] or [20].
Every Galois ring R = GR(p a , m) contains a (p m − 1) th primitive root of unity ζ. Every r ∈ R has a p-adic expansion r = ζ 0 + ζ 1 p + · · · + ζ a−1 p a−1 where Given a polynomial f (x) in any polynomial ring R[x], f can be viewed in the The next two Lemmas are results on negacyclic code ambients over Galois rings which will be needed in the proceeding sections. Defining multiplication of r ∈ x p s +1 can be made into an GR(p a ,m)[x] x p s +1 -module. In light of this, the following lemma is easy to see.
x p s +1 are isomorphic. x p s +1 is a chain ring with exactly the following deals, In [14] an algorithm was given to find a Gröbner basis for ideals of a polynomial ring over a PIR. Later in [18], it is shown that any ideal of a residue ring of a polynomial ring over a chain ring has a Gröbner basis with certain additional properties. Since for any prime p, GR(p a , m) is a chain ring, ideals of GR(p a ,m)[x] x p s +1 will have such a Gröbner basis. The following Lemma is a restatement of that result.
Lemma 2.6 (adapted from Theorem 4.1 in [18]). For any prime p, given an ideal One can show further that the set of generators in Lemma 2.6 is a strong Gröbner basis in the sense of [18]. While interesting, this fact will not be used here.
Lemma 2.7. Let p be a prime. Let k ≤ p n 2 and l be the largest integer s.t. p l | k.
Proof. For k ≤ p, the result holds. Now we proceed in 3 cases. First assume there is an l > 0 s.t. p l | k − 1 and it is the largest such integer. Then p n−l | p n k−1 . Since Noting the previous case, p n | p n k . Now, assume there is an l > 0 s.t. p l | k and it is the largest such integer. Then p ∤ k − 1 and so p ∤ p n − k + 1. Again noting the previous cases, p n−l | p n k 3. Negacyclic codes in GR(p a ,m)[x] x p s +1 for odd prime p As mentioned earlier, all ambient rings previously studied in the literature are chain rings. They are GR(2 a ,m)[x] x p s −1 for a, m, p, s ∈ Z where a ≥ 1, m ≥ 1, p is prime and s ≥ 0. In the following sections the remaining cases will be studied. In these remaining cases, the ambient spaces are not chain rings. We will show, however, that they are local rings with simple socle.
In this section, the structure of GR(p a ,m)[x] x p s +1 where p is an odd prime and a > 1 is studied so that in the following section the structure details can be used to find Hamming distance of all codes. Since s = 0 is the trivial case also assume s > 0.
We start by showing that x + 1 is nilpotent. The calculation of its exact nilpotency is saved for Corollary 3.7.
Proof. Let I be the set of non-invertible elements. Let f ∈ p, x+1 . By Proposition 3.1 (x + 1) is nilpotent. Since p is also, f is nilpotent and hence not invertible. So, The assumption that f not invertible implies therefore, that p | a 0 and this shows that f ∈ p, x + 1 . So, I ⊂ p, x + 1 . Since I contains all invertible elements, it is the unique maximal ideal and therefore, x p s +1 is local.
x p s +1 is the simple module Proof. Using Lemma 2.5, it can be shown that x p s +1 x p s +1 = p a−1 (x + x p s +1 x p s +1 is not a chain ring (4) p, x + 1 is not a principal ideal . When x = −1, p = 0 which is a contradiction in this case since a = 1. Hence, p / ∈ x + 1 . Now assume x + 1 ∈ p . Then x + 1 = pf (x) + (x p s + 1)g(x). Now, comparing coefficients, 1 = pf 0 + g 0 which implies 1 ≡ g 0 modulo p. Also, 0 = pf p s + g 0 + g p s which implies g 0 ≡ −g p s modulo p. In general, 0 = pf kp s + g (k−1)p s + g kp s for k ≥ 1. So, g kp s = 0 for k ≥ 0 which is a contradiction since g is a polynomial. Hence, x p s +1 is not a chain ring. Since any local ring with principal maximal ideal is a chain ring by x p s +1 cannot have principal maximal ideal. Hence, p, x + 1 is 2-generated.
x 3 +1 . Notice that the radical is 3, x + 1 and the socle is 3(x + 1) 2 . More importantly, we see that the ring is not a chain ring. 1 3, x + 1 3, (x + 1) 2 3 + (x + 1) 3 + 2(x + 1) 3 + 6(x + 1) + (x + 1) 2 3 + 3(x + 1) + (x + 1) 2 3 + (x + 1) 2 3(x + 1) 3(x + 1) 2 0 j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j ? ?  ?  ?  ?  ?  ?  ?  ?  ?  ?  ?  ?  ?   T  T  T  T  T  T  T  T  T  T  T  T  T  T  T  T  T  T  T  T  T  T  T  T  T  T  T  T  T  T T  T  T  T  T  T  T  T  T  T  T  T  T  T  T  T  T  T  T  T  T  T  T  T  T  T  T  T  T  T   ?  ?  ?  ?  ?  ?  ?  ?  ?  ?  ?  ?  ? ? j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j Now we are ready to develop our main structural Lemma.
Lemma 3.6. In GR(p a ,m)[x] x p s +1 for t ≥ 0, Proof. We proceed by induction on t. For t = 0, for some a 0 (x) s.t. p 2 |a 0 (x) and b 0 (x) invertible. Now assume the result holds for t−1. So there exists some x p s +1 , the nilpotency of x + 1 is p s a − p s−1 (a − 1).

So far we have seen that GR(p a ,m)[x]
x p s +1 is not a chain ring and not even a PIR. Although a description of a generating set for ideals would be most desirable, we will settle for a bound on the number of generators. We provide two proofs of this result. The first one has a more theoretical flavor as it uses results from [12] on polynomial rings over local rings. The second one aims at establishing a simple algorithm for producing such a generating set. x p s +1 , any ideal is generated by a or fewer elements.
and deg(f i ) < p s . There exists a regular polynomial . . , f a−1 , r, f a+1 , . . . , f n . If p k b +1 ∤ r(x), we can continue this process and replace f j and then r etc. until the remainder is divisible by p kj +1 . It is clear then using this process that it will produce a generating set I = g 0 , p 1 g 1 , . . . , p a−1 g a−1 where either each g i = 0 or is a regular polynomial.
For the second proof, a canonical form for the description of polynomials is needed. It was shown earlier that any f ∈ GR(p a ,m)[x] x p s +1 can be written as where ζ ij ∈ {0, 1, ζ, ζ 2 , . . . , ζ p m −2 } = T m . Now, we will show there is a useful form which we call the canonical form. First, we can write where β k ∈ T m and α k (x) ∈ GR(p a ,m)[x] x p s +1 is invertible. Assume for a moment that i k1 ≤ i k2 and β k1 = 0 = β k2 for some k 1 = k 2 . Then Since α k1 + β k 2 β k 1 p k2−k1 (x + 1) i k 2 −i k 2 α k2 is invertible, wlog we can assume i 0 > i 1 > · · · > i a−1 . We now use this canonical form in the following proof.
Proof #2. Let I = g 0 , g 1 , . . . , g n where g j ∈ GR(p a ,m)[x] x p s +1 . If n ≤ a − 1 we are done so assume n ≥ a. Let f j = g j . Viewing the f j in canonical form, write If β j0 = 0 for some j, we reorder the f j so that for all j where β j0 = 0, i 00 ≤ i j0 .
In either case, f ′ j ∈ I and f j ∈ f 0 , f ′ 1 , . . . , f ′ n . Note that β ′ j0 = 0 for j ≥ 1. To avoid unnecessary complication with the notation at this point we let f j = f ′ j . Next we do the same process but we leave f 0 alone. If β j1 = 0 for some j ≥ 1, we reorder the f j so that for all j ≥ 1 where β j1 = 0, In either case, f ′ j ∈ f 0 , f 1 , . . . , f n and . . , f ′ n . Note that β ′ j1 = 0 for j ≥ 2. Continuing this process a − 1 steps, we end up with . . .
To illustrate the previous algorithmic proof, we provide the following example.
After applying the first step in the algorithm in the above proof we have Then one final step gives We conclude this section by providing a method for finding the Hamming distances of codes in GR(p a ,m)[x] x p s +1 where p is an odd prime and a > 1 is provided. We use the canonical definition of Hamming weight for polynomial based codes i.e. givenc(x) ∈ GR(p a ,m)[x] x p s +1 where we consider c(x) as the polynomial representative of degree less than p s in the cosetc(x) = c(x) + x p s + 1 , the Hamming weight of c(x), w(c(x)), is the number of non-zero coefficients of c(x). The minimum distance d is then defined in the usual way.

Remark 1. It should be clear that the isomorphism in Lemma 2.4 is an isometry when the Hamming weight in GR(p,m)[x]
x p s +1 is defined similarly to the weight in x p s +1 .
Theorem 4.11 of [7] provides the distances for any code in GR(p,m)[x] x p s +1 , which we include here. Lemma 3.9 (Theorems 4.11, [7]). In GR(p,m) Using one additional result from [18] the distances of all codes in GR(p a ,m)[x] x p s +1 can be found. Moreover, Lemma 2.6 is algorithm based, so using all these results, an algorithm exists for finding the distances of these codes. x p s +1 . We can find f 1 , . . . , f r ∈ GR(p a ,m)[x] x p s +1 such that I = p j0 f 0 , . . . , p jr f r where this set satisfies the properties of Lemma 2.6. Then Lemma 3.10 implies that d(I) = d( p a−1 f r ). Next we view f r in canonical form. Write In light of Remark 1, the distance d( p a−1 (x + 1) i0 ) can be found using Lemma 3.9.

Cyclic codes in GR(p a ,m)[x]
x p s −1 for arbitrary prime p Let us first consider the case when p is an odd prime. It is easy to see, arguing as in Proposition 5.1 in [8], that GR(p a ,m)[x] x p s −1 by sending x to −x. Hence, all the results can in Section 3 translate easily into results about cyclic codes. Let us therefore focus solely on the case when p = 2 for the remainder of this section.
Remember that in [6], it was shown that GR(2 a ,m)[x] x 2 s +1 is a chain ring. They also computed the Hamming distance for most of the codes. Let us now consider the cyclic case i.e. the code ambient GR(2 a ,m)[x] x 2 s −1 . It turns out that when a > 1, this is not a chain ring but the structure is very similar to the ring considered in Section 3. In this section assume a > 1 and as before s > 0 since this produces the trivial case. Most of the proofs here are very similar to their analogs in Section 3. We include only the proofs that need fundamental modification. Proof.
The following propositions can be obtained from the parallel results in Section 3 by replacing p with 2 and x p s + 1 with x 2 s − 1 and using Proposition 4.1 in lieu of Proposition 3.1 when needed.  x 2 s −1 is not a chain ring (4) 2, x + 1 is not a principal ideal The following Lemma is similar to Lemma 3.6 with a subtle difference in the divisor of a t (x) which is used in the last line of the proof. x 2 s −1 for t ≥ 0, where b t (x) is invertible and 2 t+2 (x + 1)|a t (x).
The two proofs for Lemma 3.8 can be adapted to this setting with the same substitutions as before. x 2 s −1 , any ideal is at most a-generated.
As was the case with most of the structure results, the Hamming distance results in Section 3 can easily be adapted to this setting. The main results needed are the Hamming Distances for the codes in GR(2,m)[x] x 2 s −1 . These distances again were obtained in [7]. x 2 s −1 , for 0 ≤ i ≤ p s