Duadic codes form a class of cyclic codes that generalizes quadratic residue codes from prime to composite lengths. While initially quadratic residue codes were studied within the confines of finite fields, there have been recent developments on quadratic residue codes over some special rings. Pless and Qian  studied quadratic residue codes over, Chiu et al.  extended the ideas to the ring and Taeri  considered QR- codes over. Kaya et al.  and Zhang et al.  studied quadratic residue codes over
where p is an odd prime. Kaya et al.  studied quadratic residue codes over
whereas Liu et al.  studied them over non-local ring
where and p is an odd prime. The authors  along with Kathuria extended their results over the ring where
and. In  the authors studied quadratic residue codes and their
extensions over the ring where and p is a prime satisfying generalizing all the previous results.
There are duadic codes which are not quadratic residue codes, but they have properties similar to those of quadratic residue codes. In this paper we extend our
results of  to duadic codes over the ring, where
, q is a prime power congruent to 1 modulo. The Gray map defined in
 is also extended from which preserves linearity and in some special
cases preserves self duality. The Gray images of extensions of duadic codes over the ring lead to construction of self-dual, formally self-dual and self-orthogonal codes. We give some examples of duadic but non quadratic residue codes which give rise to a [40,20,6] self-dual code over, a [27,12,6] self orthogonal code over, a [30,12,8] self-orthogonal code over and a formally self-dual [24,12,6] code over.
The paper is organized as follows: In Section 2, we recall duadic codes of length n
over and state some of their properties. In Section 3, we study the ring
, cyclic codes over ring and define the Gray map. In Section 4, we study duadic codes over, their extensions and give some of their properties. We also give some examples to illustrate our results.
2. Duadic Codes over and Their Properties
In this section we give the definition of duadic codes and state some of their properties. Before that we need some preliminary notations and results.
A cyclic code of length n over can be regarded as an ideal of the ring
. It has a unique idempotent generator.
Let. The cyclic code has generating
idempotent, its dual is the repetition code with generating idempotent.
A polynomial is called even like if otherwise it is
called odd like. A code is called even like (odd like) if all its codewords are even like (odd like). For, defined as is called a multiplier where. It is extended on by defining
Suppose n is odd, and, where
(i), are union of q-cyclotomic cosets mod n.
(iii) There exists a multiplier, such that and.
Then codes and having and as defining sets are called a pair of odd like duadic codes and codes and having and as def- ining sets are called a pair of even like duadic codes.
It is known that duadic codes exist if and only if q is a square mod n.
There is an equivalent definition of duadic codes in terms of idempotents. (For details see Huffman and Pless  , Chapter 6).
Let and be two even like idempotents with and. The codes and form a pair of even like duadic codes if and only if
(1) the idempotents satisfy
(2) There is a multiplier such that
Associated to and there is a pair of odd like duadic codes and generated by idempotents and respectively, where,
If (1) and (2) hold we say that gives a splitting for even like duadic codes and or for the odd like duadic codes and.
Lemma 1: Let and be a pair of even-like duadic codes of length n over. Suppose gives the splitting for and. Let and be the associated odd-like duadic codes. Then:
(iii) is even like subcode of for,
(iv) and, and
This is part of Theorem 6.1.3 of  .
Lemma 2: Let and be a pair of even-like duadic codes over with and the associated pair of odd-like duadic codes.
(i) If and
(ii) If and
Proof follows from Theorems 6.4.2 and 6.4.3 of  .
Lemma 3:, , ,. Further and.
Proof follows immediately from the definition and Lemma 1.
3. Cyclic Codes over the Ring R and the Gray Map
Let q be a prime power,. Throughout the paper, denotes the commutative ring, where, is a natural number and. is a ring of size and characteristic p. For a primitive element of, take, so that and. Let denote the following elements of:
A simple calculation shows that
The decomposition theorem of ring theory tells us that.
For a linear code of length n over the ring, let
Then are linear codes of length n over, and. For a code over, the dual code is defined as
where denotes the usual Euclidean inner
product. is self-dual if and self-orthogonal if. A code is called formally self-dual if and have the same weight distribution.
The following result is a simple generalization of a result of  .
Theorem 1: Let be a linear code of length n over. Then
(i) is cyclic over if and only if are cyclic over.
(ii) If, , then
(iv) Suppose that Let then.
(vi) where, where is the reciprocal polynomial of
The following is a well known result :
Lemma 4: (i) Let C be a cyclic code of length n over a finite ring S generated by the idempotent E in then is generated by the idempotent.
(ii) Let C and D be cyclic codes of length n over a finite ring S generated by the idem-
potents in then and are generated by the ide-
mpotents and respectively.
Let the Gray map be given by
where M is an nonsingular matrix of Vandermonde determinant and V is any nonsingular matrix over of order. This map can be extended from to component wise.
Let the Gray weight of an element be, the Hamming weight of. The Gray weight of a codeword is defined
as. For any two elements
, the Gray distance is given by.
Theorem 2. The Gray map is an -linear, one to one and onto map. It is also
distance preserving map from (, Gray distance) to (, Hamming distance).
Further if the matrix V satisfies, , where denotes the transpose
of the matrix V, then the Gray image of a self-dual code over is a self-
dual code in.
The proof follows exactly on the same lines as the proof of Theorem 2 of  . The only difference is that here q is an arbitrary prime power and not just an odd prime. For the sake of completeness of the result we reproduce the proof here.
Proof. The first two assertions hold as is an invertible matrix over.
Let now, , satisfying. So that
Let be a self-dual code over. Let where and. Then
implies that (comparing the coefficients of on both sides)
for each r,
For convenience we call and. Then
Using (2), we find that
Using (3) and (4), one can check that each is zero, which proves the result.
4. Duadic Codes over the Ring R
We now define duadic codes over the ring in terms of their idempotent generators. Let denote the ring. Using the properties (2) of idempotents, we have
Lemma 5: Let and be idempotents as defined in
(1). Then for and for any tuple of odd-like idem-
potents not all equal and for any tuple of even-like idempotents not all equal, and are respectively odd-like and even-like idempotents in the ring.
Throughout the paper we assume that q is a square mod n so that duadic codes of
length n over exist. The construction and the properties of duadic codes over the ring is similar to that of quadratic residue codes over the ring, where given in  . We denote the set by. For each, let denote the odd-like idempotent of the ring in which occurs at the ith place and occurs at the remaining places i.e.
For, let denote the odd-like idempotent in which occ- urs at the and places and occurs at the remaining places i.e.
In the same way, for, let denote the odd-like idempotent
For, , where let the corresponding odd-like idempotents be
Similarly we define even-like idempotents for and, ,
Let denote the odd-like duadic codes and denote the even-like duadic codes over generated by the corresponding idempotents, i.e.
, , , ,
Theorem 3: Let, Then for, is equivalent to and is equivalent to. For, , is equivalent to, and is equivalent to. Further there are
inequivalent odd-like duadic codes and inequivalent even-like duadic codes over the ring.
Proof: Let the multiplier give splitting of and or of and. Then, , , and so
, , ,. This proves that , , and.
Note that, , ,. Therefore
For a given positive integer k, the number of choices of the subsets of is.
Let m be even first. Then. Using (15) and
(16), we find that the number of inequivalent odd-like or even-like duadic-codes is
. If m is odd the number of inequiv- alent odd-like or even-like duadic codes is.
Let denote the greatest integer. we have when m is even and when m is odd.
Theorem 4: If, then for subsets of with cardinality k, , the following assertions hold for duadic codes over.
Proof: From the relations (2),(6)-(14) we see that, , and. Therefore by Lemmas 1 and 4, , and;, and. This proves (i)-(iv).
Using that and from Lemma 3 and noting that we find that.
Similarly using and from Lemma 3, we see that.
Therefore and. This proves (v) and (vi).
Finally for, we have
it being a repetition code over. Therefore
This gives. Now we find that
since. This gives.
Theorem 5 : If, and if, then for each possible tuple, the following assertions hold for duadic codes over.
(ii) is self orthogonal.
Proof: By using Lemma 2 and Lemma 4, we have so. Similarly. For . Now result (i) follows from Lemma 4. Using (vi) of Theorem 4, we have. Therefore is self orthogonal.
Similarly we get
Theorem 6 : If and, then for all possible choices of, the following assertions hold for duadic codes over.
The extended duadic codes over are formed in the same way
as the extended duadic codes over are formed. See Theorem 6.4.12 of  .
Consider the equation
This equation has a solution in if and only if n and −1 are both squares or both non squares in (see  , Chapter 6).
Theorem 7: Suppose there exist a in satisfying Equation (17). If, then for all possible choices of, the extended duadic codes of length are self-dual.
Proof: As, by Theorem 4, let be the exten- ded duadic code over generated by
where is a generator matrix for the even-like duadic code. The row above the matrix shows the column labeling by. Since the all one vector belongs to and its dual is equal to, the last row of is orthogonal to all the previous rows of. The last row is orthog- onal to itself also as in. Further as is self orthogonal by Theorem 5, we find that the code is self orthogonal. Now the result foll-
ows from the fact that.
Theorem 8: Suppose there exists a in satisfying Equation (17). If, then for all possible choices of, the extended duadic codes satisfy.
Proof: Let and be the extended duadic codes over generated by
respectively where is a generator matrix for the duadic code and is a generator matrix for the duadic code. Let v denote the all one
vector of length n. As and, v is orthogonal to all the
rows of. Also. Further rows of are in
, so are orthogonal to rows of. Therefore all rows of
are orthogonal to all the rows of. Hence. Now the result follows from comparing their orders.
Corollary: Let the matrix V taken in the definition of the Gray map satisfy,. If, then for all possible choices of, the Gray images of extended duadic codes i.e. are self-dual codes of length over and the Gray images of the even-like duadic codes
i.e. are self-orthogonal codes of length over. If, then are formally self-dual codes of length over.
Next we give some examples to illustrate our theory. The minimum distances of all the examples appearing have been computed by the Magma Computational Algebra System.
Example 1: Let, , and be a matrix over
satisfying. The even like idempotent generators of duadic codes of length 9 over are,. Here,. The Gray image of even like duadic code is a self-orthogonal [27,12,6] code over. Here there is no satisfying Equation (17).
Example 2: Let, , and
be a matrix over satisfying. The even like idempotent generators of duadic codes of length 9 over are,. Here, and is a solution of (17). The Gray image of extended duadic code is a self-dual [40,20,6] code over.
Example 3: Let, , and
be a matrix over satisfying. The even like idempotent generators of duadic codes of length 5 over are,. The Gray image of even like duadic code is a self- orthogonal [30,12,8] code over.
Example 4 : Let, , and let a be the primitive element of
be a matrix over satisfying. The even like idempotent generators of duadic codes of length 5 over are,. Here, and is a solution of (17). The Gray image of extended duadic code is a formally self-dual [24,12,6] code over.
 Kaya, A., Yildiz, B. and Siap, I. (2014) Quadratic Residue Codes over Fp+uFp and Their Gray Images. ournal of Pure and Applied Algebra, 218, 1999-2011.
 Kaya, A., Yildiz, B. and Siap, I. (2014) New Extremal Binary Self-Dual Codes of Length 68 from Quadratic Residue Codes over F2+uF2+u2F2. Finite Fields and Their Applications, 29, 160-177.
[u]/m-u> and Their Gray Images. arXiv: 1609. 07862v1 [math.NT] 2016.