A note on negacyclic and cyclic codes of length ps over a finite field of characteristic p

Recently, the minimum Hamming weights of negacyclic and cyclic codes of length $p^s$ over a finite field of characteristic $p$ are determined in [4]. We show that the minimum Hamming weights of such codes can also be obtained immediately using the results of [1].


Introduction
Recently, negacyclic codes of length 2 s over Galois rings of characteristic 2 m have been studied by Dinh and López-Permouth in [5] and by Dinh in [2,3] . Later in [4], using similar techniques and detailed computations, Dinh has studied cyclic and negacyclic codes of length p s over a finite field of characteristic p, where s is an arbitrary positive integer. More precisely, Dinh determined the ideal structure and the minimum Hamming weights of all such codes. Additionally, he gave the Hamming distance distribution of some of these codes.
In 1991, G. Castagnoli, J. L. Massey, P. A. Schoeller and N. von Seemann obtained general results on repeated-root cyclic codes over finite fields [1]. For a combinatorial treatment of this topic, we refer to [8]. In this study, as a simpler and more direct method compared to that of [4], we show that the minimum Hamming weights of all negacyclic and cyclic codes of length p s over a finite field of characteristic p can be obtained immediately using the results of [1]. We also point out that the ideal structure of such codes can be obtained directly using a well-known result of algebraic coding theory (see Remark 1).
This note is organized as follows. In Section 2, we recall some preliminaries. In Section 3, we obtain the minimum Hamming weights of all cyclic and negacyclic codes of length p s over finite fields of characteristic p using Lemma 1 and Theorem 1 of [1]. We recall the definitions and the results of [1] that we use in Appendix for convenience.

Preliminaries
Let F q be a finite field of characteristic p. Let n be a positive integer. Throughout the paper we identify a codeword (a 0 , a 1 , . . . , a n−1 ) of length n over F q with the polynomial a(x) = a 0 + a 1 x + · · · + a n−1 x n−1 ∈ F q [x]. Let w H (a(x)) denote the Hamming weight of the codeword a(x). The minimum Hamming weight of a code C is denoted by d H (C).
Let a = x n − 1 and b = x n + 1 be the ideals in F q [x]. Let R a and R b be the finite rings given by It is well known that cyclic codes of length n over F q are ideals of R a and negacyclic codes of length n over F q are ideals of R b (cf. Chapter 7 of [7], see also [9]). Any element of R a (resp. R b ) can be represented as For any ideal I of R a (resp. R b ), there exists a uniquely determined monic polynomial g(x) ∈ F q [x] such that deg(g(x)) < n and I = g(x) + a (resp. I = g(x) + b ). The polynomial g(x) is called the generator of the cyclic code (resp. negacyclic code) I.
Let n = p s for some positive integer s, and let R a , R b be as above, i.e., R a = is a ring isomorphism between R a and R b . Hence ξ gives a one-to-one correspondence between the cyclic codes of length p s over F q and the negacyclic codes of length p s over F q . Moreover for f (x) + a ∈ R a we have Therefore if C is a cyclic code of length n over F q , then we have d H (C) = d H (ξ(C)), where ξ(C) is the negacyclic code obtained by the isomorphism (1).

Negacyclic and cyclic codes of length p s over F q
In this section we determine the ideal structure and the minimum Hamming weights of all negacyclic and cyclic codes of length p s over F q , where s is an arbitrary positive integer.
It is well-known (see, for example, [7]) that the ideals of R a = F q [x]/ x p s − 1 are exactly those generated by the divisors of the polynomial x p s − 1 = (x − 1) p s . Therefore all of the ideals of R a are of the form ( Hence the ideals of R a are linearly ordered as Similarly, the ideals of the ring where 0 ≤ i ≤ p s , and they are linearly ordered as ) denotes the cyclic (resp. negacyclic) code, over F q , of length p s , generated by the polynomial (x − 1) i (resp. (x + 1) i ) throughout .
Remark 1. We note that the arguments above give the ideal structure of the cyclic codes of length p s over F q directly. Hence we prove [4, Proposition 3.2 and Theorem 3.3] in a simpler way.
The minimum Hamming weights of some cyclic (and negacyclic) codes of length p s are obvious.
and f (0) = 0. Recall that (see, for example, Chapter 3 of [6]) the order of f (x) is the least positive integer e such that f (x) |x e − 1 . Assume that p s−1 ≤ i ≤ p s − 1. Then using [6, Theorem 3.6] we obtain that the order of (x − 1) i is equal to p s . Therefore the order of the generator polynomial (x − 1) i is equal to the length of the cyclic code C[i]. This implies that for p s−1 + 1 ≤ i ≤ p s − 1, we can use the results of [1].
The zero ideal 0 and R constitute all ideals of R. For C ∈ {0, R}, using the convention in [1] we denote the minimum Hamming weight d H (C) of the cyclic code C of length 1 over F q as For 0 ≤ t ≤ p s − 1, let 0 ≤ t 0 , t 1 , . . . , t s−1 ≤ p − 1 be the uniquely determined integers such that t = t 0 + t 1 p + · · · + t s−1 p s−1 , and P t be the positive integer given by We define the sets (cf. [1, page 339]) Note that if i is an integer satisfying p s−1 + 1 ≤ i ≤ (p − 1)p s−1 and p is an odd prime, then there exists a uniquely determined integer β such that 1 ≤ β ≤ p − 2 and βp s−1 + 1 ≤ i ≤ (β + 1)p s−1 .
For s > 1, we have Hence for an integer i satisfying p s − p s−1 + 1 ≤ i ≤ p s − 1, there exists a uniquely determined integer k such that 1 ≤ k ≤ s − 1 and Moreover if i is an integer as above and k is the integer satisfying 1 ≤ k ≤ s − 1 and (4), then we have Therefore for such integers i and k, there exists a uniquely determined integer τ with 1 ≤ τ ≤ p − 1 such that Lemma 3. Let p be any prime number. Assume that s > 1, τ and k are integers So we get As ℓ ∈ T * , using (5) we get ℓ = (p − 1)p s−1 + (p − 1)p s−2 + · · · + (p − 1)p s−k + τ p s−k−1 .
The λ-cyclic codes, of length p s , over F q correspond to the ideals of the ring So λ-cyclic codes, of length p s , over F q , are exactly those generated by the elements of the set {(x + γ) i : 0 ≤ i ≤ p s }. Let C[i] be the λ-cyclic code generated by (x + γ) i . Then the minimum Hamming distance of C[i] is exactly as in Theorem 1.

Concluding remarks and comparisons
In [4], Dinh has studied cyclic and negacyclic codes of length p s over a finite field of characteristic p, where s is an arbitrary positive integer. The minimum Hamming weights of all such codes are given in [4], which is one of the main results of [4]. In this note, as a simpler and more direct method compared to that of [4], we have shown that the minimum Hamming weights of all such negacyclic and cyclic codes can be obtained immediately using the results of G. Castagnoli, J. L. Massey, P. A. Schoeller and N. von Seemann in [1]. The ideal structure of such codes is obtained in [4] using arguments from ring theory (see [4, Proposition 3.2 and Theorem 3.3]). We have also shown that the ideal structure of these codes can be determined easily using a classical result of algebraic coding theory (see Remark 1).
Recently, we have observed, in [10], that the methods presented in this paper can be extended to compute the Hamming weight of cyclic codes, of length 2p s , where p is an odd prime. Moreover, we believe that the ideas and techniques, introduced in this paper and in [10], can provide valuable insight into the more general problem of determining the minimum Hamming distance of repeated-root cyclic codes over finite fields.