1 Introduction

Abualrub and Oehmk in [1] determined the generators for cyclic codes over \({\mathbb {Z}}_4\) for lengths of the form \(2^k\), and Blackford in [2] presented the generators for cyclic codes over \({\mathbb {Z}}_4\) for lengths of the form 2n where n is odd. The case for odd n follows from results in [3] and also appears in more detail in [5]. Dougherty and Ling in [4] determined the structure of cyclic codes over \({\mathbb {Z}}_4\) for arbitrary even length giving the generator polynomial for these codes, described the number and dual codes of cyclic codes for a given length and presented the form of cyclic codes that are self-dual.

A code over a ring R of length N is a nonempty subset \({\mathcal {C}}\) of \(R^N\). The code \({\mathcal {C}}\) is said to be linear if \({\mathcal {C}}\) is an R-submodule. All codes in this paper are assumed to be linear unless otherwise specified. The ambient space \(R^N\) is equipped with the usual Euclidian inner product, i.e., \([a,b]=\sum _{j=0}^{N-1}a_jb_j\), where \(a=(a_0,a_1,\ldots ,a_{N-1}), b=(b_0,b_1,\ldots ,b_{N-1})\in R^N\), and the dual code is defined by \({\mathcal {C}}^{\bot }=\{a\in R^N\mid [a,b]=0, \forall b\in {\mathcal {C}}\}\). If \({\mathcal {C}}^{\bot }={\mathcal {C}}\), \({\mathcal {C}}\) is called a self-dual code over R. Let \(\zeta \) be an invertible element of R. \({\mathcal {C}}\) is said to be \(\zeta \) -constacyclic if \((c_0,c_1,\ldots , c_{N-1})\in {\mathcal {C}}\) implies \((\zeta c_{N-1}, c_0,c_1,\ldots , c_{N-2})\in {\mathcal {C}}\). Particularly, \({\mathcal {C}}\) is called a negacyclic code if \(\zeta =-1\), and \({\mathcal {C}}\) is called a cyclic code if \(\zeta =1\). We use the natural connection of \(\zeta \)-constacyclic codes to polynomial rings, where \(c=(c_0,c_1,\ldots , c_{N-1})\) is viewed as \(c(x)=\sum _{j=0}^{N-1}c_jx^j\) and the \(\zeta \)-constacyclic code \({\mathcal {C}}\) is an ideal in the polynomial residue ring \(R[x]/\langle x^N-\zeta \rangle \).

Let \(N=2^kn\) where n is odd and k a positive integer. Then cyclic codes over \({\mathbb {Z}}_4\) of length N are viewed as ideals of the ring \({\mathbb {Z}}_4[x]/\langle x^{N}-1\rangle \). Let m be a positive integer, and h(x) a monic basic irreducible polynomial in \({\mathbb {Z}}_4\) of degree m that divides \(x^{2^{m}-1}-1\). As in [4], we denote \(\mathrm{GR}(4,m)={\mathbb {Z}}_4[x]/\langle h(x)\rangle \), which is an extension Galois ring of \({\mathbb {Z}}_4\) with cardinality \(4^m\), and set \(R_4(u,m)=\mathrm{GR}(4,m)[u]/\langle u^{2^k}-1\rangle \). The main important contribution in [4] is the complete description for cyclic codes over \(\mathrm{GR}(4,m)\) of length \(2^k\), i.e., ideals of the ring \(R_4(u,m)\). Then ideals of the ring \({\mathbb {Z}}_4[x]/\langle x^{N}-1\rangle \) are described by a ring isomorphism from \({\mathbb {Z}}_4[x]/\langle x^{N}-1\rangle \) onto \(\oplus _{\alpha \in J}R_4(u,m_\alpha )\) (see [4, Theorem 3.2]) using a discrete Fourier transformation, and then connecting cyclic codes over \({\mathbb {Z}}_4\) of length N to a direction sum of some cyclic codes over \(\mathrm{GR}(4,m_\alpha )\) of length \(2^k\) (see [4, Corollary 3.3]). But the expressions for codes in [4] are not clear enough for the purpose of designing and encoding codes.

In this paper, we focus our attention on cyclic codes of length 4n where n is odd, and attempt to give a precise description for these cyclic codes over \({\mathbb {Z}}_4\) in terms of concatenated structure of codes. By use of this description, one can easily to design codes for their requirements and encode presented codes by constructing their generator matrices from the concatenated structure directly.

The present paper is organized as follows. In Sect. 2, we present a canonical form decomposition for every cyclic code over \({\mathbb {Z}}_4\) of length \(2^kn\), where each subcode is concatenated by a basic irreducible cyclic code over \({\mathbb {Z}}_4\) of length n as the inner code and a constacyclic code over a Galois extension ring over \({\mathbb {Z}}_4\) of length \(2^k\) as the outer code. In Sect. 3, we give a precise description for each cyclic code by determining its outer code when \(k=2\). Using the canonical form decomposition, we present dual codes and investigate self-duality in Sect. 4. Finally, we list all self-dual cyclic codes over \({\mathbb {Z}}_4\) of length 28 and 60 in Sect. 5.

2 The concatenated structure of cyclic codes over \({\mathbb {Z}}_{4}\) of length \(2^kn\)

In this section, we give a canonical form decomposition for every cyclic code over \({\mathbb {Z}}_4\) of length \(2^kn\) where n is odd.

It is known that any element a of \({\mathbb {Z}}_4\) is unique expressed as \(a=a_0+2a_1\) where \(a_0,a_1\in {\mathbb {F}}_2=\{0,1\}\) in which we regard \( {\mathbb {F}}_2\) as a subset of \({\mathbb {Z}}_4\). Denote \(\overline{a}=a_0\in {\mathbb {F}}_2\). Then \(^{-}: a\mapsto \overline{a}\) (\(\forall a\in {\mathbb {Z}}_4\)) is a surjective ring homomorphism from \({\mathbb {Z}}_4\) onto \({\mathbb {F}}_2\), and \(^{-}\) can be extended to a surjective ring homomorphism from \({\mathbb {Z}}_4[x]\) onto \({\mathbb {F}}_2[x]\) by \(\overline{f}(x)=\overline{f(x)}=\sum _{i=0}^m\overline{b}_ix^i\) for any \(f(x)=\sum _{i=0}^mb_ix^i\in {\mathbb {Z}}_4[x]\). Recall that a monic polynomial \(f(x)\in {\mathbb {Z}}_4[x]\) of positive degree is said to be basic irreducible if \(\overline{f}(x)\) is an irreducible polynomial in \({\mathbb {F}}_2[x]\) (cf. [7, Chapter 5]). In the rest of this paper, we adopt the following notations.

Notation 2.1

Let n be an odd positive integer, denote \({\mathcal {A}}={\mathbb {Z}}_4[y]/\langle y^n-1\rangle \) and assume

$$\begin{aligned} y^n-1=f_1(y)f_2(y)\ldots f_r(y), \end{aligned}$$
(1)

where \(f_1(y),f_2(y),\ldots , f_r(y)\) are pairwise coprime monic basic irreducible polynomials in \({\mathbb {Z}}_4[y]\). We assume \(\mathrm{deg}(f_i(y))=m_i\) and denote \(R_i={\mathbb {Z}}_4[y]/\langle f_i(y)\rangle =\{\sum _{j=0}^{m_i-1}b_jy^j\mid b_0,b_1,\ldots ,b_{m_i-1}\in {\mathbb {Z}}_4\}\), for all \(i=1,\ldots ,r\).

For each integer i, \(1\le i\le r\), by [7, Chapter 6] we know that \(R_i\) is a Galois ring of characteristic 4 and cardinality \(4^{m_i}\) with the usual polynomial addition and multiplication modulo \(f_i(y)\). The Teichmüller set of \(R_i\) is

$$\begin{aligned} {\mathcal {T}}_i=\left\{ \sum _{j=0}^{m_i-1}t_jy^j\mid t_0,t_1,\ldots ,t_{m_i-1}\in {\mathbb {F}}_2\right\} , \end{aligned}$$

and every element \(\alpha \) of \(R_i\) has a unique 2-adic expansion: \(\alpha =r_0+2r_1\), \(r_0,r_1\in {\mathcal {T}}_i\). Moreover, \(\alpha \) is invertible if and only if \(r_0\ne 0\).

Denote \(F_i(y)=\frac{y^n-1}{f_i(y)}\in {\mathbb {Z}}_4[y]\) in the following. Since \(F_i(y)\) and \(f_i(y)\) are coprime, there are polynomials \(u_i(y), v_i(y)\in {\mathbb {Z}}_4[y]\) such that \(u_i(y)F_i(y)+v_i(y)f_i(y)=1\). In the rest of this paper, we denote by \(\varepsilon _i(y)\) the unique element of \({\mathcal {A}}\) satisfying

$$\begin{aligned} \varepsilon _i(y)\equiv u_i(y)F_i(y)=1-v_i(y)f_i(y) \ \left( \mathrm{mod} \ y^n-1\right) . \end{aligned}$$
(2)

Then from classical ring theory, we deduce the following lemma.

Lemma 2.2

(cf. [6, Theorem 2.7]) The ring \({\mathcal {A}}\) satisfies the following properties.

  1. (i)

    \(\varepsilon _1(y)+\cdots +\varepsilon _r(y)=1\), \(\varepsilon _i(y)^2=\varepsilon _i(y)\) and \(\varepsilon _i(y)\varepsilon _j(y)=0\) for all \(1\le i\ne j\le r\).

  2. (ii)

    \({\mathcal {A}}={\mathcal {A}}_1\oplus \cdots \oplus {\mathcal {A}}_r\), where \({\mathcal {A}}_i=\varepsilon _i(y){\mathcal {A}}\) is a ring with multiplicative identity \(\varepsilon _i(y)\). Moreover, this decomposition is a direct sum of rings in that \({\mathcal {A}}_i{\mathcal {A}}_j=\{0\}\) for all i and j, \(1\le i\ne j\le r\).

  3. (iii)

    For each \(1\le i\le r\), define a mapping \(\varphi _i: g(y)\mapsto \varepsilon _i(y)g(y)\) \((\forall g(y)\in R_i)\). Then \(\varphi _i\) is a ring isomorphism from \(R_i\) onto \({\mathcal {A}}_i\). Hence \(|{\mathcal {A}}_i|=4^{m_i}\).

  4. (iv)

    For each \(1\le i\le r\), \({\mathcal {A}}_i\) is a basic irreducible cyclic code over \({\mathbb {Z}}_4\) of length n having parity check polynomial \(f_i(y)\).

For convenience and self-sufficiency of the paper, we restate the concatenated structure of codes over rings.

Definition 2.3

Using the notations above, let C be a linear code over \(R_i\) of length l, i.e., C is an \(R_i\)-submodule of \(R_i^l=\{(r_0,r_1,\ldots , r_{l-1})\) \(\mid r_j\in R_i, \ j=0,1,\ldots ,l-1\}\). The concatenated code of \({\mathcal {A}}_i\) and C is defined by

$$\begin{aligned} {\mathcal {A}}_i\Box _{\varphi _i}C=\{(\varphi _i(c_0),\varphi _i(c_1),\ldots ,\varphi _{i}(c_{l-1}))\mid (c_0,c_1,\ldots ,c_{l-1})\in C\}\subseteq {\mathbb {Z}}_4^{nl}, \end{aligned}$$

where the cyclic code \({\mathcal {A}}_i\) over \({\mathbb {Z}}_4\) of length n is called the inner code and C is called the outer code.

Lemma 2.4

\({\mathcal {A}}_i\Box _{\varphi _i}C\) is a linear code over \({\mathbb {Z}}_4\) of length nl. The number of codewords in this concatenated code is equal to \(|{\mathcal {A}}_i\Box _{\varphi _i}C|=|C|\) and

$$\begin{aligned} d_{\mathrm{min}}({\mathcal {A}}_i\Box _{\varphi _i}C)\ge d_{\mathrm{min}}({\mathcal {A}}_i)\cdot d_{\mathrm{min}}(C), \end{aligned}$$

where \(d_{\mathrm{min}}({\mathcal {A}}_i\Box _{\varphi _i}C)\) is the minimum distance of \({\mathcal {A}}_i\Box _{\varphi _i}C\) as a linear code over \({\mathbb {Z}}_4\), \(d_{\mathrm{min}}({\mathcal {A}}_i)\) is the minimum distance of \({\mathcal {A}}_i\) as a linear code over \({\mathbb {Z}}_4\) of length n and \(d_{\mathrm{min}}(C)\) is the minimum distance of C as a linear code over the Galois ring \(R_i\) of length l.

Proof

Every nonzero codeword \(\xi \) in \({\mathcal {A}}_i\Box _{\varphi _i}C\) is given by \(\xi =(\varphi _i(c_0),\varphi _i(c_1),\ldots , \varphi _{i}(c_{l-1}))\) with \(c=(c_0,c_1,\ldots ,c_{l-1})\in C\subseteq R_i^l\) and \(c\ne 0\). Then the Hamming weight \(\mathrm{w}_H(c)\) of c satisfies \(\mathrm{w}_H(c)=|\{i\mid c_i\ne 0, \ i=0,1,\ldots ,l-1\}|\ge d_{\mathrm{min}}(C)\). Now, let \(\mathrm{w}_H(\varphi _i(c_i))\) be the Hamming weight of \(\varphi _i(c_i)\in {\mathcal {A}}_i\subseteq {\mathcal {A}} ={\mathbb {Z}}_4[y]/\langle y^n-1\rangle \) (in which we regard \(\varphi _i(c_i)\) as a vector in \({\mathbb {Z}}_4^n\)). Then \(\mathrm{w}_H(\varphi _i(c_i))\ge d_{\mathrm{min}}({\mathcal {A}}_i)\) for all \(c_i\ne 0\), \(0\le i\le l-1\). Therefore, as a vector in \({\mathbb {Z}}_4^{nl}\) the Hamming weight of \(\xi \) satisfies

$$\begin{aligned} \mathrm{w}_H(\xi )=\sum _{c_i\ne 0, \ 0\le i\le l-1}\mathrm{w}_H(\varphi _i(c_i))\ge \mathrm{w}_H(c)\cdot d_{\mathrm{min}}({\mathcal {A}}_i) \ge d_{\mathrm{min}}(C)\cdot d_{\mathrm{min}}({\mathcal {A}}_i). \end{aligned}$$

Hence \(d_{\mathrm{min}}({\mathcal {A}}_i\Box _{\varphi _i}C)\ge d_{\mathrm{min}}({\mathcal {A}}_i)\cdot d_{\mathrm{min}}(C)\). \(\square \)

By the following lemma, we see that a generator matrix of the concatenated code \({\mathcal {A}}_i\Box _{\varphi _i}C\) as a \({\mathbb {Z}}_4\)-submodule can be constructed from a generator matrix of the cyclic code \({\mathcal {A}}_i\) over \({\mathbb {Z}}_4\) and a generator matrix of the linear code C over \(R_i\) straightforwardly.

Theorem 2.5

Let \(\varepsilon _i(y)=\sum _{j=0}^{n-1}e_{i,j}y^j\) with \(e_{i,j}\in {\mathbb {Z}}_4\), and C be a linear code over the Galois ring \(R_i\) of length l with a generator matrix \(G_C=(\alpha _{j,s})_{1\le j\le t, 1\le s\le l}\) where \(\alpha _{j,s}\in R_i\), i.e., C is an \(R_i\)-submodule of \(R_i^l\) generated by the row vectors of \(G_{C}\). Then we have the following

  1. (i)

    A generator matrix of the cyclic code \({\mathcal {A}}_i\) over \({\mathbb {Z}}_4\) of length n is given by

    $$\begin{aligned} G_{{\mathcal {A}}_i}=\left( \begin{array}{c@{\quad }c@{\quad }c@{\quad }c@{\quad }c}e_{i,0} &{} e_{i,1} &{} \ldots &{} e_{i,n-2} &{} e_{i,n-1}\\ e_{i,n-1} &{} e_{i,0} &{} \ldots &{} e_{i,n-3} &{} e_{i,n-2}\\ \ldots &{}\ldots &{}\ldots &{}\ldots &{}\ldots \\ e_{i,n-m_i+1} &{} e_{i,n-m_i+2} &{} \ldots &{} e_{i,n-m_i-1} &{} e_{i,n-m_i} \end{array}\right) . \end{aligned}$$
  2. (ii)

    Assume \(f_i(y)=\sum _{j=0}^{m_i}f_{i,j}y^j\) with \(f_{i,j}\in {\mathbb {Z}}_{4}\) and \(f_{i,m_i}=1\), and let \(M_{f_i}=\left( \begin{array}{c@{\quad }c}0&{} I_{m_i-1}\\ -f_{i,0} &{} V_i\end{array}\right) \) be the companion matrix of \(f_i(y)\) where \(I_{m_i-1}\) is the identity matrix of order \(m_i-1\) and \(V_i=(-f_{i,1},\ldots ,-f_{i,m_i-1})\). For any \(\alpha =\alpha (y)=\sum _{j=0}^{m_i-1}r_jy^j\in R_i\) with \(r_j\in {\mathbb {Z}}_{4}\), denote \(A_{\alpha }=\alpha (M_{f_i})=\sum _{j=0}^{m_i-1}r_j(M_{f_i})^j\in \mathrm{M}_{m_i\times m_i}({\mathbb {Z}}_{4})\) in the rest of the paper. Then

    $$\begin{aligned} \alpha Y=A_{\alpha }Y, \ \mathrm{where} \ Y=\left( \begin{array}{c}1\\ y\\ \ldots \\ y^{m_i-1}\end{array}\right) . \end{aligned}$$
  3. (iii)

    Let \(G_C=(\alpha _{j,s})_{1\le j\le t, 1\le s\le l}\) with \(\alpha _{j,s}\in R_i\). Then a generator matrix of the concatenated code \({\mathcal {A}}_i\Box _{\varphi _i}C\) is given by

    $$\begin{aligned} G_{{\mathcal {A}}_i\Box _{\varphi _i}C}=\left( \begin{array}{c@{\quad }c@{\quad }c}A_{\alpha _{1,1}}G_{{\mathcal {A}}_i} &{} \ldots &{} A_{\alpha _{1,l}}G_{{\mathcal {A}}_i}\\ \ldots &{} \ldots &{} \ldots \\ A_{\alpha _{t,1}}G_{{\mathcal {A}}_i} &{} \ldots &{} A_{\alpha _{t,l}}G_{{\mathcal {A}}_i}\end{array}\right) . \end{aligned}$$

Hence \({\mathcal {A}}_i\Box _{\varphi _i}C=\{\underline{w}G_{{\mathcal {A}}_i\Box _{\varphi _i}C}\mid \underline{w}\in {\mathbb {Z}}_{4}^{m_it}\}\).

Proof

  1. (i)

    Since \(f_i(y)\) is a monic basic irreducible polynomial in \({\mathbb {Z}}_4[y]\) of degree \(m_i\), \(\{1,y,\ldots ,y^{m_i-1}\}\) is a \({\mathbb {Z}}_{4}\)-basis of the Galois ring \(R_i={\mathbb {Z}}_{4}[y]/\langle f_i(y)\rangle \) (See [7, Chapter 6]). As \(\varphi _i\) is a \({\mathbb {Z}}_{4}\)-module isomorphism from \(R_i\) onto \({\mathcal {A}}_i\) by Lemma 2.2(iii), we conclude that \(\{\varepsilon _i(y),y\varepsilon _i(y),\ldots ,y^{m_i-1}\varepsilon _i(y)\}\) is a \({\mathbb {Z}}_{4}\)-basis of \({\mathcal {A}}_i\). Hence \(G_{{\mathcal {A}}_i}\) is a generator matrix of \({\mathcal {A}}_i\) as a \({\mathbb {Z}}_{4}\)-submodule of \({\mathbb {Z}}_{4}^n\).

  2. (ii)

    It is obvious that \(yY=M_{f_i}Y\), which implies that \(y^jY=(M_{f_i})^jY\) for all \(j=0,1,\ldots ,m_i-1\). Hence \(\alpha Y=\sum _{j=0}^{m_i-1}r_j(y^jY)=A_\alpha Y\).

  3. (iii)

    Let \({\mathcal {C}}\) be the \({\mathbb {Z}}_{4}\)-submodule of \({\mathbb {Z}}_{4}^{nl}\) generated by the row vectors of \(G_{{\mathcal {A}}_i\Box _{\varphi _i}C}\), i.e., \({\mathcal {C}}=\{\underline{w}G_{{\mathcal {A}}_i\Box _{\varphi _i}C}\mid \underline{w}\in {\mathbb {Z}}_{4}^{m_it}\}\). By Definition 2.3, \(\xi \in {\mathcal {A}}_i\Box _{\varphi _i}C\) if and only if there exists a unique codeword \(c=(c_1,\ldots ,c_l)\in C\) such that \(\xi =(\varphi _i(c_1),\ldots ,\varphi _i(c_l))\). Since \(G_C\) is a generator matrix of C, \(c\in C\) if and only if c is an \(R_i\)-combination of the row vectors \((\alpha _{1,1},\ldots ,\alpha _{1,l}), \ldots , (\alpha _{t,1},\ldots ,\alpha _{t,l})\) of \(G_C\), which is equivalent that there exist \(\beta _1,\ldots ,\beta _t\in R_i\) such that

    $$\begin{aligned} \xi= & {} \left( \varphi _i\left( \beta _1\alpha _{1,1}+\cdots +\beta _{t}\alpha _{t,1}\right) , \ldots , \varphi _i\left( \beta _1\alpha _{1,l}+\cdots +\beta _{t}\alpha _{t,l}\right) \right) \\= & {} \left( \varphi _i\left( \beta _1\alpha _{1,1}\right) +\cdots +\varphi _i\left( \beta _{t}\alpha _{t,1}\right) , \ldots , \varphi _i\left( \beta _1\alpha _{1,l}\right) +\cdots +\varphi _i\left( \beta _{t}\alpha _{t,l}\right) \right) , \end{aligned}$$

    since \(\varphi _i\) is a \({\mathbb {Z}}_{4}\)-module isomorphism. For each integer j, \(1\le j\le t\), by \(\beta _j\in R_i\) there is a unique row vector \(\underline{b}_j\in {\mathbb {Z}}_{4}^{m_i}\) such that \(\beta _j=\underline{b}_jY\). From this and by (ii) we deduce that \(\beta _j\alpha _{j,s}=\underline{b}_j(\alpha _{j,s}Y)=\underline{b}_jA_{\alpha _{j,s}}Y\) for all \(s=1,\ldots ,l\). Also, since \(\varphi _i\) is a \({\mathbb {Z}}_{4}\)-module isomorphism, we have

    $$\begin{aligned} \xi= & {} \left( \underline{b}_1A_{\alpha _{1,1}}\varphi _i(Y)+\cdots + \underline{b}_tA_{\alpha _{t,1}}\varphi _i(Y), \ldots , \right. \\&\left. \underline{b}_1A_{\alpha _{1,l}}\varphi _i(Y)+\cdots + \underline{b}_tA_{\alpha _{t,l}}\varphi _i(Y)\right) \\= & {} \underline{w}\left( \begin{array}{c@{\quad }c@{\quad }c}A_{\alpha _{1,1}}\varphi _i(Y) &{} \ldots &{} A_{\alpha _{1,l}}\varphi _i(Y)\\ \ldots &{} \ldots &{} \ldots \\ A_{\alpha _{t,1}}\varphi _i(Y) &{} \ldots &{} A_{\alpha _{t,l}}\varphi _i(Y)\end{array}\right) , \end{aligned}$$

    where \(\underline{w}=(\underline{b}_1,\ldots ,\underline{b}_t)\in {\mathbb {Z}}_{4}^{m_it}\). Then from

    $$\begin{aligned} \varphi _i(Y)=\left( \begin{array}{c}\varphi _i(1)\\ \varphi _i(y)\\ \ldots \\ \varphi _i(y^{m_i-1})\end{array}\right) =\left( \begin{array}{c}\varepsilon _i(y)\\ y\varepsilon _i(y)\\ \ldots \\ y^{m_i-1}\varepsilon _i(y)\end{array}\right) =G_{{\mathcal {A}}_i}\left( \begin{array}{c}1 \\ y\\ \ldots \\ y^{n-1}\end{array}\right) \end{aligned}$$

    and the identification of \({\mathbb {Z}}_{4}[y]\langle y^n-1\rangle \) with \({\mathbb {Z}}_{4}^n\), we deduce \(\xi =\underline{w}G_{{\mathcal {A}}_i\Box _{\varphi _i}C}\in {\mathcal {C}}\). Therefore, \({\mathcal {A}}_i\Box _{\varphi _i}C={\mathcal {C}}\). \(\square \)

Now, we give the concatenated structure of cyclic codes over \({\mathbb {Z}}_{4}\). From now on, let \(N=2^kn\) where k is a positive integer. As usual, we will identify \({\mathbb {Z}}_4^N\) with \({\mathbb {Z}}_4[x]/\langle x^N-1\rangle \) under the natural \({\mathbb {Z}}_4\)-module isomorphism: \((c_0,c_1,\ldots ,c_{N-1})\mapsto c_0+c_1x+\cdots +c_{N-1}x^{N-1}\) (\(c_j\in {\mathbb {Z}}_4\), \(j=0,1,\ldots ,N-1\)).

Using the notations of Lemma 2.2, every element of the ring \({\mathcal {A}}\) can be uniquely expressed as \(a(y)=\sum _{j=0}^{n-1}a_jy^j\) with \(a_j\in {\mathbb {Z}}_4\). Then every element of the quotient ring \({\mathcal {A}}[x]/\langle x^{2^k}-y\rangle \) can be uniquely expressed as \(\alpha (x,y)=\sum _{i=0}^{n-1}\sum _{j=0}^{2^k-1}c_{i,j}y^ix^j\), \(c_{i,j}\in {\mathbb {Z}}_4\). Now, define

$$\begin{aligned} \varPsi (\alpha (x,y))=\alpha \left( x,x^{2^k}\right) = \sum _{i=0}^{n-1}\sum _{j=0}^{2^k-1}c_{i,j}x^{i2^k+j}. \end{aligned}$$

It is clear that \(\varPsi \) is a ring isomorphism from \({\mathcal {A}}[x]/\langle x^{2^k}-y\rangle \) onto \({\mathbb {Z}}_4[x]/\langle x^N-1\rangle \). In the rest of this paper, we will identify \({\mathcal {A}}[x]/\langle x^{2^k}-y\rangle \) with \({\mathbb {Z}}_4[x]/\langle x^N-1\rangle \) under this isomorphism \(\varPsi \).

Theorem 2.6

Using the notations in Notation 2.1 and Lemma 2.2, let \({\mathcal {C}}\subseteq {\mathbb {Z}}_4[x]/\langle x^N-1\rangle \). The following are equivalent:

  1. (i)

    \({\mathcal {C}}\) is a cyclic code over \({\mathbb {Z}}_4\) of length N.

  2. (ii)

    \({\mathcal {C}}\) is an ideal of the ring \({\mathcal {A}}[x]/\langle x^{2^k}-y\rangle \).

  3. (iii)

    For each integer i, \(1\le i\le r\), there is a unique ideal \({\mathcal {C}}_i\) of the ring \({\mathcal {A}}_i[x]/\langle \varepsilon _i(y)x^{2^k}-\varepsilon _i(y)y\rangle \) such that \({\mathcal {C}}=\oplus _{i=1}^r{\mathcal {C}}_i\).

  4. (iv)

    For each integer i, \(1\le i\le r\), there is a unique y-constacyclic code \(C_i\) over \(R_i\) of length \(2^k\), i.e., \(C_i\) is an ideal of the ring \(R_i[x]/\langle x^{2^k}-y\rangle \), such that

    $$\begin{aligned} {\mathcal {C}}=\left( {\mathcal {A}}_1\Box _{\varphi _1}C_1\right) \oplus \cdots \oplus \left( {\mathcal {A}}_r\Box _{\varphi _r}C_r\right) , \end{aligned}$$

    where \({\mathcal {A}}_i\Box _{\varphi _i}C_i=\{\varepsilon _i(y)\alpha (x)\mid \alpha (x)\in C_i\}\) for all \(i=1,\ldots ,r\).

Proof

(i)\(\Leftrightarrow \)(ii) It follows from \({\mathbb {Z}}_4[x]/\langle x^N-1\rangle ={\mathcal {A}}[x]/\langle x^{2^k}-y\rangle \).

(ii)\(\Leftrightarrow \)(iii) By Lemma 2.2 (i) and (ii) it follows that

$$\begin{aligned} {\mathcal {A}}[x]/\left\langle x^{2^k}-y\right\rangle = \oplus _{i=1}^r\left( {\mathcal {A}}_i[x]/\left\langle \varepsilon _i(y)x^{2^k}-\varepsilon _i(y)y\right\rangle \right) \end{aligned}$$

and \(({\mathcal {A}}_i[x]/\langle \varepsilon _i(y)x^{2^k}-\varepsilon _i(y)y\rangle )({\mathcal {A}}_j[x]/\langle \varepsilon _j(y)x^{2^k}-\varepsilon _j(y)y\rangle )=\{0\}\) for all \(i\ne j\). Hence \({\mathcal {C}}\) is an ideal of the ring \({\mathbb {Z}}_4[x]/\langle x^N-1\rangle \) if and only if for each integer i, \(1\le i\le r\), there is a unique ideal \({\mathcal {C}}_i\) of the ring \({\mathcal {A}}_i[x]/\langle \varepsilon _i(y)x^{2^k}-\varepsilon _i(y)y\rangle \) such that \({\mathcal {C}}=\oplus _{i=1}^r{\mathcal {C}}_i\).

(iii)\(\Leftrightarrow \)(iv) By Lemma 2.2(iii), \(\varphi _i: g(y)\mapsto \varepsilon _i(y)g(y)\) \((\forall g(y)\in R_i)\) is a ring isomorphism from \(R_i\) onto \({\mathcal {A}}_i\). It is clear that \(\varphi _i\) induces a ring isomorphism from \(R_i[x]/\langle x^{2^k}-y\rangle \) onto \({\mathcal {A}}_i[x]/\langle \varepsilon _i(y)x^{2^k}-\varepsilon _i(y)y\rangle \) by the rule that: \(\forall \alpha (x)=\sum _{j=0}^{2^k-1}\alpha _jx^j\in R_i[x]/\langle x^{2^k}-y\rangle \) with \(\alpha _0,\alpha _1,\ldots ,\alpha _{2^k-1}\in R_i\),

$$\begin{aligned} \varphi _i(\alpha (x))=\sum _{j=0}^{2^k-1}\varphi _i(\alpha _j)x^j \leftrightarrow \left( \varphi _i(\alpha _0),\varphi _i(\alpha _1),\ldots ,\varphi _i(\alpha _{2^k-1})\right) \in {\mathcal {A}}_i^{2^k}. \end{aligned}$$

Therefore, for each integer i, \(1\le i\le r\), and an ideal \({\mathcal {C}}_i\) of \({\mathcal {A}}_i[x]/\langle \varepsilon _i(y)x^{2^k}-\varepsilon _i(y)y\rangle \), there is a unique ideal \(C_i\) of \(R_i[x]/\langle x^{2^k}-y\rangle \) such that \({\mathcal {C}}_i=\varphi _i(C_i)\). Hence \({\mathcal {C}}_i={\mathcal {A}}_i\Box _{\varphi _i}C_i\) by Definition 2.3. It is clear that \(C_i\) is a y-constacyclic code over the Galois ring \(R_i\) of length \(2^k\). \(\square \)

By Theorem 2.6, in order to present all cyclic codes over \({\mathbb {Z}}_4\) of length N it is sufficient to determine all ideals of the ring \(R_i[x]/\langle x^{2^k}-y\rangle \), for all \(i=1,\ldots ,r\).

3 Representation of cyclic codes over \({\mathbb {Z}}_{4}\) of length 4n

In this section, following [4] we give another precise description for cyclic codes over \({\mathbb {Z}}_4\) of length 4n by determining their outer codes in the concatenated structure of subcodes.

Since n is odd, there is a positive integer e, \(1\le e<n\), such that \(2^ke\equiv -1\) (mod n). By Eq. (1) it follows that \(y^n\equiv 1\) (mod \(f_i(y)\)), i.e., \(y^n=1\) in \(R_i\). From these we deduce that \((y^e)^{2^k}=y^{-1}\) in \(R_i\).

Lemma 3.1

Using the notations above, define a mapping \(\sigma _i: R_i[u]/\langle u^{2^k}-1\rangle \rightarrow R_i[x]/\langle x^{2^k}-y\rangle \) by

$$\begin{aligned} \sigma _i(a(u))=a\left( y^{e}x\right) , \ \forall a(u)\in R_i[u]/\left\langle u^{2^k}-1\right\rangle . \end{aligned}$$

Then \(\sigma _i\) is a ring isomorphism from \(R_i[u]/\langle u^{2^k}-1\rangle \) onto \(R_i[x]/\langle x^{2^k}-y\rangle \) preserving \(R_i\)-Hamming weight.

Proof

For any \(b(u)=\sum _{j}b_ju^j\in R_i[u]\) where \(b_j\in R_i\), define \(\sigma _i(b(u)) =\sum _{j}b_j(y^{e}x)^j\in R_i[x]\). Since \(y^e\) is an invertible element of \(R_i\), \(\sigma _i\) is a ring isomorphism from \(R_i[u]\) onto \(R_i[x]\). From this and by \(\sigma _i(u^{2^k}-1)=(y^{e}x)^{2^k}-1=y^{e2^k}x^{2^k}-1=y^{-1}(x^{2^k}-y)\) in \(R_i[x]\), we deduce the conclusions. \(\square \)

In the rest of this paper, we denote

$$\begin{aligned} \pi _i=y^ex-1=\sigma _i(u-1)\in R_i[x]/\left\langle x^{2^k}-y\right\rangle . \end{aligned}$$
(3)

Now, we denote \(\varGamma _4(u,m)=R_i[u]/\langle u^{2^k}-1\rangle \) where \(R_i=\mathrm{GR}(4,m_i)\) (cf. Eq. (7) in Page 130 of [4]). Recall that ideals of the ring \(\varGamma _4(u,m)\) are in fact cyclic codes over the Galois ring \(R_i\) of length \(2^k\). These cyclic codes have been studied in [4]. For the purpose of this paper, we list some conclusions from [4].

Lemma 3.2

([4, Theorem 2.6]) The number of ideals of \(R_i[u]/\langle u^{2^k}-1\rangle \), where \(R_i=\mathrm{GR}(4,m_i)\), is equal to

$$\begin{aligned} N_{(4,m_i;k)}=5+\left( 2^{m_i}\right) ^{2^{k-1}}+\left( 5\cdot 2^{m_i}-1\right) \left( 2^{m_i}\right) \frac{\left( 2^{m_i} \right) ^{2^{k-1}-1}-1}{\left( 2^{m_i}-1\right) ^2} -4\cdot \frac{2^{k-1}-1}{2^{m_i}-1}. \end{aligned}$$

Especially, \(N_{(4,m_i;k)}=9+5\cdot 2^{m_i}+2^{2m_i}\) when \(k=2\).

By Theorem 2.6, Lemmas 3.1 and 3.2, we see that the number of cyclic codes over \({\mathbb {Z}}_4\) of length \(2^kn\) is equal to \(\prod _{i=1}^rN_{(4,m_i;k)}\) ([4, Corollary 3.4]).

For any ideal \(C_i\) of the ring \(R_i[x]/\langle x^{2^k}-y\rangle \), recall that the annihilating ideal of \(C_i\) is \(\mathrm{Ann}(C_i)=\{\alpha \in R_i[x]/\langle x^{2^k}-y\rangle \mid \alpha \beta =0, \forall \beta \in C_i \}\).

Then by Lemma 3.1 and [4, Theorem 5.3] or by direct calculations, we list all distinct y-constacyclic codes over the Galois ring \(R_i\) of length 4, i.e., ideals of the ring \(R_i[x]/\langle x^4-y\rangle \), by the following theorem.

Theorem 3.3

All distinct y-constacyclic codes \(C_i\) over the Galois ring \(R_i\) of length 4 and their annihilating ideals are given by one of the following cases:

Case

\(C_i\)

\(|C_i|\)

Ann\( (C_i)\)

\(L_C\)

1.

\(\langle 0\rangle \)

1

\(\langle 1\rangle \)

1

2.

\(\langle 1\rangle \)

\(2^{8m_i}\)

\(\langle 0\rangle \)

1

3.

\(\langle \pi _i^j\rangle \) (\(j=1,2\))

\(2^{2m_i(4-j)}\)

\(\langle \pi _i^{4-j}+2\pi _i^{2-j}\rangle \)

2

4.

\(\langle 2\rangle \)

\(2^{4m_i}\)

\(\langle 2\rangle \)

1

5.

\(\langle 2\pi _i^s\rangle \) (\(s=1,2,3\))

\(2^{m_i(4-s)}\)

\(\langle \pi _i^{4-s},2\rangle \)

3

6.

\(\langle \pi _i+2h\rangle \) (\(h\in {\mathcal {T}}_i{\setminus }\{0\}\))

\(2^{6m_i}\)

\(\langle \pi _i^3+2\pi _i(1+\pi _ih)\rangle \)

\(2^{m_i}-1\)

7.

\(\langle \pi _i^2+2\pi _ih\rangle \)

\(2^{4m_i}\)

\(\langle \pi _i^2+2(1+\pi _ih)\rangle \)

\(2^{m_i}-1\)

 

(\(h\in {\mathcal {T}}_i{\setminus }\{0\}\))

   

8.

\(\langle \pi _i^2+2(h+\pi _ig)\rangle \)

\(2^{4m_i}\)

\(\langle \pi _i^2+2(1+h+\pi _ig)\rangle \)

\(2^{2m_i}-2^{m_i+1}\)

 

(\(h\in {\mathcal {T}}_i{\setminus }\{0,1\}, g\in {\mathcal {T}}_i\))

   

9.

\(\langle \pi _i^2+2(1+\pi _ih)\rangle \)

\(2^{4m_i}\)

\(\langle \pi _i^2+2\pi _ih\rangle \)

\(2^{m_i}-1\)

 

(\(h\in {\mathcal {T}}_i{\setminus }\{0\}\))

   

10.

\(\langle \pi _i^3+2\pi _i(3+\pi _ih)\rangle \)

\(2^{2m_i}\)

\(\langle \pi _i+2h\rangle \)

\(2^{m_i}-1\)

 

(\(h\in {\mathcal {T}}_i{\setminus }\{0\}\))

   

11.

\(\langle \pi _i^3+2h\rangle \) (\(h\in {\mathcal {T}}_i\))

\(2^{4m_i}\)

\(\langle \pi _i^3+2h\rangle \)

\(2^{m_i}\)

13.

\(\langle \pi _i^{j}+2\pi _i^{j-2}\rangle \) (\(j=2,3\))

\(2^{2m_i(4-j)}\)

\(\langle \pi _i^{4-j}\rangle \)

2

14.

\(\langle \pi _i^{j},2\rangle \) (\(j=1,2,3\))

\(2^{m_i(8-j)}\)

\(\langle 2\pi _i^{4-j}\rangle \)

3

15.

\(\langle \pi _i^2+2, 2\pi _i\rangle \)

\(2^{5m_i}\)

\(\langle \pi _i^3,2\pi _i^2\rangle \)

1

16.

\(\langle \pi _i^3,2\pi _i^2\rangle \)

\(2^{3m_i}\)

\(\langle \pi _i^2+2, 2\pi _i\rangle \)

1

17.

\(\langle \pi _i^3+2\pi _i, 2\pi _i^2\rangle \)

\(2^{3m_i}\)

\(\langle \pi _i^2,2\pi _i\rangle \)

1

18.

\(\langle \pi _i^2,2\pi _i\rangle \)

\(2^{5m_i}\)

\(\langle \pi _i^3+2\pi _i, 2\pi _i^2\rangle \)

1

19.

\(\langle \pi _i^2+2h, 2\pi _i\rangle \)

\(2^{5m_i}\)

\(\langle \pi _i^3+2\pi _i(1+h),2\pi _i^2\rangle \)

\(2^{m_i}-2\)

 

(\(h\in {\mathcal {T}}_i{\setminus }\{0,1\}\))

   

20.

\(\langle \pi _i^3+2\pi _ih, 2\pi _i^2\rangle \)

\(2^{3m_i}\)

\(\langle \pi _i^2+2(1+h),2\pi _i\rangle \)

\(2^{m_i}-2\)

 

(\(h\in {\mathcal {T}}_i{\setminus }\{0,1\}\))

   

where \({\mathcal {T}}_i=\{\sum _{j=0}^{m_i-1}t_jy^j\mid t_0,t_1,\ldots ,t_{m_i-1}\in \{0,1\}\}\) and \(L_C\) is the number of codes in the same row.

Proof

In [4] Theorem 5.3, all distinct ideals of \(\varGamma _4(u,m)=R_i[u]/\langle u^{2^k}-1\rangle \) and their annihilating ideals are listed in terms of \(u-1\). By Lemma 3.1, all distinct ideals of \(R_i[x]/\langle x^{2^k}-y\rangle \) and their annihilating ideals can be obtained by replacing \(u-1\) to \(\sigma _i(u-1)=y^ex-1=\pi _i\) from [4] Theorem 5.3. Particularly, we get the conclusions for the special case of \(k=2\). \(\square \)

Example 3.4

We know that \(y^{15}-1=f_1(y)f_2(y)f_3(y)f_4(y)f_5(y)\), where

  • \(f_1(y)=y-1\), \(f_2(y)=1+y+y^2\), \(f_3(y)=1+y+y^2+y^3+y^4\);

  • \(f_4(y)=1+3y+2y^2+y^4\), \(f_5(y)=1+2y^2+3y^3+y^4\),

and \(f_1(y),f_2(y),f_3(y),f_4(y),f_5(y)\) are pairwise coprime monic basic irreducible polynomials in \({\mathbb {Z}}_{4}[y]\). Hence \(r=5\), \(m_1=1\), \(m_2=2\) and \(m_3=m_4=m_5=4\). Now, let \(N=60=2^k\cdot 15\) where \(k=2\). Then the number of cyclic codes over \({\mathbb {Z}}_{4}\) of length 60 is equal to

$$\begin{aligned} \prod _{i=1}^5N_{(4,m_i;2)}=\prod _{i=1}^5 \left( 9+5\cdot 2^{m_i}+2^{2m_i}\right) =23\cdot 45\cdot 345^3=42,500,851,875. \end{aligned}$$

For each integer i, \(1\le i\le 5\), let \(R_i={\mathbb {Z}}_4[y]/\langle f_i(y)\rangle \), which is a Galois ring of characteristic 4 and cardinality \(4^{m_i}\). By \(4\cdot 11\equiv -1\), (mod 15), it follows that \((y^{11})^4=y^{-1}\) in every \(R_i\). We select \(e=11\). Using Eq. (3), we have the following.

  • \(\pi _1=y^{11}x-1=x-1\in R_1[x]/\langle x^4-y\rangle =R_1[x]/\langle x^4-1\rangle \), since \(y^{11}\equiv y\equiv 1\) (mod \(y-1\)), i.e., \(y^e=1\) in \(R_1\), and \(R_1={\mathbb {Z}}_4[y]/\langle y-1\rangle ={\mathbb {Z}}_4\).

  • \(\pi _2=y^{11}x-1=(3+3y)x-1\in R_2[x]/\langle x^4-y\rangle \), since \(y^{11}\equiv 3+3y\) (mod \(f_2(y)\)), i.e., \(y^e=3+3y\) in \(R_2\).

  • \(\pi _3=y^{11}x-1=yx-1\in R_3[x]/\langle x^4-y\rangle \), since \(y^{11}\equiv y\) (mod \(f_3(y)\)), i.e., \(y^e=y\) in \(R_3\).

  • \(\pi _4=y^{11}x-1=(2+y+y^2+3y^3)x-1\in R_4[x]/\langle x^4-y\rangle \), since \(y^{11}\equiv 2+y+y^2+3y^3\) (mod \(f_4(y)\)), i.e., \(y^e=2+y+y^2+3y^3\) in \(R_4\).

  • \(\pi _5=y^{11}x-1=(3+3y^2+3y^3)x-1\in R_5[x]/\langle x^4-y\rangle \), since \(y^{11}\equiv 3+3y^2+3y^3\) (mod \(f_5(y)\)), i.e., \(y^e=3+3y^2+3y^3\) in \(R_5\).

Then by Theorem 3.3, one can list all cyclic codes over \({\mathbb {Z}}_{4}\) of length 60.

Finally, from Theorems 2.63.3 and 2.5 we deduce the following corollary.

Corollary 3.5

Every cyclic code \({\mathcal {C}}\) over \({\mathbb {Z}}_4\) of length 4n can be constructed by the following two steps:

  1. (i)

    For each \(i=1,\ldots ,r\), choose a y-constacyclic code \(C_i\) over \(R_i\) of length 4 listed in Theorem 3.3.

  2. (ii)

    Set \({\mathcal {C}}=\oplus _{i=1}^r{\mathcal {C}}_i\) with \({\mathcal {C}}_i={\mathcal {A}}_i\Box _{\varphi _i}C_i\).

The number of codewords in \({\mathcal {C}}\) is equal to \(|{\mathcal {C}}|=\prod _{i=1}^r|C_i|\) and the minimal Hamming distance of \({\mathcal {C}}\) satisfies

$$\begin{aligned} d_{\mathrm{min}}({\mathcal {C}})\le \mathrm{min}\left\{ d_{\mathrm{min}}({\mathcal {C}}_i)\mid i=1,\ldots ,r \right\} , \end{aligned}$$

where \(d_{\mathrm{min}}({\mathcal {C}}_i)\) is the minimal \({\mathbb {Z}}_4\)-Hamming weight of \({\mathcal {C}}_i\). Moreover, a generator matrix of \({\mathcal {C}}\) is given by \(G_{{\mathcal {C}}}=\left( \begin{array}{c}G_{{\mathcal {A}}_1\Box _{\varphi _1}C_1}\\ \ldots \\ G_{{\mathcal {A}}_r\Box _{\varphi _r}C_r}\end{array}\right) \).

Using the notations of Corollary 3.5(ii), \({\mathcal {C}}=\oplus _{i=1}^r{\mathcal {C}}_i\) is called the canonical form decomposition of the cyclic code \({\mathcal {C}}\) over \({\mathbb {Z}}_4\) of length 4n.

4 Dual codes of cyclic codes over \({\mathbb {Z}}_4\) of length 4n

In this section, we give the dual code of each cyclic code over \({\mathbb {Z}}_4\) of length N where \(N=4n\), and investigate the self-duality of these codes.

As usual, we will identify \(a=(a_0,a_1,\ldots ,a_{N-1})\in {\mathbb {Z}}_4^N\) with \(a(x)=\sum _{j=0}^{N-1}a_jx^j\in {\mathbb {Z}}_4[x]/\langle x^N-1\rangle \). In this paper, we define

$$\begin{aligned} \mu (a(x))=a\left( x^{-1}\right) =a_0+\sum _{j=1}^{N-1}a_jx^{N-j}, \ \forall a(x)\in {\mathbb {Z}}_4[x]/\left\langle x^N-1\right\rangle . \end{aligned}$$

Then \(\mu \) is a ring automorphism of \({\mathbb {Z}}_4[x]/\langle x^N-1\rangle \) satisfying \(\mu ^{-1}=\mu \) and \(\mu (c)=c\) for all \(c\in {\mathbb {Z}}_4\). The following lemma is well known.

Lemma 4.1

Let \(a,b\in {\mathbb {Z}}_4^N\). Then \([a,b]=0\) if \(a(x)\mu (b(x))=0\) in the ring \({\mathbb {Z}}_4[x]/\langle x^N-1\rangle \).

Using the notations of Sect. 3, we have \({\mathbb {Z}}_4[x]/\langle x^N-1\rangle ={\mathcal {A}}[x]/\langle x^{4}-y\rangle \) under the substitution \(y=x^{4}\), where \({\mathcal {A}}={\mathbb {Z}}_4[y]/\langle y^n-1\rangle \). Hence

$$\begin{aligned} \mu (y)=\left( x^{-1}\right) ^{4}=y^{-1} \ \mathrm{in} \ {\mathcal {A}}[x]/\left\langle x^{4}-y\right\rangle . \end{aligned}$$

Therefore, the restriction of \(\mu \) to \({\mathcal {A}}\) is given by

$$\begin{aligned} \mu (f(y))=f\left( y^{-1}\right) \ \left( \forall f(y)\in {\mathcal {A}}\right) , \end{aligned}$$

which is a ring automorphism of \({\mathcal {A}}\). For notations simplicity, we still denote this restriction by \(\mu \). From this and by Notation 2.1, we deduce

$$\begin{aligned} \mu (\varepsilon _i(y))=u_i\left( y^{-1}\right) F_i\left( y^{-1}\right) =1-v_i\left( y^{-1}\right) f_i\left( y^{-1}\right) \ \mathrm{in} \ {\mathcal {A}}. \end{aligned}$$
(4)

Let \(f(y)=\sum _{j=0}^mc_jy^j\) be a polynomial in \({\mathbb {Z}}_4[y]\) of degree \(m\ge 1\). Recall that the reciprocal polynomial of f(y) is defined by \(\widetilde{f}(y)=y^mf(\frac{1}{y})=\sum _{j=0}^m c_jy^{m-j}\). Especially, f(y) is said to be self-reciprocal if \(\widetilde{f}(y)=\delta f(y)\) for some \(\delta \in {\mathbb {Z}}_4^{\times }=\{1,-1\}\). Then by Eq. (1) in Sect. 2, we have

$$\begin{aligned} y^n-1=-\widetilde{f}_1(y)\widetilde{f}_2(y)\ldots \widetilde{f}_r(y). \end{aligned}$$

Since \(f_1(y),f_2(y),\ldots ,f_r(y)\) are pairwise coprime monic basic polynomials in \({\mathbb {Z}}_4[y]\), for each \(1\le i\le r\) there is a unique integer \(i^{\prime }\), \(1\le i^{\prime }\le r\), such that \(\widetilde{f}_i(y)=\delta _if_{i^{\prime }}(y)\) for some \(\delta _i\in \{1,-1\}\). From this, by Eq. (4) and \(y^n=1\) in the ring \({\mathcal {A}}\), we deduce

$$\begin{aligned} \mu \left( \varepsilon _i(y)\right)= & {} 1-y^{n-\mathrm{deg}\left( v_i(y)\right) -m_i} \left( y^{\mathrm{deg}(v_i(y))}v_i(y^{-1})\right) \left( y^{m_i}f_i\left( y^{-1}\right) \right) \\= & {} 1-y^{n-\mathrm{deg}\left( v_i(y)\right) -m_i}\widetilde{v}_i(y)\widetilde{f}_i(y)\\= & {} 1-h_i(y)f_{i^{\prime }}(y) \end{aligned}$$

where \(h_i(y)=\delta _iy^{n-\mathrm{deg}(v_i(y))-m_i}\widetilde{v}_i(y)\in {\mathcal {A}}\). Similarly, by (4) it follows that \(\mu (\varepsilon _i(y))=g_i(y)F_{i^{\prime }}(y)\) for some \(g_i(y)\in {\mathcal {A}}\). Then from these and by Eq. (2) in Sect. 2, we deduce that \(\mu (\varepsilon _i(y))=\varepsilon _{i^{\prime }}(y)\).

As stated above, we see that for each \(1\le i\le r\) there is a unique integer \(i^{\prime }\), \(1\le i^{\prime }\le r\), such that \(\mu (\varepsilon _i(y))= \varepsilon _{i^{\prime }}(y)\). We still use \(\mu \) to denote this map \(i\mapsto i^{\prime }\), i.e., \(\mu (\varepsilon _i(y))=\varepsilon _{\mu (i)}(y)\). Whether \(\mu \) denotes the automorphism of \({\mathcal {A}}\) or this map on the set \(\{1,\ldots ,r\}\) is determined by the context. The next lemma shows the compatibility of the two uses of \(\mu \).

Lemma 4.2

With the notations above, we have the following conclusions.

  1. (i)

    \(\mu \) is a permutation on the set \(\{1,\ldots ,r\}\) satisfying \(\mu ^{-1}=\mu \).

  2. (ii)

    After a rearrangement of \(\varepsilon _1(y),\ldots ,\varepsilon _r(y)\), there are integers \(\lambda ,\rho \) such that \(\mu (i)=i\) for all \(i=1,\ldots ,\lambda \) and \(\mu (\lambda +j)=\lambda +\rho +j\) for all \(j=1,\ldots ,\rho \), where \(\lambda \ge 1, \rho \ge 0\) and \(\lambda +2\rho =r\).

  3. (iii)

    For each integer i, \(1\le i\le r\), there is a unique element \(\delta _i\) of \(\{1,-1\}\) such that \(\widetilde{f}_i(y)=\delta _i f_{\mu (i)}(y)\).

  4. (iv)

    For any integer i, \(1\le i\le r\), \(\mu (\varepsilon _i(y))=\varepsilon _{\mu (i)}(y)\) in the ring \({\mathcal {A}}\), and \(\mu ({\mathcal {A}}_{i})={\mathcal {A}}_{\mu (i)}\). Then \(\mu \) induces a ring isomorphism from \({\mathcal {A}}_{i}\) onto \({\mathcal {A}}_{\mu (i)}\).

Proof

(i)–(iii) follow from the definition of the map \(\mu \), and (iv) follows from that \({\mathcal {A}}_i=\varepsilon _i(y){\mathcal {A}}\) immediately. \(\square \)

Lemma 4.3

Using the notations above, the following hold for any \(1\le i\le r\).

  1. (i)

    For any \(\xi \in R_i\), we define \(\widehat{\xi }=(\varphi _{\mu (i)}^{-1}\mu \varphi _i)(\xi )\). Then \(\widehat{ \ }\) is a ring isomorphism from \(R_i\) onto \(R_{\mu (i)}\) such that the following diagram commutes

    $$\begin{aligned} \begin{array}{ccc} \ \ \ \ R_i={\mathbb {Z}}_4[y]/\langle f_i(y)\rangle &{} \mathop {\longrightarrow }\limits ^{\widehat{ \ }} &{} R_{\mu (i)}={\mathbb {Z}}_4[y]/\langle f_{\mu (i)}(y)\rangle \\ \varphi _i \downarrow &{} &{} \ \ \ \downarrow \varphi _{\mu (i)} \\ \ \ \ \ {\mathcal {A}}_i &{} \mathop {\longrightarrow }\limits ^{\mu } &{} {\mathcal {A}}_{\mu (i)} \end{array} \end{aligned}$$

    Specifically, we have \(\widehat{\xi }=a(y^{-1})\in R_{\mu (i)}\) for all \(\xi =a(y)\in R_i\).

  2. (ii)

    For any \(\alpha (x)=\sum _{j=0}^{3}\alpha _jx^j\in R_i[x]/\langle x^{4}-y\rangle \) where \(\alpha _0,\alpha _1,\alpha _2,\alpha _{3}\in R_i\), define \(\widehat{\alpha }(x)=\sum _{j=0}^{3}\widehat{\alpha _j}x^j\). Then \(\mu \) induces a ring isomorphism from \(R_i[x]/\langle x^{4}-y\rangle \) onto \(R_{\mu (i)}[x]/\langle x^{4}-y\rangle \) by the rule that

    $$\begin{aligned} \mu : \alpha (x)=\sum _{j=0}^{3}\alpha _jx^j\mapsto \widehat{\alpha }\left( x^{-1}\right) =\widehat{\alpha _0}+y^{-1}\sum _{j=1}^{3}\widehat{\alpha _j}x^{4-j}. \end{aligned}$$

Proof

  1. (i)

    By Lemma 2.2(iii) and Lemma 4.2(iv), we see that \(\varphi _{\mu (i)}^{-1}\mu \varphi _i\) is a ring isomorphism from \(R_i\) onto \(R_{\mu (i)}\) such that the following diagram commutes

    $$\begin{aligned} \begin{array}{ccc} \ \ \ \ R_i={\mathbb {Z}}_4[y]/\langle f_i(y)\rangle &{} \mathop {\longrightarrow }\limits ^{\varphi _{\mu (i)}^{-1}\mu \varphi _i} &{} R_{\mu (i)}={\mathbb {Z}}_4[y]/\langle f_{\mu (i)}(y)\rangle \\ \varphi _i \downarrow &{} &{} \ \ \ \downarrow \varphi _{\mu (i)} \\ \ \ \ \ {\mathcal {A}}_i &{} \mathop {\longrightarrow }\limits ^{\mu } &{} {\mathcal {A}}_{\mu (i)} \end{array} \end{aligned}$$

    Then for any \(\xi =a(y)\in R_i\), by \(\varepsilon _{\mu (i)}(y)=1-h_i(y)f_{\mu (i)}(y)\) we have

    $$\begin{aligned} \widehat{\xi }= & {} \left( \varphi _{\mu (i)}^{-1}\mu \varphi _i\right) (\xi )=\varphi _{\mu (i)}^{-1}\mu (\varepsilon _i(y)a(y)))\\= & {} \varphi _{\mu (i)}^{-1}\left( \varepsilon _{\mu (i)}(y)a(y^{-1})\right) =\left( 1-h_i(y)f_{\mu (i)}(y)\right) a\left( y^{-1}\right) \\\equiv & {} a\left( y^{-1}\right) \ \left( \mathrm{mod} \ f_{\mu (i)}(y)\right) , \end{aligned}$$

    which implies \(\widehat{\xi }=a(y^{-1})\in R_{\mu (i)}\).

  2. (ii)

    As \(y\in R_i\), by (i) we deduce that \(\widehat{y}=y^{-1}\in R_{\mu (i)}\) and \(y^{-1}=y^{n-1}\) (mod \(f_{\mu (i)}(y)\)). Since x and y are invertible elements of \(R_{\mu (i)}[x]/\langle x^{4}-y\rangle \), we have \(\langle \mu (x^{4}-y)\rangle =\langle (x^{-1})^{4}-y^{-1}\rangle =\langle -x^{-4}y^{-1}(x^{4}-y)\rangle =\langle x^{4}-y\rangle \) as ideals of the ring \(R_{\mu (i)}[x]/\langle x^{4}-y\rangle \). Hence \(\mu \) induces a ring isomorphism from \(R_i[x]/\langle x^{4}-y\rangle \) onto \(R_{\mu (i)}[x]/\langle x^{4}-y\rangle \) by the rule that \(\mu (\alpha (x))=\widehat{\alpha }(x^{-1})=\sum _{j=0}^{3}\widehat{\alpha _j}x^{-j}\). Finally, by \(x^{4}=y\), i.e., \(y^{-1}x^{4}=1\) in \(R_{\mu (i)}[x]/\langle x^{4}-y\rangle \) it follows that \(\mu (\alpha (x))=\widehat{\alpha _0}+y^{-1}\sum _{j=1}^{3}\widehat{\alpha _j}x^{4-j}\) as required. \(\square \)

Lemma 4.4

Let \(a(x)=\sum _{i=1}^ra_i(x), b(x)=\sum _{i=1}^rb_i(x)\in {\mathcal {A}}[x]/\langle x^{4}-y\rangle \), where \(a_i(x), b_i(x)\in {\mathcal {A}}_i[x]/\langle \varepsilon _i(y)x^{4}-\varepsilon _i(y)y\rangle \). Then

$$\begin{aligned} a(x)\mu (b(x))=\sum _{i=1}^ra_i(x)\mu (b_{\mu (i)}(x)). \end{aligned}$$

Proof

By Lemma 4.2(iv), we have

$$\begin{aligned} \mu \left( b_{\mu (i)}(x)\right) \in \mu \left( {\mathcal {A}}_{\mu (i)}[x]/\left\langle \varepsilon _{\mu (i)}(y)x^{4}-\varepsilon _{\mu (i)}y\right\rangle \right) = {\mathcal {A}}_i[x]/\left\langle \varepsilon _i(y)x^{4}-\varepsilon _i(y)y\right\rangle . \end{aligned}$$

Hence \(a_i(x)\mu (b_{\mu (i)}(x))\in {\mathcal {A}}_i[x]/\langle \varepsilon _i(y)x^{4}-\varepsilon _i(y)y\rangle \) for all i. If \(j\ne \mu (i)\), then \(i\ne \mu (j)\), which implies \({\mathcal {A}}_i{\mathcal {A}}_{\mu (j)}=\{0\}\) by Lemma 2.2(ii). Therefore,

$$\begin{aligned} \left( {\mathcal {A}}_i[x]/\langle \varepsilon _i(y)x^{4}-\varepsilon _i(y)y\rangle \right) \left( {\mathcal {A}}_{\mu (j)}[x]/\langle \varepsilon _{\mu (j)}(y)x^{4}-\varepsilon _{\mu (j)}(y)y\rangle \right) =\{0\}, \end{aligned}$$

and so \(a_i(x)\mu (b_j(x))=0\) since \(\mu (b_j(x))\in {\mathcal {A}}_{\mu (j)}[x]/\langle \varepsilon _{\mu (j)}(y)x^{4}-\varepsilon _{\mu (j)}(y)y\rangle \). Hence \(a(x)\mu (b(x))=\sum _{i=1}^r\sum _{j=1}^ra_i(x)\mu (b_{j}(x))=\sum _{i=1}^ra_i(x)\mu (b_{\mu (i)}(x))\). \(\square \)

Now, we can give the dual code of each cyclic code over \({\mathbb {Z}}_4\) of length 4n.

Theorem 4.5

Let \({\mathcal {C}}\) be a cyclic code over \({\mathbb {Z}}_4\) of length 4n with concatenated structure \({\mathcal {C}}=\oplus _{i=1}^r({\mathcal {A}}_i\Box _{\varphi _i}C_i)\), where \(C_i\) is an ideal of the ring \(R_i[x]/\langle x^{4}-y\rangle \) listed by Theorem 3.3 for all \(i=1,\ldots ,r\). Using the notations of Theorem 3.3, the dual code \({\mathcal {C}}^{\bot }\) is given by

$$\begin{aligned} {\mathcal {C}}^{\bot }=\oplus _{i=1}^r \left( {\mathcal {A}}_{\mu (i)}\Box _{\varphi _{\mu (i)}}D_{\mu (i)}\right) , \end{aligned}$$

where \(D_{\mu (i)}=\mu (\mathrm{Ann}(C_i))\), which is an ideal of the ring \(R_{\mu (i)}[x]/\langle x^{4}-y\rangle \) given in the following table.

Case

\(C_i\) (mod \(x^4-y, f_i(y)\))

\(D_{\mu (i)}=\mu (\mathrm{Ann}(C_i))\) (mod \(x^4-y, f_{\mu (i)}(y)\))

1.

\(\langle 0\rangle \)

\(\langle 1\rangle \)

2.

\(\langle 1\rangle \)

\(\langle 0\rangle \)

3.

\(\langle \pi _i^j\rangle \) (\(j=1,2\))

\(\langle \pi _{\mu (i)}^{4-j}+2\pi _{\mu (i)}^{2-j}y^{2e}x^2\rangle \)

4.

\(\langle 2\rangle \)

\(\langle 2\rangle \)

5.

\(\langle 2\pi _i^s\rangle \) (\(s=1,2,3\))

\(\langle \pi _{\mu (i)}^{4-s},2\rangle \)

6.

\(\langle \pi _i+2h\rangle \) (\(h\in {\mathcal {T}}_i{\setminus }\{0\}\))

\(\langle \pi _{\mu (i)}^3+2\pi _{\mu (i)}(1+\pi _{\mu (i)}\widehat{h}y^{n-e}x^{4n-1})y^{2e}x^2\rangle \)

7.

\(\langle \pi _i^2+2\pi _ih\rangle \) (\(h\in {\mathcal {T}}_i{\setminus }\{0\}\))

\(\langle \pi _{\mu (i)}^2+2(1+\pi _{\mu (i)}\widehat{h}y^{n-e}x^{4n-1})y^{2e}x^2\rangle \)

8.

\(\langle \pi _i^2+2(h+\pi _ig)\rangle \)

\(\langle \pi _{\mu (i)}^2+2(1+\widehat{h}+\pi _{\mu (i)}\widehat{g}y^{n-e}x^{4n-1})y^{2e}x^2\rangle \)

 

(\(h\in {\mathcal {T}}_i{\setminus }\{0,1\}, g\in {\mathcal {T}}_i\))

 

9.

\(\langle \pi _i^2+2(1+\pi _ih)\rangle \)

\(\langle \pi _{\mu (i)}^2+2\pi _{\mu (i)}\widehat{h}y^ex\rangle \)

 

(\(h\in {\mathcal {T}}_i{\setminus }\{0\}\))

 

10.

\(\langle \pi _i^3+2\pi _i(1+\pi _ih)\rangle \)

\(\langle \pi _{\mu (i)}+2\widehat{h}y^ex\rangle \)

 

(\(h\in {\mathcal {T}}_i{\setminus }\{0\}\))

 

11.

\(\langle \pi _i^3+2h\rangle \) (\(h\in {\mathcal {T}}_i\))

\(\langle \pi _{\mu (i)}^3+2\widehat{h}y^{3e}x^3\rangle \)

13.

\(\langle \pi _i^{j}+2\pi _i^{j-2}\rangle \) (\(j=2,3\))

\(\langle \pi _{\mu (i)}^{4-j}\rangle \)

14.

\(\langle \pi _i^{j},2\rangle \) (\(j=1,2,3\))

\(\langle 2\pi _{\mu (i)}^{4-j}\rangle \)

15.

\(\langle \pi _i^2+2, 2\pi _i\rangle \)

\(\langle \pi _{\mu (i)}^3,2\pi _{\mu (i)}^2\rangle \)

16.

\(\langle \pi _i^3,2\pi _i^2\rangle \)

\(\langle \pi _{\mu (i)}^2+2y^{2e}x^2, 2\pi _{\mu (i)}\rangle \)

17.

\(\langle \pi _i^3+2\pi _i, 2\pi _i^2\rangle \)

\(\langle \pi _{\mu (i)}^2,2\pi _{\mu (i)}\rangle \)

18.

\(\langle \pi _i^2,2\pi _i\rangle \)

\(\langle \pi _{\mu (i)}^3+2\pi _{\mu (i)}y^{2e}x^2, 2\pi _{\mu (i)}^2\rangle \)

19.

\(\langle \pi _i^2+2h, 2\pi _i\rangle \)

\(\langle \pi _{\mu (i)}^3+2\pi _{\mu (i)}(1+\widehat{h})y^{2e}x^2,2\pi _{\mu (i)}^2\rangle \)

 

(\(h\in {\mathcal {T}}_i{\setminus }\{0,1\}\))

 

20.

\(\langle \pi _i^3+2\pi _ih, 2\pi _i^2\rangle \)

\(\langle \pi _{\mu (i)}^2+2(1+\widehat{h})y^{2e}x^2,2\pi _{\mu (i)}\rangle \)

 

(\(h\in {\mathcal {T}}_i{\setminus }\{0,1\}\))

 

where \(\widehat{h}=b_0+\sum _{j=1}^{m_i-1}b_jy^{n-j}\) \((\mathrm{mod} \ f_{\mu (i)}(y))\) and \(\widehat{g}=g_0+\sum _{j=1}^{m_i-1}g_jy^{n-j}\) \((\mathrm{mod} \ f_{\mu (i)}(y))\) for any \(h=\sum _{j=0}^{m_i-1}b_jy^{j}, g=\sum _{j=0}^{m_i-1}g_jy^{j}\in {\mathcal {T}}_i\).

Proof

For any integer i, \(1\le i\le r\), let \(D_{\mu (i)}=\mu (\mathrm{Ann}(C_i))\). Then \(D_{\mu (i)}\) is an ideal of the ring \(R_{\mu (i)}[x]/\langle x^{4}-y\rangle \). Set \({\mathcal {D}}=\oplus _{i=1}^r({\mathcal {A}}_{\mu (i)}\Box _{\varphi _{\mu (i)}}D_{\mu (i)})=\oplus _{j=1}^r({\mathcal {A}}_{j}\Box _{\varphi _{j}}D_{j})\), where \(D_j=\mu (\mathrm{Ann}(C_{\mu (j)}))\). Then \({\mathcal {D}}\) is an ideal of \({\mathcal {A}}[x]/\langle x^{4}-y\rangle \). Since \(({\mathcal {A}}_i\Box _{\varphi _i}C_i)\cdot \mu ({\mathcal {A}}_{\mu (i)}\Box _{\varphi _{\mu (i)}}D_{\mu (i)})=({\mathcal {A}}_i\Box _{\varphi _i}C_i)\cdot ({\mathcal {A}}_i\Box _{\varphi _{i}}\mathrm{Ann}(C_i)) =\varepsilon _i(y)(C_i\cdot \mathrm{Ann}(C_i))=\{0\}\), by Lemma 4.4 we have \({\mathcal {C}}\cdot \mu ({\mathcal {D}})=\sum _{i=1}^r({\mathcal {A}}_i\Box _{\varphi _i}C_i)\cdot \mu ({\mathcal {A}}_{\mu (i)}\Box _{\varphi _{\mu (i)}}D_{\mu (i)})=\{0\}\). Hence \({\mathcal {D}}\subseteq {\mathcal {C}}^{\bot }\) by Lemma 4.1.

On the other hand, by Theorem 3.3 we see that \(|C_i||\mathrm{Ann}(C_i)|=2^{8m_i}\) for all \(i=1,\ldots ,r\), which implies

$$\begin{aligned} |{\mathcal {C}}||{\mathcal {D}}|= & {} \prod _{i=1}^r|{\mathcal {A}}_i\Box _{\varphi _i}C_i||{\mathcal {A}}_{\mu (i)}\Box _{\varphi _{\mu (i)}}D_{\mu (i)}| =\prod _{i=1}^r|C_i||D_{\mu (i)}|\\= & {} \prod _{i=1}^r|C_i||\mathrm{Ann}(C_i)|=4^{4\sum _{i=1}^rm_i}=4^{4n}\\= & {} |{\mathbb {Z}}_4[x]/\langle x^{4n}-1\rangle |. \end{aligned}$$

As stated above, we conclude that \({\mathcal {C}}^{\bot }={\mathcal {D}}\) since \({\mathbb {Z}}_4\) is a finite chain ring.

It is clear that \(x^{4n}=y^n=1\) in \(R_i[x]/\langle x^4-y\rangle \) for any \(i=1,\ldots ,r\). Now, for any integer l, \(1\le l\le 3\), by Eq. (3) we have

$$\begin{aligned} \mu \left( \pi _i^l\right)= & {} \left( \mu \left( y^ex-1\right) \right) ^l= \left( \left( y^{-1}\right) ^ex^{-1}-1\right) ^l= (-1)^ly^{-el}x^{-l}\left( y^ex-1\right) ^l\\= & {} (-1)^ly^{-el}x^{-l}\pi _{\mu (i)}^l =(-1)^ly^{n-el}x^{4n-l}\pi _{\mu (i)}^l\in R_{\mu (i)}[x]/\left\langle x^{4}-y\right\rangle . \end{aligned}$$

Then the conclusions follow from Theorem 3.3, Lemma 4.3 and direct calculations. \(\square \)

Finally, we list all distinct self-dual cyclic codes over \({\mathbb {Z}}_4\) of length 4n by the following corollary.

Corollary 4.6

Using the notations in Theorem 4.5 and Lemma 4.2 \((\mathrm{ii})\), let \({\mathcal {C}}\) be a cyclic code over \({\mathbb {Z}}_4\) of length 4n with \({\mathcal {C}}=\oplus _{i=1}^r({\mathcal {A}}_i\Box _{\varphi _i}C_i)\), where \(C_i\) is an ideal of \(R_i[x]/\langle x^{4}-y\rangle \). Then \({\mathcal {C}}\) is self-dual if and only if for each integer i, \(1\le i\le r\), \(C_i\) satisfies the following conditions:

  1. (i)

    If \(1\le i\le \lambda \), \(C_i\) is given by one of the following three cases:

    $$\begin{aligned} \langle 2\rangle , \ \left\langle \pi _i^2+2\left( 1+\pi _i\right) \right\rangle , \ \left\langle \pi _i^3\right\rangle . \end{aligned}$$
  2. (ii)

    If \(i=\lambda +j\) where \(1\le j\le \rho \), then \(C_i\) is an ideal of \(R_i[x]/\langle x^{4}-y\rangle \) and \(C_{i+\rho }=\mu (\mathrm{Ann}(C_i))\) which is given in the table of Theorem 4.5.

Hence the number of all self-dual cyclic codes over \({\mathbb {Z}}_4\) of length 4n is equal to

$$\begin{aligned} 3^\lambda \prod _{j=\lambda +1}^{\lambda +\rho } \left( 9+5\cdot 2^{m_{i}}+2^{2m_{i}}\right) . \end{aligned}$$

Proof

Using the notations in Lemma 4.2(ii), by Theorem 4.5 we have

$$\begin{aligned} {\mathcal {C}}= & {} \oplus _{i=1}^\lambda ({\mathcal {A}}_i\Box _{\varphi _i}C_i)\oplus \left( \oplus _{i=\lambda +1}^{\lambda +\rho } \left( ({\mathcal {A}}_{i}\Box _{\varphi _{i}}C_{i})\oplus ({\mathcal {A}}_{i+\rho }\Box _{\varphi _{i+\rho }}C_{i+\rho })\right) \right) ,\\ {\mathcal {C}}^{\bot }= & {} \oplus _{i=1}^\lambda ({\mathcal {A}}_i\Box _{\varphi _i}D_i)\oplus \left( \oplus _{i=\lambda +1}^{\lambda +\rho } \left( ({\mathcal {A}}_{i}\Box _{\varphi _{i}}D_{i})\oplus ({\mathcal {A}}_{i+\rho }\Box _{\varphi _{i+\rho }}D_{i+\rho })\right) \right) , \end{aligned}$$

where \(D_i=D_{\mu (i)}=\mu (\mathrm{Ann}(C_i))\) for all \(i=1,\ldots ,\lambda \), \(D_{i}=D_{\mu (i+\rho )}=\mu (\mathrm{Ann}(C_{i+\rho }))\) and \(D_{i+\rho }=D_{\mu (i)}=\mu (\mathrm{Ann}(C_{i}))\) for all \(i=\lambda +1,\ldots ,\lambda +\rho \).

Now, by Theorem 2.6 we conclude that \({\mathcal {C}}={\mathcal {C}}^{\bot }\) if and only if \(C_i=D_i\) for all \(i=1,\ldots ,\lambda +2\rho \). Precisely, \(C_i=D_i\) if and only if \(C_i\) satisfies the following conditions:

  1. (i)

    Let \(1\le i\le \lambda \). Then \(C_i=D_{\mu (i)}=\mu (\mathrm{Ann}(C_i))\). By Theorem 4.5, \(C_i\) must be given by one of the following five cases:

    • \(\langle 2\rangle \).

    • \(\langle \pi _i^2+2\pi _ih\rangle \), where \(h\in {\mathcal {T}}_i{\setminus }\{0\}\) satisfying \(h-(1+\pi _i\widehat{h}y^{-e}x^{-1})y^{2e}x^2\equiv 0\) (mod \(x^4-y, f_i(y), 2\)), i.e., \(((1+\widehat{h})y^{2e})x^2+(\widehat{h}y^e)x+h\equiv 0\) (mod \(x^4-y, f_i(y), 2\)). It is clear that there is no \(h\in {\mathcal {T}}_i{\setminus }\{0\}\) satisfying this condition.

    • \(\langle \pi _i^2+2(h+\pi _ig)\rangle \), where \(h\in {\mathcal {T}}_i{\setminus }\{0,1\}\) and \(g\in {\mathcal {T}}_i\) satisfying \(h+\pi _ig-(1+\widehat{h}+\pi _i\widehat{g}y^{-e}x^{-1})y^{2e}x^2\equiv 0\) (mod \(x^4-y, f_i(y), 2\)), i.e., \(((1+\widehat{h}+\widehat{g})y^{2e})x^2+((g+\widehat{g})y^e)x+(h+g)\equiv 0\) (mod \(x^4-y, f_i(y), 2\)). It is clear that there is no \(h\in {\mathcal {T}}_i{\setminus }\{0,1\}\) and \(g\in {\mathcal {T}}_i\) satisfying this condition.

    • \(\langle \pi _i^2+2(1+\pi _ih)\rangle \), where \(h\in {\mathcal {T}}_i{\setminus }\{0\}\) satisfying \(1+\pi _ih-\pi _i\widehat{h}y^ex\equiv 0\) (mod \(x^4-y, f_i(y), 2\)), i.e., \(((h+\widehat{h})y^e)x+(1+h)\equiv 0\) (mod \(x^4-y, f_i(y), 2\)). It is clear that the condition is equivalent to \(h=1\).

    • \(\langle \pi _i^3+2h\rangle \), where \(h\in {\mathcal {T}}_i\) satisfying \(h-\widehat{h}y^{3e}x^3\equiv 0\) (mod \(x^4-y, f_i(y), 2\)). It is clear that the condition is equivalent to \(h=0\).

    As stated above, we conclude that \(C_i\) must be given by one of the following three cases: \(\langle 2\rangle , \ \langle \pi _i^2+2(1+\pi _i)\rangle , \ \langle \pi _i^3\rangle .\)

  2. (ii)

    Let \(i=\lambda +j\) where \(1\le j\le \rho \). Then \(C_{i+\rho }=D_{i+\rho }=D_{\mu (i)}=\mu (\mathrm{Ann}(C_i))\) as \(\mu (i)=i+\rho \). Furthermore, \(C_{i+\rho }=D_{i+\rho }=\mu (\mathrm{Ann}(C_i))\) implies \(D_i=D_{\mu (i+\rho )}=\mu (\mathrm{Ann}(C_{i+\rho }))=\mu (\mathrm{Ann}(\mu (\mathrm{Ann}(C_i)))=C_i\).

Therefore, \((C_i, C_{i+\rho })\) is determined completely by the ideal \(C_i\) of \(R_i[x]/\langle x^{4}-y\rangle \) and the relation \(C_{i+\rho }=\mu (\mathrm{Ann}(C_i))\). Hence the number of pairs of \((C_i, C_{i+\rho })\) is equal to \(N_{(4,m_i,2)}=9+5\cdot 2^{m_i}+2^{2m_i}\) by Lemma 3.2.

Finally, from (i) and (ii) we deduce that number of all self-dual cyclic codes over \({\mathbb {Z}}_4\) of length 4n is equal to \(3^\lambda \prod _{i=\lambda +1}^{\lambda +\rho }(9+5\cdot 2^{m_{i}}+2^{2m_{i}})\). \(\square \)

5 Examples

In this section, we give all self-dual cyclic codes over \({\mathbb {Z}}_{4}\) of length 28 and 60.

\(\diamondsuit \) In the case of \(N=28=4n\) where \(n=7\), it is known that \(y^7-1=f_1(y)f_2(y)f_3(y)\), where \(f_1(y)=y-1\), \(f_2(y)=y^3+2y^2+y+3\) and \(f_3(y)=y^3+3y^2+2y+3\) are pairwise coprime monic basic irreducible polynomials in \({\mathbb {Z}}_{4}[y]\). Obviously, \(\widetilde{f}_1(y)=\delta _1f_1(y)\) and \(\widetilde{f}_2(y)=\delta _2f_3(y)\) where \(\delta _1=\delta _2=-1\), which implies that \(\mu (1)=1\) and \(\mu (2)=3\). Hence \(m_1=1\), \(m_2=m_3=3\), \(r=3\) and \(\lambda =\rho =1\). By Lemma 3.2 and Corollary 4.6, the number of cyclic codes and the number of self-dual cyclic codes over \({\mathbb {Z}}_{4}\) of length 28 is equal to \(\prod _{i=1}^3N_{(4,m_i;2)}=\prod _{i=1}^3(9+5\cdot 2^{m_i}+2^{2m_i})=23\cdot 113^2=293,687\) and \(3\cdot 113=339\), respectively.

Using the notations in Sect. 2, for each integer i, \(1\le i\le 3\), we denote \(F_i(y)=\frac{y^7-1}{f_i(y)}\), and find polynomials \(u_i(y),v_i(y)\in {\mathbb {Z}}_{4}[y]\) satisfying \(u_i(y)F_i(y)+v_i(y)f_i(y)=1\). Then set \(\varepsilon _i(y)\equiv u_i(y)F_i(y)\) (mod \(y^7-1\)). Precisely, we have

$$\begin{aligned} \varepsilon _1(y)= & {} 3+3y+3y^2+3y^3+3y^4+3y^5+3y^6;\\ \varepsilon _2(y)= & {} 1+3y+3y^2+2y^3+3y^4+2y^5+2y^6;\\ \varepsilon _3(y)= & {} 1+2y+2y^2+3y^3+2y^4+3y^5+3y^6. \end{aligned}$$

Let \({\mathcal {A}}={\mathbb {Z}}_4[y]/\langle y^7-1\rangle \) and \({\mathcal {A}}_i={\mathcal {A}}\varepsilon _i(y)\). Then \({\mathcal {A}}_i\) is a basic irreducible cyclic code over \({\mathbb {Z}}_4\) of length 7 with parity check polynomial \(f_i(y)\) for \(i=1,2,3\). Precisely, we know that

  • \({\mathcal {A}}_1\) is a free \({\mathbb {Z}}_4\)-submodule of \({\mathbb {Z}}_4^7\), \(\mathrm{rank}_{{\mathbb {Z}}_4}({\mathcal {A}}_1)=1\), and a generator matrix is given by \(G_{{\mathcal {A}}_1}=(3,3,3,3,3,3,3)\). Hence \({\mathcal {A}}_1=\{(a,a,a,a,a,a,a)\mid a\in {\mathbb {Z}}_4\}\) and \(d_{\mathrm{min}}({\mathcal {A}}_1)=7\).

  • \({\mathcal {A}}_2\) is a free \({\mathbb {Z}}_4\)-submodule of \({\mathbb {Z}}_4^7\), \(\mathrm{rank}_{{\mathbb {Z}}_4}({\mathcal {A}}_2)=3\), and a generator matrix is given by \(G_{{\mathcal {A}}_2}={\left( \begin{array}{c@{\quad }c@{\quad }c@{\quad }c@{\quad }c@{\quad }c@{\quad }c} 1 &{} 3 &{} 3 &{} 2 &{}3 &{} 2 &{}2 \\ 2 &{} 1 &{} 3 &{} 3 &{} 2 &{}3 &{} 2\\ 2 &{} 2 &{} 1 &{} 3 &{} 3 &{} 2 &{}3\end{array}\right) }\). Hence \({\mathcal {A}}_2=\{wG_{{\mathcal {A}}_2}\mid w\in {\mathbb {Z}}_4^3\}\) and \(d_{\mathrm{min}}({\mathcal {A}}_2)=4\).

  • \({\mathcal {A}}_3\) is a free \({\mathbb {Z}}_4\)-submodule of \({\mathbb {Z}}_4^7\), \(\mathrm{rank}_{{\mathbb {Z}}_4}({\mathcal {A}}_3)=3\), and a generator matrix is given by \(G_{{\mathcal {A}}_3}={\left( \begin{array}{c@{\quad }c@{\quad }c@{\quad }c@{\quad }c@{\quad }c@{\quad }c} 1 &{} 2 &{} 2 &{} 3 &{}2 &{} 3 &{}3 \\ 3 &{} 1 &{} 2 &{} 2 &{} 3 &{}2 &{} 3\\ 3 &{} 3 &{} 1 &{} 2 &{} 2 &{} 3 &{}2\end{array}\right) }\). Hence \({\mathcal {A}}_3=\{wG_{{\mathcal {A}}_3}\mid w\in {\mathbb {Z}}_4^3\}\) and \(d_{\mathrm{min}}({\mathcal {A}}_3)=4\).

Denote \(R_i={\mathbb {Z}}_4[y]/\langle f_i(y)\rangle \). Obviously, \(4\cdot 5\equiv -1\) (mod 7), which implies \((y^5)^4=y^{-1}\) by \(y^{7}=1\) in \(R_i\) for all \(i=1,2,3\). Using the notations in Sect. 3, we have \(e=5\). Therefore, by Corollary 4.6 we conclude that all distinct self-dual cyclic codes over \({\mathbb {Z}}_{4}\) of length 28 are given by

$$\begin{aligned} {\mathcal {C}}=({\mathcal {A}}_1\Box _{\varphi _1}C_1)\oplus ({\mathcal {A}}_2\Box _{\varphi _2}C_2)\oplus ({\mathcal {A}}_3\Box _{\varphi _3}C_3), \end{aligned}$$

where \(C_i\) is a y-constacyclic code over \(R_i\) of length 4, i.e., an ideal of the ring \(R_i[x]/\langle x^4-y\rangle \), satisfying the following conditions:

  • \(C_1\) is is an ideal of \({\mathbb {Z}}_4/\langle x^4-1\rangle \) given by one of the following 3 cases:

    $$\begin{aligned} \left\langle 2\right\rangle , \ \left\langle (x-1)^2+2x\right\rangle , \ \left\langle (x-1)^3\right\rangle . \end{aligned}$$
  • \((C_2,C_3)\) is given by one of the following 113 cases, since \(y^{-5}x^{-1}=yx^3\), \((y^5x)^2=y^3x^2\) and \((y^5x)^3=yx^3\):

Case

\(C_2\) (mod \(x^4-y, f_2(y)\))

\(C_{3}\) (mod \(x^4-y, f_{3}(y)\))

\(L_C\)

1.

\(\langle 0\rangle \)

\(\langle 1\rangle \)

1

2.

\(\langle 1\rangle \)

\(\langle 0\rangle \)

1

3.

\(\langle \pi _2^j\rangle \) (\(j=1,2\))

\(\langle \pi _{3}^{4-j}+2\pi _{3}^{2-j}y^{3}x^2\rangle \)

2

4.

\(\langle 2\rangle \)

\(\langle 2\rangle \)

1

5.

\(\langle 2\pi _2^s\rangle \) (\(s=1,2,3\))

\(\langle \pi _{3}^{4-s},2\rangle \)

3

6.

\(\langle \pi _2+2h\rangle \) (\(h\in {\mathcal {T}}_2{\setminus }\{0\}\))

\(\langle \pi _{3}^3+2\pi _{3}(1+\pi _{3}\widehat{h}yx^{3})y^{3}x^2\rangle \)

7

7.

\(\langle \pi _2^2+2\pi _2h\rangle \) (\(h\in {\mathcal {T}}_2{\setminus }\{0\}\))

\(\langle \pi _{3}^2+2(1+\pi _{3}\widehat{h}yx^{3})y^{3}x^2\rangle \)

7

8.

\(\langle \pi _2^2+2(h+\pi _2g)\rangle \)

\(\langle \pi _{3}^2+2(1+\widehat{h}+\pi _{3}\widehat{g}yx^{3})y^{3}x^2\rangle \)

48

 

(\(h\in {\mathcal {T}}_2{\setminus }\{0,1\}, g\in {\mathcal {T}}_2\))

  

9.

\(\langle \pi _2^2+2(1+\pi _2h)\rangle \)

\(\langle \pi _{3}^2+2\pi _{3}\widehat{h}y^5x\rangle \)

7

 

(\(h\in {\mathcal {T}}_2{\setminus }\{0\}\))

  

10.

\(\langle \pi _2^3+2\pi _2(1+\pi _2h)\rangle \)

\(\langle \pi _{3}+2\widehat{h}y^5x\rangle \)

7

 

(\(h\in {\mathcal {T}}_2{\setminus }\{0\}\))

  

11.

\(\langle \pi _2^3+2h\rangle \) (\(h\in {\mathcal {T}}_2\))

\(\langle \pi _{3}^3+2\widehat{h}yx^3\rangle \)

8

13.

\(\langle \pi _2^{j}+2\pi _2^{j-2}\rangle \) (\(j=2,3\))

\(\langle \pi _{3}^{4-j}\rangle \)

2

14.

\(\langle \pi _2^{j},2\rangle \) (\(j=1,2,3\))

\(\langle 2\pi _{3}^{4-j}\rangle \)

3

15.

\(\langle \pi _2^2+2, 2\pi _2\rangle \)

\(\langle \pi _{3}^3,2\pi _{3}^2\rangle \)

1

16.

\(\langle \pi _2^3,2\pi _2^2\rangle \)

\(\langle \pi _{3}^2+2y^{3}x^2, 2\pi _{3}\rangle \)

1

17.

\(\langle \pi _2^3+2\pi _2, 2\pi _2^2\rangle \)

\(\langle \pi _{3}^2,2\pi _{3}\rangle \)

1

18.

\(\langle \pi _2^2,2\pi _2\rangle \)

\(\langle \pi _{3}^3+2\pi _{3}y^{3}x^2, 2\pi _{3}^2\rangle \)

1

19.

\(\langle \pi _2^2+2h, 2\pi _2\rangle \)

\(\langle \pi _{3}^3+2\pi _{3}(1+\widehat{h})y^{3}x^2,2\pi _{3}^2\rangle \)

6

 

(\(h\in {\mathcal {T}}_2{\setminus }\{0,1\}\))

  

20.

\(\langle \pi _2^3+2\pi _2h, 2\pi _2^2\rangle \)

\(\langle \pi _{3}^2+2(1+\widehat{h})y^{3}x^2,2\pi _{3}\rangle \)

6

 

(\(h\in {\mathcal {T}}_2{\setminus }\{0,1\}\))

  

where \({\mathcal {T}}_2=\{\sum _{j=0}^2t_jy^j\mid t_0,t_1,t_2\in \{0,1\}\}\) and \(L_C\) is the number of pairs \((C_2,C_3)\) in the same row. Furthermore, we have the following

  • \(\pi _1=y^5x-1=x-1\in R_1[x]/\langle x^4-1\rangle \) where \(R_1={\mathbb {Z}}_4[y]/\langle f_1(y)\rangle ={\mathbb {Z}}_4\);

  • \(\pi _2=y^5x-1=(y^2+3y+3)x-1\in R_2[x]/\langle x^4-y\rangle \) since \(y^5\equiv y^2+3y+3\) (mod \(f_2(y)\));

  • \(\pi _3=y^5x-1=(2y^2+3y+3)x-1\in R_3[x]/\langle x^4-y\rangle \) since \(y^5\equiv 2y^2+3y+3\) (mod \(f_3(y)\)),

and \(\varphi _i: R_i\rightarrow {\mathcal {A}}_i\) is given by

  • \(\varphi _1(a)=a\varepsilon _1(y)\) for all \(a\in R_1\);

  • \(\varphi _i(a(y))=a(y)\varepsilon _i(y)\) for all \(a(y)\in R_i\), \(i=2,3\).

Next, by an example we describe how to obtain an encoder for each self-dual code over \({\mathbb {Z}}_{4}\) of length 28 listed above. Choose \({\mathcal {C}}=({\mathcal {A}}_1\Box _{\varphi _1}C_1)\oplus ({\mathcal {A}}_2\Box _{\varphi _2}C_2)\oplus ({\mathcal {A}}_3\Box _{\varphi _3}C_3)\), where \(C_1=\langle (x-1)^3\rangle \), \(C_2=\langle \pi _2^2+2(1+\pi _2h)\rangle \) and \(C_3=\langle \pi _3^2+2\pi _3\widehat{h}y^5x\rangle \) in which \(h=y+y^2\). As \(y^7=1\) we have \(\widehat{h}=y^{-1}+(y^{-1})^2=y^5+y^6\). By Cases 11 and 9 in Theorem 3.3, it follows that \(|C_1|=2^{4m_1}=4^2\) and \(|C_2|=|C_3|=2^{4m_2}=4^6\), which implies \(|{\mathcal {C}}|=|C_1||C_2||C_3|=4^{14}\). Furthermore, we have the following:

  • \(C_1=\langle 3+3x+x^2+x^3\rangle \). Then a generator matrix of the cyclic code \(C_1\) over \(R_1\) is \(G_{C_1}={\left( \begin{array}{c@{\quad }c@{\quad }c@{\quad }c} 3 &{} 3 &{} 1 &{} 1\\ 1 &{} 3 &{} 3 &{} 1\\ 1 &{} 1 &{} 3 &{} 3 \\ 3 &{}1 &{} 1 &{} 3\end{array}\right) }\). Since the companion matrix of \(f_1(y)=y-1\) is \(M_{f_1}=(1)\), by Theorem 2.5 a generator matrix of \({\mathcal {A}}_1\Box _{\varphi _1}C_1\) is given by

  • \(C_2=\langle (3+2y+2y^2)+(2+2y)x+(1+3y+2y^2)x^2\rangle \). Then a generator matrix of the y-constacyclic code \(C_2\) over \(R_2\) is given by

    $$\begin{aligned} G_{C_2}=\left( \begin{array}{c@{\quad }c@{\quad }c@{\quad }c}\alpha _2 &{} \beta _2 &{} \gamma _2 &{}0\\ {} 0 &{} \alpha _2 &{} \beta _2&{} \gamma _2\\ {} y\gamma _2 &{}0 &{} \alpha _2 &{}\beta _2\\ {} y\beta _2 &{} y\gamma _2 &{}0 &{} \alpha _2\end{array}\right) , \end{aligned}$$

    where \(\alpha _2=3+2y+2y^2\), \(\beta _2=2+2y\), \(\gamma _2=1+3y+2y^2\), \(y\beta _2=2y+2y^2\) and \(y\gamma _2=2+3y+3y^2\). Using the notations of Theorem 2.5, we have

    $$\begin{aligned} A_{\alpha _2}= & {} 3I_3+2M_{f_2}+2M_{f_2}^2=\left( \begin{array}{c@{\quad }c@{\quad }c} 3&{} 2 &{} 2 \\ 2 &{} 1&{} 2 \\ 2&{} 0&{} 1 \end{array}\right) ,\\ A_{\beta _2}= & {} 2I_3+2M_{f_2}=\left( \begin{array}{c@{\quad }c@{\quad }c} 2 &{} 2 &{} 0\\ 0 &{} 2&{} 2 \\ 2&{} 2&{} 2 \end{array}\right) ,\\ A_{\gamma _2}= & {} I_3+3M_{f_2}+2M_{f_2}^2=\left( \begin{array}{c@{\quad }c@{\quad }c} 1&{} 3 &{} 2 \\ 2 &{} 3&{} 3 \\ 3&{} 3&{} 1 \end{array}\right) ,\\ A_{y\beta _2}= & {} 2M_{f_2}+2M_{f_2}^2=\left( \begin{array}{c@{\quad }c@{\quad }c} 0 &{} 2 &{} 2 \\ 2 &{} 2&{} 2 \\ 2&{} 0&{} 2 \end{array}\right) ,\\ A_{y\gamma _2}= & {} 2I_3+3M_{f_2}+3M_{f_2}^2=\left( \begin{array}{c@{\quad }c@{\quad }c} 2 &{} 3 &{} 3 \\ 3 &{} 3&{} 1 \\ 1&{} 2&{} 1 \end{array}\right) . \end{aligned}$$

Since the companion matrix of \(f_2(y)\) is \(M_{f_2}={\left( \begin{array}{c@{\quad }c@{\quad }c} 0 &{} 1 &{} 0 \\ 0 &{} 0&{} 1 \\ 1&{} 3&{}2 \end{array}\right) }\), by Theorem 2.5 a generator matrix of \({\mathcal {A}}_2\Box _{\varphi _2}C_2\) is given by

  • \(C_3=\langle 1+2x+(1+3y^2)x^2\rangle \). Then a generator matrix of the y-constacyclic code \(C_3\) over \(R_3\) is given by

    $$\begin{aligned} G_{C_3}=\left( \begin{array}{c@{\quad }c@{\quad }c@{\quad }c}1&{} 2 &{} \alpha _3 &{} 0 \\ {} 0 &{} 1&{} 2 &{} \alpha _3\\ {} y\alpha _3 &{}0 &{} 1&{} 2 \\ {} 2y &{} y\alpha _3 &{}0 &{} 1\end{array}\right) , \end{aligned}$$

    where \(\alpha _3=1+3y^2\), \(y\alpha _3=3+3y+3y^2\). Using the notations in Theorem 2.5, we have \(A_y=M_{f_3}\) and

    $$\begin{aligned} A_{\alpha _3}= & {} I_3+3M_{f_3}^2=\left( \begin{array}{c@{\quad }c@{\quad }c} 1 &{} 0&{} 3 \\ 3 &{} 3&{} 3 \\ 3 &{} 1 &{} 2 \end{array}\right) ,\\ A_{y\alpha _3}= & {} 3I_3+3M_{f_3}+3M_{f_3}^2=\left( \begin{array}{c@{\quad }c@{\quad }c} 3&{} 3 &{} 3 \\ 3 &{} 1&{} 2 \\ 2&{} 3&{}3 \end{array}\right) . \end{aligned}$$

Since the companion matrix of \(f_3(y)\) is \(M_{f_3}={\left( \begin{array}{c@{\quad }c@{\quad }c} 0 &{} 1 &{} 0 \\ 0 &{} 0&{} 1 \\ 1&{} 2&{}1 \end{array}\right) }\), by Theorem 2.5 a generator matrix of \({\mathcal {A}}_3\Box _{\varphi _2}C_3\) is given by

Then by Corollary 3.5, a generator matrix of the self-dual cyclic code \({\mathcal {C}}\) over \({\mathbb {Z}}_4\) of length 28 is given by \(G_{{\mathcal {C}}}={\left( \begin{array}{c}G_{{\mathcal {A}}_1\Box _{\varphi _1}C_1}\\ G_{{\mathcal {A}}_2\Box _{\varphi _2}C_2} \\ G_{{\mathcal {A}}_3\Box _{\varphi _3}C_3}\end{array}\right) }\). Now, by performing a reduction on \(G_{{\mathcal {C}}}\) we obtain a standard generator matrix of the self-dual cyclic code \({\mathcal {C}}\) over \({\mathbb {Z}}_4\) of length 28 given by \(\mathbf G ={\left( \begin{array}{c}{} \mathbf g _1\\ \mathbf g _2\\ \ldots \\ \mathbf g _{14} \end{array}\right) }\), where

$$\begin{aligned} \mathbf g _1= & {} (1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3);\\ \mathbf g _2= & {} (3,3,3,3,3,3,3,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,3,3,3,3,3,3);\\ \mathbf g _3= & {} (3,3,1,2,3,0,0,2,0,0,2,2,2,0,3, 2, 2, 1, 3, 3, 2,0, 0, 0, 0, 0, 0, 0);\\ \mathbf g _4= & {} (0,3,3,1,2,3,0,0,2,0,0,2,2,2,2, 3, 2, 2, 1, 3, 3,0, 0, 0, 0, 0, 0, 0);\\ \mathbf g _5= & {} (0,0,3,3,1,2,3, 2,0,2,0,0,2,2,3,2,3,2,2,1,3,0, 0, 0, 0, 0, 0, 0);\\ \mathbf g _6= & {} (0,0,0,0,0,0,0, 3, 3, 1, 2, 3, 0, 0,2, 0, 0, 2, 2, 2, 0,3, 2, 2, 1, 3, 3, 2);\\ \mathbf g _7= & {} (0,0,0,0,0,0,0,0, 3, 3, 1, 2, 3, 0,0, 2, 0, 0, 2, 2, 2, 2, 3, 2, 2, 1, 3, 3);\\ \mathbf g _8= & {} (0,0,0,0,0,0,0,0, 0, 3, 3, 1, 2, 3,2, 0, 2, 0, 0, 2, 2,3, 2, 3, 2, 2, 1, 3);\\ \mathbf g _9= & {} (1, 2, 2, 3, 2, 3, 3, 2, 0, 0, 2, 0, 2, 2, 2, 3, 1, 1, 0, 0, 1,0,0,0,0,0,0,0);\\ \mathbf g _{10}= & {} (3, 1, 2, 2, 3, 2, 3,2, 2, 0, 0, 2, 0, 2,1, 2, 3, 1, 1, 0, 0,0,0,0,0,0,0,0);\\ \mathbf g _{11}= & {} (3, 3, 1, 2, 2, 3, 2, 2, 2, 2, 0, 0, 2, 0,0, 1, 2, 3, 1, 1, 0,0,0,0,0,0,0,0);\\ \mathbf g _{12}= & {} (0,0,0,0,0,0,0, 1, 2, 2, 3, 2, 3, 3, 2, 0, 0, 2, 0, 2,2, 2, 3, 1, 1, 0, 0, 1);\\ \mathbf g _{13}= & {} (0,0,0,0,0,0,0, 3, 1, 2, 2, 3, 2, 3, 2, 2, 0, 0, 2, 0, 2, 1, 2, 3, 1, 1, 0, 0);\\ \mathbf g _{14}= & {} (0,0,0,0,0,0,0, 3, 3, 1, 2, 2, 3, 2, 2, 2, 2, 0, 0, 2, 0, 0, 1, 2, 3, 1, 1, 0). \end{aligned}$$

Therefore, \({\mathcal {C}}\) is encoded by

$$\begin{aligned} {\mathcal {C}}=\left\{ \underline{u}{} \mathbf G \mid \underline{u}\in {\mathbb {Z}}_4^{14}\right\} =\left\{ \sum _{j=1}^{14}u_j\mathbf g _j\mid u_1,\ldots ,u_{14}\in {\mathbb {Z}}_4\right\} . \end{aligned}$$

Precisely, the Hamming weight enumerator of the self-dual cyclic code \({\mathcal {C}}\) over \({\mathbb {Z}}_4\) of length 28 is given by

$$\begin{aligned} W_C^{(H)}(Y)= & {} 1+14Y^2+91Y^4+364Y^6+448Y^7+1001Y^8+4032Y^9\\&+18130Y^{10}+41216Y^{11}+154875Y^{12}+344064Y^{13}+890472Y^{14}\\&+1828736Y^{15}+ 3660475Y^{16}+6340992Y^{17}+9985234Y^{18}\\&+13558272Y^{19}+17731945Y^{20}+19586560Y^{21}+20430956Y^{22}\\&+16488640Y^{23}+11621211Y^{24}+6754496Y^{25}+3548174Y^{26}\\&+1112832Y^{27}+114497Y^{28}. \end{aligned}$$

\(\diamondsuit \) In the case of \(N=60=4\cdot 15\). Using the notations of Lemma 4.2, by Example 3.4 we see that

$$\begin{aligned} \widetilde{f}_1(y)=-f_1(y), \ \widetilde{f}_2(y)=f_2(y), \ \widetilde{f}_3(y)=f_3(y) \ \mathrm{and} \ \widetilde{f}_4(y)=f_5(y), \end{aligned}$$

which imply \(\mu (4)=5\) and \(\mu (i)=i\) for \(i=1,2,3\). Hence \(\lambda =3\) and \(\rho =1\). From these and by Corollary 4.6, we deduce that the number of self-dual cyclic codes over \({\mathbb {Z}}_{4}\) of length 60 is equal to \(3^3\cdot 345=9315\).

Specifically, all distinct self-dual cyclic codes over \({\mathbb {Z}}_{4}\) of length 60 are the following:

$$\begin{aligned} ({\mathcal {A}}_1\Box _{\varphi _1}C_1)\oplus ({\mathcal {A}}_2\Box _{\varphi _2}C_2)\oplus ({\mathcal {A}}_3\Box _{\varphi _3}C_3)\oplus ({\mathcal {A}}_4\Box _{\varphi _4}C_4)\oplus ({\mathcal {A}}_5\Box _{\varphi _5}C_5), \end{aligned}$$
  • For each integer i, \(1\le i\le 3\), \(C_i\) is given by one of the following cases:

    $$\begin{aligned} \left\langle 2\right\rangle , \ \left\langle \pi _i^2+2(1+\pi _i)\right\rangle , \ \left\langle \pi _i^3\right\rangle , \end{aligned}$$

    which are y-constacyclic codes over \(R_i\) of length 4.

  • As \(x^{-1}=x^{59}=(x^4)^{14}x^3=y^{14}x^3\), we have \(y^{-11}x^{-1}=y^3x^3\) and \(y^{22}=y^7\). By Theorem 4.5 and Corollary 4.6, \((C_4,C_5)\) is given by one of the following cases:

Case

\(C_4\) (mod \(x^4-y, f_4(y)\))

\(C_5\) (mod \(x^4-y, f_{5}(y)\))

\(L_C\)

1.

\(\langle 0\rangle \)

\(\langle 1\rangle \)

1

2.

\(\langle 1\rangle \)

\(\langle 0\rangle \)

1

3.

\(\langle \pi _4^j\rangle \) (\(j=1,2\))

\(\langle \pi _{5}^{4-j}+2\pi _{5}^{2-j}y^{7}x^2\rangle \)

2

4.

\(\langle 2\rangle \)

\(\langle 2\rangle \)

1

5.

\(\langle 2\pi _4^s\rangle \) (\(s=1,2,3\))

\(\langle \pi _{5}^{4-s},2\rangle \)

3

6.

\(\langle \pi _4+2h\rangle \) (\(h\in {\mathcal {T}}_4{\setminus }\{0\}\))

\(\langle \pi _{5}^3+2\pi _{5}(1+\pi _{5}\widehat{h}y^{3}x^{3})y^{7}x^2\rangle \)

15

7.

\(\langle \pi _4^2+2\pi _4h\rangle \) (\(h\in {\mathcal {T}}_4{\setminus }\{0\}\))

\(\langle \pi _{5}^2+2(1+\pi _{5}\widehat{h}y^{3}x^{3})y^{7}x^2\rangle \)

15

8.

\(\langle \pi _4^2+2(h+\pi _4g)\rangle \)

\(\langle \pi _{5}^2+2(1+\widehat{h}+\pi _{5}\widehat{g}y^{3}x^{3})y^{7}x^2\rangle \)

224

 

(\(h\in {\mathcal {T}}_4{\setminus }\{0,1\}, g\in {\mathcal {T}}_4\))

  

9.

\(\langle \pi _4^2+2(1+\pi _4h)\rangle \)

\(\langle \pi _{5}^2+2\pi _{5}\widehat{h}y^{11}x\rangle \)

15

 

(\(h\in {\mathcal {T}}_4{\setminus }\{0\}\))

  

10.

\(\langle \pi _4^3+2\pi _4(1+\pi _4h)\rangle \)

\(\langle \pi _{5}+2\widehat{h}y^{11}x\rangle \)

15

 

(\(h\in {\mathcal {T}}_4{\setminus }\{0\}\))

  

11.

\(\langle \pi _4^3+2h\rangle \) (\(h\in {\mathcal {T}}_4\))

\(\langle \pi _{5}^3+2\widehat{h}y^{3}x^3\rangle \)

16

13.

\(\langle \pi _4^{j}+2\pi _4^{j-2}\rangle \) (\(j=2,3\))

\(\langle \pi _{5}^{4-j}\rangle \)

2

14.

\(\langle \pi _4^{j},2\rangle \) (\(j=1,2,3\))

\(\langle 2\pi _{5}^{4-j}\rangle \)

3

15.

\(\langle \pi _4^2+2, 2\pi _4\rangle \)

\(\langle \pi _{5}^3,2\pi _{5}^2\rangle \)

1

16.

\(\langle \pi _4^3,2\pi _4^2\rangle \)

\(\langle \pi _{5}^2+2y^{7}x^2, 2\pi _5\rangle \)

1

17.

\(\langle \pi _4^3+2\pi _4, 2\pi _4^2\rangle \)

\(\langle \pi _{5}^2,2\pi _{5}\rangle \)

1

18.

\(\langle \pi _4^2,2\pi _4\rangle \)

\(\langle \pi _{5}^3+2\pi _{5}y^{7}x^2, 2\pi _{5}^2\rangle \)

1

19.

\(\langle \pi _4^2+2h, 2\pi _4\rangle \)

\(\langle \pi _{5}^3+2\pi _{5}(1+\widehat{h})y^{7}x^2,2\pi _{5}^2\rangle \)

14

 

(\(h\in {\mathcal {T}}_4{\setminus }\{0,1\}\))

  

20.

\(\langle \pi _4^3+2\pi _4h, 2\pi _4^2\rangle \)

\(\langle \pi _{5}^2+2(1+\widehat{h})y^{7}x^2,2\pi _{5}\rangle \)

14

 

(\(h\in {\mathcal {T}}_4{\setminus }\{0,1\}\))

  

where \({\mathcal {T}}_4=\{\sum _{j=0}^3t_jy^j\mid t_0,t_1,t_2,t_3\in \{0,1\}\}\) and \(L_C\) is the number of pairs \((C_4,C_5)\) in the same row.

Finally, we list the number \({\mathcal {N}}\) of self-dual cyclic codes over \({\mathbb {Z}}_4\) of length 4n, where n is odd and \(12\le 4n\le 100\), by the following table.

4n

\({\mathcal {N}}\)

4n

\({\mathcal {N}}\)

4n

\({\mathcal {N}}\)

12, 20, 44, 52, 76

9

28

339

84

4,500,225

36, 68, 100

27

60

9315

92

12,613,659

6 Conclusions

We have given precise description for cyclic codes over \({\mathbb {Z}}_4\), present precisely dual codes and investigate self-duality for cyclic codes over \({\mathbb {Z}}_4\) of length 4n. These codes enjoy a rich algebraic structure compared to arbitrary linear codes (which makes the search process much simpler). Obtaining some bounds for minimal distance such as BCH-like of a cyclic code over the ring \({\mathbb {Z}}_4\) by just looking at the concatenated structure would be rather interesting.