1 Introduction

Let (CD) be a pair of linear codes having length m over a finite commutative ring R. Then (CD) is called a linear complementary pair (LCP) of codes over R if \(R^{m}\) is a direct sum of C and D,i.e., \(R^{m} = C+D\) and \(C \cap D = \{0\}\). Linear complementary dual (LCD) codes form a special case of LCP of codes wherein D is the dual code of C. LCD codes have been first introduced in 1992 by Massey [1]. LCD and LCP of codes have applications in countering fault injection attacks and side channel attacks during implementation of cryptographic algorithms [2,3,4]. The LCP of codes (CD) has security parameter equal to minimum of minimum distance of C and minimum distance of \(D^{\bot }\). In case of LCD codes, the security parameter becomes minimum distance of C. Thus, the problem of constructing LCD codes with best security parameter amounts to the problem of constructing LCD codes with largest ’minimum distance’. LCD codes over finite fields and rings have been studied extensively in literature. For reference, see [5,6,7,8,9]. Parallel to the growing interest in LCD codes, LCP of different classes of codes over finite fields and rings have also been studied recently [10,11,12,13,14,15,16]. It has been proved by Carlet et al. [10] that C is equivalent to \(D^{\bot }\) for an LCP (CD) of 2D cyclic codes over the field \(F_{q}\) having length coprime to q. Similar results have been proved by Güneri et al. for LCP of cyclic n-D codes [11]. LCP of constacyclic codes over R, where R is a finite chain ring of characteristic k (k coprime to length of the code) have been studied by Hu and Liu [15]. Moreover, LCP of constacyclic codes of arbitrary length have been explored over a finite chain ring by Thakral et al. [16].

The class of constacyclic 2-D codes is an important generalization of cyclic 2-D codes. Basic theory of binary cyclic 2-D codes was first studied by Imai et al. [17]. Some of the works on cyclic 2-D codes are presented in [18,19,20,21,22]. Quite recently, structure of constacyclic 2-D codes over a finite field has been given by Bhardwaj and Raka [23]. Further, multidimensional constacyclic codes over a finite field have been explored by Bhardwaj and Raka in [24]. Algebraic structure of multidimensional cyclic code over a finite chain ring have been determined by Disha and Dutt in [25].

In present work, LCP of constacyclic n-D codes over a finite commutative ring R have been studied. In this directon, a necessary as well as sufficient condition for a pair of constacyclic 2-D codes over R to be an LCP of codes has been obtained. Moreover, a characterization of all non-trivial LCP of constacyclic 2-D codes over R has been given. Furthermore, total number of such codes has been determined. Using the obtained results, a few examples of LCP of constacyclic 2-D codes over some finite chain rings have been given. These results have been extended to constacyclic 3-D codes over finite commutative rings. Similar approach leads to the extension of results to constacyclic n-D codes, \(n \ge 3\), over finite commutative rings. In particular, necessary and sufficient conditions for existence of a non-trivial LCP of constacyclic 2-D codes over finite chain rings have been obtained.

2 Preliminaries

Let R be a finite commutative ring. A linear code C of length m over R is an R-submodule of \(R^m\). A linear code C is called a \(\lambda\)-constacyclic code of length m over R if for every codeword \((c_{0}, c_{1},\ldots ,c_{m-1}) \in C\), the codeword \((\lambda c_{m-1}, c_{0},\ldots ,c_{m-2})\) belongs to C. The code C is cyclic if \(\lambda = 1\). It is an established fact that a constacyclic code of length m over R is easily viewed as an ideal of the quotient ring \(R[x]/\left\langle x^m-\lambda \right\rangle\). Let C be a linear code over R of length \(k_{1}k_{2}\) whose codewords are viewed as \(k_{1} \times k_{2}\) arrays as follows:

$$\begin{aligned} c = [c_{ij}], \ \ \ 0 \le i \le k_{1}-1, 0 \le j \le k_{2}-1. \end{aligned}$$

Let \(\lambda\) and \(\delta\) be units in R. Then \(\lambda\)-row shift \(\tau _{\lambda }(c)\) and \(\delta\)-column shift \(\tau _{\delta }(c)\) of a codeword c are defined as follows:

$$\begin{aligned}{} & {} \tau _{\lambda }(c)=\begin{bmatrix} \lambda c_{k_{1}-1,0} &{} \lambda c_{k_{1}-1,1} &{} \cdots &{} \lambda c_{k_{1}-1,k_{2}-1}\\ c_{0,0} &{} c_{0,1} &{} \cdots &{} c_{0,k_{2}-1} \\ \vdots &{} \vdots &{} &{} \vdots \\ c_{k_{1}-2,0} &{} c_{k_{1}-2,1} &{} \cdots &{} c_{k_{1}-2,k_{2}-1} \end{bmatrix}, \\{} & {} \tau _{\delta }(c)= \begin{bmatrix} \delta c_{0,k_{2}-1} &{} c_{0,0} &{} \cdots &{} c_{0,k_{2}-2}\\ \delta c_{1,k_{2}-1} &{} c_{1,0} &{} \cdots &{} c_{1,k_{2}-2}\\ \vdots &{} \vdots &{} &{} \vdots \\ \delta c_{k_{1}-1,k_{2}-1} &{} c_{k_{1}-1,0} &{} \cdots &{}c_{k_{1}-1,k_{2}-2} \end{bmatrix}. \end{aligned}$$

C is called a \((\lambda ,\delta )\)-constacyclic two-dimensional code over R if it is closed under both \(\lambda\)-row shift and \(\delta\)-column shift.

Define \(\phi : R^{k_{1}k_{2}}\longrightarrow R[x,y]/\left\langle x^{k_{1}}-\lambda , y^{k_{2}}-\delta \right\rangle\) as

$$\begin{aligned} \phi (c) = \sum _{i=0}^{k_{1}-1}\sum _{j=0}^{k_{2}-1} c_{ij}x^{i}y^{j}, \end{aligned}$$

where \(c_{ij} \in R\).

It is easy to see that the map \(\phi\) is a ring homomorphism under which a \((\lambda , \delta )\)-constacyclic 2-D code C is mapped to an ideal of \(R[x,y]/\left\langle x^{k_{1}}-\lambda , y^{k_{2}}-\delta \right\rangle\). Similarly, a \((\lambda _{1}, \lambda _{2}, \lambda _{3})\)-constacyclic 3-D code of length \(k_{1}k_{2} k_{3}\) can be defined as an ideal of \(R[x_{1}, x_{2}, x_{3}]/\left\langle x_{_{1}}^{{k_{_{1}}}} - \lambda _{_{1}}, x_{_{2}}^{{k_{_{2}}}} - \lambda _{_{2}}, x_{_{3}}^{{k_{_{3}}}} -\lambda _{_{3}} \right\rangle .\)

3 LCP of constacyclic 2-D codes over finite commutative rings

A \((\lambda , \delta )\)-constacyclic 2-D code of length \(k_{1}k_{2}\) over a finite commutative ring R can be viewed as an ideal of the ring \(S = R[x,y]/\left\langle x^{k_{1}}-\lambda , y^{k_{2}}-\delta \right\rangle\).

Clearly, the ring \(S \cong \dfrac{R[x]/\left\langle x^{k_{1}}-\lambda \right\rangle }{\left\langle y^{k_{2}}-\delta \right\rangle }[y]\).

Let \(x^{k_{1}}-\lambda = f_{1}(x)f_{2}(x) \cdots f_{r}(x)\) be a factorization of \(x^{k_{1}}-\lambda\) into maximum number of pairwise coprime monic polynomials over R. Then, by Chinese Remainder Theorem (CRT),

$$\begin{aligned} \dfrac{R[x]/\left\langle x^{k_{1}}-\lambda \right\rangle }{\left\langle y^{k_{2}}-\delta \right\rangle }[y] \cong \bigoplus _{i=1}^{r}\dfrac{R[x]/ \left\langle f_{i}(x)\right\rangle }{\left\langle y^{k_{2}}-\delta \right\rangle }[y]. \end{aligned}$$

Then we can write

$$\begin{aligned} S \cong \bigoplus _{i=1}^{r}K_{i}[y]/ \left\langle y^{k_{2}}-\delta \right\rangle , \end{aligned}$$

where \(K_{i} = R[x]/\left\langle f_{i}(x)\right\rangle\).

Now, let \(y^{k_{2}}-\delta = g_{i1}(y)g_{i2}(y) \cdots g_{is_{i}}(y)\) be a factorization of \(y^{k_{2}}-\delta\) into maximum number of pairwise coprime monic polynomials in \(K_{i}[y]\) for each \(i = 1,2,\ldots ,r\). Again by CRT,

$$\begin{aligned} S \cong \bigoplus _{i=1}^{r} K_{i}[y]/\left\langle y^{k_{2}} -\delta \right\rangle \cong \bigoplus _{i=1}^{r} \left( \bigoplus _{j=1}^{s_{i}} K_{i}[y]/ \left\langle g_{ij}(y)\right\rangle \right) = \bigoplus _{i=1}^{r}\left( \bigoplus _{j=1}^{s_{i}} T_{ij} \right) , \end{aligned}$$

where \(T_{ij} = K_{i}[y]/\left\langle g_{ij}(y)\right\rangle\).

Let C be a \((\lambda , \delta )\)-constacyclic 2-D code of length \(k_{1}k_{2}\) over R, then C can be expressed as follows:

$$\begin{aligned} C \cong \bigoplus _{i=1}^{r}\left( \bigoplus _{j=1}^{s_{i}} C_{ij}\right) , \end{aligned}$$

for some ideal \(C_{ij}\) of \(T_{ij}\), \(1 \le i \le r\) and \(1 \le j \le s_{i}\).

The following theorem provides a necessary condition which is sufficient as well for a pair of \((\lambda , \delta )\)-constacyclic 2-D codes to be an LCP of codes over R, where R is a finite commutative ring.

Theorem 1

Let (CD) be a pair of \((\lambda , \delta )\)-constacyclic 2-D codes of length \(k_{1}k_{2}\) over a finite commutative ring R. Let \(S = R[x,y]/\left\langle x^{k_{1}}-\lambda , y^{k_{2}}-\delta \right\rangle \cong \bigoplus _{i=1}^{r}\left( \bigoplus _{j=1}^{s_{i}} T_{ij} \right) , C \cong \bigoplus _{i=1}^{r}\left( \bigoplus _{j=1}^{s_{i}} C_{ij} \right)\) and \(D \cong \bigoplus _{i=1}^{r} \left( \bigoplus _{j=1}^{s_{i}} D_{ij} \right)\) be the CRT expressions of S, C and D respectively. Then, (CD) is an LCP of constacyclic 2-D codes over R if and only if \((C_{ij}, D_{ij})\) is an LCP of codes over \(T_{ij}\), \(1 \le i \le r\) and \(1 \le j \le s_{i}\). Moreover, \((C_{ij}, D_{ij})\) is always a trivial pair of LCP of codes.

Proof

First suppose that (CD) is an LCP of codes over R. Then, as ideals of S, \(C \oplus D = S\). In terms of CRT expressions,

$$\begin{aligned} \left\{ \bigoplus _{i=1}^{r} \left( \bigoplus _{j=1}^{s_{i}} C_{ij} \right) \right\} \bigoplus \left\{ \bigoplus _{i=1}^{r} \left( \bigoplus _{j=1}^{s_{i}} D_{ij} \right) \right\} = \bigoplus _{i=1}^{r}\left( \bigoplus _{j=1}^{s_{i}} T_{ij} \right) \end{aligned}$$

which implies that

$$\begin{aligned} C_{ij} + D_{ij} = T_{ij}, \ 1 \le i \le r \ \text {and} \ 1 \le j \le s_{i}. \end{aligned}$$
(1)

Now we have that

$$\begin{aligned} k_{1}k_{2} = rank_{R}(C+D) = rank_{R}(C) + rank_{R}(D). \end{aligned}$$
(2)

Also,

$$\begin{aligned} rank_{R}(C) = \sum _{i=1}^{r}\left( \sum _{j=1}^{s_{i}} rank_{T_{ij}}(C_{ij}) deg (g_{ij}(y))\right) deg(f_{i}(x)) \end{aligned}$$
(3)

and

$$\begin{aligned} rank_{R}(D) = \sum _{i=1}^{r}\left( \sum _{j=1}^{s_{i}} rank_{T_{ij}}(D_{ij}) deg (g_{ij}(y))\right) deg(f_{i}(x). \end{aligned}$$
(4)

Substituting (3) and (4) in (2), we get that

$$\begin{aligned} k_{1}k_{2}&= \sum _{i=1}^{r}\left( \sum _{j=1}^{s_{i}} rank_{T_{ij}}(C_{ij}) deg (g_{ij}(y)\right) deg(f_{i}(x)) \\&\quad + \sum _{i=1}^{r}\left( \sum _{j=1}^{s_{i}} rank_{T_{ij}}(D_{ij}) deg (g_{ij}(y))\right) deg(f_{i}(x)) \end{aligned}$$

which implies that

$$\begin{aligned} 1= rank_{T{ij}}(C_{ij}) + rank_{T_{ij}}(D_{ij}), \ 1 \le i \le r \ \text {and} \ 1 \le j \le s_{i}. \end{aligned}$$
(5)

On the other hand,

$$\begin{aligned} 1= rank_{T_{ij}}(T_{ij}) = rank_{T_{ij}}(C_{ij}) + rank_{T_{ij}}(D_{ij}) - rank_{T_{ij}}(C_{ij} \cap D_{ij}). \end{aligned}$$
(6)

From (5) and (6), we get that \(rank_{T_{ij}}(C_{ij} \cap D_{ij}) = 0,\) thereby implying that \((C_{ij},D_{ij})\) is an LCP of codes. Also, (5) gives us that either \(C_{ij}=T_{ij}\) and \(D_{ij}=\{0\}\) or \(D_{ij}=T_{ij}\) and \(C_{ij}=\{0\}\). Therefore, \((C_{ij}, D_{ij})\) is only trivial LCP of codes for \(1 \le i \le r\) and \(1 \le j \le s_{i}\).

Converse is easy to show. \(\square\)

Theorem 2 given below determines all LCP of \((\lambda , \delta )\)-constacyclic 2-D codes over R which are non-trivial and Theorem 3 gives the total number of such codes.

Theorem 2

Let R be a finite commutative ring and (CD) be a pair of \((\lambda , \delta )\)-constacyclic 2-D codes of length \(k_{1}k_{2}\) over R. Let \(R[x,y]/\left\langle x^{k_{1}}-\lambda , y^{k_{2}}-\delta \right\rangle \cong \bigoplus _{i=1}^{r} \left( \bigoplus _{j=1}^{s_{i}} T_{ij} \right) , C \cong \bigoplus _{i=1}^{r}\left( \bigoplus _{j=1}^{s_{i}} C_{ij} \right)\) and \(D \cong \bigoplus _{i=1}^{r}\left( \bigoplus _{j=1}^{s_{i}} D_{ij} \right)\) be the CRT expressions of \(R[x,y]/\left\langle x^{k_{1}}-\lambda , y^{k_{2}}-\delta \right\rangle\), C and D respectively. Then (CD) is an LCP of codes over R which is non-trivial if and only if there exist atleast two distinct pairs (ij) and \((i', j')\) such that \(C_{ij} = T_{ij}\) and \(D_{i'j'} =T_{i'j'}.\)

Proof

The result follows from Theorem 1 and the fact that if there does not exist any two distinct pairs (ij) and \((i', j')\) for which \(C_{ij} = T_{ij}\) and \(D_{i'j'} = T_{i'j'}\), then (CD) becomes a trivial LCP of codes. \(\square\)

Theorem 3

The number of LCP of \((\lambda , \delta )\)-constacyclic 2-D codes over R which are non-trivial is given by

$$\begin{aligned} N = {\left\{ \begin{array}{ll} 0, &{}\text {for t = 1,}\\ 1, &{}\text {for t = 2,}\\ \sum _{i=1}^{(t-1)/2}\left( {\begin{array}{c}t\\ i\end{array}}\right) , &{}\text {for t odd, t}> 1,\\ \sum _{i=1}^{(t/2)-1}\left( {\begin{array}{c}t\\ i\end{array}}\right) + \left( {\begin{array}{c}t\\ t/2\end{array}}\right) /2,&\text {for t even, t} > 2, \end{array}\right. } \end{aligned}$$

where \(t = \sum _{i=1}^{r} s_{i}\).

Proof

The proof is straightforward. \(\square\)

Following are some examples which illustrate above results.

Example 1

Consider cyclic 2-D codes having length \(k_{1}k_{2}=3 \cdot 2\) over \(Z_{4}\) which are ideals of the the ring \(S = Z_{4}[x,y]/\left\langle x^3-1, y^2-1\right\rangle\). We have that \(x^3-1 = (x+1)(x^2+x+1)\) is a factorization of \(x^3-1\) into maximum pairwise coprime monic polynomials in \(Z_{4}[x]\). Then \(S \cong \bigoplus _{i=1}^{2} K_{i}[y]/\left\langle y^2-1\right\rangle\), where \(K_{1} = Z_{4}[x]/\left\langle x+1\right\rangle\) and \(K_{2} = Z_{4}[x]/\left\langle x^2+x+1 \right\rangle\). Also, \(y^2-1 = (y-1)(y+1)\) in \(K_{1}[y]\) and \(y^2-1 = (y+2xy-1)(y+2xy+1)\) in \(K_{2}[y]\). So, \(S \cong \bigoplus _{i=1}^{2}(\bigoplus _{j=1}^{2} T_{ij})\), where \(T_{11}= K_{1}[y]/\left\langle y+1\right\rangle\), \(T_{12} = K_{1}[y]/\left\langle y-1\right\rangle\), \(T_{21} = K_2[y]/\left\langle y+2xy-1\right\rangle\) and \(T_{22} = K_{2}[y]/\left\langle y+2xy+1\right\rangle\). By Theorem 3, the number of LCP of cyclic 2-D codes having length \(3 \cdot 2\) over \(Z_{4}\) which are non-trivial is 7. Using Theorem 2, these codes are listed below:

  1. 1.

    \(C_{1} = T_{11} \oplus T_{12} \oplus T_{21} \oplus \{0\} = \left\langle y-1\right\rangle _{K_{1}} \oplus \left\langle y+1\right\rangle _{K_1} \oplus \left\langle 2xy+y+1\right\rangle _{K_2} \oplus \{0\}\) and \(D_{1} = \{0\} \oplus \{0\} \oplus \{0\} \oplus T_{22} = \{0\} \oplus \{0\} \oplus \{0\} \oplus \left\langle 2xy+y-1\right\rangle _{K_2}\).

  2. 2.

    \(C_{2} = T_{11} \oplus T_{12} \oplus \{0\} \oplus T_{22} = \left\langle y-1\right\rangle _{K_{1}} \oplus \left\langle y+1\right\rangle _{K_1} \oplus \{0\} \oplus \left\langle 2xy+y-1\right\rangle _{K_2}\) and \(D_{2} = \{0\} \oplus \{0\} \oplus T_{21} \oplus \{0\} = \{0\} \oplus \{0\} \oplus \left\langle 2xy+y+1\right\rangle _{K_2} \oplus \{0\}.\)

  3. 3.

    \(C_{3} = T_{11} \oplus \{0\} \oplus T_{21} \oplus T_{22} = \left\langle y-1\right\rangle _{K_{1}} \oplus \{0\} \oplus \left\langle 2xy+y+1\right\rangle _{K_2} \oplus \left\langle 2xy+y-1\right\rangle _{K_2}\) and \(D_{3} = \{0\} \oplus T_{12} \oplus \{0\} \oplus \{0\} = \{0\} \oplus \left\langle y+1\right\rangle _{K_1} \oplus \{0\} \oplus \{0\}\).

  4. 4.

    \(C_{4} = \{0\} \oplus T_{12} \oplus T_{21} \oplus T_{22} = \{0\} \oplus \left\langle y+1\right\rangle _{K_1} \oplus \left\langle 2xy+y+1\right\rangle _{K_2} \oplus \left\langle 2xy+y-1\right\rangle _{K_2}\) and \(D_{4} = T_{11} \oplus \{0\} \oplus \{0\} \oplus \{0\} = \left\langle y-1\right\rangle _{K_{1}} \oplus \{0\} \oplus \{0\} \oplus \{0\}\).

  5. 5.

    \(C_{5} = \{0\} \oplus \{0\} \oplus T_{21} \oplus T_{22} = \{0\} \oplus \{0\} \oplus \left\langle 2xy+y+1\right\rangle _{K_2} \oplus \left\langle 2xy+y-1\right\rangle _{K_2}\) and \(D_{5} = T_{11} \oplus T_{12} \oplus \{0\} \oplus \{0\} = \left\langle y-1\right\rangle _{K_{1}} \oplus \left\langle y+1\right\rangle _{K_1} \oplus \{0\} \oplus \{0\}\).

  6. 6.

    \(C_{6} = \{0\} \oplus T_{12} \oplus \{0\} \oplus T_{22} = \{0\} \oplus \left\langle y+1\right\rangle _{K_1} \oplus \{0\} \oplus \left\langle 2xy+y-1\right\rangle _{K_2}\) and \(D_{6} = T_{11} \oplus \{0\} \oplus T_{21} \oplus \{0\} = \left\langle y-1\right\rangle _{K_{1}} \oplus \{0\} \oplus \left\langle 2xy+y+1\right\rangle _{K_2} \oplus \{0\}\).

  7. 7.

    \(C_{7} = T_{11} \oplus \{0\} \oplus \{0\} \oplus T_{22} = \left\langle y-1\right\rangle _{K_{1}} \oplus \{0\} \oplus \{0\} \oplus \left\langle 2xy+y-1\right\rangle _{K_2}\) and \(D_{7} = \{0\} \oplus T_{12} \oplus T_{21} \oplus \{0\} = \{0\} \oplus \left\langle y+1\right\rangle _{K_1} \oplus \left\langle 2xy+y+1\right\rangle _{K_2} \oplus \{0\}.\)

Example 2

Let \(S = Z_{8}[x,y]/\left\langle x^2-1, y^2-1\right\rangle\). We have that \(x^2-1 = (x+1)(x-1)\) is a factorisation of \(x^2-1\) into maximum pairwse coprime monic polynomials in \(Z_{8}[x]\). Then \(S \cong \bigoplus _{i=1}^{2} K_{i}[y]/\left\langle y^2-1\right\rangle\), where \(K_{1} = Z_{8}[x]/\left\langle x+1\right\rangle = Z_{8}\) and \(K_{2} = Z_{8}[x]/\left\langle x-1 \right\rangle = Z_{8}\). Now, \(y^2-1 = (y-1)(y+1)\) in \(Z_{8}[y]\). Thus, \(S \cong \bigoplus _{i=1}^{2}(\bigoplus _{j=1}^{2} T_{ij})\), where \(T_{11}= Z_{8}[y]/\left\langle y+1\right\rangle = Z_{8}\), \(T_{12} = Z_{8}[y]/\left\langle y-1\right\rangle = Z_{8}\), \(T_{21} = Z_{8}[y]/\left\langle y+1\right\rangle = Z_{8}\) and \(T_{22} = Z_{8}[y]/\left\langle y-1\right\rangle = Z_{8}\). Thus, \(S \cong Z_{8} \oplus Z_{8} \oplus Z_{8} \oplus Z_{8}\). By Theorem 3, the number of LCP of cyclic 2-D codes having length \(2 \cdot 2\) over \(Z_{8}\) which are non-trivial is 7. Using Theorem 2, these codes are listed below:

  1. 1.

    \(C_{1} = \{(x_{1}, x_{2}, x_{3}, 0) ~ | ~ x_{i} \in Z_{8} \text { for i = 1, 2, 3}\}\) and \(D_{1} = \{(0, 0, 0, x_{4}) ~ | ~ x_{4} \in Z_{8}\}\).

  2. 2.

    \(C_{2} = \{(x_{1}, x_{2}, 0, x_{4}) ~ | ~ x_{i} \in Z_{8} \text { for i = 1, 2, 4}\}\) and \(D_{2} = \{(0, 0, x_{3}, 0) ~ | ~ x_{3} \in Z_{8}\}\).

  3. 3.

    \(C_{3} = \{(x_{1}, 0, x_{3}, x_{4}) ~ | ~ x_{i} \in Z_{8} \text { for i = 1, 3, 4}\}\) and \(D_{3} = \{(0, x_{2}, 0, 0) ~ | ~ x_{2} \in Z_{8}\}\).

  4. 4.

    \(C_{4} = \{(0, x_{2}, x_{3}, x_{4}) ~ | ~ x_{i} \in Z_{8} \text { for i = 2, 3, 4}\}\) and \(D_{4} = \{(x_{1}, 0, 0, 0) ~ | ~ x_{1} \in Z_{8}\}\).

  5. 5.

    \(C_{5} = \{(x_{1}, x_{2}, 0, 0) ~ | ~ x_{i} \in Z_{8} \text { for i = 1, 2}\}\) and \(D_{5} = \{(0, 0, x_{3}, x_{4}) ~ | ~ x_{i} \in Z_{8} \text { for i = 3, 4}\}\).

  6. 6.

    \(C_{6} = \{(x_{1}, 0, x_{3}, 0) ~ | ~ x_{i} \in Z_{8} \text { for i = 1, 3}\}\) and \(D_{6} = \{(0, x_{2}, 0, x_{4}) ~ | ~ x_{i} \in Z_{8} \text { for i = 2, 4}\}\).

  7. 7.

    \(C_{7} = \{(0, x_{2}, x_{3}, 0) ~ | ~ x_{i} \in Z_{8} \text { for i = 2, 3}\}\) and \(D_{7} = \{(x_{1}, 0, 0, x_{4}) ~ | ~ x_{i} \in Z_{8} \text { for i = 1, 4}\}\).

4 LCP of constacyclic 3-D codes over finite commutative rings

In this section, the results of Sect. 3 are generalized to \((\lambda _{1}, \lambda _{2}, \lambda _{3})\)-constacyclic 3-D codes over a finite commutative ring R. The CRT expression of a constacyclic 2-D code established in the above section is extended to a constacyclic 3-D code and is explained extensively as follows:

A \((\lambda _{1}, \lambda _{2}, \lambda _{3})\)-constacyclic 3-D code of length \(k_{1}k_{2}k_{3}\) is defined to be an ideal of the quotient ring

$$\begin{aligned} S = R[x_{1}, x_{2}, x_{3}]/\left\langle x_{_{1}}^{{k_{_{1}}}} - \lambda _{_{1}}, x_{_{2}}^{{k_{_{2}}}} -\lambda _{_{2}}, x_{_{3}}^{{k_{_{3}}}} - \lambda _{_{3}} \right\rangle . \end{aligned}$$

Clearly,

$$\begin{aligned} S \cong \dfrac{ R[x_{1}]/\left\langle x_{_{1}}^{{k_{_{1}}}} - \lambda _{_{1}}\right\rangle }{\left\langle x_{_{2}}^{k_{_{2}}} - \lambda _{_{2}}, x_{_{3}}^{k_{_{3}}} - \lambda _{_{3}} \right\rangle } [x_2, x_3]. \end{aligned}$$

Let \(x_{_{1}}^{{k_{_{1}}}} - \lambda _{_{1}} = {\displaystyle \prod _{i_{_{1}}=1}^{r} f_{i_{_{1}}}}\) be a factorization of \(x_{_{1}}^{{k_{_{1}}}} - \lambda _{_{1}}\) into maximum pairwise coprime monic polynomials in \(R[x_{1}]\). Applying CRT, we have that

$$\begin{aligned} S \cong \bigoplus _{i_{_{1}}=1}^{r}\dfrac{R[x_{1}]/ \left\langle f_{i_{_{1}}}\right\rangle }{\left\langle x_{_{2}}^{k_{_{2}}} - \lambda _{_{2}}, x_{_{3}}^{k_{_{3}}} - \lambda _{_{3}} \right\rangle }[x_{2},x_{3}] = \bigoplus _{i_{_{1}}=1}^{r}\dfrac{K_{i_{_{1}}}[x_{2}, x_{3}]}{\left\langle x_{_{2}}^{k_{_{2}}} - \lambda _{_{2}}, x_{_{3}}^{k_{_{3}}} - \lambda _{_{3}} \right\rangle }, \end{aligned}$$

where \(K_{i_{_{1}}} = R[x_{1}]/\left\langle f_{i_{_{1}}}\right\rangle\) for \(i_{_{1}} = 1,2,\ldots , r\).

Therefore, we can write

$$\begin{aligned} S \cong \bigoplus _{i_{_{1}}=1}^{r} \dfrac{K_{i_{_{1}}}[x_{2}]/\left\langle x_{_{2}}^{k_{_{2}}} - \lambda _{_{2}}\right\rangle }{\left\langle x_{_{3}}^{k_{_{3}}} - \lambda _{_{3}} \right\rangle } [x_{3}]. \end{aligned}$$

Now, let \(x_{_{2}}^{{k_{_{2}}}} - \lambda _{_{2}} = {\displaystyle \prod _{i_{_{2}}=1}^{r_{i_{_{1}}}} f_{i_{_{1}}i_{_{2}}}}\) be a factorization of \(x_{_{2}}^{{k_{_{2}}}} - \lambda _{_{2}}\) into maximum monic pairwise coprime polynomials over \(K_{i_{_{1}}}\) for \(i_{_{1}}= 1,2,\ldots ,r\). Then again by applying CRT,

$$\begin{aligned} S \cong \bigoplus _{i_{_{1}}=1}^{r} \bigoplus _{i_{_{2}}=1}^{r_{i_{_{1}}}} \dfrac{K_{i_{_{1}}}[x_{2}]/\left\langle f_{i_{_{1}}i_{_{2}}} \right\rangle }{\left\langle x_{_{3}}^{k_{_{3}}} - \lambda _{_{3}} \right\rangle }[x_{3}] =\bigoplus _{i_{_{1}}=1}^{r} \bigoplus _{i_{_{2}}=1}^{r_{i_{_{1}}}} \dfrac{K_{i_{_{1}}i_{_{2}}}[x_{3}]}{\left\langle x_{_{3}}^{k_{_{3}}} - \lambda _{_{3}} \right\rangle }, \end{aligned}$$

where \(K_{i_{_{1}}i_{_{2}}} = K_{i_{_{1}}}[x_{2}]/ \left\langle f_{i_{_{1}}i_{_{2}}}\right\rangle\) for \(i_{_{2}} = 1,2,\ldots ,r_{i_{_{1}}}.\)

Further, let \(x_{_{3}}^{k_{_{3}}} - \lambda _{_{3}} = {\displaystyle \prod _{i_{_{3}}=1}^{r_{_{i_{_{1}}i_{_{2}}}}} f_{i_{_{1}}i_{_{2}}i_{_{3}}}}\) be a factorization of \(x_{_{3}}^{{k_{_{3}}}} - \lambda _{_{3}}\) into maximum number of monic pairwise coprime polynomials over \(K_{i_{_{1}}i_{_{2}}}\) for \(i_{_{1}}= 1,2,\ldots ,r\) and \(i_{_{2}} = 1,2,\ldots ,r_{i_{_{1}}}\). By applying CRT, we have that

$$\begin{aligned} S&\cong \bigoplus _{i_{_{1}}=1}^{r} \bigoplus _{i_{_{2}}=1}^{r_{i_{_{1}}}} \bigoplus _{i_{_{3}}=1}^{r_{i_{_{1}}i_{_{2}}}} \dfrac{K_{i_{_{1}}i_{_{2}}}[x_{3}]}{\left\langle f_{i_{_{1}}i_{_{2}}i_{_{3}}} \right\rangle }\\&= \bigoplus _{i_{_{1}}=1}^{r} \bigoplus _{i_{_{2}}=1}^{r_{i_{_{1}}}} \bigoplus _{i_{_{3}}=1}^{r_{i_{_{1}}i_{_{2}}}} K_{i_{_{1}}i_{_{2}}i_{_{3}}} , \end{aligned}$$

where \(K_{i_{_{1}}i_{_{2}}i_{_{3}}} = K_{i_{_{1}}i_{_{2}}}[x_{3}]/\left\langle f_{i_{_{1}}i_{_{2}}i_{_{3}}}\right\rangle\) for \(i_{_{3}} = 1,2,\ldots ,r_{i_{_{1}}i_{_{2}}}.\)

It can be easily seen that if C is a \((\lambda _{1}, \lambda _{2},\lambda _{3})\)-constacyclic 3-D code of length \(k_{1}k_{2}k_{3}\) over R, then

$$\begin{aligned} C \cong \bigoplus _{i_{_{1}} =1}^{r} \bigoplus _{i_{_{2}} =1}^{r_{i_{_{1}}}}\bigoplus _{i_{_{3}} =1}^{r_{i_{_{1}} i_{_{2}}}} C_{i_{_{1}}i_{_{2}}i_{_{3}}}, \end{aligned}$$

where \(C_{i_{_{1}}i_{_{2}}i_{_{3}}}\) is an ideal of \(K_{i_{_{1}}i_{_{2}}i_{_{3}}}\).

Following results on constacyclic 3-D LCP of codes over R are generalizations of similar results on LCP of constacyclic 2-D codes proved in previous section. To avoid repetition, the proofs of these results have been omitted.

Theorem 4

Let C and D be \((\lambda _{1}, \lambda _{2},\lambda _{3})\)-constacyclic 3-D codes of length \(k_{1}k_{2}k_{3}\) over R. Let \(S = R[x_{1}, x_{2}, x_{3}]/\left\langle x_{_{1}}^{{k_{_{1}}}} - \lambda _{_{1}}, x_{_{2}}^{{k_{_{2}}}} - \lambda _{_{2}}, x_{_{3}}^{{k_{_{3}}}} - \lambda _{_{3}} \right\rangle \cong \bigoplus _{i_{_{1}}=1}^{r} \bigoplus _{i_{_{2}}=1}^{r_{i_{_{1}}}} \bigoplus _{i_{_{3}}=1}^{r_{i_{_{1}}i_{_{2}}}} K_{i_{_{1}}i_{_{2}} i_{_{3}}}, C \cong \bigoplus _{i_{_{1}}=1}^{r} \bigoplus _{i_{_{2}}=1}^{r_{i_{_{1}}}} \bigoplus _{i_{_{3}}=1}^{r_{i_{_{1}}i_{_{2}} }} C_{i_{_{1}}i_{_{2}}i_{_{3}}}\), \(D \cong \bigoplus _{i_{_{1}}=1}^{r} \bigoplus _{i_{_{2}}=1}^{r_{i_{_{1}}}} \bigoplus _{i_{_{3}}=1}^{r_{i_{_{1}}i_{_{2}}}} D_{i_{_{1}}i_{_{2}}i_{_{3}}}\) be the CRT expressions of SC and D respectively as described above. Then (CD) is an LCP of constacyclic 3-D codes over R if and only if \((C_{i_{_{1}}i_{_{2}}i_{_{3}}}, D_{i_{_{1}}i_{_{2}}i_{_{3}}} )\) is an LCP of codes over \(K_{i_{_{1}}i_{_{2}} i_{_{3}}}\). Moreover, \((C_{i_{_{1}}i_{_{2}}i_{_{3}}}, D_{i_{_{1}}i_{_{2}}i_{_{3}}} )\) over \(K_{i_{_{1}}i_{_{2}}i_{_{3}}}\) is always a trivial pair of LCP of codes.

Theorem 5

Let C and D be \((\lambda _{1}, \lambda _{2},\lambda _{3})\)-constacyclic 3-D codes of length \(k_{1}k_{2}k_{3}\) over R. Let \(S = R[x_{1}, x_{2}, x_{3}]/\left\langle x_{_{1}}^{{k_{_{1}}}} - \lambda _{_{1}}, x_{_{2}}^{{k_{_{2}}}} - \lambda _{_{2}}, x_{_{3}}^{{k_{_{3}}}} - \lambda _{_{3}} \right\rangle \cong \bigoplus _{i_{_{1}}=1}^{r} \bigoplus _{i_{_{2}}=1}^{r_{i_{_{1}}}} \bigoplus _{i_{_{3}}=1}^{r_{i_{_{1}}i_{_{2}}}} K_{i_{_{1}}i_{_{2}}i_{_{3}}}, C \cong \bigoplus _{i_{_{1}}=1}^{r} \bigoplus _{i_{_{2}}=1}^{r_{i_{_{1}}}} \bigoplus _{i_{_{3}}=1}^{r_{i_{_{1}}i_{_{2}}}} C_{i_{_{1}}i_{_{2}} i_{_{3}}}\), \(D \cong \bigoplus _{i_{_{1}}=1}^{r} \bigoplus _{i_{_{2}}=1}^{r_{i_{_{1}}}} \bigoplus _{i_{_{3}}=1}^{r_{i_{_{1}}i_{_{2}}}} D_{i_{_{1}}i_{_{2}} i_{_{3}}}\) be the CRT expressions of SC and D respectively. Then (CD) is an LCP of codes over R which is non-trivial if and only if there exist atleast two distinct tuples \((i_{_{1}},i_{_{2}},i_{_{3}})\) and \((j_{_{1}},j_{_{2}}, j_{_{3}})\) such that \(C_{i_{_{1}}i_{_{2}} i_{_{3}}} = K_{i_{_{1}}i_{_{2}} i_{_{3}}}\) and \(D_{j_{_{1}}j_{_{2}} j_{_{3}}} = K_{j_{_{1}}j_{_{2}} j_{_{3}}}.\)

Theorem 6

The number of LCP of \((\lambda _{1}, \lambda _{2},\lambda _{3})\)-constacyclic 3-D codes of length \(k_{1}k_{2}k_{3}\) over R which are non-trivial is given by

$$\begin{aligned} N = {\left\{ \begin{array}{ll} 0, &{}\text {for t = 1,}\\ 1, &{}\text {for t = 2,}\\ \sum _{i=1}^{(t-1)/2}\left( {\begin{array}{c}t\\ i\end{array}}\right) , &{} \text {for t odd, t}> 1,\\ \sum _{i=1}^{(t/2)-1}\left( {\begin{array}{c}t\\ i\end{array}}\right) + \left( {\begin{array}{c}t\\ t/2\end{array}}\right) /2,&\text {for t even, t} > 2, \end{array}\right. } \end{aligned}$$

where \(t = \sum _{i_{_{1}=1}}^{r} \sum _{i_{_{2}=1}}^{r_{i_{_{1}}}} r_{i_{_{1}}i_{_{2}}}.\)

Example 3

Consider cyclic 3-D codes of length \(2 \cdot 2 \cdot 2\) over \(Z_{9}\) as ideals of the ring \(S = Z_{9}[x_{1},x_{2},x_{3}]/\left\langle x_{1}^2-1, x_{2}^2-1, x_{3}^2-1\right\rangle\). We have that \(x_{1}^2-1 = (x_{1}+1)(x_{1}-1)\) is a factorisation of \(x_{1}^2-1\) into maximum pairwse coprime monic polynomials in \(Z_{9}[x_{1}]\). Then \(S \cong \bigoplus _{i_{_{1}}=1}^{2} K_{i_{_{1}}}[x_{2},x_{3}]/\left\langle x_{2}^2-1, x_{3}^2-1\right\rangle\), where \(K_{1} = Z_{9}[x_{1}]/\left\langle x_{1}+1\right\rangle = Z_{9}\) and \(K_{2} = Z_{9}[x]/\left\langle x_{1}-1 \right\rangle = Z_{9}\). Now, \(x_{2}^2-1 = (x_{2}-1)(x_{2}+1)\) in \(Z_{9}[x_{2}]\). Thus, \(S \cong \bigoplus _{i_{_{1}}=1}^{2}\bigoplus _{i_{_{2}}=1}^{2} K_{_{i_{_{1}}i_{_{2}}}}[x_{3}]/\left\langle x_{3}^2-1 \right\rangle\), where \(K_{11}= Z_{9}[x_{2}]/\left\langle x_{2}+1\right\rangle = Z_{9}\), \(K_{12} = Z_{9}[y]/\left\langle x_{2}-1\right\rangle = Z_{9}\), \(K_{21} = Z_{9}[y]/\left\langle x_{2}+1\right\rangle = Z_{9}\) and \(K_{22} = Z_{9}[y]/\left\langle x_{2}-1\right\rangle = Z_{9}\). Also, \(x_{3}^2-1 = (x_{3}+1)(x_{3}-1)\) in \(Z_{9}[x_{3}]\). Therefore, \(S \cong \bigoplus _{i_{_{1}}=1}^{2} \bigoplus _{i_{_{2}}=1}^{2}\bigoplus _{i_{_{3}} =1}^{2}K_{_{i_{_{1}}i_{_{2}}i_{_{3}}}},\) where \(K_{_{i_{_{1}}i_{_{2}}i_{_{3}}}} = Z_{9}\) for each \(i_{_{1}}, i_{_{2}}, i_{_{3}} \in \{1,2\}\). Thus, we have \(S \cong Z_{9} \oplus Z_{9} \oplus Z_{9} \oplus Z_{9} \oplus Z_{9} \oplus Z_{9} \oplus Z_{9} \oplus Z_{9}\). By Theorem 6, the number of LCP of cyclic 3-D codes having length \(2 \cdot 2 \cdot 2\) over \(Z_{9}\) which are non-trivial is 127. A few of them are listed below:

  1. 1.

    \(C_{1} = \{(a_{1}, a_{2}, a_{3}, a_{4}, a_{5}, a_{6}, a_{7}, 0) ~ | ~ a_{i} \in Z_{9} \text { for i = 1, 2,} \cdots ,7\}\) and \(D_{1} = \{(0, 0, 0, 0, 0, 0, 0, a_{8}) ~ | ~ a_{8} \in Z_{9}\}\).

  2. 2.

    \(C_{2} = \{(a_{1}, a_{2}, a_{3}, a_{4}, a_{5}, a_{6}, 0, 0) ~ | ~ a_{i} \in Z_{9} \text { for i = 1, 2,} \cdots ,6\}\) and \(D_{2} = \{(0, 0, 0, 0, 0, 0, a_{7}, a_{8}) ~ | ~ a_{i} \in Z_{9} \text { for i = 7,8}\}\).

  3. 3.

    \(C_{3} = \{(a_{1}, a_{2}, a_{3}, a_{4}, a_{5}, 0, 0, 0) ~ | ~ a_{i} \in Z_{9} \text { for i = 1, 2,} \cdots ,5\}\) and \(D_{3} = \{(0, 0, 0, 0, 0, a_{6}, a_{7}, a_{8}) ~ | ~ a_{i} \in Z_{9} \text { for i = 6, 7, 8}\}\).

  4. 4.

    \(C_{4} = \{(a_{1}, a_{2}, a_{3}, a_{4}, 0, 0, 0, 0) ~ | ~ a_{i} \in Z_{9} \text { for i = 1, 2, 3, 4}\}\) and \(D_{4} = \{(0, 0, 0, 0, a_{5}, a_{6}, a_{7}, a_{8}) ~ | ~ a_{i} \in Z_{9} \text { for i = 5, 6, 7, 8}\}\).

A \((\lambda _{1}, \lambda _{2},\ldots ,\lambda _{n})\)-constacyclic n-D code of length \(k_{1}k_{2}\cdots k_{n}\) is defined as an ideal of \(R[x_{1}, x_{2},\ldots , x_{n}]/\left\langle x_{_{1}}^{{k_{_{1}}}} - \lambda _{_{1}}, x_{_{2}}^{{k_{_{2}}}} - \lambda _{_{2}},\ldots , x_{_{n}}^{{k_{_{n}}}} - \lambda _{_{n}} \right\rangle .\) Proceeding in a similar manner as above, the CRT expression for a constacyclic n-D code over a finite commutative ring can be derived. Subsequently, the results can be extended to LCP of constacyclic n-D codes, \(n \ge 3\), over finite commutative rings.

5 LCP of constacyclic 2-D codes over finite chain rings

In this section, existence of non-trivial LCP of \((\lambda , \delta )\)-constacyclic 2-D codes of length \(k_{1}k_{2}\) over a finite commutative chain ring is obtained. Let us recall some results before proceeding further.

Proposition 1

([26, 27]): Let R be a finite commutative chain ring with maximal ideal \(<\gamma>\) and nilpotency index \(\nu\). Then, we have the following:

  1. (a)

    There exists an element \(\xi \in R\) with multiplicative order \(p^{m}-1\), where p is a prime, such that every element \(r \in R\) can be uniquely expressed as r = \(r_{0} + r_{1}\gamma +\cdots + r_{\nu -1}\gamma ^{\nu -1}\), where \(r_{i} \ \in \ T\) = \({\{0,1,\xi ,\ldots , \xi ^{p^{m}-2}}\}\) is the Teichmüller set of R.

  2. (b)

    Let r = \(r_{0} + r_{1}\gamma +\cdots + r_{\nu -1}\gamma ^{\nu -1}\) where \(r_{i} \ \in \ T\), \(0 \le i \le \nu -1\). Then r is a unit in R if and only if \(r_{0} \ne 0\). Moreover, there exists an element \(\alpha _{0} \in T\) such that \(r_{0}\) = \(\alpha _{0}^{p^{s}}\).

Theorem 7

(Theorem 7, [28]) Let \(\alpha = \alpha _{0}^{p^s} + \gamma \alpha _{1} + \cdots + \gamma ^{\nu -1} \alpha _{\nu -1}\), where \(\alpha _{0}, \alpha _{1}, \ldots , \alpha _{\nu -1} \in T\) and \(\alpha _{0} \ne 0\). Then the quotient ring \(R[x]/\left\langle x^{p^s}-\alpha \right\rangle\) is a chain ring if and only if \(\alpha _{1} \ne 0\).

Theorem 8

(Theorem 1, [16]) A non-trivial LCP of \(\lambda\)-constacyclic codes of length n over a finite chain ring R exists if and only if \(x^{n}-\overline{\lambda } = f(x)g(x)\), where f(x) and g(x) are monic, coprime polynomials of degree \(\ge 1\) over the residue field K.

Corollary 1

(Corollary 1, [16]) There does not exist any non-trivial LCP of \(\lambda\)-constacyclic codes of length \(p^{s}\) over a finite chain ring R with residue field K of characteristic p.

Let R be a finite commutative chain ring with nilpotency index \(\nu\) and \(\gamma\) be the generator of its maximal ideal. Let K be the residue field of R with characteristic p. Let \(\lambda\) and \(\delta\) be units in R.

The ring \(S = R[x,y]/\left\langle x^{k_{1}}-\lambda , y^{k_{2}}-\delta \right\rangle \cong \dfrac{R_{1}[y]}{\left\langle y^{k_{2}}-\delta \right\rangle }\), where \(R_{1} = R[x]/\left\langle x^{k_{1}}-\lambda \right\rangle\). Let \(k_{1} = p^{s_{1}}\) for some \(s_{1} > 0\). By Proposition 1, \(\lambda = \beta _{0}^ {\ p^{s_{1}}} + \gamma \beta _{1}+\cdots + \gamma ^{\nu -1} \beta _{\nu -1}\), where \(\beta _{0}, \beta _{1}, \cdots , \beta _{\nu -1} \in T\) and \(\beta _{0} \ne 0\). Let \(\beta _{1} \ne 0\). Therefore, by Theorem 7, \(R_{1}\) is a finite chain ring. Let a(x) be the generator of its maximal ideal and \(K_{1} = R_{1}/\left\langle a(x) \right\rangle\) be its residue field. Let \(\phi _{1}: R_{1} \longrightarrow K_{1}\) be an onto homomorphism defined by \(\phi _{1}(r(x)) = r(x) (mod \ a(x))\) for each \(r(x) \in R_{1}\). It is easy to see that \(K_{1} = K.\)

A \((\lambda , \delta )\)-constacyclic 2-D code of length \(k_{1}k_{2}\) can be considered as a \(\delta\)-constacyclic code of length \(k_{2}\) over \(R_{1}\). Thus, by Theorem 8, we have the following result which provides a necessary and sufficient condition for existence of a non-trivial LCP of constacyclic 2-D codes over a finite chain ring R with residue field K.

Theorem 9

Let R be a finite chain ring with residue field K of characteristic p. Let \(k_{1} = p^{s_{1}}\) for some \(s_{1} > 0\) and \(\lambda = \beta _{0}^ {\ p^{s_{1}}} + \gamma \beta _{1}+\cdots + \gamma ^{\nu -1} \beta _{\nu -1}\), where \(\beta _{0}, \beta _{1}, \cdots , \beta _{\nu -1} \in T, \beta _{0} \ne 0\) and \(\beta _{1} \ne 0\). A non-trivial LCP of \((\lambda , \delta )\)-constacyclic 2-D codes of length \(k_{1}k_{2}\) over R exists if and only if \(y^{k_{2}}-\phi _{1}(\delta ) = f(y)(g(y),\) where f(y) and g(y) are monic, coprime polynomials of degree \(\ge 1\) in K[y].

Analogously, \(S \cong \dfrac{R_{2}[x]}{\left\langle x^{k_{1}}-\lambda \right\rangle }\), where \(R_{2} = R[y]/\left\langle y^{k_{2}}-\delta \right\rangle .\) Let \(k_{2}= p^{s_{2}}\) for some \(s_{2}>0.\) By Proposition 1, \(\delta = \delta _{0}^ {\ p^{s_{1}}} + \gamma \delta _{1}+\cdots + \gamma ^{\nu -1} \delta _{\nu -1}\), where \(\delta _{0}, \delta _{1}, \cdots , \delta _{\nu -1} \in T\) and \(\delta _{0} \ne 0\). Let \(\delta _{1} \ne 0\). Therefore, by Theorem 7, \(R_{2}\) is a finite chain ring. Let b(y) be the generator of its maximal ideal and \(K_{2} = R_{2}/\left\langle b(y) \right\rangle\) be the residue field. Let the map \(\phi _{2}: R_{2} \longrightarrow R_{2}/ \left\langle b(y) \right\rangle\) be defined by \(\phi _{2} (s(y)) = s(y) (mod \ b(y))\) for each \(s(y) \in R_{2}\). Again, it is easy to see that \(K_{2} = K.\)

Now, a \((\lambda , \delta )\)-constacyclic 2-D code of length \(k_{1}k_{2}\) can also be considered as a \(\lambda\)-constacyclic code of length \(k_{1}\) over the ring \(R_{2}\). Thus, by Theorem 8, we have the following result.

Theorem 10

Let R be a finite chain ring with residue field K of characteristic p. Let \(k_{2} = p^{s_{2}}\) for some \(s_{2} > 0\) and \(\delta = \delta _{0}^ {\ p^{s_{2}}} + \gamma \delta _{1}+\cdots + \gamma ^{\nu -1} \delta _{\nu -1}\), where \(\delta _{0}, \delta _{1}, \cdots , \delta _{\nu -1} \in T, \delta _{0} \ne 0\) and \(\delta _{1} \ne 0\). A non-trivial LCP of \((\lambda , \delta )\)-constacyclic 2-D codes of length \(k_{1}k_{2}\) over R exists if and only if \(x^{k_{1}}-\phi _{2}(\lambda ) = F(x)G(x)\), where F(x) and G(x) are monic, coprime polynomials of degree \(\ge 1\) in K[x].

Example 4

Consider (3,1)-constacyclic 2-D codes of length \(2 \times 3\) over the ring \(Z_{4}\) with residue field \(Z_{2}\). Then, the ring \(S = \dfrac{Z_{4}[x,y]}{\left\langle x^{2}-3, y^{3}-1 \right\rangle }, R_{1}= Z_{4}[x]/\left\langle x^{2}-3\right\rangle\) and \(R_{2} = Z_{4}[y]/\left\langle y^{3}-1 \right\rangle\). Note that by Theorem 7, \(R_{1}\) is a finite chain ring and \(R_{2}\) is not a finite chain ring. Also, \(y^{3}-1 = (y+1)(y^2+y+1)\) in \(Z_{2}[y]\) is a factorization of \(y^3-1\) into pairwise coprime, monic polynomials of degree \(\ge 1\). Thus, by Theorem 9, non-trivial LCP of (3,1)-constacyclic 2-D codes of length \(2\times 3\) exists over \(Z_{4}\).

Following Corollary is an immediate consequence of Theorem 7, Corollary 1 and the fact that a \((\lambda , \delta )\)-constacyclic 2-D code of length \(p^{s_{1}}p^{s_{2}}\) can be considered as a \(\delta\)-constacyclic code of length \(p^{s_{2}}\) over \(R_{1}\) as well as a \(\lambda\)-constacyclic code of length \(p^{s_{1}}\) over the ring \(R_{2}\).

Corollary 2

Let R be a finite chain ring with residue field K of characteristic p. Let \(\lambda = \beta _{0}^ {\ p^{s_{1}}} + \gamma \beta _{1}+\cdots + \gamma ^{\nu -1} \beta _{\nu -1}\), where \(\beta _{0}, \beta _{1}, \cdots , \beta _{\nu -1} \in T, \beta _{0} \ne 0\) and \(\delta = \delta _{0}^ {\ p^{s_{2}}} + \gamma \delta _{1}+\cdots + \gamma ^{\nu -1} \delta _{\nu -1}\), where \(\delta _{0}, \delta _{1}, \cdots , \delta _{\nu -1} \in T, \delta _{0} \ne 0\). There does not exist any non-trivial LCP of \((\lambda , \delta )\)-constacyclic 2-D codes of length \(p^{s_{1}}p^{s_{2}}\) over R if either \(\beta _{1} \ne 0\) or \(\delta _{1} \ne 0\).

Proof

Suppose \(\beta _{1} \ne 0\). By Theorem 7, \(R_{1}\) is a finite chain ring. Considering a \((\lambda , \delta )\)-constacyclic 2-D code of length \(p^{s_{1}}p^{s_{2}}\) as a \(\delta\)-constacyclic code of length \(p^{s_{2}}\) over the ring \(R_{1}\) and applying Corollary 1, we get the desired result. Similarly, if \(\delta _{1} \ne 0\), \(R_{2}\) is a finite chain ring. Now, consider a \((\lambda , \delta )\)-constacyclic 2-D code of length \(p^{s_{1}}p^{s_{2}}\) as a \(\lambda\)-constacyclic code of length \(p^{s_{1}}\) over the ring \(R_{2}\). Therefore, by Corollary 1, we get the desired result.

6 Conclusion

In this paper, LCP of constacyclic n-D codes over a finite commutative ring R have been studied. In this direction, a necessary as well as sufficient condition for a pair of constacyclic 2-D codes over R to be an LCP of codes has been obtained. Moreover, a characterization of all non-trivial LCP of constacyclic 2-D codes over R has been given. Furthermore, total number of such codes has also been determined. Using the obtained results, a few examples of LCP of constacyclic 2-D codes over some finite commutative rings have been given. Finally, these results have been extended to constacyclic 3-D codes over finite commutative rings. The obtained results readily extend to constacyclic n-D codes, \(n \ge 3\), over finite commutative rings. In particular, necessary and sufficient conditions for existence of a non-trivial LCP of constacyclic 2-D codes over finite chain rings have been obtained.