MDS Constacyclic Codes and MDS Symbol-Pair Constacyclic Codes

Symbol-pair codes are used to protect against symbol-pair errors in high density data storage systems. One of the most important tasks in symbol-pair coding theory is to design MDS codes. MDS symbol-pair codes are optimal in the sense that such codes attain the Singleton bound. In this paper, a new class of MDS symbol-pair codes with code-length <inline-formula> <tex-math notation="LaTeX">$5p$ </tex-math></inline-formula> and optimal pair distance of 7 is established. It is shown that for any prime <inline-formula> <tex-math notation="LaTeX">$p \equiv 1 \pmod 5$ </tex-math></inline-formula>, we can always construct four <inline-formula> <tex-math notation="LaTeX">$p$ </tex-math></inline-formula>-ary MDS symbol-pair cyclic codes of length <inline-formula> <tex-math notation="LaTeX">$5p$ </tex-math></inline-formula> of largest possible pair distance 7. We also completely determined all MDS symbol-pair and MDS <inline-formula> <tex-math notation="LaTeX">$b$ </tex-math></inline-formula>-symbol codes of length <inline-formula> <tex-math notation="LaTeX">$p^{s}$ </tex-math></inline-formula> and <inline-formula> <tex-math notation="LaTeX">$2p^{s}$ </tex-math></inline-formula> over <inline-formula> <tex-math notation="LaTeX">$\mathbb F_{p^{m}}+u\mathbb F_{p^{m}}$ </tex-math></inline-formula> by filling in some missing cases, and rectifying some gaps in Type 3 codes of recent papers. As an applications of our results, we use MAGMA to provide many examples of new MDS codes over <inline-formula> <tex-math notation="LaTeX">$\mathbb F_{p^{m}}$ </tex-math></inline-formula> and <inline-formula> <tex-math notation="LaTeX">$\mathbb F_{p^{m}}+u\mathbb F_{p^{m}}$ </tex-math></inline-formula>.


I. INTRODUCTION
Let p be a prime number and F p m a finite field. An [n, k] linear code C over F p m is a k-dimensional subspace of F n p m . A linear code C of length n over F p m is called a λ-constacyclic code if it is an ideal of the quotient ring F p m [x] x n −λ , where the generator polynomial g(x) is the unique monic polynomial of minimum degree in the code, which is a divisor of x n − λ. If λ = 1, those λ-constacyclic codes are called cyclic codes, and when λ = −1, such λ-constacyclic codes are called negacyclic codes. Cyclic codes over finite fields were first studied in the late 1950s by Prange [49]- [52], while negacyclic codes over finite fields were initiated by Berlekamp in the late 1960s [1], [2].
A linear code C is a cyclic code if τ (C) = C, where τ is a cyclic shift defined as τ (x 0 , x 1 , . . . , x n−1 ) = (x n−1 , x 0 , x 1 , · · · , x n−2 ) for all x = (x 0 , x 1 , . . . , x n−1 ) ∈ C. Cyclic codes are attractive because they are easy to encode and decode. They are especially fast when implemented in hardware. Therefore, cyclic codes are a good option for many networks.
The associate editor coordinating the review of this manuscript and approving it for publication was Khmaies Ouahada .
Cyclic codes are the most studied of all codes. Many wellknown codes, such as BCH, Kerdock, Golay, Reed-Muller, Preparata, Justesen, and binary Hamming codes, are either cyclic codes or constructed from cyclic codes.
Codes over finite rings are intensive studied from the 1990s because of their new role in algebraic coding theory and their successful applications. In [42], an important problem is proved by Hammons et al. that certain good non-linear codes such as Kerdock and Preparata codes can be constructed from linear codes over Z 4 via the Gray map. After that, codes over finite chain rings received attention. In general, the class of finite rings of the form R = F p m + uF p m (u 2 = 0) has been widely used as alphabets of certain constacyclic codes. In a recent work, Dinh [24] classified and gave the detailed structures of all constacyclic codes of length p s over R; and in 2012 [23], Dinh provided that for all constacyclic codes of length 2p s over R. In 2018, we established successfully all negacyclic and constacyclic codes of length 4p s over R [30], [32], [33], [34]. After that, some authors extended these problems to many more general lengths and alphabets (see, e.g., [6]- [9], [10]- [13], [14], [31]).
Given a code with the parameters [n, k, d H ] q , then n, k, d H must satisfy the Singleton bound [47], i.e., k ≤ n − d H +1.
If k = n − d H +1, then the code is called an MDS code. If we fix n and k, then an MDS code has the greatest detecting and error-correcting capabilities. Therefore, the problem of constructing maximum distance separable codes is an important topic in coding theory.
The symbol-pair distance of a symbol-pair code C is defined as d sp (C) = min x,y∈C,x =y {d sp (x, y)}. The symbolpair weight of a vector x is defined as the Hamming weight of its symbol-pair vector π (x): If the code C is linear, its symbol-pair distance is equal to the minimum symbol-pair weight of nonzero codewords of C: With the development of high-density data storage technologies, symbol-pair codes are proposed to protect efficiently against a certain number of pair-errors. In [15], Cassuto and Blaum gave the model of symbol-pair read channels. They provided constructions and decoding methods of symbol-pair codes. Lower and upper bounds on such codes are studied in [16]. Moreover, bounds and asymptotics on the size of optimal symbol-pair codes are also given in [16]. They established the relationship between the symbol-pair distance and the Hamming distance by [16,Theorem 2]. In 2011, Cassuto and Litsyn [17] constructed cyclic symbolpair codes. They proved that the symbol-pair distance of a cyclic code C with Hamming distance d H is at least d H +2 [17,Theorem 10]. This shows that the lower bounds on symbol-pair distances of cyclic codes can be determined by computing the Hamming distances of the cyclic codes.
More recently, Yaakobi et al. [53] studied and gave a lower bound on the symbol-pair distances for binary cyclic codes as following: for a given linear cyclic code with a Hamming distance d H , the symbol-pair distance is at least d H + d H 2 [53,Theorem 4]. It implies that the lower bound on the symbol-pair distances given by Yaakobi et al. [53,Theorem 4] is better than the result of Cassuto and Litsyn [17,Theorem 10] for binary cyclic codes. However, the algorithms introduced by Cassuto et al. and Yaakobi et al. for decoding symbol-pair codes could not construct all pair-errors within the pair-error correcting capability. By giving the definition of parity-check matrix for symbol-pair codes, [43] proposed a new syndrome decoding algorithm of symbol-pair codes that improved the algorithms of Cassuto et al. [17] and Yaakobi et al. [53]. In particular, in 2015, [45] extended the result of Cassuto and Litsyn [17,Theorem 10] for the case of simple-root constacyclic codes. In 2020, Dinh et al. [28] studied symbolpair distances of repeated-root negacyclic codes of lengths 2 s over Galois rings.
Singleton bound for b-symbol codes over the finite chain ring R is as follows (see [21]): |C| ≤ p 2m(n−d b (C)+b) . A code C of length n over R is called an MDS b-symbol code if it satisfies: |C| = p 2m(n−d b (C)+b) . In [26], Dinh et. al considered the case that p is a prime and b is an integer such that 1 ≤ b ≤ p 2 . They obtained all MDS b-symbol codes. On the other hand, the Hamming distance of all cyclic codes of length 2p s over F p m was provided in [48]. After that, [25] computed the Hamming distances of all λ-constacyclic codes of length 2p s over F p m + uF p m , and identify all the MDS codes among them. The authors of [25] also gave some new codes which have better parameters than existing ones. However, in the papers [25], [26], [37], they had some errors on codes of Type 3. For more details, [37,Theorem 12] and [26,Theorem 7] had an error on the generator of Type 3 codes, as the exponent i of (x − λ 0 ) i F should be T . We also see that [27,Theorem 8] had also some errors. In addition, in [25], the authors studied Hamming distance of repeated-root constacyclic codes of length 2p s over R but the result on Hamming distance of Type 3 codes is not correct.
Motivated by those, in this paper, we give a new class of MDS symbol-pair codes over finite fields. We also fix the errors of papers [25], [26], [37]. We provide some examples to show the errors in previous our papers and then we correct all errors appeared in [25], [26], [37].
The rest of this paper is organized as follows. Section 2 contains some basic definitions and preliminary results. In Section 3, we obtain a class of MDS symbolpair codes constructed from a class of cyclic codes over F p . In Section 4, we determine the errors of our previous papers and correct them. The conclusion of our paper is given in Section 5. Finally, we summarize all the Hamming distance distributions of lengths p s , 2p s over R, and symbol-pair distance distributions of length p s over R, as well as the b-symbol distance distributions of length p s over R in the Appendix.

II. PRELIMINARIES
Let c = (c 0 , c 1 , . . . , c n−1 ) be a codeword. Then we have a bijective correspondence between C and the polynomial x n −λ . From this, a linear code C of length n over F p m is a λ-constacyclic code of length n over F p m if and only if C is an ideal of x n −λ (cf. [47]). Given n-tuples e = (e 0 , e 1 , . . . , e n−1 ), t = (t 0 , t 1 , . . . , t n−1 ) ∈ F n p m , the inner product (dot product) of two vectors e, t is expressed as follows: e · t = e 0 t 0 + e 1 t 1 + · · · + e n−1 t n−1 , evaluated in F p m . If e · t = 0, then two vectors e, t are called orthogonal. Dual code of a linear code C over F p m , denoted by C ⊥ , is defined as follows: The dual of a λ-constacyclic code is given in the following result.
Let e, t ∈ F n p m be two vectors. Then the Hamming distance between e and t, denoted by d H (e, t), is the number of coordinates in which e and t differ. For a code C containing at least two words, the Hamming distance of the code C, denoted by d H (C), is Let C be a linear λ-constacyclic code of length p s over x p s −λ . By applying the Division Algorithm, there are nonnegative integers t q , t r satisfying s = t q m + t r , and Therefore, x − λ 0 is nilpotent in R and it has the nilpotency index p s . Therefore, R is a chain ring. Hence, the following result is provided in [24].
Theorem 2.2 (cf. [24]): Each λ-constacyclic code of length p s over F p m is an ideal which has the form (x − λ 0 ) i , i = 0, 1, . . . , p s , of the chain ring R. Each C i = (x − λ 0 ) i ⊆ R has p m(p s −j) codewords and the dual of The Hamming distance of each code C i in Theorem 2.2 is investigated in [24]. Theorem 2.3 (cf. [24]): Let C i be a λ-constacyclic code of length p s over F p m . Then C i = (x − λ 0 ) i ⊆ R, for i ∈ {0, 1, . . . , p s }, and the Hamming distance d H (C i ) is given by: In [48], for all the non-trivial cyclic codes of length 2p s which are the form (x − 1) i (x + 1) j , the Hamming distances of such codes were provided, where the parameters Theorem 2.4 [48,Theorem 2]: The ring R can be expressed as R = Over the last few years, in a series of papers, Dinh et al [22], [24], [34]- [36] have done the job of classifying classes of constacyclic codes of certain lengths over R. In 2010, Dinh [24] provided the construction of all constacyclic codes of p s length over R as follow.
x p s −λ is a local ring with the maximal ideal u, x −λ 0 , but it is not a chain ring. The λ-constacyclic codes of p s length over R, i.e., ideals of the ring R[x]

III. MDS SYMBOL-PAIR CONSTACYCLIC CODES OVER FINITE FIELDS
In recent years, construction of maximum distance separable (briefly, MDS) symbol-pair codes has become one of the central topics. MDS symbol-pair codes form an optimal class of symbol-pair codes in the sense that these codes are a kind of symbol-pair codes with the best possible error-correction capability.
In 2012, Chee et al. [18] introduced the Singleton Bound for symbol-pair codes as follows: For any symbol-pair code C of length n over F p m with symbol-pair distance d sp (C) satisfying 2 ≤ d sp (C) ≤ n, |C| ≤ p m(n−d sp (C)+2) [18, Theorem 2.1]. A symbol-pair code C is called an MDS symbol-pair code when |C| = p m(n−d sp (C)+2) . By using the Singleton Bound for symbol-pair codes, one can construct MDS symbol-pair codes and establish the conditions to the existence of MDS symbol-pair codes in three cases: (i) 2 ≤ d sp ≤ 4 and d sp = n; (ii) d sp = n − 1 for 6 ≤ n ≤ 8; (iii) d sp = n − 2 for 7 ≤ n ≤ 10, where n is the length and d sp is symbol-pair distance of a symbol-pair code (Section 4 of [18]). MDS symbolpair codes with large length are also constructed in Section 4 of [18]. In [15], MDS symbol-pair codes with even length and symbol-pair distance are given. However, the Hamming distances of symbol-pair codes are not good. Therefore, [45] provided a method of constructing symbol-pair codes with good symbol-pair distances and Hamming distances. In light of Kai et al.'s work, [20] determined two lower bounds for symbol-pair distances of simple-root constacyclic codes.
However, not much work has been done on determining the exact values of symbol-pair distances of constacyclic codes as it is a very difficult problem. For examples, [20] obtained some MDS symbol-pair codes with symbol-pair distance seven and eight, while MDS symbol-pair codes with symbol-pair distance five and six were constructed by Kai et al. [45]. In 2018, we investigated the symbol-pair weight distributions of repeated-root constacyclic codes of length p s over F p m [29]. Recently, we determined all MDS symbol-pair cyclic codes of length 2p s over F p m [38]. In addition, Dinh's work in [22], [24] investigated the Hamming distances of all constacyclic codes of length p s over F p m , and they also gave some MDS codes with respect to the Hamming metric (such as constacyclic codes of length p over F p m ).
In this section, we will provide four new MDS symbol-pair codes of length 5p over F p , whose symbol-pair distance are optimal at 7.
Theorem 3.1: Let p be a prime such that p ≡ 1 (mod 5), and γ be a primitive fifth root of unity in F p . Assume that C is the cyclic code of length 5p over F p generated by g( Proof: By [40], d H (C) = 4. Clearly, deg(g(x)) = 5, and so C has dimension k = 5p − 5, i.e., C is not an MDS code. Thus, [20] implies that d sp (C) ≥ 6. On the other hand, by the Singleton bound for symbol-pair codes [18], d sp (C) ≤ 7. That means 6 ≤ d sp (C) ≤ 7, i.e., d sp (C) = 6 or 7. We will show that d sp (C) can not be equal to 6, so it must be 7, and C is an MDS symbol-pair code.
We first observe that C can not contain a codeword with 5 consecutive nonzero entries. Because in such case, after certain cyclic shifts, the code C would contain a codeword of the form c( 3 , c 4 are all nonzero. This is impossible as deg(c(x)) = 4 < 5 = deg(g(x)). Now, C can have symbol-pair distance 6 if and only if it contains a codeword of Hamming weight 4 and symbolpair weight 6. That means, after certain cyclic shifts, C must contain a codeword of the form ( , , , 0 s , , 0 t ), or ( , , 0 s , , , 0 t ), where 0 s and 0 t are all zero vectors of length s, t ≥ 1, and each is a nonzero element of F p . We now consider each of these two cases. Note that, for any Case 1: C contains a codeword c = ( , , , 0 s , , 0 t ). That means c(x) = 1+c 1 x +c 2 x 2 +c 3 x i ∈ C, where 5 ≤ i ≤ 5p − 2, c 1 , c 2 , and c 3 are nonzero element of F p . We consider 5 subcases, according to i (mod 5). VOLUME 9, 2021 . Subtracting side by side each pair of equations ((1. ), we get . Subtracting equations (1.1.5) and (1.1.6) implies that c 2 (γ − 1) = 0, which is a contradiction because c 2 and γ −1 are both nonzero elements of F p . Subcase 1.
In Theorem 3.1, γ being a fifth root of unity implies that γ 2 , γ 3 , γ 4 are the other fifth roots of unity. That means Theorem 3.1 is applicable for each of those fifth roots, and we get the following result.

IV. MDS CONSTACYCLIC AND b-SYMBOL-PAIR CODES OF REPEATED-ROOT CONSTACYCLIC CODES
In this section, we consider 3 parts. Part A corrects the errors in the [37] and [27]. Part B studies MDS b-symbol constacyclic codes of length p s over R = F p m + uF p m . In addition, we fix the result on Hamming distance of repeated-root constacyclic codes of length 2p s over R in Part C.

A. MDS CONSTACYCLIC CODES
For any nonzero λ ∈ F p m , λ-constacyclic codes of length p s over R are precisely the ideals of the local ring R[x] In 2010, all λ-constacyclic code of length p s over R into 4 distinct types as in Theorem 2.5. Let C 3 be of Type 3 (principal ideals with monic polynomial generators), i.e., Note that F p m is a subring of R, for a code C over R, we denote d H (C F ) as the Hamming distance of C over F p m .
In [37], it has been shown that d H (C 3 . This is an error, as the exponent i should be T .
We give an example to illustrate this error.
The error here is that the exponent i should be T . We correct this error in the following theorem.
(2) If h(x) is a unit and p s +t and wt H (g(x)) ≥ wt H (ug(x)) (2). Suppose that g(x) = 0 and ug(x) = 0. Then a 0j = 0 for 0 ≤ j ≤ p s − i − 1. Thus, In the following we give an example to illustrate our result.
In [37,Theorem 12], it has been shown that d sp (C 3 ) = d sp ( (x − λ 0 ) i ). It seems to be an error as the exponent i should be T . We give a counter example as follows. We will correct [37,Theorem 12] in the following theorem. Theorem 4.5: , as required. We have a direct consequence of Theorem 4.5 as follows.
be a Type 3 λ-constacyclic codes of p s length over R. Then the symbol-pair distance of C 3 is determined as follows. ( • p s , if i = t + 1.

Example 4.7:
In [27,Theorem 8], the authors gave a statement that if C 3 is an MDS symbol-pair code and s ≥ 2, VOLUME 9, 2021 then i must satisfy i ≥ 2. However, it seems to be an error. Indeed, if s = 4, p = 5 and i = 1, then t = 0. By applying Theorem 4.6 (a), d sp (C 3 ) = 3, then d sp (C 3 ) − 2 = 3 − 2 = 1 = i. It is well-known that if i = d sp (C 3 ) − 2, then C 3 is an MDS symbol-pair code. This example shows that [27,Theorem 8] had some errors.
We consider some examples in the following example. Example 4.8: is an MDS symbolpair code, where h(x) is a unit, s ≥ 1, p ≥ 5 and t = p s − 4. Unfortunately, this result is not true. For example, taking s = and p = 7, then t = 3. By using Theorem 4.6 (b), we have d sp (C 3 ) = 6, then 2 d sp ( This result is not true. For example, taking s = 3, then t = 4. By using Theorem 4.6 (b), we have d sp (C 3 ) = 6, then 2 d sp (C 3  We correct [27,Theorem 8] by the following theorem. Theorem 4.9:

, then C 3 is an MDS symbol-pair code if and only if one of the following conditions holds:
then C is an MDS symbol-pair code. In [27], they considered the case that p s−1 + t 2 < i ≤ p s − 1, i.e., 0 ≤ t < 2i − 2p s−1 . In this case, all MDS symbol-pair constacyclic codes are listed in [27,Theorem 9]. Now, we consider the case 0 ≤ t < i and p s +t 2 < i ≤ p s −1 that is lacked in [27]. We have the following result.

Then there is no MDS symbol-pair constacyclic code.
Proof: i.e., 2i > p s +t, the symbol-pair distance d sp (C 3 ) is determined in Theorem 4.6 (b). We consider the case when t = 2 d sp (C 3 ) − p s − 4 and 2i > p s + t. We divide into 5 cases as follows.
Case 1: This means that t > 2 d sp (C 3 )−p s −4. Therefore, there is no MDS symbol-pair constacyclic code in this case.
There is no MDS symbol-pair constacyclic code in this case.
Applying Theorem 4.6 (b), we have d sp (C 3 ) = 2(β +2)p k . We consider Hence, there is no MDS symbol-pair constacyclic code in this case.

B. MDS b-SYMBOL CONSTACYCLIC CODES OF LENGTH p s OVER R
From now on, we always assume that b is a positive integer with 1 ≤ b ≤ p 2 . In [41], the b-distance of each λ-constacyclic code over F p m is completely determined which does not depend on m.
x p s −λ , for i ∈ {0, 1, . . . , p s }, and its b-distance d b (C) is completely determined by: Note that F p m is a subring of R, for a code C over R, we denote d b (C F ) as the b-symbol distance of C|F p m . In [26,Theorem 3.3], the authors showed that d b ( . This is an error as the exponent i should be T . In the following, we give two examples to illustrate this error.
Then the b-symbol distance d b (C 3 ) of the code C 3 is given by We can see that be a Type 3 λ-constacyclic codes of length p s over R. Then the b-symbol-pair of C 3 is determined as follows.
(a) If h(x) = 0 or h(x) is a unit and 1 ≤ i ≤ p s +t 2 , then we have [26, Theorem 3.3] computed d b (C 4 ), where C 4 is a λ-constacyclic codes of Type 4, i.e., and 0 ≤ t < κ. It is easy to check that if κ = 0, then u ∈ C 4 . It follows that d b (C 4 ) = b. This is lacked in [26,Theorem 3.3]. We complete [26,Theorem 3.3] for Type 4 as follows.
Theorem 4.17: be a λ-constacyclic codes of Type 4 as above. Then In [21], MDS codes for b-symbol read channels are considered. In addition, MDS b-symbol constacyclic codes of length p s over F p m are studied in [41]. Recently, [26] gave the conditions for a λ-constacyclic codes of length p s over R to be an MDS b-symbol code. [26,Theorem 4.4] showed is an MDS b-symbol code when s ≥ 2 and i ≥ 2. However, this result is not true. We give two examples to illustrate our discussion as follows.
Example 4.18: We correct [26,Theorem 4.4] in the following theorem. Theorem 4.20: Example 4.21: In [26,Theorem 4.5], it is proved that for p s However, this result is not true in general. Indeed, we consider 9-constacyclic codes of length 169 over F 13 + uF 13 . Since 3 169 = 9 in F 13 + uF 13 , . This means that C 3 is not an MDS 5-symbol constacyclic code. Hence, [26,Theorem 4.5] is wrong. We correct the errors of [26,Theorem 4.5] in the following theorem.
Theorem 4.22: When 2i > p s + t, we divide into 4 cases as follows.
We see  We have some MDS b-symbol constacyclic codes, denoted by (*).

C. HAMMING DISTANCE OF REPEATED-ROOT CONSTACYCLIC CODES OF LENGTH 2p s OVER R
In [25], the authors studied Hamming distance of repeatedroot constacyclic codes of length 2p s over R. This mistake in Type 3 codes also appeared in [25], where it was mentioned that d H ( . We give an example to illustrate these errors.   (5). Therefore, As T = min{i, p s − i + t}, we have g(x) ∈ u(x 2 − λ 0 ) T . Combining this with Eq. (6), we get Hence, Hence,

V. CONCLUSION
In this paper, we give a new class of MDS symbol-pair codes constructed from a class of cyclic codes over F p in Section 3. Theorem 3.1 in Section 3 shows that if C is the cyclic code of length 5p over F p generated by g( We establish some Type 3 MDS λ-constacyclic codes given in Table 1 of Example 4.11. We also compute Hamming distance and symbol-pair distance of Type 3 λ-constacyclic codes for p = 3, 5, 7, 11, 13, 17, 19, s = 1, 2, 3, 4 and m = 1 in Example 4.23. We give some MDS b-symbol constacyclic codes listed in Table 2 of Example 4.23. By using MAGMA, Example 4.26 provides Type 3 λ-constacyclic codes of length 2p s over F p m + uF p m , where λ ∈ F * p m , p = 3, 5, 7, 11, 13, 17, 19, 23, s = 1, 2, 3 and m = 1, 2 or m = 3.
One of the problems against the feasibility of quantum computation appears to be the difficulty of eliminating error caused by inaccuracy and decoherence. Since the classical error-correcting techniques based on redundancy or repetition codes seemed to contradict the quantum no-cloning theorem, classical error-correcting codes can not be used in quantum computation. Therefore, quantum error-correcting codes are proposed to protect quantum information from errors due to the decoherence and other quantum noise. For future work, it will be interesting to apply these distances in constructing quantum error-correcting codes from the class of λ-constacyclic codes of lengths p s , 2p s over F p m as well as over R.

APPENDIX
In this appendix, we summarize all the Hamming distance distributions of lengths p s , 2p s over R, and symbol-pair distance distributions of length p s over R, as well as the b-symbol distance distributions of length p s over R.
Theorem A.1. Let C be a λ-constacyclic code of length p s over R. Then Hamming distance of λ-constacyclic code C is determined as follows.
• Type 2 (principal ideals with nonmonic polynomial generators): • Type 3 (principal ideals with monic polynomial generators): is a unit and T is the smallest integer satisfying u(x − λ 0 ) T ∈ C 3 , i.e., is a unit and p s +t 2 < i ≤ p s − 1, then • Type 4 (nonprincipal ideals): ; i.e., such T can be determined as The symbol-pair distances of λ-constacyclic codes of p s length over R are given below: Theorem A.2: Let C be a λ-constacyclic code of length p s over R. Then symbol-pair distances of λ-constacyclic code C is determined as follows.
1) [37] If C is a (α + uβ)-constacyclic codes of p s length over R, x p s −(α+uβ) , for j ∈ {0, 1, . . . , 2p s }, and the symbol-pair distance d sp (C) is completely determined by 2) ( [37] and Theorem 4.6) Let λ = γ ∈ F * p m be a unit in R. Then the symbol-pair distances of λ-constacyclic codes of length p s over R is given as follows.
• Type 2 (principal ideals generated by nonmonic polynomial ): • Type 3 (principal ideals generated by monic polynomial ): be a Type 3 λ-constacyclic codes of p s length over R. Then the symbol-pair distance of C 3 is determined as follows.
is a unit and p s +t i.e., such T can be determined as The b-symbol distances of all λ-constacyclic codes of length p s over the ring R are computed as follows.

R[x]
x p s −(α+uγ ) , for i ∈ {0, 1, . . . , 2p s }. The b-distance d b (C) of C is completely determined by: 2) ( [26] and Theorem 4.15) Let λ ∈ F * p m be a unit in R. The λ-constacyclic codes of length p s over R have their b-symbol distances completely determined as follows.

R[x]
x 2p s −(α+uγ ) for j ∈ {0, 1, . . . , 2p s }, then the Hamming distance distribution of C, i.e. d H (C) is determined as: 2) ( [25] and Theorem 4.25) Assume that λ is not a square and λ ∈ F p m . Then the Hamming distances of λ-constacyclic codes of length 2p s over R are completely determined as follows.