QUATERNARY GROUP RING CODES: RANKS, KERNELS AND SELF-DUAL CODES

. We study G -codes over the ring Z 4 , which are codes that are held invariant by the action of an arbitrary group G . We view these codes as ideals in a group ring and we study the rank and kernel of these codes. We use the rank and kernel to study the image of these codes under the Gray map. We study the speciﬁc case when the group is the dihedral group and the dicyclic group. Finally, we study quaternary self-dual dihedral and dicyclic codes, tabulating the many good self-dual quaternary codes obtained via these constructions, including the octacode.

Codes over Z 4 have received an enormous amount of attention ever since the landmark paper [13].The major importance of these codes is that they are equipped with a Gray map to the binary Hamming space.This Gray map allows for many interesting non-linear binary codes to be viewed as images of linear quaternary codes under this map.This connection makes it important to understand families of quaternary codes and what their images are in the binary Hamming space.
Two of the most important and useful tools to study quaternary codes are the rank and kernel of the code.In this paper, we shall examine both the rank and kernel of a large family of quaternary codes and use these to examine their image under the Gray map.
Cyclic codes are one of the most important families of codes.They are characterized by the fact that the code is held invariant by the action of the cyclic group.
Moreover, cyclic codes have a canonical characterization as ideals in a polynomial ring which enables a classification of cyclic codes.We generalize this definition to G-codes, which are codes that are held invariant by the action of an arbitrary finite group G.When the group is specified we use the name of the group.For example, we can talk about cyclic codes, dihedral codes, or dicyclic codes.We then show how these codes can be described in terms of certain skew polynomial rings.
Codes as ideals in group algebras were first studied by Jesse MacWilliams in [15] and [16].In these early works the alphabet was always the binary alphabet.Our goal is to study the alphabet Z 4 and use non-abelian groups as well.We begin with the standard definitions.For a complete description of codes over rings and for any undefined terms see [4].
A code over the ring Z 4 of length n is a subset of Z n 4 and a binary code of length n is a subset of F n 2 .For the ring Z 4 we say the code is linear if it is a submodule of Z n 4 and for F 2 we say it is linear if it is a sub-vector space of F n 2 .We attach the usual inner-product to Z n 4 , namely [v, w] = v i w i and we define the orthogonal to a code C in Z n 4 as C ⊥ = {v |v ∈ Z n 4 , [v, w] = 0 ∀w ∈ C}.If C ⊆ C ⊥ , we say that C is self-orthogonal and if C = C ⊥ we say that C is self-dual.
Denote by φ the standard Gray map φ : Z 4 → F 2 2 that is defined by 0 → 00, 1 → 01, 2 → 11, 3 → 10, see [13] for a complete description of this map.We extend this map to Z n 4 → F 2n 2 by applying it coordinatewise.If C is a quaternary code, then φ(C) is a binary code that is not linear in general.This map has been generalized to numerous rings.For the widest generalization see [7].
We now give the standard definition of the kernel and the rank of a binary code and relate this code to its quaternary preimage.Let C be a binary, not necessarily linear code.First, we say that a linear subcode C i of C is a maximal linear code in C if for any linear code Define the kernel of C to be (1) Note that ker(C) must be a linear code and, in fact, it can be characterized as the intersection of all maximal linear codes in C.Moreover, the code C can be seen as the union of the cosets of ker(C) in C. See [9] for a complete description of these results.
Denote by C the linear binary code generated by the vectors in C. We say that the rank of C is For a quaternary code C we shall also say that rank(C) = rank(φ(C)).Then define the quaternary preimage of φ(C) as R(C), that is, We have the following lemma which appears in [9].
Lemma 1.Let C be quaternary linear code.Then, R(C) and K(C) are quaternary linear codes satisfying For vectors v, w ∈ Z n 4 , define the operation v * w = (v 1 w 1 , v 2 w 2 , . . ., v n w n ).In [13], it is proved that φ(v + w) = φ(v) + φ(w) + φ(2v * w).The following lemma follows from the last property and can be found in [9].Lemma 2. Let C be a quaternary linear code.
1.The code φ(C) is linear if and only if 2v * w ∈ C for all w ∈ C.

2.
The kernel of C is

G-codes over Z 4
We now give the standard definition of group rings and show how to construct codes as ideals in these group rings.Let G = {g 1 , g 2 , . . ., g n } be a group of order n and denote by e G the identity element in G.If G is non-abelian then one must distinguish between left and right ideals.We shall assume throughout that we are always dealing with left ideals and multiply by group elements on the left.Similar results can be obtained for right ideals.For abelian groups, the left and right ideals coincide.
We define the group ring ( 5) , where the addition in Z 4 G is done by coordinate addition, namely (6) and the product in Z 4 G is given by ( 7) Note that the coefficient of g i in the product is We shall consider linear codes over Z 4 that are ideals in the group ring Z 4 G. First, define the one-to-one map I : 4 and λ ∈ Z 4 , we have that λg(v) = g(λv).Then, we have Let S n be the symmetric group of permutations on the set {1, . . ., n}.Recall the standard definition of an automorphism group of a code C of length n.Namely, let C be a code and let τ ∈ S n , with τ acting on the coordinates of C. Then we define ( 8) The following lemma is immediate.
Lemma 3. Let C be a linear code over Z 4 .If C is a G-code, then Aut(C) must contain the group G.
In many respects, this lemma is the key motivation for studying codes as ideals in a group ring.That is, we wish to find codes that are held invariant by the actions of some group.
We now give a construction of a code from an element of the group ring.This construction was given for codes over rings in [8] and for codes over fields in [14].It was used in [12] to construct self-dual codes.
are simply the elements of the group G in some order.Then, define the matrix σ(v) ∈ M n (Z 4 ) to be ( 9) Proof.The matrix σ(gv) = σ(w) is the matrix σ(v) with the rows permuted.Hence they generate the same code.
Let G be a group.We say that G is the internal semi-direct product of its subgroups H and Let H and N be groups and let τ : H → Aut(N ) be an homomorphism.The external semi-direct product of H and N is G = H τ N defined by In both cases, we will refer to G as the semi-direct product a H and N , and it will be denoted by G = H N even though in some cases it depends on the action τ .
1.1.Some families of G-codes.We shall define the groups that we use in this paper.The first group is the cyclic group C t , which is defined as Codes that are ideals in F 2 C t are one of the most widely studied families of codes.
Note that the notation for the dihedral group is not the same in all texts, as some might refer to this group as D t .This group can be seen as the group of symmetries of a regular t sided figure in a Euclidean plane.The element b corresponds to rotating the object 2π t radians with respect to its center and the element a corresponds to flipping the object over.
The third group is also a generalization of the cyclic group, namely the dicyclic group.The dicyclic group is defined as ( 12) We note that both D 2t and Dic 4t are non-abelian groups for t ≥ 3, while the cyclic group is abelian.
1.1.1.Cyclic codes.One of the most studied families of codes are cyclic codes.Initially, the cyclic codes were studied over a finite field.Cyclic codes may also be studied as ideals in the group algebra of a cyclic group (see [11]).In [13] cyclic codes over Z 4 were introduced and, since then, cyclic codes have been studied over different rings.
Cyclic codes, by definition, are invariant under the action of C n , and therefore have C n as a subgroup of their automorphism groups.This can also be seen by considering cyclic codes over Z 4 as ideals in Z 4 C n .If C is a cyclic code of length n then Aut(C) must contain C n as a subgroup.
One of the most important aspects of cyclic codes is that they can be understood by studying ideals in a polynomial ring.Specifically, cyclic codes of length n over a ring R are ideals in R[x]/ x n − 1 .This is easily generalized to constacyclic codes by studying ideals in R[x]/ x n − λ , with λ a unit in the ring R. If we define S = Z 4 [x]/ x n − 1 , then S is the ambient space where cyclic codes reside.Cyclic codes can be considered as ideals in the polynomial ring S. The following Theorem gives the generator polynomials of cyclic codes over Z 4 .
Then, the code over Z 4 generated by σ(v) is the code generated by the polynomial v(x).
1.1.2.Dihedral Codes.We shall now examine the specific case when the group G is the dihedral group.
A circulant matrix with elements from the ring R is of the form: A reverse circulant matrix with elements from the ring R is of the form: We can now give a description of dihedral codes in terms of a skew polynomial ring, specifically as an Ore extension of the polynomial ring corresponding to cyclic codes [17].
Let S = Z 4 [x]/ x n − 1 and τ ∈ S n be a Z 4 -automorphism of S defined by We can now make a correspondence in a canonical way between elements in the group ring and polynomials in the skew polynomial ring.For an element in Proof.It is immediate that since C is closed under addition and multiplication we have that ψ(C) is closed under addition and multiplication.Then we note that multiplication by x on the left corresponds to multiplication by the group element b and multiplication by y on the left corresponds to multiplication by a on the left.Moreover, yx = x −1 y and so yxy −1 = x −1 .Therefore, since C is a left ideal in Example 1.Let p(x) be a divisor of x n − 1.Then ψ −1 (Z 4 (p(x))) is a left dihedral code of length 2n.
We can now give a similar description of dicyclic codes as ideal in a skew polynomial ring.
Let T = Z 4 [x]/ x 2n − 1 .We note that this is the ambient space for cyclic codes of length 2n.Let τ be a Z 4 -automorphism of S defined by τ (x) = x −1 . Let

Advances in Mathematics of Communications
Volume X, No. X (200X), X-XX We can now make a correspondence in a canonical way between elements in the group ring and polynomials in the skew polynomial ring.For an element in Z 4 Dic 4n define Proof.Since C is closed under addition and multiplication, so is µ(C).Then we note that multiplication by x on the left corresponds to multiplication by the group element s and multiplication by y on the left corresponds to multiplication by b on the left.Moreover, yx = x −1 y and so yxy The image of the cyclic code under the Gray map is a quasi-cyclic code.We shall now generalize this notion.
If D is a code in R sn with the coordinates partitioned into n sets of size s, where each set is assigned an element of G and the code is held invariant by the action of multiplying the coordinate set marker by every element of G, then the code D is called a quasi-group code of index s.The word group can be replaced by the specific group in question.For example, it might be a quasi-cyclic code or a quasi-dihedral code.
Theorem 4. If C is an ideal in Z 4 G where G is a finite group of order N , then φ(C) is a (possibly non-linear) quasi-group code of index 2 and length 2N .
Proof.The length of the image is immediate from the definition of φ.Then since gv ∈ C, for all g ∈ G, we have that G acts on pairs of coordinates and gives a quasi-group code of index 2.
Just as it is possible that G is not the full automorphism group of a G-code, it is also possible that a code may be a quasi-G code for different groups with possibly different partitions of the coordinates.
Let C and D be linear codes over Z 4 .We define the image under the Gray map is a linear quasi-G code of length 2n.
Proof.It is well known, see [18] that if C 1 * C 1 ⊂ C 2 then the code has a linear binary image.By the previous lemma, the code C is a quaternary G code since both C 1 and C 2 are held invariant by the action of G. Therefore the Gray image is a binary linear quasi-G code.
This theorem shows that given binary G codes of length n we can construct binary quasi-G codes of length 2n by using quaternary codes.

Rank and Kernel
We shall now examine the rank and kernel of G codes, viewed as an ideal in a group ring.When the size of the kernel of a code is the minimal size, we say that the kernel is a minimum.In the case the size of the kernel is the maximal, then we say that it is a maximum.
The result is a broad generalization of the fact that the kernel of a cyclic code is cyclic, which can be found in [6].
Similarly, the next result is a broad generalization of the fact that R(C) is cyclic when C is cyclic which can also be found in [6].
Hence, for a G-code C over Z 4 , we have ( 19) We summarize the relations between the codes in the following diagram.
Proof.We know that K(C) is the intersection of all maximal codes C i ⊆ C such that φ(C i ) is linear and, by Theorem 6, K(C) is a G-code.
Let C i ⊆ C be a maximal linear code over Z 4 .We have Therefore, the minimal kernel for any code C(v) is C(2v) and we have Note that if v is of additive order 2 in Z 4 G, then C(2v) = {0}.However, in this case, we have that φ(C(v)) is linear as it is shown in the following proposition.Proof.If v has additive order 2, then for all u ∈ C(v), 2v * u = 0 ∈ C(v) and v ∈ K(C).Therefore, the results follows by Proposition 1.
It is proven in [8] that if I(C) is an ideal in Z 4 G then I(C ⊥ ) is an ideal in Z 4 G.The following gives an example where the kernel of a group code over Z 4 is a minimum for all groups G. Specifically, where K(C(v)) = C(2v).

Advances in Mathematics of Communications
Volume X, No. X (200X), X-XX 2.1.Rank and kernel of I(C) for some families of codes.Recall that the minimal kernel of a code C(v) is given when K(C(v)) = C(2v) and the maximal when K(C(v)) = C(v).In this section we will see that there exist G-codes with both minimal and maximal kernel when G is C n , D 2n and Dic 4t .
The rank and kernel of cyclic codes over Z 4 were studied in [6].In that paper, it was shown that there exist cyclic codes over Z 4 with the minimal and maximal kernels.We give just some example.
Example 2. Consider the cyclic code of length n generated by the polynomial x−1, that is, the ideal Theorem 10 gives that for this code K(C 1 ) is a minimum.The code C 2 = 2(x − 1) has K(C 2 ) = C and hence the kernel is a maximum.
In fact, in Theorem 17 in [6], if C = f (x)h(x) + 2f (x) is a quaternary cyclic code of odd length n = p 2 and x n − 1 = (x − 1)a(x)b(x) with a(x) and b(x) irreducible polynomials over Z 4 , then for h(x) = 1 and f (x) = a(x), we have Proof.If α i = 0, when g i = b s a, then the generator matrix σ(v) is of the form Example 4. For length 4, (here the dihedral group is really the Klein 4 group), it is a simple computation to see that, for all v, we have K We can now mimic the technique used in Theorem 11 to get a similar result for dicyclic codes.
Theorem 13.Let G be the dicyclic group Dic 4t .Let v = α i g i , with α i+2t = 0 for i ∈ {1, . . ., 2t}.Then C(v) = C 1 × C 2 , where C 1 and C 2 are cyclic codes and Advances in Mathematics of Communications Volume X, No. X (200X), X-XX Upon running an exhaustive search over all dihedral self-dual codes of length 6 and 10 we found that the highest minimum Lee distance is 2 and when we ran the search over all dihedral self-dual codes of length 12, the highest minimum Lee distance that we obtained turned out to be 4.

Conclusion
As a broad generalization of cyclic codes we have studied G-codes over the ring Z 4 , which are codes held invariant by the action of a finite group G.As an analogue to the results for cyclic codes, we have shown that the quaternary kernel and rank of a G-code is itself a G-code.We have found bounds for the size of the kernel and gave examples of minimal and maximal kernels for G-codes.Examining the image of G-codes under the canonical Gray map, we have shown how to construct binary quasi-G codes.Finally, we have studied self-dual G-codes and given examples for the dihedral and dicyclic groups, in particular we have been able to obtain the octacode from the dicyclic construction.

Example 3 .
A generating a cyclic code.The result follows.Consider the dihedral group D 2t .Let v = 1−b, then Theorem 10 gives K(C(v)) = C(2v), hence it is a minimum.As in the previous example, if v = 2 − 2b, then K(C(v)) = C(v) and hence it is a maximum.Let C 1 and C 2 be quaternary cyclic codes of odd length n = p 2 and x n − 1 = (x − 1)ab with a and b irreducible polynomials over Z 4 .Let C 1 = C 2 = b, 2bg .Let C be the dihedral code C = C 1 × C 2 as given in Theorem 11.By Theorem 11, we have K(C) = C and the kernel is a maximum.Theorem 10 has already given examples of dihedral codes with minimum kernel.Therefore we have the following.Theorem 12.There exists dihedral codes with minimal kernel and with maximal kernel.

Remark 4 .
An exhaustive search reveals that all the dicylic self-dual codes of lengths 4 and 12 have 4 as the highest minimum Lee distance and all such examples have linear Gray map images.
since C is a left ideal in Z 4 Dic 4n , µ(C) is a left ideal in A n .
1.2.Quasi G-codes.As we have seen in Lemma 3, if C is a G-code, then Aut(C) contains the group G.For example, if C is a C n -code, then Aut(C) contains C n .It may of course contain other elements, specifically it is possible that

Table 3 .
Best Dicyclic Self-dual Codes of lengths 4, 8 and 12 n 1st row of A 1st row of B 1st row of C Min Lee Weight Gray Image Linear 4 (