Cyclic codes over finite rings are important class from a theoretical and practical viewpoint. It was shown that certain good nonlinear binary codes could be found as images of linear codes over $\mathbb{Z}_4$ under the Gray map (see [1]). In [2], Zhu et al. studied constacyclic codes over ring $\mathbb{F}_2+v\mathbb{F}_2$ , where $v^2=v$ . We in [3] generated ring $\mathbb{F}_2+v\mathbb{F}_2$ to ring $\mathbb{F}_2+u\mathbb{F}_2+v\mathbb{F}_2$ , where $v^2=v, u^2=0, uv=vu=0 $ , and studied the structure of cyclic of an arbitrary length $n$ over this ring.
Boucher et al. in [4] initiated the study of skew cyclic codes over a noncommutative ring $\mathbb{F}_q[x, \Theta]$ , called skew polynomial ring, where $\mathbb{F}_{q}$ is a finite field and $\Theta$ is a field automorphism of $\mathbb{F}_{q}$ . Later, in [5], Abualrub and Seneviratne investigated skew cyclic codes over ring $\mathbb{F}_2 + v\mathbb{F}_2$ with $v^2 = v$ . Moreover, Gao [6] and Gursoy et al. [7] presented skew cyclic codes over $\mathbb{F}_p +v\mathbb{F}_p$ and $\mathbb{F}_q +v\mathbb{F}_q$ with different automorphisms, respectively. Recently, Yan, Shi and Solè in [8] investigated skew cyclic codes over $\mathbb{F}_q+u\mathbb{F}_a+v\mathbb{F}_q+v\mathbb{F}_q$ .
In this work, let $R$ denote the ring $\mathbb{F}_q+u\mathbb{F}_q+v\mathbb{F}_q $ where $u^2=u, v^2=v$ and $uv=vu=0$ . In Section 2, we give some properties of ring $R$ and define the Gray map $\varphi$ from $R$ to $\mathbb{F}_q^{3}$ . Moreover, we investigate some results about linear codes over $R$ . In Section 3, we first give a sufficient and necessary condition which a code $C$ is a skew cyclic code over $R$ . We then characterize the generator polynomials of skew cyclic codes and their dual over $R$ . Finally, in Section 4, we address the relationship of LCD codes between $R$ and $\mathbb{F}_q$ . By means of the Gray map from $R$ to $\mathbb{F}_q^3$ , we obtain that Gray images of LCD codes over $R$ are LCD codes over $\mathbb{F}_q$ .
The ring $R$ is a finite commutative ring with characteristic $p$ and it contains three maximal ideals which are
It is easy to verify that $\frac{R}{I_1}, \frac{R}{I_{2}}$ , and $\frac{R}{I_{3}}$ are isomorphic to $\mathbb{F}_q$ . Therefore $R\cong \mathbb{F}_q^{3}$ . This means that $R$ is a princpal ideal ring, i.e., $R$ is a Frobenius ring.
Let $R^n=\{{\bf x}=(x_1, \cdots, x_n)\, |\, x_j\in R\}$ be $R$ -module. A $R$ -submodule $C$ of $R^n$ is called a linear code of length $n$ over $R$ . We assume throughout that all codes are linear.
Let ${\bf x}, {\bf y}\in R^n$ , the Euclidean inner product of ${\bf x}, {\bf y}$ is defined as follows
We call $C^{\bot}=\{{\bf x}\in R^n\, |\, {\bf x}\cdot{\bf c}=0, \, \forall \, {\bf c}\in C\}$ as the dual code of $C$ . Notice that $C^{\bot}$ is linear if $C$ is linear or not.
In [8], it was proved that for any linear code $C$ over a finite Frobenius ring,
The Gray map $\varphi:~R^{n}\rightarrow\mathbb{F}_{q}^{3n}$ is defined by $\varphi({\bf{x}})=(\beta(x_1), \cdots, \beta(x_n))$ for ${\bf{x}}=(x_1, \cdots, x_n)$ , where $\beta(a+ub+vc)=(a, a+b, a+c)$ for $a+ub+vc\in R$ with $a, b, c\in\mathbb{F} _{q}$ . By using this map, we can define the Lee weight $W_L$ and Lee distance $d_L$ as follows.
Definition 2.1 For any element ${\bf{x}}=(x_1, \cdots, x_n)\in R^n$ , we define $W_L({\bf{x}})=W_H(\varphi({\bf{x}}))$ , where $W_H$ denotes the ordinary Hamming weight for codes over $\mathbb{F} _{q}$ . The Lee distance $d_L({\bf{x}}, {\bf{y}})$ between two codewords ${\bf{x}}$ and ${\bf{y}}$ is the Lee weight of ${\bf{x}}-{\bf{y}}$ .
Lemma 2.2 The Gray map $\varphi$ is a distance-preserving map from $(R^n, ~{\rm Lee~distance})$ to $(\mathbb{F}^{3n}, ~{\rm Hamming~distance})$ and also $\mathbb{F}_{q}$ -linear.
Proof From the definition, it is clear that $\varphi({\bf{x}}-{\bf{y}})=\varphi({\bf{x}})-\varphi({\bf{y}})$ for ${\bf{x}}$ and ${\bf{y}}\in R^n$ . Thus $d_L({\bf{x}}, {\bf{y}})=d_H(\varphi({\bf{x}}), \varphi({\bf{y}}))$ .
For any ${\bf{x}}, {\bf{y}}\in R^n$ , $a, b\in \mathbb{F}_q$ , from the definition of the Gray map, we have $\varphi(a{\bf{x}}+b{\bf{y}})=a\varphi({\bf{x}})+b\varphi({\bf{y}})$ , which implies that $\varphi$ is an $\mathbb{F}_{q}$ -linear map.
The following theorem is obvious.
Theorem 2.3 If $C$ is a linear code of length $n$ over $R$ , size $q^k$ and Lee distance $d_L$ , then $\varphi(C)$ is a linear code over $\mathbb{F}_{q}$ with parameters $[3n, k, d_L]$ .
Theorem 2.4 If $C$ is a linear code of length $n$ over $R$ , then $\varphi(C^{\perp})=\varphi(C)^{\perp}$ . Moreover, if $C$ is a self-dual code, so is $\varphi(C)$ .
Proof Let ${\bf{x}}_1={\bf{a}}_1+u{\bf{b}}_1+v{\bf{c}}_1, {\bf{x}}_2={\bf{a}}_2+u{\bf{b}}_2+v{\bf{c}}_2\in C$ be two codewords, where ${\bf{a}}_1, {\bf{b}}_1, {\bf{c}}_1, {\bf{a}}_2, {\bf{b}}_2, {\bf{c}}_2\in\mathbb{F}_q^{n}$ , and $\cdot$ be the Euclidean inner product on $R^n$ or $\mathbb{F}_q^{n}$ . Then
and
It is easy to check that ${\bf{x}}_1\cdot{\bf{x}}_2=0$ implies $\varphi({\bf{x}}_1)\cdot\varphi({\bf{x}}_2)=0$ . Therefore
But by Theorem 2.3, $\varphi(C)$ is a linear code of length $3n$ of size $\mid C\mid$ over $\mathbb{F}_q$ . So by usual properties of the dual of linear codes over finite fields, we know that $\mid\varphi(C)^\perp\mid=\frac{q^{3n}}{\mid C\mid}$ . So ${\rm (2.1)}$ , this implies
Combining ${\rm (2.2)}$ with ${\rm (2.3)}$ , we get the desired equality.
Let $e_1=1-u-v, e_2=u, e_3=v$ . It is easy to check that $e_ie_j=\delta_{ij}e_i$ and $\sum\limits_{k=1}^{3}e_k=1$ , where $\delta_{ij}$ stands for Dirichlet function, i.e., $\delta_{ij}=\left\{\begin{aligned} 1, ~{\rm if}~i=j, \\ 0, ~{\rm if}~i\neq j. \end{aligned}\right.$ According to [9], we have $R=e_1R\oplus e_2R\oplus e_3R$ .
Now, we mainly consider some familiar structural properties of a linear code $C$ over $R$ . The proof of following results can be found in [10], so we omit them here.
Let $A_i~(i=1, 2, 3)$ be codes over $R$ . We denote
If $C$ is a linear code of length $n$ over $R$ , we define that
It is easy to verity that $C_i~(i=1, 2, 3)$ are linear codes of length $n$ over $\mathbb{F}_{q}$ . Furthermore, $C=e_1C_1\oplus e_2C_2\oplus e_3C_3$ and $\mid C\mid=\mid C_1\mid\mid C_2\mid\mid C_3\mid$ . Throughout this paper, $C_i~(i=1, 2, 3)$ will be reserved symbols referring to these special subcodes.
According to above definition and [10], we have the following theorem.
Theorem 2.5 If $C=e_1C_1\oplus e_2C_2\oplus e_3C_3$ is a linear code of length $n$ over $R$ , then $C^{\perp}=e_1C_1^{\perp} \oplus e_2C_2^{\perp}\oplus e_3C_3^{\perp}$ .
The next theorem gives a computation for minimum Lee distance $d_L$ of a linear code of length $n$ over $R$ .
Theorem 2.6 If $C=e_1C_1\oplus e_2C_2\oplus e_3C_3$ is a linear code of length $n$ over $R$ , then $d_L(C)=\min\{d_H(C_1), d_H(C_2), d_H(C_3)\}$ .
Proof By Theorem 2.3, we have $d_L(C)=d_H(\varphi(C))$ .
For any codeword ${\bf{x}} $ , it can be written as ${\bf{x}}=e_1{\bf{a}}+e_2{\bf{b}}+e_3{\bf{c}} $ , where ${\bf{a}}\in C_1, {\bf{b}}\in C_2, {\bf{c}}\in C_3$ . Thus
This means that $d_L(C)=\min\{d_H(C_1), d_H(C_2), d_H(C_3)\}$ .
Let $R=\mathbb{F}_q+u\mathbb{F}_q+v\mathbb{F}_q$ , where $q = p^m$ , $p$ is a prime. For integer $0\leq s\leq m$ , we consider the automorphisms
In this section, we first define skew polynomial rings $R[x, \Theta_s]$ and skew cyclic codes over $R$ . Next, we investigate skew cyclic codes over $R$ through a decomposition theorem.
Definition 3.1 We define the skew polynomial ring as $R[x, \Theta_s]= \{a_0 + a_1x + \cdots + a_nx^n|a_i \in R, i = 0, 1, \cdots, n\}$ , where the coefficients are written on the left of the variable $x$ . The addition is the usual polynomial addition and the multiplication is defined by the rule $xa=\Theta_s(a)x~(a\in R)$ .
It is easy to prove that the ring $R[x, \Theta_s]$ is not commutative unless $\Theta_s$ is the identity automorphism on $R$ .
Definition 3.2 A linear code $C$ of length $n$ over $R$ is called skew cyclic code if for any codeword ${\bf{c}}=(c_0, c_1, \cdots , c_{n-1})\in C$ , the vector $\Theta_s({\bf{c}})=(\Theta_s(c_{n-1}), \Theta_s(c_0), \cdots , \Theta_s(c_{n-2}))$ is also a codeword in $C$ .
The following theorem characterizes skew cyclic codes of length $n$ over $R$ .
Theorem 3.3 Let $C=e_1C_{1}\oplus e_2C_{2}\oplus e_3C_{3}$ be a linear code of length $n$ over $R$ . Then $C$ is a skew cyclic code of length $n$ over $R$ if and only if $C_{1}$ , $C_{2}$ and $C_{3}$ are skew cyclic codes of length $n$ over $\mathbb{F}_q$ , respectively.
Proof Suppose that $x_{i}=e_1a_{i}+e_2b_{i}+e_3c_i$ , where $a_{i}, b_{i}, c_i\in \mathbb{F}_q$ , $i=0, 1, \cdots, n-1$ , and ${\bf{x}}=(x_{0}, x_{1}, \cdots, x_{n-1})$ . Then
Set ${\bf{a}}=( a_{0}, a_{1}, \cdots, a_{n-1})$ , ${\bf{b}}=( b_{0}, b_{1}, \cdots, b_{n-1})$ , ${\bf{c}}=(c_{0}, c_{1}, \cdots, c_{n-1})$ , thus ${\bf{x}}=e_1{\bf{a}}+e_2{\bf{b}}+e_3{\bf{c}}$ and ${\bf{a}}\in C _{1}$ , ${\bf{b}}\in C_{2}$ , ${\bf{c}}\in C_3$ . If $C$ is a skew cyclic code of length $n$ over $R$ , then
Therefore $\Theta_{s}({\bf{a}})\in C _{1}, \Theta_{s}({\bf{b}})\in C_{2}, \Theta_{s}({\bf{c}})\in C_3.$ This means that $C_{1}$ , $C_{2}$ and $C_{3}$ are skew cyclic codes.
Conversely, if $C_i$ are skew cyclic codes over $\mathbb{F}_q$ , then
This implies that $C$ is a skew cyclic code over $R$ .
Theorem 3.4 Let $C=e_1C_{1}\oplus e_2C_{2}\oplus e_3C_{3}$ be a skew cyclic code of length $n$ over $R$ . Then
(1) $C=\langle e_1g_1(x), e_2g_2(x), e_3g_3(x)\rangle$ and $\mid C\mid=q^{3n-\sum\limits_{i=1}^{3}{\rm deg}g_i(x)}$ , where $g_i(x)$ is a generator polynomial of skew cyclic codes $C_i$ of length $n$ over $\mathbb{F}_q$ for i=1, 2, 3.
(2) There is a unique polynomial $g(x)$ such that $C=\langle g(x)\rangle$ and $g(x)|x^n-1$ , where $g(x)=e_1g_1(x)+e_2g_2(x)+e_3g_3(x)$ . Moreover, every left submodule of $R[x, \Theta_s]/\langle x^n-1\rangle $ is principally generated.
Proof ${\rm (1)}$ Since $C_i=\langle g_i(x)\rangle\subset\mathbb{F}_q[x, \Theta_s]/\langle x^n-1\rangle$ for $i=1, 2, 3$ and $C=e_1C_{1}\oplus e_2C_{2}\oplus e_3C_{3}$ , $C=\langle c(x) |c(x)=e_1f_1(x)+e_2f_2(x)+e_3f_3(x), f_i(x)\in C_i, i=1, 2, 3\rangle$ . Thus
On the other hand, for any $e_1r_1(x)g_1(x)+e_2r_2(x)g_2(x)+e_3r_3(x)g_3(x)\in \langle e_1g_1(x), e_2g_2(x), $ $e_3g_3(x)\rangle\subset R[x, \Theta_s]/\langle x^n-1\rangle, $ where $r_1(x)$ , $r_2(x)$ and $r_3(x)\in R[x, \Theta_s]/\langle x^n-1\rangle$ , there exist $s_1(x)$ , $s_2(x)$ and $s_3(x)\in \mathbb{F}_q[x, \Theta_s]/\langle x^n-1\rangle$ such that $e_1r_1(x)=e_1s_1(x)$ , $e_2r_2(x)=e_2s_2(x)$ and $e_3r_3(x)=e_3s_3(x)$ . Hence
which implies that $\langle e_1g_1(x), e_2g_2(x), e_3g_3(x)\rangle\subset C$ . Therefore $C=\langle e_1g_1(x), e_2g_2(x), e_3g_3(x)\rangle$ .
In light of $\mid C\mid=\mid C_1\mid\mid C_2\mid\mid C_3\mid$ , we have $\mid C\mid=q^{3n-\sum\limits_{i=1}^{3}{\rm deg}g_i(x)}$ .
(2) Obviously, $\langle e_1g_1(x)+e_2g_2(x)+e_3g_3(x)\rangle \subset\langle e_1g_1(x), e_2g_2(x), e_3g_3(x)\rangle$ .
Note that $e_1g(x)=e_1g_1(x)$ , $e_2g(x)=e_2g_2(x)$ and $e_3g(x)=e_3g_3(x)$ , we have $C\subset\langle g(x)\rangle$ . Therefore, $C=\langle g(x)\rangle$ .
Since $g_1(x)$ , $g_2(x)$ and $g_3(x)$ are monic right divisors of $ x^n-1$ , there exist $h_1(x)$ , $h_2(x)$ and $h_3(x)\in\mathbb{F}_q[x, \Theta_s]/\langle x^n-1\rangle$ such that $x^n-1=h_1(x)g_1(x)=h_2(x)g_2(x)=h_3(x)g_3(x)$ . Therefore $x^n-1=[e_1h_1(x)+e_2h_2(x)+e_3h_3(x)]g(x)$ . It follows that $g(x)|x^n-1$ . The uniqueness of $g(x)$ can be followed from that of $g_1(x)$ , $g_2(x)$ and $g_3(x)$ .
Let $g(x)=g_0+g_1x+\cdots+g_k x^k $ and $h(x)=h_0+h_1x+\cdots+h_{n-k}x^{n-k}$ be polynomials in $\mathbb{F}_q[x, \Theta_s]$ such that $x^n-1=h(x)g(x)$ and $C$ be the skew cyclic code generated by $g(x)$ in $\mathbb{F}_q[x, \Theta_s]$ . Then the dual code of $C$ is a skew cyclic code generated by the polynomial $\overline{h}(x) = h_{n-k} + \Theta_s(h_{n-k-1})x +\cdots+\Theta_s^{n-k}(h_{0})x^{n-k}$ (see [11]).
Corollary 3.5 Let $C_1, C_2, C_3$ be skew cyclic codes of length $n$ over $\mathbb{F}_q$ and $g_1(x), g_2(x), $ $g_3(x)$ be their generator polynomials such that
in $\mathbb{F}_q[x, \Theta_s]$ . If $C=e_1C_{1}\oplus e_2C_{2}\oplus e_3C_{3}$ , then
${\rm (1)}$ $C^{\perp}=\langle \overline{h}(x)\rangle$ is also a skew cyclic code of length $n$ over $R$ , where $\overline{h}(x)=e_1\overline{h}_1(x)+e_2\overline{h}_2(x)+e_3\overline{h}_3(x)$ , and $\mid C^{\perp}\mid=q^{\sum\limits_{i=1}^{3}{\rm deg}g_i(x)}$ ;
(2) $C$ is a self-dual skew cyclic code over $R$ if and only if $C_1$ , $C_2$ and $C_3$ are self-dual skew cyclic codes of length $n$ over $\mathbb{F}_q$ .
Proof ${\rm (1)}$ In light of Theorem 2.5, we obtain $C^{\perp}=e_1C_1^{\perp} \oplus e_2C_2^{\perp}\oplus e_3C_3^{\perp}$ .
Since $C_1^{\perp}=\langle \overline{h_1}(x)\rangle$ , $C_2^{\perp}=\langle \overline{h_2}(x)\rangle$ and $C_3^{\perp}=\langle \overline{h_3}(x)\rangle$ , we have $C^{\perp}=\langle \overline{h}(x)\rangle$ and $\mid C^{\perp}\mid=q^{\sum\limits_{i=1}^{3}{\rm deg}g_i(x)}$ by Theorem 3.2.
(2) $C$ is a self-dual skew cyclic code over $R$ if and only if $g(x)=\overline{h}(x)$ , i.e., $g_1(x)=\overline{h_1}(x)$ , $g_2(x)=\overline{h_2}(x)$ and $g_3(x)=\overline{h_3}(x)$ . Thus $C$ is a self-dual skew cyclic code over $R$ if and only if $C_1$ , $C_2$ and $C_3$ are self-dual skew cyclic codes of length $n$ over $\mathbb{F}_q$ .
Example 1 Let $\omega$ a primitive element of $\mathbb{F}_9$ (where $\omega=2\omega+1$ ) and $\Theta$ be the Frobenius automorphism over $\mathbb{F}_9$ , i.e., $ \Theta(a) = a^3 $ for any $a \in \mathbb{F}_9$ . Then
Let $g_1(x) = 2 + (2 +\omega)x + (1 + 2 \omega)x^3 + x^4$ and $g_2(x)= g_3(x)= 2 + x + (2 + 2\omega )x^2 + x^3$ . Then $C_1 = \langle g_1(x) \rangle$ and $C_2= C_3=\langle g_2(x)\rangle$ are skew cyclic codes of length $6$ over $\mathbb{F}_9$ with dimensions $k_1 = 2$ , $k_2 = k_3=3$ , respectively. Take $g(x) = e_1g_1(x)+e_2g_2(x)+e_3g_3(x)$ , then $C$ is a skew cyclic code of length $6$ over $R$ . Thus the Gray image of $C$ is a [18, 8, 4] code over $\mathbb{F}_9$ .
Linear complementary dual codes (which is abbreviated to LCD codes) are linear codes that meet their dual trivially. These codes were introduced by Massey in [12] and showed that asymptotically good LCD codes exist, and provide an optimum linear coding solution for the two-user binary adder channel. In [13], Sendrier indicated that linear codes with complementary-duals meet the asymptotic Gilbert-Varshamov bound. They are also used in counter measure to passive and active side channel analyses on embedded cryto-systems (see [14]). In recent, we in [15] investigated LCD codes finite chain ring. Motivated by these works, we will consider the LCD codes over $R$ .
Suppose that $f(x)$ is a monic (i.e., leading coefficient $1$ ) polynomial of degree $k$ with $f(0)=c\neq0.$ Then by monic reciprocal polynomial of $f(x)$ we mean the polynomial $\widetilde{f}(x)=c^{-1}f^{\ast}(x)$ .
We recall a result about LCD codes which can be found in [16].
Proposition 4.1 If $g_{1}(x)$ is the generator polynomial of a cyclic code $C$ of length $n$ over $\mathbb{F}_{q}$ , then $C$ is an LCD code if and only if $g_{1}(x)$ is self-reciprocal $({\rm i.e.}, \widetilde{g}_{1}(x)=g_{1}(x))$ and all the monic irreducible factors of $g_{1}(x)$ have the same multiplicity in $g_{1}(x)$ and in $x^{n}-1$ .
Theorem 4.2 If $C=e_1C_1\oplus e_2C_2\oplus e_3C_3$ is a linear code over $R$ , then $C$ is a LCD code over $R$ if and only if $C_1, C_2$ and $C_3$ are LCD codes over $\mathbb{F}_{q}$ .
Proof $C$ is a LCD code over $R$ if and only if $C\cap C^{\perp}=\{{\bf{0}}\}$ . By Theorem 2.5, we know that $C\cap C^{\perp}=\{{\bf{0}}\}$ if and only if $C_1\cap C_1^{\perp}=\{{\bf{0}}\}$ , $C_2\cap C_2^{\perp}=\{{\bf{0}}\}$ , and $C_3\cap C_3^{\perp}=\{{\bf{0}}\}$ , i.e., $C_1, C_2$ and $C_3$ are LCD codes over $\mathbb{F}_{q}$ .
By means of Proposition 4.1 and above theorem, we have the following corollary.
Corollary 4.3 Let $C=e_1C_1\oplus e_2C_2\oplus e_3C_3$ is a cyclic code of length $n$ over $R$ , and let $C_1=\langle g_1(x)\rangle$ , $C_2=\langle g_2(x)\rangle$ and $C_3=\langle g_3(x)\rangle$ be cyclic codes of length $n$ over $\mathbb{F}_{q}$ . Then $C$ is a LCD code over $R$ if and only if $g_i(x)$ is self-reciprocal $({\rm i.e.}, \widetilde{g}_{i}(x)=g_{i}(x))$ and all the monic irreducible factors of $g_{i}(x)$ have the same multiplicity in $g_{i}(x)$ and in $x^{n}-1$ for $i=1, 2, 3$ .
Theorem 4.4 A linear code $C\subset R^n$ is LCD if and only if the linear code $\varphi(C)\subset\mathbb{F}_{q}^{3n}$ is LCD.
Proof If ${\bf{x}}\in C\cap C^{\perp}$ , then ${\bf{x}}\in C$ and ${\bf{x}}\in C^{\perp}$ . It follows that $\varphi({\bf{x}})\in \varphi(C)$ and $\varphi({\bf{x}})\in \varphi(C^{\perp})$ . Hence $\varphi(C\cap C^{\perp})\subset\varphi(C)\cap\varphi( C^{\perp})$ .
On the other hand, if $\varphi({\bf{x}})\in \varphi(C)\cap\varphi( C^{\perp})$ , then there are ${\bf{y}}\in C$ and ${\bf{z}}\in C^{\perp}$ such that $\varphi({\bf{x}})=\varphi({\bf{y}})=\varphi({\bf{z}})$ . Since $\varphi$ is an injection, ${\bf{x}}={\bf{y}}={\bf{z}}\in C\cap C^{\perp}$ , which implies that
Thus $\varphi(C)\cap\varphi( C^{\perp})=\varphi(C\cap C^{\perp}) $ .
By Theorem 2.3, we $\varphi(C\cap C^{\perp})=\varphi(C)\cap\varphi( C)^{\perp}$ . It follows that $C\subset R^n$ is LCD if and only if the linear code $\varphi(C)\subset\mathbb{F}_{q}^{3n}$ is LCD.
Example 2 $x^4-1=(x+1)(x+2)(x+w^2)(x+w^6)$ in $\mathbb{F}_9$ . Let $g_1(x)= g_2(x)=g_2(x)=x+1$ . Then $C_1=C_2=C_3=\langle g_1(x)\rangle$ are LCD cyclic codes over $\mathbb{F}_9$ with parameters [4, 3, 2], respectively. Suppose that $C=e_1C_1\oplus e_2C_2\oplus e_3C_3$ is a cyclic code of length $n$ over $R$ . By Theorem 2.6 and Theorem 4.5, $\varphi(C)$ is a LCD code with parameters [12, 9, 2], which is an optimal code.