July 02, 2026
In the present paper, we provide an explicit construction for generators of a \(\lambda\)-constacyclic code \(\mathcal{C}\) of arbitrary length \(\ell\) over a finite chain ring(FCR) \(\mathcal{R}\) in terms of certain minimum degree polynomials of the ring \(\mathcal{R}[x]/ \langle x^{\ell}-\lambda \rangle\). Moreover, the proposed construction achieves the minimum possible number of generators. We prove certain properties of this set of generators, using which we obtain a minimal spanning set of \(\mathcal{C}\). We also obtain that the rank of \(\mathcal{C}\) is \(\ell-n_0\), where \(n_0\) is the degree of the minimal degree polynomial in \(\mathcal{C}\). Finally, we derive necessary and sufficient conditions under which an arbitrary length \(\lambda\)-constacyclic code \(\mathcal{C}\) over \(\mathcal{R}\) is Maximum Hamming Distance with respect to Rank(MHDR) as well as Maximum Distance Separable(MDS) in terms of a torsion code of \(\mathcal{C}\) over the residue field \(\mathbb{F}_q\) of \(\mathcal{R}\). We further determine the exact values for \(n_0\) for which \(\mathcal{C}\) over \(\mathcal{R}\) is MHDR.
Reliable transmission of information across noisy channels has long demanded mathematical tools and error-correcting codes occupy a central place among them. Within this domain, the class of cyclic and constacyclic codes received considerable attention due to their close connection between the codewords and ideals of the polynomial ring.
Early studies on cyclic and negacyclic codes over finite fields were established in the 1960s by Berlekamp [1]. Subsequently, in 1991, Castagnoli et al. [2] and Lint [3] investigated repeated root cyclic codes. In 1994, it was observed by Hammons et al. [4] that certain nonlinear binary codes derived from linear codes over \(\mathbb{Z}_4\) using Gray maps.
An advancement in coding theory was achieved with the introduction of finite chain rings(FCR) as an underlying algebraic structure. In this direction, the theory of linear and cyclic codes over FCR was developed by Norton and Sălăgean [5], [6] in 2000. They also found the Hamming distances of such codes. In 2004, Dinh and López-Permouth [7] studied the structural properties of cyclic and negacyclic codes over a FCR, particularly for those lengths that do not divide the characteristic of the residue field of the FCR. Further studies in 2005 by Dinh [8] focused on negacyclic codes defined over Galois rings with length \(2^s\). In 2006, it was established by Sălăgean [9] that repeated root cyclic and negacyclic codes defined over FCR are generally not principally generated. In 2008, Dinh studied the structural properties of prime power length negacyclic codes over finite fields [10]. In 2009, Dinh [11] investigated length \(2^s\) constacyclic codes over Galois extension rings of \(F_2 + uF_2\). Continuing this line of research, Dinh [12] in 2010, analyzed the structural characterisation and Hamming distances of \((\alpha + u\beta)\)-constacyclic codes of length \(p^s\) over the ring \(F_{p^m} + uF_{p^m}\). In 2012, Dinh[13] further explored repeated-root constacyclic codes by examining the length \(2p^s\) over finite fields. During the same year, Chen et al. [14] provided an explicit characterisation of generator polynomials associated with constacyclic codes of length \(l^tp^s\) over a finite field, where \(p\) denotes the field characteristic and \(l\) is a prime different from \(p\). In 2013, Cao [15] examined arbitrary length \((1 + w\gamma)\)-constacyclic codes over FCR. Also in that year, Dinh [16] investigated length \(3p^s\) repeated-root constacyclic codes over finite fields, focusing on their structural and dual properties. Further developments were made in 2014 by Chen et al. [17], who characterised repeated-root constacyclic codes of length \(\ell p^s\) over finite fields. In 2015, Raka [18] determined all \(\mu\)-constacyclic codes of length \(\ell^n\). She also characterised repeated-root \(\lambda\)-constacyclic codes of length \(\ell^n p^s\) over finite fields. In 2016, Chen et al. [19] established the structure of \(\lambda\)-constacyclic codes of length \(2p^s\) over the ring \(F_{p^m} + uF_{p^m}\), where \(\lambda = \alpha + u\beta\) is a non-square unit and \(\alpha, \beta \in F_{p^m}\) are non-zero elements. In 2017, Dinh et al. [20] analysed prime power length repeated-root constacyclic codes over finite commutative chain rings. In 2018, Cao et al. [21] described the structure of \(\lambda\)-constacyclic codes of length \(np^s\) over the ring \(F_{p^m}[u]/\langle u^2 \rangle\), where the length of the code and characteristic of the residue field are coprime. In 2019, Sharma and Sidana [22] examined the structural characteristic and distance distribution of repeated-root constacyclic codes with prime power length over finite commutative chain rings.
Monika et al. [23] derived the structure of cyclic codes of arbitrary length over a FCR in 2021. Later in 2024, Dalal et al. [24] established a unique generating set for cyclic codes of arbitrary length over a FCR, along with necessary and sufficient conditions for these codes to be Maximum Hamming Distance with respect to Rank(MHDR) and Maximum Distance Separable(MDS). Extending her work, the present paper investigates constacyclic codes of arbitrary length over FCR and obtains a minimal set of generators for such codes. We also obtain necessary and sufficient conditions for these constacyclic codes to be MHDR as well as MDS.
The rest of this paper is arranged as follows. The basic algebraic background and notation are introduced in Section 2. We provide a generating set for \(\mathcal{C}\) in terms of certain minimum degree polynomials in the ring \(\mathcal{R}[x]/ \langle x^{\ell}-\lambda \rangle\), where \(\mathcal{C}\) is a \(\lambda\)-constacyclic code of arbitrary length \(\ell\) over a FCR \(\mathcal{R}\) in section 3. In the same section, we prove certain properties of this set of generators, using which we obtain a minimal spanning set of \(\mathcal{C}\). We obtain the rank of \(\mathcal{C}\). Finally, we obtain necessary and sufficient conditions for an arbitrary length \(\lambda\)-constacyclic code \(\mathcal{C}\) over \(\mathcal{R}\) to be MHDR as well as to be MDS in terms of a torsion code of \(\mathcal{C}\) over the residue field \(\mathbb{F}_q\) of \(\mathcal{R}\). We further determine values of \(n_0\) for which an arbitrary length \(\lambda\)-constacyclic code is MHDR. Some examples are also included to illustrate the results. Finally, the paper is concluded in section 4.
Consider a finite commutative chain ring \(\mathcal{R}\). Let the ideal generated by the element \(a\) is denoted by \(\langle a \rangle\). Assume that \(\gamma \in \mathcal{R}\) and the ideal generated by \(\gamma\) is the unique maximal ideal in \(\mathcal{R}\). Thus, the collection of ideals of \(\mathcal{R}\) constitutes a chain under the inclusion ordering, i.e., \(\langle 0 \rangle = \langle \gamma^{\rho} \rangle \subset \langle \gamma^{\rho-1} \rangle \subset \cdots \subset \langle \gamma \rangle \subset \langle \gamma^{0} \rangle = \mathcal{R}\), where \(\rho\) denotes the nilpotency index of \(\gamma\). The factor ring \(\mathcal{\overline{R}}=\mathcal{R}/\langle \gamma\rangle\) forms a finite field, say \(\mathbb{F}_{q}\), the residue field of the ring \(\mathcal{R}\). The ring homomorphism \(\mathcal{R} \to \mathbb{F}_{q}\), defined by \(a \mapsto \overline{a}\), extends naturally coefficientwise from \(\mathcal{R}[x]\) onto \(\mathbb{F}_{q}[x]\). The proposition below holds for a FCR.
Proposition 1. [20] Consider a finite commutative chain ring \(\mathcal{R}\) having a maximal ideal \(\langle \gamma \rangle\), and let the nilpotency index of \(\gamma\) is \(\rho\). Then:
There exist positive integers \(m \ge n\) and a prime \(p\) such that \(|\mathcal{R}| = p^m\), the residue field \(\mathbb{F}_q = \mathcal{R}/\langle \gamma \rangle\) has size \(|\mathbb{F}_q| = q= p^n\), and \(\mathcal{R}\) has characteristic equal to a power of \(p\).
There is a unit \(\theta \in \mathcal{R}\) whose multiplicative order equals \(q-1\). With the Teichmüller set \(\mathbb{T}=\{0,1,\theta,\theta^2,\ldots,\theta^{q-2}\}\), each element \(a \in \mathcal{R}\) has a unique \(\gamma\)-adic expansion of the form \(a=a_0+\gamma a_1+\cdots+\gamma^{\rho-1}a_{\rho-1}\), where \(a_i \in \mathbb{T}\) for every \(0 \leq i \leq \rho-1\).
For each integer \(i\) with \(0 \le i \le \rho\), we have \(|\langle \gamma^i \rangle| = q^{\rho - i}\); in particular \(|\mathcal{R}| =|\mathbb{F}_q|^{\rho} =q^{\rho}\), hence \(m = n\rho\).
From the proposition above, it clearly follows that every polynomial \(f(x)=a_0+a_1x+\dots+a_nx^n\) with coefficients in \(\mathcal{R}\) admits the representation \(f(x)=c_0(x)+\gamma c_1(x)+\dots+\gamma^{\rho-1}c_{\rho-1}(x)\), where \(c_i(x) \in \mathbb{T}[x]\) for each \(i\) satisfying \(0 \le i \le \rho-1\).
A code \(\mathcal{C}\) of length \(\ell\) over \(\mathcal{R}\) is any nonempty subset of \(\mathcal{R}^{\ell}\). Such a code \(\mathcal{C}\) is called linear when it forms an \(\mathcal{R}\)-submodule of \(\mathcal{R}^{\ell}\). Let \(\lambda\) be a unit in \(\mathcal{R}\). A linear code \(\mathcal{C}\) is termed \(\lambda\)-constacyclic if it remains invariant under the \(\lambda\)-constacyclic shift of each of its codewords., that is, whenever \((\eta_0, \eta_1, \dots, \eta_{\ell-1}) \in \mathcal{C}\), we also have \((\lambda \eta_{\ell-1}, \eta_0, \eta_1, \dots, \eta_{\ell-2}) \in \mathcal{C}\). The cases \(\lambda=1~\text{and}~\lambda=-1\) correspond to well-known cyclic and negacyclic codes. Every codeword \((\eta_0, \eta_1, \dots, \eta_{\ell-1}) \in \mathcal{C}\) can be represented as a polynomial \(\eta_0+\eta_1x+\dots+\eta_{\ell-1}x^{\ell-1}\) in \(\mathcal{R}[x]/\langle x^{\ell} - \lambda \rangle\). Define a map \(\pi:\mathcal{R} \to \mathcal{R}[x]/\langle x^{\ell} - \lambda \rangle\) by \(\pi(\eta_0, \eta_1, \dots, \eta_{\ell-1})=\eta_0+\eta_1x+\dots+\eta_{\ell-1}x^{\ell-1}~\pmod{(x^{\ell}-\lambda)}\). It is easy to observe that \(\mathcal{C}\) is a \(\lambda\)-constacyclic code if and only if \(\pi(\mathcal{C})\) forms an ideal of the ring \(\mathcal{R}[x]/\langle x^{\ell} - \lambda \rangle\).
Consider two codewords \(\eta = (\eta_0, \eta_1, \dots, \eta_{\ell-1})\) and \(\eta' = (\eta'_0, \eta'_1, \dots, \eta'_{\ell-1})\) in \(\mathcal{C}\). The Hamming distance between these two codewords is defined as \(d(\eta,\eta') = \sum_{i=0}^{n-1} \delta(\eta_i,\eta'_i)\), where \(\delta(\eta_i,\eta'_i)=\begin{cases} 0 & \eta_i = \eta'_i\\ 1 & \eta_i \ne \eta'_i \end{cases}\). For a code \(\mathcal{C}\), its minimum Hamming distance is given by \(d(\mathcal{C})=\min_{{\eta,\eta'} \in \mathcal{C},\, \eta \ne {\eta'}} d({\eta,\eta'})\). The Hamming weight of a codeword \(\eta \in \mathcal{C}\), denoted by \(wt(\eta)\), is equal to the number of nonzero components of \(\eta\). The minimum Hamming weight of the code \(\mathcal{C}\) is defined as \(wt(\mathcal{C}) = \min_{\eta \in \mathcal{C},\, \eta \ne 0} wt(\eta)\). Observe that for a linear code \(\mathcal{C}\), \(d(\mathcal{C}) = wt(\mathcal{C})\).
A spanning set of a code \(\mathcal{C}\) is a subset \(S\) of \(\mathcal{C}\) such that every codeword in \(\mathcal{C}\) can be expressed as a linear combination of the codewords in \(S\) with coefficients in \(\mathcal{R}\). The set \(S\) is called a minimal spanning set of \(\mathcal{C}\) if every proper subset of \(S\) fails to span \(\mathcal{C}\). Note that a minimal spanning set of \(\mathcal{C}\) is not unique. However, it is easy to observe that the number of elements remains unchanged in any two minimal spanning sets of \(\mathcal{C}\). The rank of \(\mathcal{C}\), denoted by \(Rank(\mathcal{C})\), is given by the cardinality of a minimal spanning set of the code \(\mathcal{C}\). For any linear code \(\mathcal{C}\), \(d(\mathcal{C}) \le \ell - Rank(\mathcal{C}) + 1\). The code \(\mathcal{C}\) is said to be a Maximum Distance Separable (MDS) code with respect to the Hamming metric if \(|\mathcal{C}| = |\mathcal{R}|^{(\ell-d(\mathcal{C})+1)}\). The code \(\mathcal{C}\) is termed as a Maximum Hamming Distance with respect to Rank (MHDR) if the equality \(d(\mathcal{C}) = \ell - Rank(\mathcal{C}) + 1\) is satisfied.
Let \(\mathcal{R}\) denotes a finite commutative chain ring whose maximal ideal is generated by \(\gamma\), having nilpotency index \(\rho\), and residue field \(\mathbb{F}_q\). This section aims to describe the generators of \(\lambda\)-constacyclic codes of length \(\ell\) over \(\mathcal{R}\). We also derive a minimal spanning set and determine the rank of such codes over \(\mathcal{R}\). We further obtain necessary and sufficient conditions under which a constacyclic code is MHDR and MDS.
Let \(\mathcal{C}\) be a \(\lambda\)-constacyclic code of length \(\ell\) over \(\mathcal{R}\). Viewing \(\mathcal{C}\) as an ideal of the ring \(\mathcal{R}[x]/ \langle x^{\ell}- \lambda \rangle\), consider all minimum degree polynomials of \(\mathcal{C}\). From these polynomials, choose a polynomial \(f_0(x)\) whose leading coefficient contains the lowest possible power of \(\gamma\), say \(r_0\). Consider the ideal generated by \(f_0(x)\) in \(\mathcal{C}\). If \(\mathcal{C}= \langle f_0(x) \rangle\), then we have obtained the structure of \(\mathcal{C}\) in terms of its generator. If \(\langle f_0(x) \rangle\) is a proper subset of \(\mathcal{C}\), then consider all least degree polynomials in \(\mathcal{C} \setminus \langle f_0(x) \rangle\). Among these polynomials, choose a polynomial \(f_1(x)\) whose leading coefficient contains the least power of \(\gamma\), say \(r_1\). Let \(\deg(f_0(x))=n_0\) and \(\deg(f_1(x))=n_1\). It is easy to see that \(n_1>n_0\). We claim that \(r_0>r_1\). Otherwise, if \(r_1 \geq r_0\), then \(f_1(x)-\gamma^{r_1-r_0}x^{n_1-n_0}f_0(x)=g(x), ~\text{where}~ g(x)=0 ~\text{or}~\deg(g(x))<\deg(f_1(x))\). In both cases, \(f_1(x)\in \langle f_0(x) \rangle\), which is a contradiction. Thus \(r_0 > r_1\). If \(\mathcal{C}= \langle f_0(x),f_1(x) \rangle\), we stop the process. Otherwise, consider all the least degree polynomials in \(\mathcal{C} \setminus \langle f_0(x),f_1(x) \rangle\). Among these polynomials, choose a polynomial \(f_2(x)\) whose leading coefficient contains the least power of \(\gamma\), say \(r_2\). Let \(\deg(f_2(x))=n_2\). It is clear that \(n_2>n_1\). Also, by the similar argument as given for proving \(r_0>r_1\), we can prove that \(r_1>r_2\). Again if \(\mathcal{C}= \langle f_0(x),f_1(x),f_2(x)\rangle\), then we are done. Otherwise, we will proceed in the same manner as above to find the polynomials \(f_3(x),f_4(x), \dots\) such that \(n_0<n_1<n_2< \dots ~\text{and}~ r_0>r_1>r_2> \dots\). Since the possible powers of \(\gamma\) lie between \(0\) to \(\rho-1\), the above process must terminate, i.e., for a positive integer \(s\), there exists a least degree polynomial \(f_s(x)\) in \(\mathcal{C} \setminus \langle f_0(x),f_1(x), \dots, f_{s-1}(x) \rangle\) whose leading coefficient contains the least power of \(\gamma\), say \(r_s\), such that \(\mathcal{C}= \langle f_0(x),f_1(x),\dots f_s(x) \rangle\). Let \(\deg(f_s(x))=n_s\). It is clear that \(n_s>\dots >n_1>n_0\) and \(r_0>r_1> \dots >r_s\).
The following theorem is obtained from the construction given above.
Theorem 2. Let \(\mathcal{C}\) be a \(\lambda\)-constacyclic code of length \(\ell\) over the FCR \(\mathcal{R}\) and \(f_i(x), 0 \le i \le s\) be the polynomials as described above. Then the set \(\{ f_0(x),f_1(x), \dots , f_s(x) \}\) generates \(\mathcal{C}\) as an ideal of the ring \(\mathcal{R}[x]/ \langle x^{\ell}- \lambda \rangle\).
Note that according to the construction given above, we may end up choosing more than one set of generators of \(\mathcal{C}\). However, it is easy to see the number of generators in any two generating sets of \(\mathcal{C}\) chosen by this procedure will be the same. Further, if \(\{ f_0(x),f_1(x), \dots, f_s(x)\}~~\text{and}~~\{g_0(x),g_1(x), \dots, g_s(x)\}\) are two generating sets of \(\mathcal{C}\) obtained by the above procedure we must have \(\deg(f_i(x))=\deg(g_i(x))\) for all \(0 \le i \le s\).
Lemma 1. Let \(\mathcal{C}=\langle f_0(x),f_1(x),\dots, f_s(x)\rangle\) be a \(\lambda\)-constacyclic code of length \(\ell\) over \(\mathcal{R}\), where \(f_i(x),~0 \le i \le s\), be the polynomials as described above. Then, for every polynomial \(q(x) \in \mathcal{C}\) such that \(\deg(q(x))<n_i\), \(q(x) \in \langle f_0(x),f_1(x), \dots, f_{i-1}(x) \rangle ~\text{for}~ 1 \le i \le s\).
Proof. Since \(\deg(q(x))<n_i\) and \(n_i\) is the minimum degree among all the polynomials in \(\mathcal{C} \setminus \langle f_0(x),f_1(x),\dots,f_{i-1}(x) \rangle\), it implies that \(q(x) \notin \mathcal{C} \setminus \langle f_0(x),f_1(x),\dots,f_{i-1}(x) \rangle\). This proves that \(q(x) \in \langle f_0(x),f_1(x),\dots,f_{i-1}(x) \rangle\). ◻
Theorem 3. Let \(\mathcal{C}\) be a \(\lambda\)-constacyclic code generated by the set \(\{ f_0(x),f_1(x), \dots , f_s(x) \}\), where \(f_i(x),~ 0 \le i \le s\) are the polynomials as defined above. Then
\(f_0(x)\), the minimum degree polynomial in \(\mathcal{C}\), is uniquely determined.
Each of the \(f_i(x)\) is uniquely determined modulo \(\langle f_0(x),f_1(x), \dots , f_{i-1}(x) \rangle\) for \(1 \le i \le s\).
\(\gamma^{r_{i-1}-r_i}f_i(x) \in \langle f_0(x), f_1(x), \dots, f_{i-1}(x) \rangle\) for \(1 \le i \le s\).
For \(0 \le i \le s,~~ f_i(x)=\gamma^{r_i}h_i(x)\), where \(h_i(x)\) is a monic polynomial.
\(h_0(x) \mid h_1(x) \pmod{\gamma^{\rho-r_0}}\), \(h_{i-1}(x) \mid h_i(x) \pmod{\gamma^{r_{i-2}-r_{i-1}}}\) for \(2 \le i \le s\), and \(h_s(x) \mid (x^{\ell}-\lambda) \pmod{\gamma^{r_{s-1}-r_s}}\).
Proof.
Suppose there exists another polynomial \(g_0(x)\) such that \(\deg(g_0(x))=n_0\) and the power of \(\gamma\) in the leading coefficient of \(g_0(x)\) is \(r_0\). Then there exists a unit \(u_0\) such that \(f_0(x)-u_0g_0(x)\) is either \(0\) or a polynomial in \(\mathcal{C}\) of degree less than \(n_0\). This is a contradiction. Therefore, \(f_0(x)\) is uniquely determined.
If there exists some \(f_i(x),~1 \le i \le s\), that is not uniquely determined modulo \(\langle f_0(x),f_1(x), \dots , f_{i-1}(x) \rangle\), then there exists \(g_i(x)\) such that \(\deg(g_i(x))=n_i\) and the power of \(\gamma\) in the leading coefficient of \(g_i(x)\) is \(r_i\). Then there exists a unit \(u_i\) such that \(f_i(x)-u_ig_i(x)\) is either \(0\) or a polynomial in \(\mathcal{C}\) of degree less than \(n_i\). By Lemma 1, \(f_i(x)-u_ig_i(x) \in \langle f_0(x),f_1(x), \dots, f_{i-1}(x) \rangle\). It follows that \(f_i(x)\equiv u_ig_i(x)\) modulo \(\langle f_0(x),f_1(x), \dots, f_{i-1}(x) \rangle\). Hence, \(f_i(x)\) is uniquely determined modulo \(\langle f_0(x),f_1(x), \dots, f_{i-1}(x) \rangle\).
Clearly, the polynomial \(\gamma^{r_{i-1}-r_i}f_i(x)-x^{n_i-n_{i-1}}u_if_{i-1}(x) \in \mathcal{C}\), has degree less than \(n_i\), where \(u_i\) is a unit in \(\mathcal{R}\). Therefore, by Lemma 1, \(\gamma^{r_{i-1}-r_i}f_i(x)-x^{n_i-n_{i-1}}u_if_{i-1}(x) \in \langle f_0(x),f_1(x), \dots, f_{i-1}(x) \rangle\). It follows that \(\gamma^{r_{i-1}-r_i}f_i(x) \in \langle f_0(x), f_1(x), \dots, f_{i-1}(x) \rangle\) for \(1 \le i \le s\).
The proof is carried out by induction on \(i\). For \(i=0\), let \(f_0(x)= \gamma^{r_0}u_0x^{n_0}+ a_{n_0-1}x^{n_0-1}+ \dots+a_1x+a_0\), where \(u_0\) is a unit in \(\mathcal{R}\) and \(a_i \in \mathcal{R},~ 0 \le i \le n_0-1\). If \(a_k \not\equiv 0 \pmod{\gamma^{r_0}}\) for some \(k, ~0 \le k \le n_0-1\), then \(\gamma^{\rho-r_0}f_0(x)\) is a polynomial in \(\mathcal{C}\) with degree less than \(n_0\), which contradicts the fact that the degree of \(f_0(x)\) in \(\mathcal{C}\) is minimal. Therefore, \(a_k \equiv 0 \pmod{\gamma^{r_0}}~ \forall~ 0 \le k \le n_0-1\) implying that \(f_0(x)=\gamma^{r_0}h_0(x)\), where \(h_0(x)\) is a monic polynomial. Thus, the result is true for \(i=0\).
Let us assume that the result is true for all \(i \le k-1\) i.e. \(f_i(x)=\gamma^{r_i}h_i(x)\), where \(h_i(x)\) is a monic polynomial for all \(0 \le i \le k-1\).
Now we prove the result for \(i=k\). We have \(\gamma^{r_{i-1}-r_i}f_i(x) \in \langle f_0(x), f_1(x), \dots, f_{i-1}(x) \rangle\) by part [thm:parttwo]. Therefore, there exist polynomials \(c_0(x),c_1(x),\dots,c_{k-1}(x)\) in \(\mathcal{R}[x]/ \langle x^{\ell}-\lambda \rangle\) such that \[\begin{align} \gamma^{r_{k-1}-r_k}f_k(x) = \sum_{i=0}^{k-1}c_i(x)f_i(x) =\sum_{i=0}^{k-1}\gamma^{r_i}c_i(x)h_i(x)=\gamma^{r_{k-1}}\sum_{i=0}^{k-1}\gamma^{r_i-r_{k-1}}c_k(x)h_k(x) \end{align}\]
It follows that \(\gamma^{\rho-r_k}f_k(x)=0\) and therefore, \(f_k(x)=\gamma^{r_k}h_k(x)\), where \(h_k(x)\) is a monic polynomial.
Hence, \(f_i(x)=\gamma^{r_i}h_i(x)\), where \(h_i(x)\) is a monic polynomial for \(0 \le i \le s\), by mathematical induction.
From part [thm:parttwo], we have \(\gamma^{r_0-r_1}f_1(x) \in \langle f_0(x) \rangle\). Therefore, \(\gamma^{r_0-r_1}f_1(x)=c_0(x)f_0(x)\), where \(c_0(x) \in \mathcal{R}[x]/\langle x^{\ell}-\lambda \rangle\). This together with part [thm:partthree] implies that \(\gamma^{r_0}(h_1(x)-c_0(x)h_0(x))=0\), which further implies that \(h_1(x)-c_0(x)h_0(x)=0 \pmod{\gamma^{\rho-r_0}}\). Therefore, \(h_0(x) \mid h_1(x) \pmod{\gamma^{\rho-r_0}}\).
Again using part [thm:parttwo], there exists \(c_0(x),c_1(x), \dots, c_{i-1}(x) \in \mathcal{R}[x]/\langle x^{\ell}-\lambda\rangle\) such that \[\begin{align} \gamma^{r_{i-1}-r_i}f_i(x)&=\sum_{k=0}^{i-1}c_k(x)f_k(x) \end{align}\] Above equation together with part [thm:partthree] implies that \[\begin{align} \gamma^{r_{i-1}}h_i(x)=\sum_{k=0}^{i-1}c_k(x)\gamma^{r_k}h_k(x)=\gamma^{r_{i-1}}c_{i-1}(x)h_{i-1}(x)+\sum_{k=0}^{i-2}c_k(x)\gamma^{r_k}h_k(x) \end{align}\] It follows that \[\begin{align} \gamma^{r_{i-1}}(h_i(x)-c_{i-1}(x)h_{i-1}(x))=\sum_{k=0}^{i-2}c_k(x)\gamma^{r_k}h_k(x)=\gamma^{r_{i-2}}\sum_{k=0}^{i-2}c_k(x)\gamma^{r_k-r_{i-2}}h_k(x) \end{align}\] It follows that \(\gamma^{\rho-(r_{i-2}-r_{i-1})}(h_i(x)-c_{i-1}(x)h_{i-1}(x))=0\), which implies that \(h_i(x)-c_{i-1}(x)h_{i-1}(x)\equiv 0 \pmod{\gamma^{r_{i-2}-r_{i-1}}}\). Therefore, \(h_{i-1}(x) \mid h_i(x) \pmod{\gamma^{r_{i-2}-r_{i-1}}}\) for \(2 \le i \le s\).
Now to prove that \(h_s(x) \mid (x^{\ell}-\lambda) \pmod{\gamma^{r_{s-1}-r_s}}\), we see that \(\gamma^{r_s}(x^{\ell}-\lambda) \in \mathcal{C}\) which implies that \(\gamma^{r_s}(x^{\ell}-\lambda) \in \langle f_0(x),f_1(x), \dots, f_s(x) \rangle\). Now we will proceed in a similar manner as above to obtain the required result.
◻
The following theorem provides a minimal spanning set for a \(\lambda\)-constacyclic code \(\mathcal{C}\) of length \(\ell\) over a FCR \(\mathcal{R}\) along with its rank.
Theorem 4. Let \(\mathcal{C}= \langle f_0(x),f_1(x), \dots , f_s(x) \rangle\) be a \(\lambda\)-constacyclic code of length \(\ell\) over \(\mathcal{R}\), where \(f_0(x),f_1(x), \dots ,f_s(x)\) generators \(\mathcal{C}\) as given in Theorem 2. For \(0 \le i \le s\), let \(S_i=\{ f_i(x), xf_i(x), \ldots, x^{n_{i+1}-n_{i}-1}f_i(x) \}, ~\text{where}~~n_{s+1}=\ell\). Then
\({S}=\bigcup_{i=0}^{s}S_i\) is a minimal spanning set of \(\mathcal{C}\).
\(Rank(\mathcal{C})=\ell-n_0\), where \(n_0=\deg(f_0(x))\) and \(f_0(x)\) is a polynomial of minimal degree in \(\mathcal{C}\).
Proof.
Let \(S'=\bigcup_{i=0}^s S_i'\), where \(S_i'=\{f_i(x),xf_i(x), \dots , x^{\ell-n_i-1}f_i(x)\}~\text{for}~ 0 \le i \le s\). Clearly \(S \subseteq S'\) and \(S'\) spans \(\mathcal{C}\). To prove that \(S\) spans \(\mathcal{C}\), it is sufficient to prove that \(x^{n_{i+1}-n_{i}}f_i(x) \in Span(S)~~\text{for}~~0 \le i \le s-1\). We prove it by induction on \(i\). For \(i=0\), \(x^{n_1-n_0}f_0(x)\) is a polynomial of degree \(n_1\) in \(\mathcal{C}\). Then, \(x^{n_1-n_0}f_0(x)-\gamma^{r_0-r_1}u_1f_1(x)\) is a polynomial of degree less than \(n_1\), where \(u_1\) is a unit in \(\mathcal{R}\). By Lemma 1, \(x^{n_1-n_0}f_0(x)-\gamma^{r_0-r_1}u_1f_1(x)\in \langle f_0(x) \rangle\) which implies that \(x^{n_1-n_0}f_0(x)-\gamma^{r_0-r_1}u_1f_1(x)= c_0(x)f_0(x)\), where \(c_0(x) \in \mathcal{R}[x]\) with \(\deg(c_0(x))<n_1-n_0\). Therefore, \(x^{n_1-n_0}f_0(x)-\gamma^{r_0-r_1}u_1f_1(x) \in Span(S)\) which implies that \(x^{n_1-n_0}f_0(x) \in Span(S)\). Hence, the result is true for \(i=0\). Let us suppose that the result holds for all \(i \le k-1\), i.e., \(x^{n_{i+1}-n_{i}}f_i(x) \in Span(S)~~\text{for}~~0 \le i \le k-1\). Now we will prove the result for \(i=k\). It is easy to see that \(\deg(x^{n_{k+1}-n_{k}}f_k(x))=n_{k+1}~~\text{in}~~\mathcal{C}\). Then \(x^{n_{k+1}-n_{k}}f_k(x)-\gamma^{r_k-r_{k+1}}u_{k+1}f_{k+1}(x)\) is a polynomial of degree less than \(n_{k+1}\). Therefore, by Lemma 1, \(x^{n_{k+1}-n_{k}}f_k(x)-\gamma^{r_k-r_{k+1}}u_{k+1}f_{k+1}(x)\in \langle f_0(x),f_1(x), \dots, f_k(x)\rangle\). This implies that \(x^{n_{k+1}-n_{k}}f_k(x)=\gamma^{r_k-r_{k+1}}u_{k+1}f_{k+1}(x)+c_0(x)f_0(x)+c_1(x)f_1(x)+\dots+c_k(x)f_k(x)\) where, \(c_j(x)\in \mathcal{R}[x]\) such that \(\deg(c_j(x))<n_{j+1}-n_j\) for all \(0\le j \le k\). It follows that \(c_j(x)f_j(x) \in Span(S)\) for all \(0\le j \le k\). Therefore, \(x^{n_{k+1}-n_{k}}f_k(x) \in Span(S)\). Thus, by mathematical induction \(x^{n_{i+1}-n_{i}}f_i(x) \in Span(S)\) for all \(0\le i \le s-1\). Hence, \(S\) spans \(\mathcal{C}\). The minimality of the spanning set \(S\) can be easily proved by considering the degrees of various polynomials involved.
By definition, \(Rank(\mathcal{C})= |S|\), \(S\) as a minimal spanning set of \(\mathcal{C}\). Therefore, \(|{S}|=\sum_{i=0}^{s}|S_i|=\sum_{i=0}^{s}(n_{i+1}-n_i)=n_{s+1}-n_0=\ell-n_0\). Hence \(Rank(\mathcal{C})=\ell-n_0\).
◻
Below, we give a few examples to illustrate the above results.
Example 1. Consider \(\mathcal{R}=Z_{125}\). It possesses a maximal ideal generated by \(5\), i.e.,\(\langle\gamma\rangle=\langle5\rangle\) and has nilpotency index \(\rho=3\). Then \(\mathcal{C}=\langle25(x-2),5(x-2)^3\rangle\) forms a \(2\)-constacyclic code of length \(5\) over \(Z_{125}\), where \[\begin{align} f_0(x)&=25(x-2), \quad h_0(x)=(x-2), \quad r_0=2,\quad n_0=1 \\ f_1(x)&=5(x-2)^3, \quad h_1(x)=(x-2)^3, \quad r_1=1,\quad n_1=3 \end{align}\] The following set forms a minimal spanning set of \(\mathcal{C}\) \[S=\{f_0(x),xf_0(x),f_1(x),xf_1(x)\}\] where \(|S|=4\). Also, \(Rank(\mathcal{C})=5-1=4\).
Example 2. Consider \(\mathcal{R}=Z_{343}\). It possesses a maximal ideal generated by \(7\), i.e. \(\langle\gamma\rangle=\langle7\rangle\) and has nilpotency index \(\rho=3\). Then \(\mathcal{C}=\langle49,7(x^6-x^3+4)\rangle\) froms a \(5\)-constacyclic code of length \(12\) over \(Z_{343}\), where \[\begin{align} f_0(x)&=49, \quad h_0(x)=1, \quad r_0=2,\quad n_0=0 \\ f_1(x)&=7(x^6-x^3+4), \quad h_1(x)=(x^6-x^3+4), \quad r_1=1,\quad n_1=6 \end{align}\] The following set forms a minimal spanning set of \(\mathcal{C}\) \[\begin{align} S=\{ f_0(x), xf_0(x), x^2f_0(x), x^3f_0(x), x^4f_0(x), x^5f_0(x),\\ f_1(x), xf_1(x), x^2f_1(x), x^3f_1(x), x^4f_1(x), x^5f_1(x) \} \end{align}\] where \(|S|=12\). Also, \(Rank(\mathcal{C})=12-0=12\).
Example 3. Consider \(\mathcal{R}=Z_{289}\). It possesses a maximal ideal generated by \(17\), i.e. \(\langle\gamma\rangle=\langle17\rangle\) and has nilpotency index \(\rho=2\). Then \(\mathcal{C}=\langle17,(x^6+5x^5+8x^4+6x^3-4x^2-3x+2)\rangle\) forms a \(10\)-constacyclic code of length \(7\) over \(Z_{289}\), where \[\begin{align} f_0(x)&=17, \quad h_0(x)=1, \quad r_0=1,\quad n_0=0 \\ f_1(x)&=x^6+5x^5+8x^4+6x^3-4x^2-3x+2,\\ h_1(x)&=x^6+5x^5+8x^4+6x^3-4x^2-3x+2,\quad r_1=0,\quad n_1=6 \end{align}\] The following set forms a minimal spanning set of \(\mathcal{C}\) \[S=\{f_0(x),xf_0(x),x^2f_0(x),x^3f_0(x),x^4f_0(x),x^5f_0(x),f_1(x)\}\] where \(|S|=7\). Also, \(Rank(\mathcal{C})=7-0=7\).
In this subsection, we obtain necessary and sufficient conditions under which a \(\lambda\)-constacyclic code is an MHDR as well as an MDS.
Let \(\mathcal{C}\) be a \(\lambda\)-constacyclic code of length \(\ell\) over \(\mathcal{R}\). For each integer \(i\) with \(0 \le i \le \rho-1\), \(\mathrm{Tor}_i(\mathcal{C})=\{\,\overline{c(x)}\in \mathbb{F}_q[x]/\langle x^{\ell}- \overline{\lambda} \rangle \mid \gamma^{\,i}c(x) \in \mathcal{C} \,\}\) gives the \(i\)-th torsion code of \(\mathcal{C}\). It can be easily observed that \(\mathrm{Tor}_i(\mathcal{C})\) forms a \(\overline{\lambda}\)-constacyclic code of length \(\ell\) over the residue field \(\mathbb{F}_q\). Moreover, the degree associated with the generator polynomial of \(\mathrm{Tor}_i(\mathcal{C})\) is referred to as the \(i^{th}\) torsional degree of \(\mathcal{C}\).
Lemma 2. Let \(\mathcal{C}= \langle f_0(x),f_1(x), \dots , f_s(x) \rangle\) be a \(\lambda\)-constacyclic code of length \(\ell\) over \(\mathcal{R}\), where \(f_i(x),~0 \le i \le s\) are generators of \(\mathcal{C}\) defined as \(f_i(x)=\gamma^{r_i}h_i(x)\). Then \(0 \le i \le s,~\mathrm{Tor}_{r_i}(\mathcal{C})\) is a \(\overline{\lambda}\)-constacyclic code of length \(\ell\) over the residue field \(\mathbb{F}_q\) generated by \(\overline{h_i(x)}\). Moreover, \(n_i\) is the \(r_i^{th}\) torsional degree of \(\mathcal{C}\) and \(dim(\mathrm{Tor}_{r_i}(\mathcal{C}))=\ell-n_i\).
Proof. It is easy to observe that \(\langle \overline{h_i(x)} \rangle \subseteq \mathrm{Tor}_{r_i}(\mathcal{C})\). Let \(\overline{g(x)} \in \mathrm{Tor}_{r_i}(\mathcal{C})\) be a non-zero polynomial. Then \(\gamma^{r_i}g(x) \in \mathcal{C}\). If \(\deg(\gamma^{r_i}g(x))<n_i\), then by Lemma 1, \(\gamma^{r_i}g(x) \in \langle f_0(x),f_1(x),\dots,f_{i-1}(x) \rangle\) from which it is observed that \(\gamma^{r_i}g(x)= \sum_{k=0}^{i-1}c_k(x)\gamma^{r_k}h_k(x)\), where \(c_k(x)\) belongs to the ring \(\mathcal{R}[x]/\langle x^{\ell}-\lambda \rangle\) for \(0\le k \le i-1\). It implies that \(\gamma^{r_i}g(x)= \gamma^{r_i}\sum_{k=0}^{i-1}c_k(x)\gamma^{r_k-r_i}h_k(x)\). Since \(r_k>r_i\) for every \(0\le k \le i-1\), we obtain \(\overline{g(x)}=0 ~\text{in}~ \mathbb{F}_q[x]/\langle x^{\ell}- \overline{\lambda} \rangle\), which is a contradiction. It follows that \(\deg(\gamma^{r_i}g(x)) \ge n_i\).
Now \(h_i(x)\) be a monic polynomial with \(\deg(h_i(x))=n_i\), which consequently implies that \(\overline{h_i(x)}\) is a monic polynomial in \(\mathrm{Tor}_{r_i}(\mathcal{C})\) with \(\deg(\overline{h_i(x)})=n_i\). By division algorithm, there exist polynomials \(\overline{q(x)} ~\text{and}~ \overline{r(x)}\) in the ring \(\mathbb{F}_q[x]/\langle x^{\ell}- \overline{\lambda} \rangle\) such that \(\overline{g(x)}=\overline{q(x)}~\overline{h_i(x)}+\overline{r(x)}\), where \(\deg(\overline{r(x)}) < n_i~\text{or}~\overline{r(x)}=0\). Since \(\overline{r(x)} \in \mathrm{Tor}_{r_i}(\mathcal{C})\), we must have \(\overline{r(x)}=0\). Therefore, \(\overline{g(x)}=\overline{q(x)}\overline{h_i(x)}\) which shows that \(\overline{g(x)}\in \langle \overline{h_i(x)} \rangle\). Which results in \(\mathrm{Tor}_{r_i}(\mathcal{C}) \subseteq \langle \overline{h_i(x)} \rangle\). Hence, \(\mathrm{Tor}_{r_i}(\mathcal{C})= \langle \overline{h_i(x)} \rangle\).
It is easy see that \(\mathrm{Tor}_{r_i}(\mathcal{C})\) forms a \(\overline{\lambda}\)-constacyclic code of length \(\ell\) over \(\mathbb{F}_q\). Further, \(dim(\mathrm{Tor}_{r_i}(\mathcal{C}))=\ell-\deg(\overline{h_i(x)})=\ell-n_i\). ◻
Lemma 3. Consider a \(\lambda\)-constacyclic code \(\mathcal{C}\) of length \(\ell\) over \(\mathcal{R}\). Then
\(d(\mathcal{C})=d(\mathrm{Tor}_{r_0}(\mathcal{C}))\).
\(Rank(\mathcal{C})=dim(\mathrm{Tor}_{r_0}(\mathcal{C}))\).
Proof.
We know from Theorem 2 that \(\mathrm{Tor}_{r_0}(\mathcal{C})\) forms a \(\overline{\lambda}\)-constacyclic code of length \(\ell\) over \(\mathbb{F}_q\) whenever \(\mathcal{C}\) is a \(\lambda\)-constacyclic code of length \(\ell\) over \(\mathcal{R}\). Let \(\overline{f(x)} \in \mathrm{Tor}_{r_0}(\mathcal{C})\) be such that \(wt(\mathrm{Tor}_{r_0}(\mathcal{C}))=wt(\overline{f(x)})\). Clearly, \(wt(\overline{f(x)})=wt(\gamma^{r_0}f(x))\), where \(\gamma^{r_0}f(x) \in \mathcal{C}\). Therefore, \(wt(\mathrm{Tor}_{r_0}(\mathcal{C}))=wt(\overline{f(x)})=wt(\gamma^{r_0}f(x))\ge wt(\mathcal{C})\). Conversely, let \(g(x)=g_0(x)+\gamma g_1(x)+ \dots +\gamma^{\rho-1}g_{\rho-1}(x) \in \mathcal{C}\) be such that \(wt(\mathcal{C})=wt(g(x))\). Now \(\gamma^{r_0}g(x) \in \mathcal{C}~\text{implies that}~ \overline{g_0(x)} \in \mathrm{Tor}_{r_0}(\mathcal{C})\). Therefore, \(wt(\mathcal{C})=wt(g(x)) \ge wt(\overline{g_0(x)}) \ge wt(\mathrm{Tor}_{r_0}(\mathcal{C}))\). It follows that \(wt(\mathcal{C})=wt(\mathrm{Tor}_{r_0}(\mathcal{C}))\) and therefore, \(d(\mathcal{C})=d(\mathrm{Tor}_{r_0}(\mathcal{C}))\) because both \(\mathcal{C}\) and \(\mathrm{Tor}_{r_0}(\mathcal{C})\) are linear codes.
From Theorem 4 and Lemma 2, it is clear that \(Rank(\mathcal{C})=\ell-n_0=dim(\mathrm{Tor}_{r_0}(\mathcal{C}))\). Hence, \(Rank(\mathcal{C})=dim(\mathrm{Tor}_{r_0}(\mathcal{C}))\).
◻
Lemma 4. [25] Consider a linear code \(\mathcal{C}\) over FCR \(\mathcal{R}\). Then \(|\mathcal{C}|=\prod_{i=0}^{\rho-1}|\mathrm{Tor}_{i}(\mathcal{C})|\).
Theorem 5. Consider a \(\lambda\)-constacyclic code \(\mathcal{C}= \langle f_0(x),f_1(x), \dots , f_s(x) \rangle\) of length \(\ell\) over \(\mathcal{R}\), where \(f_0(x),f_1(x), \dots ,f_s(x)\) are generators of \(\mathcal{C}\) as given in theorem 2. Then \(|\mathcal{C}|=|\mathbb{F}_q|^{(\ell\rho-(\ell r_s+n_0(\rho-r_0)+\sum_{i=1}^sn_i(r_{i-1}-r_i)))}\), where \(n_i,~ 0 \le i \le s\) are the torsional degrees of \(\mathrm{Tor}_{r_i}(\mathcal{C})\).
Proof. We know that \(|\mathrm{Tor}_{i}(\mathcal{C})|=|\mathbb{F}_q|^{\ell-n_i}\), where \(n_i\) is the degree associated with the generator polynomial of \(\mathrm{Tor}_{i}(\mathcal{C})\). Clearly \(\mathrm{Tor}_{0}(\mathcal{C})=\mathrm{Tor}_{1}(\mathcal{C})= \dots =\mathrm{Tor}_{r_s-1}(\mathcal{C})={0}\). Therefore, \(|\mathrm{Tor}_{0}(\mathcal{C})|=|\mathrm{Tor}_{1}(\mathcal{C})|= \dots =|\mathrm{Tor}_{r_s-1}(\mathcal{C})|=1\). Again \(\mathrm{Tor}_{r_i}(\mathcal{C})=\mathrm{Tor}_{r_i+1}(\mathcal{C})= \dots =\mathrm{Tor}_{r_{i-1}-1}(\mathcal{C})=\langle \overline{h_i(x)} \rangle\) for \(i=1,2,\dots,s\). Therefore, \(|\mathrm{Tor}_{r_i}(\mathcal{C})|=|\mathrm{Tor}_{r_i+1}(\mathcal{C})|= \dots =|\mathrm{Tor}_{r_{i-1}-1}(\mathcal{C})|=|\mathbb{F}_q|^{\ell-n_i}\) for \(i=1,2,\dots,s\). Also \(\mathrm{Tor}_{r_0}(\mathcal{C})=\mathrm{Tor}_{r_0+1}(\mathcal{C})= \dots =\mathrm{Tor}_{\rho-1}(\mathcal{C})=\langle \overline{h_0(x)} \rangle\). Therefore, \(|\mathrm{Tor}_{r_0}(\mathcal{C})|=|\mathrm{Tor}_{r_0+1}(\mathcal{C})|= \dots =|\mathrm{Tor}_{\rho-1}(\mathcal{C})|=|\mathbb{F}_q|^{\ell-n_0}\). Therefore, by Lemma 4, \(|\mathcal{C}|=\prod_{i=0}^{\rho-1}|\mathrm{Tor}_{i}(\mathcal{C})|=|\mathbb{F}_q|^{(\ell\rho-(\ell r_s+n_0(\rho-r_0)+\sum_{i=1}^sn_i(r_{i-1}-r_i)))}\). ◻
Theorem 6. Let \(\mathcal{C}\) be a length \(\ell\) \(\lambda\)-constacyclic code over a FCR \(\mathcal{R}\). Then \(\mathcal{C}\) is MHDR if and only if \(\mathrm{Tor}_{r_0}(\mathcal{C})\) is MDS over \(\mathbb{F}_q\).
Proof. Suppose \(\mathcal{C}\) is an MHDR code. Then \(d(\mathcal{C}) = \ell - \mathrm{Rank}(\mathcal{C}) + 1 = n_0 + 1\). By Lemma 3, \(d(\mathrm{Tor}_{r_0}(\mathcal{C})) = d(\mathcal{C}) = n_0 + 1\). By Lemma 2, \(\dim(\mathrm{Tor}_{r_0}(\mathcal{C})) = \ell - n_0\). As \(\mathrm{Tor}_{r_0}(\mathcal{C})\) forms a \(\overline{\lambda}\)-constacyclic code over \(\mathbb{F}_q\) having \(\dim(\mathrm{Tor}_{r_0}(\mathcal{C})) = \ell - n_0\), \(|\mathrm{Tor}_{r_0}(\mathcal{C})| = |\mathbb{F}_q|^{\ell - n_0} = |\mathbb{F}_q|^{\ell - d(\mathrm{Tor}_{r_0}(\mathcal{C})) + 1}\). Hence, \(\mathrm{Tor}_{r_0}(\mathcal{C})\) is MDS over \(\mathbb{F}_q\).
Conversely, suppose \(\mathrm{Tor}_{r_0}(\mathcal{C})\) is MDS code over \(\mathbb{F}_q\). Then \(|\mathrm{Tor}_{r_0}(\mathcal{C})|=|\mathbb{F}_q|^{(\ell-d(\mathrm{Tor}_{r_0}(\mathcal{C}))+1)}\) which shows that \(dim(\mathrm{Tor}_{r_0}(\mathcal{C}))=\ell-d(\mathrm{Tor}_{r_0}(\mathcal{C}))+1\). From Lemma 3, we have \(d(\mathcal{C})=d(\mathrm{Tor}_{r_0}(\mathcal{C}))\) and \(Rank(\mathcal{C})=dim(\mathrm{Tor}_{r_0}(\mathcal{C}))\). Therefore, \(d(\mathcal{C})=\ell-Rank(\mathcal{C})+1\). Hence, \(\mathcal{C}\) is an MHDR code over \(\mathcal{R}\). ◻
Theorem 7. Let \(\mathcal{C}\) be a \(\lambda\)-constacyclic code of length \(\ell\) over \(\mathcal{R}\). Then the following are equivalent.
\(\mathcal{C}\) is MDS.
\(\mathrm{Tor}_{r_0}(\mathcal{C})\) is MDS and \(\mathcal{C}\) is generated principally by a monic polynomial.
Proof. Let \(\mathcal{C}\) be an MDS code. Then \(|\mathcal{C}|=|\mathcal{R}|^{\ell-d(\mathcal{C})+1}\). By Theorem 5 and Proposition 1, \(|\mathbb{F}_q|^{(\ell\rho-(\ell r_s+n_0(\rho-r_0)+\sum_{i=1}^sn_i(r_{i-1}-r_i)))}=|\mathbb{F}_q|^{\rho(\ell-d(\mathcal{C})+1)}\). This implies that \({\ell\rho-(\ell r_s+n_0(\rho-r_0)+\sum_{i=1}^sn_i(r_{i-1}-r_i))}=\rho(\ell-d(\mathcal{C})+1)\). Therefore, we have \[\label{eq:first} \ell r_s+n_0(\rho-r_0)+\sum_{i=1}^sn_i(r_{i-1}-r_i)=\rho(d(\mathcal{C})-1)\tag{1}\] Now, \(n_0(\rho-r_s) \le n_0(\rho-r_0)+\sum_{i=1}^sn_i(r_{i-1}-r_i)\) as \(n_0 < n_i~\text{for}~1 \le i \le s\). Therefore, \(\ell r_s+ n_0(\rho-r_s)\le \ell r_s+n_0(\rho-r_0)+\sum_{i=1}^sn_i(r_{i-1}-r_i)\). Also, \(d(\mathcal{C})-1 \le n_0\). Thus using equation 1 , we have that \[\begin{align} \ell r_s+ n_0(\rho-r_s) \le \ell r_s+n_0(\rho-r_0)+\sum_{i=1}^sn_i(r_{i-1}-r_i)=\rho(d(\mathcal{C})-1) \le \rho n_0. \end{align}\] This implies that \(\ell r_s+ n_0(\rho-r_s) \le \rho n_0\), which further implies that \(r_s(\ell-n_0)\le 0\).
It follows that \(r_s=0\) as \(r_s \ge 0~\text{and}~\ell-n_0>0\) . Therefore, equation 1 simplifies to \(n_0(\rho-r_0)+\sum_{i=1}^sn_i(r_{i-1}-r_i)=\rho(d(\mathcal{C})-1)\), which can further be written as \[n_0(\rho-r_0)+\sum_{i=1}^sn_i(r_{i-1}-r_i)=((\rho-r_0)+\sum_{i=1}^s(r_{i-1}-r_i))(d(\mathcal{C})-1).\] It implies that \[(\rho-r_0)+\sum_{i=1}^s(n_i-(d(\mathcal{C})-1))(r_{i-1}-r_i)=0.\]
Since \(\rho-r_0>0~\text{and}~r_{i-1}-r_i>0~\text{for all}~1 \le i \le s\), we obtain \(n_i=d(\mathcal{C})-1\) for all \(0\le i \le s\). This together with Lemma 3 implies that \(n_0=d(\mathcal{C})-1=d(\mathrm{Tor}_{r_0}(\mathcal{C}))-1\). Therefore, \(|\mathrm{Tor}_{r_0}(\mathcal{C})|=|\mathbb{F}_q|^{\ell-n_0}=|\mathbb{F}_q|^{\ell-d(\mathrm{Tor}_{r_0}(\mathcal{C}))+1}\). Hence, \(\mathrm{Tor}_{r_0}(\mathcal{C})\) is MDS. Now \(n_i=d(\mathcal{C})-1\) for all \(0\le i \le s\) and \(n_0<n_1<\dots <n_s\) can hold simultaneously only when \(s\) is zero. Therefore, \(r_0=r_s=0\). Consequently, \(\mathcal{C}=\langle h_0(x) \rangle\), i.e., \(\mathcal{C}\) is generated principally by a monic polynomial. Hence, \((i) \implies(ii)\).
Conversely, suppose that \(\mathrm{Tor}_{r_0}(\mathcal{C})\) is MDS and \(\mathcal{C}\) is generated principally by a monic polynomial. Then, by Theorem 5, \(|\mathcal{C}|=|\mathbb{F}_q|^{\rho(\ell-n_0)}\). Since \(\mathrm{Tor}_{r_0}(\mathcal{C})\) is MDS, \(n_0=d(\mathrm{Tor}_{r_0}(\mathcal{C}))-1=d(\mathcal{C})-1\). It implies that \(|\mathcal{C}|=|\mathbb{F}_q|^{\rho(\ell-(d(\mathcal{C})-1))}=|\mathcal{R}|^{\ell-d(\mathcal{C})+1}\), which follows that \(\mathcal{C}\) is MDS. Hence \((ii) \implies(i)\). ◻
The following Corollary is a direct implication of Theorems 6 and 7.
Corollary 1. Consider a \(\lambda\)-constacyclic code \(\mathcal{C}\) of length \(\ell\) over \(\mathcal{R}\). Then \(\mathcal{C}\) is MDS implies that \(\mathcal{C}\) is MHDR.
The converse of the above Corollary need not be true. For example consider a \(2\)-constacyclic code \(\mathcal{C}=\langle25(x-2),5(x-2)^3\rangle\) of length \(5\) over \(Z_{125}\). Clearly, \(\mathcal{C}\) is MHDR by Theorem 6 but not MDS by Theorem 7.
Necessary and sufficient conditions for a \(\lambda\)-constacyclic code of length \(p^m\) to be MDS over \(\mathbb{F}_q\) have been given in Theorem 3.2 by Dinh et al. [26]. The following theorem extends this result to a \(\lambda\)-constacyclic code of arbitrary length by using similar arguments as given by Dinh et al. [26].
Theorem 8. Consider a \(\lambda\)-constacyclic code \(\mathcal{C}_j\) of arbitrary length \(\ell=np^m\) with \((n,p)=1\) over \(\mathbb{F}_q\) such that it is generated by a polynomial of degree \(j\). Then \(\mathcal{C}_j\) is an MDS constacyclic code if and only if
\(j \in \{ 0, 1, \dots, p-1\} ~\text{when}~m=1\).
\(j \in \{0,1,p^m-1\}~\text{when}~m \ge 2\).
Proof. The proof proceeds in a manner similar to that of Theorem 3.2 of [26]. ◻
The following Corollary follows directly from Theorems 6 and 8.
Corollary 2. Let \(\mathcal{C}= \langle f_0(x),f_1(x), \dots , f_s(x) \rangle\) be a \(\lambda\)-constacyclic code of length \(\ell=np^m\) with \((n,p)=1\) over \(\mathcal{R}\), where \(f_0(x),f_1(x), \dots ,f_s(x)\) are generators of \(\mathcal{C}\) as given in theorem 2. Then \(\mathcal{C}\) is MHDR if and only if
\(n_0 \in \{ 0, 1, \dots, p-1\} ~\text{when}~m=1\).
\(n_0 \in \{0,1,p^m-1\}~\text{when}~m \ge 2\).
Some examples are provided below to support our results.
Example 4. Suppose \(\mathcal{R}=F_5+\gamma F_5\) having nilpotency index \(\rho=2\). Consider a \(2\)-constacyclic code \(\mathcal{C}=\langle \gamma (x-2)^2,(x-2)^4 \rangle\) of length \(5\) over \(\mathcal{R}\). By Theorem 4 \(Rank(\mathcal{C})=3\) and \(d(\mathcal{C})=3\). Also, \(\mathrm{Tor}_{r_0}(\mathcal{C})= \langle (x-2)^2 \rangle\) forms a \(2\)-constacyclic code of length \(5\) over \(F_5\) with \(dim(\mathrm{Tor}_{r_0}(\mathcal{C}))=3\) and \(d(\mathrm{Tor}_{r_0}(\mathcal{C}))=3\). Clearly \(|\mathrm{Tor}_{r_0}(\mathcal{C})|=5^3\) and \(|\mathbb{F}_q|^{(\ell-d(\mathrm{Tor}_{r_0}(\mathcal{C}))+1)}=5^3\). Therefore, \(\mathrm{Tor}_{r_0}(\mathcal{C})\) is MDS code. Hence, by Theorem 6, \(\mathcal{C}\) is MHDR over \(\mathcal{R}\).
Example 5. Over \(Z_9\) having nilpotency index \(\rho=2\), Consider an \(8\)-constacyclic code \(\mathcal{C}=\langle 3(x^2+1)\rangle\) of length \(4\). By Theorem 4, \(\mathrm{Tor}_{r_0}(\mathcal{C})=\langle x^2+1\rangle\) forms an \(8\)-constacyclic code of length \(4\) over \(\mathbb{F}_3\) with \(\dim(\mathrm{Tor}_{r_0}(\mathcal{C}))=2\) and \(d(\mathrm{Tor}_{r_0}(\mathcal{C}))=2\). Clearly \(|\mathrm{Tor}_{r_0}(\mathcal{C})|=3^2\) and \(|\mathbb{F}_3|^{(\ell-d(\mathrm{Tor}_{r_0}(\mathcal{C}))+1)}=3^3\). By Corollary 2, \(\mathrm{Tor}_{r_0}(\mathcal{C})\) fails to be an MDS code. Hence, by Theorem 6, \(\mathcal{C}\) cannot be an MHDR code over \(\mathbb{Z}_9\).
Example 6. Consider \(\mathcal{R}=Z_{289}\). The maximal ideal of \(\mathcal{R}\) is \(\langle\gamma\rangle=\langle17\rangle\) and nilpotency index \(\rho=2\). Then, consider a \(10\)-constacyclic code \(\mathcal{C}=\langle x^6+5x^5+8x^4+6x^3-4x^2-3x+2\rangle\) of length \(7\) over \(Z_{289}\). Clearly \(\mathrm{Tor}_{r_0}(\mathcal{C})=\langle x^6+5x^5+8x^4+6x^3-4x^2-3x+2\rangle\). By Corollary 2, \(\mathrm{Tor}_{r_0}(\mathcal{C})\) is MDS. Also, \(\mathcal{C}\) is generated principally by a monic polynomial. By Theorem 7, \(\mathcal{C}\) is also MDS.
It can be seen by Theorem 6 that the constacyclic codes given in Examples 1, 2 and 3 of subsection 3.1 are all MHDR.
In the above study, the generators of the constacyclic code \(\mathcal{C}\) of arbitrary length \(\ell\) over a FCR \(\mathcal{R}\) were explicitly determined. Using these generators, a minimal spanning set was obtained along with the rank of the code \(\mathcal{C}\). Moreover, we also established necessary and sufficient conditions under which a constacyclic code of arbitrary length becomes MHDR and MDS. Some examples are also provided to support our results.