Codes over finite rings received much attention recently after it was proved that important families of binary non-linear codes are in fact images under a Gray map of linear codes over $Z_{4}$, see [3], and the references cited there. In order to obtain a complete understanding about binary codes which have certain structural properties, we need to examine cyclic codes over large families of rings. Cyclic and constacyclic codes over $F_{2}+uF_{2}(u^2=0)$ were studied in [4-7]. The structure of cyclic codes over $Z_2+uZ_2(u^2=0)$ and $Z_2+uZ_2+u^{2}Z_2(u^3=0)$ were determined in [8]. Moreover, cyclic and constacyclic codes over ring $F_{2}+uF_{2}+vF_{2}+uvF_{2}(u^2=v^2=0, uv=vu)$ were described in [9, 10]. However, not much work was done on the structure of cyclic and constacyclic codes over $F_{3}+vF_{3}(v^2=1)$.
The purpose of this paper is to obtain structure theorems for cyclic, negacyclic, constacyclic codes and their duals over $R_{3}:=F_{3}+vF_{3}$, defined with $v^{2}=1$. The ring $R_3$ is a Semi-local ring like $Z_6$, as noticed in [1] abstractly isomorphic to $F_{3}\times F_{3}$. The main technical tool in that context is therefore the Chinese Remainder Theorem.
In Section 2, we recall some backgrounds and notation about this ring, and define a Gray map $\varphi$ from $R^{n}_{3}$ to $F^{2n}_{3}$. In Section 3, by means of the decomposition of the linear codes $H$ over $R_3$, we obtain that $\varphi(H)$ are the linear codes over $F_{3}$. We tackle with the issues of duality, Lee weight enumerators and MacWilliams identities for linear codes over $R_{3}$. In Section 4, the structure of cyclic codes and cyclic self-dual codes over $R_3$ is described, and the relationship between cyclic codes over $R_3$ and ternary cyclic codes is studied. We prove that every cyclic codes over $R_3$ is principally generated and determine the generator polynomials of cyclic codes over the ring. In Section 5, a $v$-contacyclic code over $R_3$ are defined. We discuss the generator element of a $v$-contacyclic code over $R_3$. Some examples are given in Section 6 to illustrate the discussed results.
Let $R_{3}$ denote the commutative ring with 9 elements $F_{3}+vF_{3}=\{0, 1, 2, v, 1+v, 2+v, 2v, 1+2v, 2+2v\}$, where $v^{2}=1$. It is easy to verify that $R$ is a semi-local ring with two maximal ideals given by $\langle v-1\rangle$ and $\langle v+1\rangle$. Observe that both of ${R_3}/{\langle v-1\rangle}$ and ${R_3}/{\langle v+1\rangle}$ are $F_{3}$. The CRT tells us that
More concretely, linear algebra over $F_3$ shows that
for all $a, b\in F^{n}_{3}$.
A linear code $H$ over $R_3$ of length $n$ is an $R_3$-submodule of $R^{n}_{3}$. Let $x=(x_1, \cdots, x_n)$ and $y=(y_1, \cdots, y_n)$ be two elements of $R^n$, the Euclidean inner product of $x$ and $y$ in $R^{n}_{3}$ is defined by
where the operation is performed in $R_3$. The dual code of $H$ is defined as $H^{\bot}=\{x\in R^{n}_{3}|x\cdot y=0, \forall y\in H\}$. By the results in [12], we obtain that a linear codes $H$ satisfies $|H|\cdot|H^{\bot}|=| R_{3}|^n$. We say that a code is self-orthogonal if $C\subset C^\bot$ and self-dual if $C= C^\bot$.
Let $H$ be a linear code over $R_3$ of length $n$ and $P(H)$ be its polynomial representation, i.e.,
Let $\sigma$ and $\gamma$ be maps from $R_3^{n}$ to $R_3^{n}$ given by
and
respectively. Then $H$ is said to be cyclic if $\sigma(H)=H$, and negacyclic of $\gamma(H)=H$. A linear code $H$ over $R_3$ of length $n$ is cyclic if and only if $P(H)$ is an ideal of $R_3[x]/\langle x^n-1\rangle$, and a linear code $H$ over $R_3$ of length $n$ is negacyclic if and only if $P(H)$ is an ideal of $R_3[x]/\langle x^n+1\rangle$.
The Gray map $\varphi$ from $R^{n}_{3}$ to $F^{2n}_{3}$ is defined as $\varphi(x+vy)=(-(x+y), y-x)$ for all $x, y\in F^{n}_{3}$. The Lee weight of $x+vy$ is the Hamming weight of its Gray image. Then, $\varphi$ is weight-preserving map from ($R^{n}_{3}$, Lee weight) to ($F^{2n}_{3}$, Hamming weight), that is, $w_L(h)=w_H(\varphi(h)).$
If $A$ and $B$ are codes, we denote that $A\otimes B=\{(a, b)|a\in A, b\in B\}$ and $A\oplus B=\{a+b|a\in A, b\in B\}$.
The following results can be found in [2].
A nonzero linear code $C$ over $R$ has a generator matrix which after a suitable permutation of the coordinate can be written in the form
where $A_i$ and $B_j$ are ternary matrices, and $|C|=9^{k_1}3^{k_2}3^{k_3}.$
Let $H$ be a code over $R_3$. Define
We have $H=(1+v)H^+\oplus(1-v)H^-$. Obviously, the code $H^+$ is permutation-equivalent to a code with generator matrix of the form
where $A_i$ are ternary matrices. And the ternary code $H^-$ is permutation-equivalent to a code with generator matrix of the form
where $B_i$ are ternary matrices.
Theorem 3.1 If $H$ is a linear code of length $n$ over $R_3$, then $\varphi(H)=H^+\otimes H^-$, and $\varphi(H)$ is linear.
Proof For any $(x_1, x_2, \cdots, x_n, y_1, y_2, \cdots, y_n)\in \varphi(H), $ let
and let $h=(h_1, \cdots, h_n)$. Then $\varphi(h)=(x_1, x_2, \cdots, x_n, y_1, y_2, \cdots, y_n).$ Since $\varphi$ is a bijection, $h=(h_1, \cdots, h_n)\in H$. By the definitions of $H^+$ and $H^-$, we have
hence $(x_1, x_2, \cdots, x_n, y_1, y_2, \cdots, y_n)\in H^+\otimes H^-$. This implies that $\varphi(H)\subseteq H^+\otimes H^-$.
Conversely, for any $(x_1, x_2, \cdots, x_n, y_1, y_2, \cdots, y_n)\in H^+\otimes H^-$, where $(x_1, x_2, \cdots, x_n)\in H^+$, $(y_1, y_2, \cdots, y_n)\in H^-$, there are $s=(s_1, \cdots, s_n), t=(t_1, \cdots, t_n)\in H$, such that
where $a_i, b_i\in F_3$, $1\leq i\leq n$. Since $H$ is linear, we obtain that
where $x=(x_1, x_2, \cdots, x_n)\in F^{n}_{3}, y=(y_1, y_2, \cdots, y_n)\in F^{n}_{3}$. It follows that $\varphi(h)=(x_1, x_2, \cdots, x_n, y_1, y_2, \cdots, y_n)$, which gives $H^+\otimes H^-\subseteq \varphi(H)$. Therefore $\varphi(H)=H^+\otimes H^-.$
The second result is easy to be verified.
Corollary 3.2 Let $H=(1+v)H^+\oplus (1-v)H^-$ be a linear code of length $n$ over $R_3$. Then $d_L(H)=min\{d(H^+), d(H^-)\}$, where $d(H^+)$ and $d(H^-)$ denote the minimum weight of ternary codes of $H^+$ and $H^-$, respectively.
Theorem 3.3 Let $H^\bot$ be the dual code of $H$. Then $\varphi(H^\bot)=\varphi(H)^\bot$. Moreover, if $H$ is a self-dual code, so is $\varphi(H)$.
Proof To prove the theorem, we first show
i.e., $\forall h_1, h_2\in R^{n}_{3}$,
To this extent, we assume that
Then we have
Note that $[h_1, h_2]=0$ if and only if
since $\varphi(h_1)=(-(x_1+y_1), y_1-x_1), \varphi(h_2)=(-(x_2+y_2), y_2-x_2)$, then we have
by (3.5), this completes the proof of (3.4). Therefore
By Theorem 3.1, $\varphi(H)$ is a ternary linear code of length $2n$ of size $|H|$. So by the usual properties of the dual of ternary codes, we know that
Since $R_3$ is a Frobenius ring, we have $|H|\cdot|H^\bot|=3^{2n}$. Hence, this implies
Combining (3.7) and (3.8), we have $\varphi(H^\bot)=\varphi(H)^\bot$.
Corollary 3.4 Let $H=(1+v)H^+\oplus (1-v)H^-$ be a linear code of length $n$ over $R_3$. Then $\varphi(H^\bot)=(H^+)^\bot\otimes(H^-)^\bot$. Moreover, we have $H^\bot=(1+v)(H^+)^\bot\oplus (1-v)(H^-)^\bot$.
Proof Follows by applying Theorem 3.1 and Theorem 3.3.
We want to finish this section by remarking a MacWilliams identity for the Lee weight enumerators of linear codes over $R_3$. Suppose $H=(1+v)H^+\bigoplus (1-v)H^-$ is a linear code of length $n$ over $R_3$ and let
be the Lee weight enumerator of $H$. Now, since $\varphi$ maps $H$ to a ternary linear code of length $2n$ and since $\varphi$ is weight preserving, we see that
where ${\rm Ham}_{\varphi(H)}(\bar{X}, \bar{Y})$ denotes the Hamming weight enumerator of $\varphi(H)$.
We see, by Theorem 3.3 that $\varphi(H^\bot)=\varphi(H)^\bot$, and since we have the ordinary MacWilliams identity for Hamming weight enumerator of ternary linear codes, we get
Thus we have proved the following corollary.
Corollary 3.5 Suppose that $H=(1+v)H^+\oplus (1-v)H^-$ is a linear code of length $n$ over $R_3$ and let ${\rm Lee}_H(\bar{X}, \bar{Y})$ denote its Lee weight enumerator as defined above, then
Theorem 4.1 If $H=(1+v)H^+\oplus (1-v)H^-$ is a linear code of length $n$ over $R_3$, then $H$ is a cyclic code over $R_3$ if and only if $H^+, H^-$ are ternary cyclic codes.
Proof For any $h=(h_0, h_1, \cdots, h_{n-1})\in H$, where
Taking $x=(x_0, x_1, \cdots, x_{n-1}), y=(y_0, y_1, \cdots, y_{n-1})$, we obtain that $x\in H^+, y\in H^-$. If $H^+, H^-$ are ternary cyclic codes, then $\sigma(x)\in H^+, \sigma(y)\in H^-$. Hence $\sigma(h)=(v+1)\sigma(x)+(1-v)\sigma(y)\in H$, which implies that $H$ is a cyclic code over $R_3$.
Conversely, for any $x=(x_1, x_2, \cdots, x_n)\in H^+, y=(y_1, y_2, \cdots, y_n)\in H^-$, writing $h=x(v+1)+y(1-v)$, then $h\in H$. Suppose that $H$ is a cyclic code over $R_3$. Then we have
Therefore $\varphi(\sigma(h))=(\sigma(x), \sigma(y))\in H^+\otimes H^-$. We obtain that $\sigma(x)\in H^+, \sigma(y)\in H^-$, which proves that $H^+, H^-$ are ternary cyclic codes.
Similarly, we can prove the following theorem.
Theorem 4.2 If $H=(1+v)H^+\oplus (1-v)H^-$ is a linear code over $R_3$, then $H$ is a negacyclic code over $R_3$ if and only if $H^+, H^-$ are ternary negacyclic codes.
The following corollary is easy to be proved.
Corollary 4.3 If $H$ is a cyclic (or negacyclic) code over $R_3$, then the dual code $H^\bot$ is also cyclic (or negacyclic).
Theorem 4.4 If $H=(1+v)H^+\oplus (1-v)H^-$ is a cyclic code of length $n$ over $R_3$, then $H=\langle(1+v)g_1(x)+(1-v)g_2(x)\rangle$ and $|H|=3^{2n-{\rm deg}(g_1(x))-{\rm deg}(g_2(x))}$, where $g_1(x)$ and $g_2(x)$ are the monic generator polynomials of $H^+$ and $H^-$, respectively.
Proof By Theorem 4.1, we have
Therefore,
Note that
and $-(1-v)[(1+v)g_1(x)+(1-v)g_2(x)]=(1-v)g_2(x)$, so
On the other hand, for any
where
there are $m_1(x), m_2(x)\in F_3[x]$ such that $(1+v)h(x)=(1+v)m_1(x)$ and
So $\langle(1+v)g_1(x)+(1-v)g_2(x)\rangle\subseteq H$. This implies that
Since $|H|=|H^+|\cdot|H^-|$, then $|H|=3^{2n-{\rm deg}(g_1(x))-{\rm deg}(g_2(x))}$.
Corollary 4.5 Every ideal of $\frac{R_3[x]}{\langle x^n-1\rangle}$ is principal.
If $f(x)=a_0+a_1x+\cdots+a_rx^r$, then the reciprocal of $f(x)$ is the polynomial
Symbolically, $f^*(x)$ can be expressed by $f^*(x)=x^rf(\frac{1}{x})$.
Corollary 4.6 With the notations as in Theorem 4.4. Let
then $H^\bot=\langle(1+v)g^*_1(x)+(1-v)g^*_2(x)\rangle$ and $|H^\bot|=3^{{\rm deg}(g_1(x))+{\rm deg}(g_2(x))}.$
Theorem 4.7 Let $x^n-1=\prod_{i=1}^rp_i^{s_i}(x)$ be unique representations of $x^n-1$ as a product of ireducible pairwise-comprime polynomial in $F_3[x]$. Then the number of the cyclic code of length $n$ over $R_3$ is $\prod_{i=1}^r(s_i+1)^2$.
Proof The result directly follows from the fact that the number of ternary cyclic code of length $n$ is $\prod_{i=1}^r(s_i+1)$.
A $v$-constacyclic shift $\tau$ acts on $R_3^n$ as
A linear code $H$ over $R_3$ of length $n$ is said to be a $v$-constacyclic code if invariant under the $v$-constacyclic shift, i.e., $\tau(H)=H.$
Theorem 5.1 Let $H=(1+v)H^+\oplus (1-v)H^-$ be a linear code of length $n$ over $R_3$. Then $H$ is a $v$-constacyclic code of length $n$ over $R_3$ if and only if $H^+, H^-$ are cyclic and negacyclic codes of length $n$ over $F_3$, respectively.
Proof For any $h=(h_0, h_1, \cdots, h_{n-1})\in H$, we can write its components as $h_i=x_i(v+1)+y_i(1-v)$, where $x_i, y_i\in F_3, 0\leq i\leq n-1$. Let
then $x\in H^+, y\in H^-$. If $H^+, H^-$ are cyclic and negacyclic codes over $F_3$, respectively, then $\sigma(x)\in H^+, \gamma(y)\in H^-$. Therefore, we have
This proves that $H$ is a $v$-constacyclic code over $R_3$.
Conversely, for any $x=(x_0, x_1, \cdots, x_{n-1})\in H^+, y=(y_0, y_1, \cdots, y_{n-1})\in H^-$. Let $h_i=x_i(v+1)+y_i(1-v), 0\leq i\leq n-1$. Then $h=(h_0, h_1, \cdots, h_{n-1})\in H$. Suppose that $H$ is a $v$-constacyclic code over $R_3$, then $\tau(h)=(v+1)\sigma(x)+(1-v)\gamma(y)\in H$, thus $\sigma(x)\in H^+$ and $\gamma(y)\in H^-$. Therefore, $H^+, H^-$ are cyclic and negacyclic codes over $F_3$, respectively.
Theorem 5.2 If $H=(1+v)H^+\oplus (1-v)H^-$ is a $v$-constacyclic code of length $n$ over $R_3$, then $H=\langle(1+v)g_1(x), (1-v)g_2(x)\rangle$ and $|H|=3^{2n-{\rm deg}(g_1(x))-{\rm deg}(g_2(x))}$, where $g_1(x)$ and $g_2(x)$ are the monic generator polynomials of $H^+$ and $H^-$, respectively.
Proof By Theorem 5.1, we have
For any
where $h_1(x), h_2(x)\in \frac{R_3[x]}{\langle x^n-v\rangle}, $ there are $m_1(x), m_2(x)\in F_3[x]$ such that
and $(1-v)h_2(x)=(1-v)m_2(x)$. So $\langle(1+v)g_1(x), (1-v)g_2(x)\rangle\subseteq H$. This implies that $H= \langle(1+v)g_1(x), (1-v)g_2(x)\rangle$. Since $|H|=|H^+|\cdot|H^-|$, then $|H|=3^{2n-{\rm deg}(g_1(x))-{\rm deg}(g_2(x))}.$
Theorem 5.3 With the notations as in Theorem 5.2. If $H= \langle(1+v)g_1(x), (1-v)g_2(x)\rangle$, then there is a unique polynomial $g(x)$ such that $H=\langle g(x)\rangle$ and $g(x)|x^n-v$, where
Proof Since $g(x)=(1+v)g_1(x)+(1-v)g_2(x)$, $\langle g(x)\rangle\subset H$. Note that
and $-(1-v)g(x)=(1-v)g_2(x)$, so $H\subset \langle g(x)\rangle.$ Hence $H=\langle g(x)\rangle$. Since $g_1(x)|x^n-1$ and $g_2(x)|x^n+1$, there are $r_1(x), r_2(x)\in F_3[x]$ such that $x^n-1=g_1(x)r_1(x)$ and
It follows that
Hence, $g(x)|x^n-v$. Then uniqueness of $g(x)$ can be followed from that of $g_1(x)$ and $g_2(x)$.
Corollary 5.4 Every ideal of $\frac{R_3[x]}{\langle x^n-v\rangle}$ is principal.
Now, we consider the dual codes of $v$-constacyclic codes of length $n$ over $R_3$ and we have the following results.
Theorem 5.5 If $H$ is a $v$-constacyclic code of length $n$ over $R_3$, then its dual code $H^\bot$ is also a $v$-constacyclic code over $R_3$.
Proof The proof is trivial since $v=v^{-1}$ and the dual of a $v$-constacyclic code is a $v^{-1}$-constacyclic.
By Theorem 5.5 and Corollary 3.4, it is easy to see that the above results of $v$-constacyclic codes can be carried over respectively to their dual codes. We list them here for the sake of completeness.
Corollary 5.6 Let $H=\langle(1+v)g_1(x), (1-v)g_2(x)\rangle$ be a $v$-constacyclic code of length $n$ over $R_3$, $g_1(x)$ and $g_2(x)$ be the monic generator polynomials of $H^+$ and $H^-$, respectively, and $x^n-1=g_1(x)p_1(x)$ and $x^n+1=g_2(x)p_2(x).$ Then
(1) $H^\bot=\langle(1+v)p^*_1(x), (1-v)p^*_2(x)\rangle$ and $|H^\bot|=2^{{\rm deg}g_1(x)+{\rm deg}g_2(x)}$;
(2) $H^\bot=\langle p(x)\rangle$, where $p(x)=(1+v)p^*_1(x)+(1-v)p^*_2(x)$ and $p(x)|x^n-v$, where $p^*_1(x)$ and $p^*_2(x)$ are the reciprocal polynomial of $p_1(x)$ and $p_2(x)$, respectively.
Now, we give the following two examples to illustrate the above results.
Example 6.1 Consider all cyclic codes over $R_3$ of length $2$. Since $x^2-1=(x-1)(x+1)$ in $F_3[x]$, there are 15 nonzero cyclic codes over $R_3$ of length $2$. Table {1} gives the list of all cyclic codes. The ones marked with * denote the optimal ones.
Example 6.2 Consider all $v$-constacyclic codes over $R_3$ of length $4$. Since
and $x^4+1=(x^2+x-1)(x^2-x-1)$ in $F_3[x]$, there are 31 nonzero $v$-constacyclic codes over $R_3$ of length $4$. Table {2} gives the list of all $v$-constacyclic codes. The ones marked with * denote the optimal ones.
In this paper, we studied cyclic and $v$-constacyclic codes over $R_3$ with an arbitrary length. The dual of the cyclic and $v$-constacyclic of codes are studied as well. An example of the cyclic and constacyclic codes over $R_3$ with fixed length is given, respectively. With two examples in hand, we can urge the researchers to search for new ternary codes with good paraments as images of two families of codes. Another two important families for study would be the families of cyclic and constacyclic codes over $F_p+vF_p$ where $p$ is a prime number and $p>3$.