Repeated-Root Constacyclic Codes Over the Chain Ring Fpm[u]/⟨u3⟩

Let <inline-formula> <tex-math notation="LaTeX">$\mathcal {R}=\mathbb {F}_{p^{m}}[u]/\langle u^{3} \rangle $ </tex-math></inline-formula> be the finite commutative chain ring, where <inline-formula> <tex-math notation="LaTeX">$p$ </tex-math></inline-formula> is a prime, <inline-formula> <tex-math notation="LaTeX">$m$ </tex-math></inline-formula> is a positive integer and <inline-formula> <tex-math notation="LaTeX">$\mathbb {F}_{p^{m}}$ </tex-math></inline-formula> is the finite field with <inline-formula> <tex-math notation="LaTeX">$p^{m}$ </tex-math></inline-formula> elements. In this paper, we determine all repeated-root constacyclic codes of arbitrary lengths over <inline-formula> <tex-math notation="LaTeX">$\mathcal {R}$ </tex-math></inline-formula> and their dual codes. We also determine the number of codewords in each repeated-root constacyclic code over <inline-formula> <tex-math notation="LaTeX">$\mathcal {R}$ </tex-math></inline-formula>. We also obtain Hamming distances, RT distances, RT weight distributions and ranks (i.e., cardinalities of minimal generating sets) of some repeated-root constacyclic codes over <inline-formula> <tex-math notation="LaTeX">$\mathcal {R}$ </tex-math></inline-formula>. Using these results, we also identify some isodual and maximum distance separable (MDS) constacyclic codes over <inline-formula> <tex-math notation="LaTeX">$\mathcal {R}$ </tex-math></inline-formula> with respect to the Hamming and RT metrics.

where q is the cardinality of the code alphabet, n is the block length and d is the Hamming distance of the code. Linear codes that attain the Singleton bound are called maximum distance separable (MDS) codes with respect to the Hamming metric. Later, motivated by the problem to transmit messages over several parallel communication channels with some channels not available for transmission, a non-Hamming metric, called the Rosenbloom-Tsfasman metric (or RT metric), was introduced by Rosenbloom and Tsfasman [30]; they also derived Singleton bound for the RT metric. Linear codes that attain the Singleton bound for the RT metric are called The associate editor coordinating the review of this manuscript and approving it for publication was Zesong Fei .
MDS codes with respect to the RT metric. MDS codes have the highest possible error-detecting and error-correcting capabilities for given code length, code size and alphabet size, hence they are considered optimal codes in that sense. This has encouraged many coding theorists to further study and construct MDS codes with respect to various metrics (see [20], [23], [39]). Recently, Li and Yue [24] determined Hamming distances of all repeated-root cyclic codes of length 5p s over F p m and identified all MDS codes within this class of codes, where p is a prime, s, m are positive integers and F p m is the finite field of order p m . In this paper, we shall also find MDS codes with respect to Hamming and RT metrics within the family of constacyclic codes over F p m [u]/ u 3 . Berlekamp [4] first introduced and studied constacyclic codes over finite fields, which have a rich algebraic structure and are generalizations of cyclic and negacyclic codes. For recent works on constacyclic codes over finite fields, please refer to [32], [33], [37]. Calderbank et al. [6], Hammons et al. [21] and Nechaev [28] related binary non-linear codes (e.g. Kerdock and Preparata codes) to linear codes over the finite commutative chain ring Z 4 of integers modulo 4 with the help of a Gray map. Since then, codes over finite commutative chain rings have received a great deal of attention. However, their algebraic structures are known only in a few cases. Towards this, Dinh and López-Permouth [17] studied algebraic structures of simple-root cyclic and negacyclic codes over finite commutative chain rings and their dual codes. In the same work, they also determined all negacyclic codes of length 2 t over the ring Z 2 m of integers modulo 2 m and their dual codes, where t ≥ 1 and m ≥ 2 are integers. In a related work, Batoul et al. [3] proved that when λ is an nth power of a unit in a finite commutative chain ring R, repeated-root λ-constacyclic codes of length n over R are equivalent to cyclic codes of the same length over R. Apart from this, many authors [1], [2], [5], [22], [36] investigated algebraic structures of linear and cyclic codes over the finite commutative chain ring To describe the recent work, let p be a prime, s, m be positive integers, F p m be the finite field of order p m , and let F p m [v]/ v 2 be the finite commutative chain ring with unity. Dinh [15] determined all constacyclic codes of length p s over F p m [v]/ v 2 and their Hamming distances. Later, Chen et al. [14] and Liu and Xu [25] determined all constacyclic codes of length 2p s over the ring F p m [v]/ v 2 , where p is an odd prime. Using a technique different from that employed in [14], [15], [25], Cao et al. [8] determined all α-constacyclic codes of length np s over F p m [v]/ v 2 and their dual codes by writing a canonical form decomposition for each code, where α is a non-zero element of F p m and n is a positive integer with gcd(p, n) = 1. In a recent work, Zhao et al. [38] determined all (α+βv)-constacyclic codes of length np s over F p m [v]/ v 2 and their dual codes, where n is a positive integer coprime to p, and α, β are non-zero elements of F p m . This completely solved the problem of determination of all constacyclic codes of length np s over F p m [v]/ v 2 and their dual codes, where n is a positive integer coprime to p. In a recent work [34], we determined all repeated-root constacyclic codes of arbitrary lengths over the Galois ring GR(p 2 , m) of characteristic p 2 and cardinality p 2m , their sizes and their dual codes. In the same work, we also listed some isodual repeated-root constacyclic codes over GR(p 2 , m).
In a related work, Cao [7] established algebraic structures of all (1 + aw)-constacyclic codes of arbitrary lengths over a finite commutative chain ring R with the maximal ideal as w , where a is a unit in R. Later, Dinh et al. [18] studied repeated-root (α + aw)-constacyclic codes of length p s over a finite commutative chain ring R with the maximal ideal as w , where p is a prime number, s ≥ 1 is an integer and α, a are units in R. The results obtained in Dinh et al. [18] can also be obtained from the work of Cao [7] via the ring isomorphism from 0 (such an element α 0 always exists in F p m ). The constraint that a is a unit in R restricts their study to only a few special classes of repeated-root constacyclic codes over R. When a is a unit in R, codes belonging to these special classes are direct sums of (principal) ideals of certain finite commutative chain rings. However, when a is a non-unit in R, there are repeated-root constacyclic codes over R, which are direct sums of non-principal ideals. In another related work, Sobhani [35] determined all (α + γ u 2 )-constacyclic codes of length p s over F p m [u]/ u 3 and their dual codes, where α, γ are non-zero elements of F p m . For more related works, readers may refer to [9]- [13].
The main goal of this paper is to determine all repeated-root constacyclic codes of arbitrary lengths over the finite commutative chain ring F p m [u]/ u 3 , their sizes and their dual codes, where p is a prime and m is a positive integer. Hamming distances, RT distances, RT weight distributions and ranks (i.e., cardinalities of minimal generating sets) are also determined for some repeated-root constacyclic codes over F p m [u]/ u 3 . Some isodual and MDS codes over F p m [u]/ u 3 with respect to Hamming and RT metrics are also identified within this class of constacyclic codes.
This paper is organized as follows: In Section II, we state some basic definitions and results that are needed to derive our main results. In Section III, we determine all repeated-root constacyclic codes of arbitrary lengths over F p m [u]/ u 3 , their dual codes and their sizes (Theorems [13][14][15][16][17][18]. As an application, we also determine some isodual repeated-root constacyclic codes over F p m [u]/ u 3 (Corollaries [14][15][16][17][18][19]. In Section IV, we determine Hamming distances, RT distances, RT weight distributions and ranks (i.e., cardinalities of minimal generating sets) of some repeated-root constacyclic codes over F p m [u]/ u 3 (Theorems 21,23,25,26,28,30). We also list some MDS constacyclic codes over F p m [u]/ u 3 with respect to Hamming and RT metrics ( Theorems 22,24,27 and 29). In Section V, we determine Hamming distances of all repeated-root constacyclic codes of length 2p s over F p m [u]/ u 3 (Theorem 33). We also list all MDS repeated-root constacyclic codes of length 2p s over F p m [u]/ u 3 with respect to the Hamming metric (Theorem 35). In Section VI, we mention a brief conclusion and discuss some interesting open problems in this direction.

II. SOME PRELIMINARIES
A commutative ring R with unity is called (i) a local ring if it has a unique maximal ideal (consisting of all the non-units of R), and (ii) a chain ring if all its ideals form a chain with respect to the inclusion relation. Then the following result is well-known.
Proposition 1 [17]: For a finite commutative ring R with unity, the following statements are equivalent: (a) R is a local ring whose maximal ideal M is principal, i.e., M = w for some w ∈ R. (b) R is a local principal ideal ring. (c) R is a chain ring and all its ideals are given by w i , 0 ≤ i ≤ e, where e is the nilpotency index of w. Furthermore, we have | w i | = |R/ w | e−i for 0 ≤ i ≤ e. (Throughout this paper, |A| denotes the cardinality of the set A.) Now let R be a finite commutative ring with unity, and let N be a positive integer. Let R N be the R-module consisting of all N -tuples over R. For a unit λ ∈ R, a λ-constacyclic code C of length N over R is defined as an R-submodule of R N satisfying the following property: (a 0 , a 1 , · · · , a N −1 ) ∈ C implies that (λa N −1 , a 0 , a 1 , · · · , a N −2 ) ∈ C. The Hamming distance d H (C) of the code C is given by d H (C) = min{w H (c) : c( = 0) ∈ C}, where w H (c) is the number of non-zero components of c and is called the Hamming weight of c. The Rosenbloom-Tsfasman (RT) distance d RT (C) of the code C is given by d RT where w RT (c) is the RT weight of c and is defined as Note that each R-submodule of R N need not be free. The cardinality of a minimal generating set of the code C is called the rank of C and is denoted by rank(C). The code C of length N and rank k over R is referred to as an [N , k, d H (C)]-code with respect to the Hamming metric, while the code C is referred to as an [N , k, d RT (C)]-code with respect to the RT metric.
The Rosenbloom-Tsfasman (RT) weight distribution of the code C is defined as the list A 0 , A 1 , · · · , A N , where for 0 ≤ ρ ≤ N , A ρ is the number of codewords in C having the RT weight as ρ. Further, the code C is called (i) an MDS code with respect to the Hamming metric if it satisfies |C| = |R| N −d H (C)+1 , and (ii) an MDS code with respect to the RT metric if it satisfies |C| = |R| N −d RT (C)+1 . Note that an MDS code has to be non-zero. The dual code of C, denoted by C ⊥ , is defined as C ⊥ = {u ∈ R N : u.c = 0 for all c ∈ C}, where u.c = u 0 c 0 + u 1 c 1 + · · · + u N −1 c N −1 for u = (u 0 , u 1 , · · · , u N −1 ) ∈ R N and c = (c 0 , c 1 , · · · , c N −1 ) ∈ C. It is easy to observe that the dual code C ⊥ is a λ −1 -constacyclic code of length N over R. The code C is said to be isodual if it is R-linearly equivalent to its dual code C ⊥ .
Under the standard R-module isomorphism ψ : It is easy to see that I * is an ideal of the ring R[x]/ x N − λ −1 . Now the following holds. Lemma 2 [14]: If C ⊆ R[x]/ x N − λ is a λ-constacyclic code of length N over R, then we have C ⊥ = ann(C) * . From this point on, throughout this paper, let R be the ring = 0, and that any element λ ∈ R can be uniquely expressed as λ = α + βu + γ u 2 , where α, β, γ ∈ F p m . Now we make the following observation.
The following three theorems are useful in the determination of Hamming distances of some repeated-root constacyclic codes over R. In fact, the following theorem is an extension of Theorem 3.4 of Dinh [15].
Moreover, the code C is an MDS code if and only if exactly one of the following conditions is satisfied: Proof: Working in a similar manner as in Theorem 3.4 of Dinh [15], the desired result follows.
Theorem 5 [27]: Let p be an odd prime, and let ω be a non-zero square in F p m . Then there exists ω 0 ∈ F p m satisfying ω = ω p s 0 . Further, ω 0 is a square in F p m , i.e., there exists ζ ∈ F p m such that ω 0 = ζ 2 . Now let C be a non-zero ω-constacyclic code of length 2p s over F p m . Then we have VOLUME 8, 2020 When υ 1 ≥ υ 2 , the Hamming distance d H (C) of the code C over F p m is given by When υ 2 ≥ υ 1 , the Hamming distance d H (C) of the code C over F p m is given by Moreover, the code C is an MDS code if and only if exactly one of the following conditions is satisfied: • υ 1 = υ 2 = 0; • υ 1 = 1 and υ 2 = 0; • υ 1 = 0 and υ 2 = 0; • υ 1 = p s and υ 2 = p s − 1; • υ 1 = p s − 1 and υ 2 = p s . Theorem 6 [29]: Let C be a linear code of length N over R. Then Tor 2 (C) = {a ∈ F N p m : u 2 a ∈ C} is a linear code of length N over F p m . Furthermore, we have d H (C) = d H (Tor 2 (C)).
Next we proceed to study algebraic structures of all constacyclic codes of length N = np s over the ring R = F p m + uF p m + u 2 F p m , where u 3 = 0, p is a prime and n, s, m are positive integers with gcd(n, p) = 1.

III. CONSTACYCLIC CODES OF LENGTH np s OVER R
Throughout this paper, let p be a prime, and let n, s, m be positive integers with gcd(n, p) = 1. Let F p m be the finite field of order p m , and let R = F p m [u]/ u 3 be the finite commutative chain ring with unity. Let λ = α + βu + γ u 2 , where α, β, γ ∈ F p m and α is non-zero. In this section, we shall provide a method to construct all λ-constacyclic codes of length np s over R for the purpose of error-detection and error-correction. We shall also determine their dual codes and the number of codewords in each code. Apart from this, we shall list some isodual constacyclic codes of length np s over R. These results are useful in encoding and decoding these codes and in studying their error-detecting and error-correcting capabilities with respect to various communication channels.
To do this, we recall that a λ-constacyclic code of length np s over R is an ideal of the quotient ring , · · · , f r (x) are monic pairwise coprime polynomials over F p m . In the following lemma, we factorize the polynomial x np s − λ into pairwise coprime polynomials in R[x].
when β = 0 and γ is non-zero. Moreover, the polynomials f 1 Proof: Working in a similar manner as in Lemma 3.1 of Sharma and Sidana [34], the desired result follows.
From now on, we define k j ( . This, by Chinese Remainder Theorem, implies that Then we observe the following: Proposition 8: (a) Let C be a λ-constacyclic code of length np s over R, i.e., an ideal of the ring R λ . Then C = C 1 ⊕ C 2 ⊕ · · · ⊕ C r , where C j is an ideal of K j for 1 ≤ j ≤ r. (b) If I j is an ideal of K j for 1 ≤ j ≤ r, then I = I 1 ⊕ I 2 ⊕ · · · ⊕ I r is an ideal of R λ (i.e., I is a VOLUME 8, 2020 λ-constacyclic code of length np s over R). Moreover, we have |I | = |I 1 ||I 2 | · · · |I r |. Proof: Proof is trivial. Next if C is a λ-constacyclic code of length np s over R, then its dual code C ⊥ is a λ −1 -constacyclic code of length np s over R. This implies that C ⊥ is an ideal of the ring In order to determine C ⊥ more explicitly, we observe that . By applying Chinese Remainder Theorem again, we get Then we have the following: Proposition 9: Let C be a λ-constacyclic code of length np s over R, i.e., an ideal of the ring R λ . If C = C 1 ⊕ C 2 ⊕ · · · ⊕ C r with C j an ideal of K j for each j, then the dual code C ⊥ of C is given by for each j. Proof: Its proof is straightforward. In view of Propositions 8 and 9, we see that to determine all λ-constacyclic codes of length np s over R, their sizes and their dual codes, we need to determine all ideals of the ring K j , their cardinalities and their orthogonal complements in K j for 1 ≤ j ≤ r. To do so, throughout this paper, let 1 ≤ j ≤ r be a fixed integer. From now on, we shall represent elements of the rings K j and K j (resp. ) of degree less than d j p s , and we shall perform their addition and multiplication modulo k j (x) and k * j (x) (resp. f j (x) p s ), respectively. To determine all ideals of the ring K j , we make the following observation.
Lemma 10: Let 1 ≤ j ≤ r be fixed. In the ring K j , the following hold.
(a) Any non-zero polynomial g(x) ∈ F p m [x] satisfying gcd(g(x), f j (x)) = 1 is a unit in K j . As a consequence, any non-zero polynomial in F p m [x] of degree less than d j is a unit in K j .
Note that every element a(x) ∈ K j can be uniquely expressed as a(x) = a 0 (x)+ua 1 (x)+u 2 a 2 (x), where a 0 (x), a 1 (x), a 2 (x) ∈ P d j p s (F p m ). Further, by repeatedly applying the division algorithm in F p m [x], for ∈ {0, 1, 2}, we can write for each i and . Now to determine cardinalities of all ideals of K j , we observe the following: Then Tor 0 (I), Tor 1 (I) and Tor 2 To determine orthogonal complements of all ideals of K j , we need the following lemma.
Lemma 12: Let 1 ≤ j ≤ r be a fixed integer. Let I be an ideal of the ring K j with the orthogonal complement as I ⊥ .
Then the following hold.
. Proof: Its proof is straightforward. From the above lemma, we see that to determine I ⊥ , it is enough to determine ann(I) for each ideal I of K j . Further, to write down all ideals of K j , we see, by Lemma 11, that for each ideal I of K j , Tor 0 (I), Tor 1 (I) and Tor 2 (I) all are ideals of the ring F p m [x]/ f j (x) p s , which is a finite commutative chain ring with the maximal ideal as f j (x) . Next by Proposition 1, we see that all the ideals of First of all, we shall consider the case β = 0. Here we see that when α 0 = µ n for some µ ∈ F p m , each λ-constacyclic code of length np s over R can be determined by using the results derived in Cao [7] and by applying the However, when α 0 (and hence α) is not an nth power of an element in F p m , the same technique can not be employed to determine all (α +βu+γ u 2 )-constacyclic codes of length np s over R. In fact, the problem of determination of all (α + βu + γ u 2 )-constacyclic codes of length np s over R and their dual codes is not yet completely solved. Propositions 8 and 9 and the following theorem completely solves this problem when β is non-zero. Theorem 13: When β = 0, the following hold.
(a) All ideals of the ring K j are given by } is a minimal generating set of the ideal f j (x) when viewed as an R-module. Proof: Proof of part (a) is similar to that of Theorem 3.3 and Corollary 3.5 of Chen et al. [14], while part (b) is an easy exercise.
As a consequence of the above theorem, we deduce the following: Corollary 14: Let n ≥ 1 be an integer and Proof: On taking f j (x) = x n − α 0 in Theorem 13, we see that all (α + βu + γ u 2 )-constacyclic codes of length np s over R are given by (x n − α 0 ) , where 0 ≤ ≤ 3p s . Furthermore, for 0 ≤ ≤ 3p s , the code (x n − α 0 ) has p mn(3p s − ) elements and the annihilator of (x n − α 0 ) is given by (x n − α 0 ) 3p s − . Next we see that if the code C = (x n − α 0 ) is isodual, then we must have |C| = |C ⊥ |. This gives p mn(3p s − ) = p mn . This implies that 3p s = 2 , which holds if and only if p = 2. So when p is an odd prime, there does not exist any isodual (α + βu + γ u 2 )-constacyclic code of length np s over R. When p = 2, we get = 3·2 s−1 . On the other hand, when p = 2, we observe that (x n − α 0 ) 3·2 s−1 is an isodual (α + βu + γ u 2 )-constacyclic code of length n2 s over R, which completes the proof.
Remark 15: By Theorem 3.75 of [26], we see that the binomial x n − α 0 is irreducible over F p m if and only if the following two conditions are satisfied: (i) each prime divisor of n divides the multiplicative order e of α 0 , but not (p m −1)/e and (ii) p m ≡ 1 (mod 4) if n ≡ 0 (mod 4). In the following theorem, we consider the case β = γ = 0, and we determine all non-trivial ideals of the ring K j , their cardinalities, their annihilators and their minimal generating sets.
Theorem 16: Let β = γ = 0, and let I be a non-trivial ideal of the ring K j with Tor 0 (I) = f j (x) a , Tor 1 for each relevant i, k, and e. Then the following hold.
• Type I: When a = b = p s , we have where c < p s . Moreover, we have and the set is a minimal generating set of the ideal I when viewed as an R-module.
• Type II: When a = p s and b < p s , we have

Moreover, we have
is a minimal generating set of the ideal I when viewed as an R-module.
• Type III: When a < p s , we have Moreover, we have the annihilator of I is given by , and the set . Now to write down all such non-trivial ideals of K j and to determine their annihilators, we shall distinguish the following three cases: and we see that B 1 ⊆ ann(I) and that |B 1 | = p md j (2p s +c) . As When a = p s and b < p s , we have I ⊆ u and I ⊆ u 2 . Here we observe that On the other hand, when u 2 where G(x) is either 0 or a unit in K j of the form We observe that B 2 ⊆ ann(I) and |B 2 | ≥ p md j (p s +b+c) . Since we obtain |ann(I)| = |B 2 | = p md j (p s +b+c) . This implies that (iii) When a < p s , we have I ⊆ u . In this case, we see that a > 0. Here we observe that Further, working as in the previous case, one can show that In order to determine ann(I), we first observe From this, we obtain can be rewritten as which implies that This further implies that , Here we note that |B 3 | ≥ p md j (a+b+c) and B 3 ⊆ ann(I). Further, as we get |ann(I)| = |B 3 | = p md j (a+b+c) and ann(I) = B 3 . The determination of minimal generating sets of non-trivial ideals of K j is a straightforward exercise.
In the following corollary, we obtain some isodual α-constacyclic codes of length np s over R when the binomial Proof: Let C be an α-constacyclic code of length np s over R. For the code C to be isodual, we must have |C| = |C ⊥ | = |ann(C)|. (a) Let C be of Type I, i.e., C = u 2 (x n − α 0 ) c for some integer c satisfying 0 ≤ c < p s . By Theorem 16, we see that |C| = p mn(p s −c) and |ann(C)| = p mn(2p s +c) . Now if the code C is isodual, then we must have |C| = |ann(C)|. This implies that p s + 2c = 0, which is a contradiction. Hence there does not exist any isodual α-constacyclic code of Type I over R.
On the other hand, when p = 2, c = 0 and b = 2 s−1 , by Theorem 16 again, we see that C = ann(C) holds, which implies that the codes C(⊆ R α ) and C ⊥ (⊆ R α ) are R-linearly equivalent. (c) Suppose that the code C is of Type III, i.e., and |ann(C)| = p mn (a+b+c) . From this, we see that if the code C is isodual, then we must have 3p s = 2(a+b+c), which implies that p = 2. On the other hand, when p = 2, we see, by Theorem 16 again, that for 2 s−1 ≤ a < 2 s , the code In the following theorem, we consider the case β = 0 and γ = 0, and we determine all non-trivial ideals of the ring K j , their orthogonal complements, their cardinalities and their minimal generating sets.
is a minimal generating set of the ideal I when viewed as an R-module.
• Type II: When a = p s and b < p s , we have

Furthermore, we have
and the set is a minimal generating set of the ideal I when viewed as an R-module.
• Type III: When a < p s , we have the annihilator of I is given by , is a minimal generating set of the ideal I when viewed as an R-module, where F 1 . Proof: Working as in Theorem 16 and by applying Lemmas 10(c) and 11, the desired result follows.
In the following corollary, we list some isodual (α + γ u 2 )constacyclic codes of length np s over R when γ = 0 and the binomial x n − α 0 is irreducible over F p m . Corollary 19: Let n ≥ 1 be an integer and α 0 ∈ F p m \ {0} be such that the binomial x n − α 0 is irreducible over F p m . Let α = α p s 0 ∈ F p m , and let γ be a non-zero element of F p m . Following the same notations as in Theorem 18, we have the following: (a) There does not exist any isodual (α+γ u 2 )-constacyclic code of Type I over R.
, are isodual (α + γ u 2 )-constacyclic codes of Type III over R. Proof: Working in a similar manner as in Corollary 17 and by applying Theorem 18, the desired result follows.

IV. RANKS, HAMMING DISTANCES, RT DISTANCES AND RT WEIGHT DISTRIBUTIONS
Let α, β, γ ∈ F p m be such that α is non-zero. By Lemma 3(b), we see that there exists α 0 ∈ F p m such that α = α p s 0 . Throughout this section, we assume that n ≥ 1 is an integer and α 0 ∈ F p m \ {0} is such that the binomial x n − α 0 is irreducible over F p m . In this section, we shall determine ranks, Hamming distances, RT distances and RT weight distributions of all (α + βu + γ u 2 )-constacyclic codes of length np s over R. We shall also list all MDS (α + βu + γ u 2 )-constacyclic codes of length np s over R with respect to the Hamming and RT metrics.
In the following theorem, ranks of all non-zero (α + βu + γ u 2 )-constacyclic codes of length np s over R are determined.
Theorem 20: The following hold.
Proof: The Hamming distance of the code C can be determined by applying Theorems 4 and 6, while Theorem 20(a) gives the rank of the code C.
In the following theorem, we show that there does not exist any non-trivial MDS (α + βu + γ u 2 )-constacyclic code of length np s over R when β = 0.
Theorem 22: Let β ∈ F p m \ {0}. With respect to the Hamming metric, the code C = 1 is the only MDS (α+βu+γ u 2 )constacyclic code of length np s over R.
In the following theorem, we determine RT distances of all non-zero (α + βu + γ u 2 )-constacyclic codes of length np s over R when β is non-zero.
From this and by Theorem 20(a), we get the desired result.
In the following theorem, we show that there does not exist any non-trivial MDS (α + βu + γ u 2 )-constacyclic code of length np s over R with respect to the RT metric when β = 0.
Theorem 24: Let β ∈ F p m \ {0}. Then the code C = 1 is the only MDS (α + βu + γ u 2 )-constacyclic code of length np s over R with respect to the RT metric.
Proof: Let C be a non-zero (α + βu + γ u 2 )-constacyclic code of length np s over R. Then by Theorem 13, we have Now for 0 ≤ ν ≤ 2p s , by Theorem 23, we see that d RT (C) = 1. By (3), we note that the code C is MDS if and only if ν = 0. On the other hand, when 2p s + 1 ≤ ν ≤ 3p s − 1, by Theorem 23, we see that d RT (C) = nν − 2np s + 1. One can easily verify that (3) does not hold in this case. This shows that the code C is not MDS when 2p s + 1 ≤ ν ≤ 3p s − 1. In the following theorem, we determine RT weight distributions of all (α + βu + γ u 2 )-constacyclic codes of length np s over R when β is non-zero.
(a) For ν = 3p s , we have (c) For ν = yp s with y ∈ {0, 1, 2}, we have It is easy to see that A 0 = 1. So from now onwards, throughout the proof, we assume that 1 ≤ ρ ≤ np s .
(a) When ν = 3p s , we have C = {0}. This gives A ρ = 0 Here by Theorem 23, we see that d RT From this, we observe that the RT weight of the codeword u 2 . (c) Next let ν = yp s , where y ∈ {0, 1, 2}. Here by Lemma 10(b), we see that C = (x n −λ 0 ) yp s = u y = {u y F(x) : F(x) ∈ P np s (R)}. From this, we see that Here also, by Lemma 10(b), we have (x n − α 0 ) p s = u , which implies that u k ∈ C and C = u k−1 (x n − α 0 ) ν−(k−1)p s . Further, we observe that any codeword Q(x) ∈ C can be uniquely written as In this case, we see that the RT weight of the codeword Q(x) ∈ C is ρ if and only if exactly one of the following two conditions is satisfied:

. From this, we obtain
This completes the proof of the theorem. In the following theorem, Hamming distances of all non-trivial (α + γ u 2 )-constacyclic codes of length np s over R are determined.
Theorem 26: Let C be a non-trivial (α +γ u 2 )-constacyclic code of length np s over R with Tor 2 (C) = (x n − α 0 ) c for some integer c satisfying 0 ≤ c < p s (as determined in Theorems 16 and 18). Then with respect to the Hamming metric, the code C is an Proof: By Theorem 20(b), we see that rank(C) = np s − nc. Further, by applying Theorems 4 and 6, one can determine the Hamming distance of the code C.
One can easily observe that the (α+γ u 2 )-constacyclic code C = 1 of length np s over R is MDS with respect to both Hamming and RT metrics. In the following theorem, we list all non-trivial MDS (α + γ u 2 )-constacyclic codes of length np s over R with respect to the Hamming metric.  Q (x − α 0 ) with C k , Q ∈ F p m for each relevant k and , satisfying the following: By (4) and using the fact that p s > c, we get 2np s + nc > 3{d H (C) − 1}. This, by (5), implies that the code C is not MDS in this case. (ii) Now let C be of Type II. Here by Theorems 16 and 18, Now by (4) and using the fact that p s > b ≥ c, we get np s + nb + nc > 3{d H (C) − 1}. This, by (6), shows that the code C is not MDS in this case. (iii) Next let C be of Type III. Here by Theorems 16 and 18, Q (x)(x n − α 0 ) and V (x) is either 0 or a unit in R α+γ u 2 of the form , W i (x) ∈ P n (F p m ) for each relevant k, and i. Furthermore, by Theorems 16 and 18 again, we see that and that |C| = p mn(3p which implies that t 1 = θ and D 1 (x) = V (x). From this and using (7), we see that This holds if and only if t 1 = 0, p = 2, a = 2 s−1 and D 1 (x) = 0 in the case when γ = 0. Further, we see, by (1) and Theorem 4, that the code (x n − α 0 ) a , 0 ≤ a < p s , of length np s over F p m is MDS with respect to the Hamming metric if and only if • 0 ≤ a ≤ p − 1 when n = s = 1; • a ∈ {0, 1, p s − 1} when n = 1 and s ≥ 2; • a = 0 when n ≥ 2. Using this, the desired result follows immediately.
In the following theorem, we determine RT distances of all non-trivial (α + γ u 2 )-constacyclic codes of length np s over R.
Theorem 28: Let C be a non-trivial (α +γ u 2 )-constacyclic code of length np s over R with Tor 2 (C) = (x n − α 0 ) c for some integer c satisfying 0 ≤ c < p s (as determined in Theorems 16 and 18). Then the code C is an [np s , n(p s − c), nc + 1]-code with respect to the RT metric.
When C is of Type II, we have 0 and G(x) is either 0 or a unit in F p m [x]/ f j (x) p s . Here by (9), VOLUME 8, 2020 we note that w RT (Q(x)) ≥ w RT (uQ(x)) for each Q(x) ∈ C \ u 2 , which implies that w RT . From this and by case (i), we get d RT (C) = nc + 1. (9), we see that w RT (Q(x)) ≥ w RT (u 2 Q(x)). From this, we get . From this and by case (i), we get d RT (C) = nc + 1. From this and by Theorem 20(b), the desired result follows.
In the following theorem, we determine all non-trivial MDS (α +γ u 2 )-constacyclic codes of length np s over R with respect to the RT metric.
Theorem 29: With respect to the RT metric, we have the following: (a) When γ = 0, there exists a non-trivial MDS (α +γ u 2 )constacyclic code of length np s over R if and only if p = 2. Furthermore, when p = 2, all the distinct (α + γ u 2 )-constacyclic codes of length 2 s n over R are given by , C (x) ∈ P n (F 2 m ) for each relevant k and , satisfying the following: When γ = 0, all the distinct non-trivial MDS α-constacyclic codes of length np s over R are given by , W (x) ∈ P n (F p m ) for each relevant k and , satisfying the following: Proof: To prove this, let C be a non-trivial (α + γ u 2 )constacyclic code of length np s over R with Tor 2 (C) = (x n − α 0 ) c , where 0 ≤ c < p s (as determined in Theorems 16 and 18). Then by Theorem 28, we see that d RT (C) = nc + 1.
As p s > c, we get 2np s + nc > 3nc. From this and by (10), we see that the code C is not MDS in this case.
(ii) Let C be of Type II. Here by Theorems 16 and 18, 0 and G(x) is either 0 or a unit in R α+γ u 2 of the form Now as p s > b ≥ c, we have np s + nb + nc > 3nc. From this and by (11), we see that the code C is not MDS in this case. (iii) Let C be of Type III. Here by Theorems 16 and 18, for each relevant k, and i. By Theorems 16 and 18 again, we see that Using the fact that a ≥ b ≥ c, we obtain na+nb+nc ≥ 3nc, and the equality holds if and only if a = b = c.
which implies that t 1 = θ and D 1 (x) = V (x). From this and using (12) This holds if and only if t 1 = 0, p = 2, a = 2 s−1 and D 1 (x) = 0 in the case when γ = 0. From this, the desired result follows.
In the following theorem, we determine RT weight distributions of all (α + γ u 2 )-constacyclic codes of length np s over R.
Theorem 30: Let C be an (α + γ u 2 )-constacyclic code of length np s over R with Tor 0 (C) = (x n − α 0 ) a , Tor 1 (C) = (x n − α 0 ) b and Tor 2 (C) = (x n − α 0 ) c for some integers a, b, c satisfying 0 ≤ c ≤ b ≤ a ≤ p s (as determined in Theorems 16 and 18). For 0 ≤ ρ ≤ np s , let A ρ denote the number of codewords in C having the RT weight as ρ.

is of Type III, then we have
Proof: Proofs of parts (a) and (b) are trivial. To prove parts (c)-(e), by Theorem 28(c), we see that d RT (C) = nc + 1, which implies that A ρ = 0 for 1 ≤ ρ ≤ nc. So from now on, we assume that nc This implies that A ρ = (p m − 1)p m(ρ−nc−1) for nc + 1 ≤ ρ ≤ nb. Further, if nb + 1 ≤ ρ ≤ np s , then the RT weight of the codeword Q(x) ∈ C is ρ if and only if one of the following two conditions are satisfied: Here we see that each codeword Q(x) ∈ C can be uniquely expressed as This implies that A ρ = (p 2m − 1)p m(2ρ−nω−nµ−2) . Next let na + 1 ≤ ρ ≤ np s . Here the RT weight of the codeword Q(x) ∈ C is ρ if and only if exactly one of the following three conditions is satisfied: This completes the proof of the theorem.

V. HAMMING DISTANCES OF CONSTACYCLIC CODES OF LENGTH 2p s OVER R AND DETERMINATION OF MDS CODES
Throughout this section, let p be an odd prime. Here we will determine Hamming distances of all constacyclic codes of length 2p s over R, and we will also identify all MDS constacyclic codes of length 2p s over R with respect to the Hamming metric. For this, we recall that λ = α + βu + γ u 2 , where α, β, γ are elements of F p m and α is non-zero. By Lemma 3(b), we see that there exists α 0 ( = 0) ∈ F p m such that α = α − α 0 is irreducible over F p m , and one can determine Hamming distances of all (α + βu + γ u 2 )-constacyclic codes of length 2p s over R and identify all MDS codes within this class of codes on taking n = 2 in Theorems 21,22,26 and 27. So from now on, throughout this section, we assume that α 0 ( = 0) ∈ F p m is a square in F p m , i.e., there exists ζ ( = 0) ∈ F p m such that α 0 = ζ 2 . This implies that x 2 − α 0 = (x + ζ )(x − ζ ). From this and working as in Section III, we get , where for j ∈ {1, 2}, the polynomials g j (x), h j (x) ∈ F p m [x] satisfy gcd(x + ζ, g 1 (x)) = gcd(x − ζ, g 2 (x)) = 1 when β = 0, g j (x) = h j (x) = 0 when β = γ = 0, while g j (x) = 0 and gcd(x + ζ, h 1 (x)) = gcd(x − ζ, h 2 (x)) = 1 when β = 0 and γ = 0. Now let C be an (α + βu + γ u 2 )-constacyclic code of length 2p s over R, i.e., an ideal of the ring R λ . Then by Proposition 8, we have where C j is an ideal of K j for j ∈ {1, 2}. Further, we note that an element a(x) ∈ R λ can be written as Then we make the following observation.
(a) When c 1 ≥ c 2 , the Hamming distance d H (C) of the code C is given by (b) When c 2 ≥ c 1 , the Hamming distance d H (C) of the code C is given by Proof: It follows immediately by applying Theorems 5 and 6.
In the following theorem, we derive a necessary and sufficient conditions for an (α + βu + γ u 2 )-constacyclic code of length 2p s over R to be an MDS code with respect to the Hamming metric.
In the following theorem, we list all non-trivial MDS (α + βu + γ u 2 )-constacyclic codes of length 2p s over R with respect to the Hamming metric.
By Theorem 34, we see that the code C is MDS with respect to the Hamming metric if and only if a 1 = b 1 = c 1 , a 2 = b 2 = c 2 and Tor 2 (C) is an MDS α-constacyclic code of length 2p s over F p m with respect to the Hamming metric. Now we shall distinguish the following two cases: (i) β = 0 and (ii) β = 0.
(i) First let β = 0. Here by Lemma 10(b), we note that (x + ζ ) p s = u in K 1 and (x − ζ ) p s = u in K 2 . This implies that when 1 ≤ a 1 , a 2 ≤ p s − 1, we have u ∈ C 1 and u ∈ C 2 , which implies that b 1 = c 1 = 0 and b 2 = c 2 = 0. In view of this and by applying Theorems 34 and 5, we observe that the code C is MDS if and only if a 1 = b 1 = c 1 = 0 and a 2 = b 2 = c 2 = 0. So the code C = 1 is the only MDS (α + βu + γ u 2 )constacyclic code of length 2p s over R with respect to the Hamming metric.
Working in a similar manner as above in the remaining four cases, the desired result follows immediately.

VI. CONCLUSION AND FUTURE WORK
Let p be a prime, n, s, m be positive integers with gcd(n, p) = 1, F p m be the finite field of order p m , and let R = F p m [u]/ u 3 be the finite commutative chain ring with unity. Let α, β, γ ∈ F p m and α = 0. When α is an nth power of an element in F p m and β = 0, one can determine all (α + βu + γ u 2 )-constacyclic codes of length np s over R by applying the results derived in Cao [7] and by establishing a ring isomorphism from R However, when α is not an nth power of an element in F p m , algebraic structures of all (α + βu + γ u 2 )-constacyclic codes of length np s over R and their dual codes were not established. In this paper, we determined all (α+βu+γ u 2 )-constacyclic codes of length np s over R and their dual codes. We also listed some isodual (α + βu + γ u 2 )-constacyclic codes of length np s over R when the binomial x n − α 0 is irreducible over F p m . We also obtained Hamming distances, RT distances and RT weight distributions of all (α + βu + γ u 2 )-constacyclic codes of length np s over R and determined all MDS (α + βu + γ u 2 )constacyclic codes of length np s over R with respect to the Hamming and RT metrics when the binomial x n − α 0 is irreducible over F p m . Besides this, we obtained Hamming distances of all constacyclic codes of length 2p s over R and identified all MDS codes within this class of constacyclic codes with respect to the Hamming metric.
It would be interesting to determine their Hamming distances, RT distances and RT weight distributions in the case when n ≥ 3 and the binomial x n − α 0 is reducible over F p m . Another interesting problem would be to study their duality properties and to determine their homogeneous distances.