Algebraic coding theory deals with the design of error-correcting and error-detecting codes for the reliable transmission of information across noisy channel. The class of constacyclic codes plays a very significant role in the theory of error-correcting codes. It includes as a subclass of the important class of cyclic codes, which has been well studied since the late 1950’s. Constacyclic codes also have practical applications as they can be efficiently encoded with simple shift registers. This family of codes is thus interesting for both theoretical and practical reasons.
Let be a commutative finite ring with identity , and be the multiplicative group of invertible elements of . For any , we denote by , or for simplicity, the ideal of generated by , i.e. . For any ideal of , we will identify the element of the residue class ring with (mod ) for any in this paper.
A code over of length is a nonempty subset of , . The code is said to be linear if is an -submodule of . All codes in this paper are assumed to be linear. The ambient space is equipped with the usual Euclidian inner product, i.e. , where , and the dual code is defined by . If , is called a self-dual code over . Let . Then a linear code over of length is called a -constacyclic code if for all . Particularly, is called a negacyclic code if , and is called a cyclic code if .
For any , let . We will identify with in this paper. Then is a -constacyclic code over of length if and only if is an ideal of the residue class ring , and the dual code of is a -constacyclic code of length over , i.e. is an ideal of the ring (cf.  Propositions 2.4 and 2.5). The ring is usually called the ambient ring of -constacyclic codes over with length .
Let be a finite field of cardinality , where is power of a prime, and denote () where . Then is a finite chain ring. As in Dinh et al , if
where satisfying , then is called a unit in to be of Type . When is a unit in of Type , a -constacyclic code of length over is said to be of Type . On the other hand, is called a simple-root constacyclic code if , and called a repeated-root constacyclic code otherwise.
When , there were a lot of literatures on linear codes, cyclic codes and constacyclic codes of length over rings for various prime and positive integers and . See [1–3], [11–17], ,  and , for examples. In particular, an explicit representation for all -constacyclic codes over of arbitrary length and their dual codes are given in  for any , prime number and positive integer .
When , the structures for repeated-root constacyclic codes of Type over had been studied by many literatures. For examples, Kai et al.  investigated -constacyclic codes of arbitrary length over , where . Cao  generalized these results to -constacyclic codes of arbitrary length over an arbitrary finite chain ring , where is a unit of and generates the unique maximal ideal of with nilpotency index . Hence every constacyclic code of Type 1 over any finite chain ring is a one-generator ideal of the ambient ring.
When and , there were fewer literatures on repeated-root constacyclic codes over of Type .
For repeated-root constacyclic codes over of Type , in the case of , Sobhani  determined the structure of -constacyclic codes of length over , where . When and , in  for any , an explicit representation for all distinct -constacyclic codes over the ring of length is given, and the dual code for each of these codes is determined. For the case of and , all self-dual -constacyclic codes over of length are provided.
Let . When , in  an explicit representation for all distinct -constacyclic codes over of length was given, where . Formulas for the number of all such codes and the number of codewords in each code are provided respectively, and the dual code for each of these codes was determined explicitly. When , in  a representation and enumeration formulas for all distinct -constacyclic codes over of length were presented explicitly, where is odd.
Motivated by those, we generalize the approach used in  to determine the structures of repeated-root -constacyclic codes over for any . This class is a significant subclass of constacyclic codes over finite chain rings of Type 2. We give a precise representation and a complete classification for this class of constacyclic codes and their dual codes in this paper. From now on, we adopt the following notations.
Notation 1.1 Let be an odd prime number, be positive integers satisfying . For any even integer and nonzero elements , we denote
where being an integer.
(), which is a finite chain ring with the unique maximal ideal .
, which is a finite principal ideal ring, , and in which the arithmetics are done modulo .
(), where , and the operations are defined by
for all .
satisfying . (Since and , there is a unique such that ).
The present paper is organized as follows. In Section 2, we construct a ring isomorphism from onto first. Then by the Chinese remainder theorem, we give a direct sum decomposition for , which induces a direct sum decomposition for any -constacyclic code over of length . In Section 3, we determine the direct summands and provide an explicit representation for each -contacyclic code over of length . Using this representation, we give formulas to count the number of codewords in each code and the number of all such codes respectively. Then we give the dual code of each -contacyclic code of length over in Section 4. In Section 5. we determine all distinct -contacyclic codes over of length when is irreducible in and . In particular, we list all distinct -contacyclic codes and their dual codes over of length explicitly.
2 Direct sum decomposition of -constacyclic codes over of length
In this section, we will construct a specific isomorphism of rings from onto . Hence we obtain a one-to-one correspondence between the set of ideals in the ring onto the set of ideals in the ring in which the arithmetics are done modulo . Then we provide a direct sum decomposition for any -constacyclic code over of length .
Let where . It is clear that can be uniquely expressed as where satisfying (we will write for convenience). Dividing by iteratively, we obtain a unique ordered -tuple of polynomials in such that
and for all . Similarly, there is a unique ordered -tuple of polynomials in such that
and for all . Assume that
Then can be written as a product of matrices:
where is an matrix over . Define
where for all . Then it is clear that is a bijection from onto . Furthermore, from , in and in we deduce the following conclusion.
Theorem 2.1 Using the notations above, is a ring isomorphism from onto .
Proof. Both and are -algebras of dimension . In fact, is an -basis of , and is an -basis of . It is clear that is an -linear space isomorphism from onto , and is completely determined by:
These imply that
for all satisfying ;
Let where with having degree less than for and . Then it is clear that . Moreover, by in and in , we have
Hence is a ring isomorphism from onto .
By Theorem 2.1, induces a one-to-one correspondence between the set of ideals in the ring onto the set of ideas in the ring . Therefore, in order to determine all distinct -constacyclic codes over of length , it is sufficient to list all distinct ideals of .
Now, we investigate structures and properties of the rings and . As satisfying , we have in . By , there are pairwise coprime monic irreducible polynomials in such that . This implies
For any integer , , we assume and denote . Then and . So there exist such that
In the rest of this paper, we adopt the following notations.
Notation 2.2 Let be an integer satisfying .
Let be defined by
Denote in which the arithmetics are done modulo .
Then from Chinese remainder theorem for commutative rings, we deduce the following lemma about the structure and properties of the ring .
Lemma 2.3 Using the notations above, we have the following decomposition via idempotents:
(i) , and in the ring for all .
(ii) For any with , define
Then is a ring isomorphism from onto .
In order to study the structure of the ring (), we need the following lemma.
Lemma 2.4 Let and denote Then is an invertible element of and satisfies
Hence in the ring .
Proof. Since satisfying (mod ), by Equation (3) it follows that
This implies in . Hence and (mod ). Then from and , we deduce the equality in .
Now, we determine the structure of by the following lemma.
Lemma 2.5 Let . Using the notations in Lemma 2.4, we denote
For any , , define
Then is a ring isomorphism from onto .
Proof. The ring isomorphism defined in Lemma 2.3(ii) can be extended to a polynomial ring isomorphism from onto in the natural way that
for all . From this, by Lemma 2.3 (ii) and Lemma 2.4 we deduce
Therefore, by classical ring theory we conclude that induces a surjective ring homomorphism from onto that is defined as in the lemma. From this and by
we deduce that is a ring isomorphism. Finally, the conclusion follows from by Notation 1.1 and for all .
Lemma 2.6 For any integer , , denote . Then