New MDS Euclidean and Hermitian self-dual codes over finite fields

In this paper, we construct MDS Euclidean self-dual codes which are extended cyclic duadic codes. And we obtain many new MDS Euclidean self-dual codes. We also construct MDS Hermitian self-dual codes from generalized Reed-Solomon codes and constacyclic codes. And we give some results on Hermitian self-dual codes, which are the extended cyclic duadic codes.


Introduction
Let F q denote a finite field with q elements.An [n, k, d] linear code C over F q is a k−dimensional subspace of F n q .These parameters n, k and d satisfy d C is called a maximum distance separable (MDS) code.MDS codes are of practical and theoretical importance.For examples, MDS codes are related to geometric objects called n−arcs.
The Euclidean dual code C ⊥ of C is defined as x i y i = 0, ∀y ∈ C .
If q = r 2 , the Hermitian dual code C ⊥H of C is defined as x i y r i = 0, ∀y ∈ C .
is called Euclidean self-dual or Hermitian self-dual, respectively.There are many papers discussing Euclidean self-dual codes or Hermitian selfdual codes. [2][12]If C is MDS and Euclidean self-dual or Hermitian self-dual, C is called an MDS Euclidean self-dual code or an MDS Hermitian self-dual code, respectively.] One of these problems in this topic is to determine existence of MDS self-dual codes.When 2|q, Grassl and Gulliver completely solve the existence of MDS Euclidean self-dual codes in [4].In [5], Guenda obtain some new MDS Euclidean self-dual codes and MDS Hermitian self-dual codes.In [8], Jin and Xing obtain some new MDS Euclidean self-dual codes from generalized Reed-Solomon codes.
In this paper, we obtain some new Euclidean self-dual codes by studying the solution of an equation in F q .And we generalize Jin and Xing's results to MDS Hermitian self-dual codes.We also construct MDS Hermitian self-dual codes from constacyclic codes.We discuss MDS Hermitian self-dual codes obtained from extended cyclic duadic codes.We give some corrections of the result on MDS Hermitian self-dual codes obtained from extended cyclic duadic codes in [5].

MDS Euclidean Self-Dual Codes
A cyclic code C of length n over F q can be considered as an ideal, < g(x) >, of the ring R = Let S 1 and S 2 be unions of cyclotomic classes modulo n, such that S 1 ∩ S 2 = ∅ and S 1 ∪ S 2 = Z n \ {0} and aS i (modn) = S i+1( mod 2) .Then the triple µ a , S 1 and S 2 is called a splitting modulo n.Odd-like codes D 1 and D 2 are cyclic codes over F q with defining sets S 1 and S 2 , respectively.D 1 and D 2 can be denoted by µ a (D i ) = D i+1( mod 2) .Even-like duadic codes C 1 and C 2 are cyclic codes over F q with defining sets {0} ∪ S 1 and {0} ∪ S 2 , respectively.Obviously, µ a (C i ) = C i+1( mod 2) .A duadic code of length n over F q exists if and only if q is a quadratic residue modulo n. [11] Let n|q−1 and n be an odd integer.D 1 is a cyclic code with defining set MDS code.Its dual C 1 = D ⊥ 1 is also cyclic with defining set T ∪{0}.There are a pair of odd-like duadic codes D 1 = C ⊥ 1 and D 2 = C ⊥ 2 and a pair of even-like duadic codes C 2 = µ −1 (C 1 ).
Lemma 1 [5] Let n|q − 1 and n be an odd integer.There exists a pair of MDS codes D 1 and D 2 with parameters n, n+1 2 , n+1 2 , and µ −1 (D i ) = D i+1( mod 2) .Lemma 2 [7] Let D 1 and D 2 be a pair of odd-like duadic codes of length n over F q , µ −1 Then D 1 and D 2 are Euclidean self-dual codes.In [7], the solution of ( * ) is discussed when n is an odd prime.In [5], the solution of ( * ) is discussed when n is an odd prime power.Next, we discuss the solution of ( * ) for any odd integer n with n|q − 1.
Definition 1 (Legendre Symbol) [10] Let p be an prime and a be an integer.
, if a is not a quadratic residue modulo p.
We cannot obtain m( = 0) is a quadratic residue modulo n from m n = 1.But we have the next proposition.
Proposition 2 Let m( = 0) and n be two integers and (m, then m is not a quadratic residue modulo n.Proof Obviously.Lemma 3 (Law of Quadratic Reciprocity) [10] Let p and r be odd primes, (p, r) = 1.
Corollary 1 Let p and r be odd primes.
(1) When p ≡ 1(mod4) or r ≡ 1(mod4), ( Theorem 1 Let q = r t and r be an odd prime.Let n|q − 1 and n be an odd integer.And where (1) When q ≡ 1(mod4), there is a solution to ( * ) in F q .
(1.1) r ≡ 3(mod4).So we have that t is even.Then every quadratic equation with coefficients in F r , such as Eq. ( * ), has a solution in F r 2 ⊆ F q .
So n is a quadratic residue modulo r.And −1 is a quadratic residue modulo r.So there is a solution to ( * ) in F q .
s i=1 e i n r .
If s i=1 e i is odd, n is not a quadratic residue modulo r.And −1 is not a quadratic residue modulo r.So −n is a quadratic residue modulo r.There is a solution to ( * ) in F q .
Remark In fact, n|q − 1, and n is an odd integer and q ≡ 3(mod4).We can easily prove that there is a solution to ( * ) in F q if and only if s i=1 e i is an odd integer.Let n|q − 1, q ≡ 1(modn).q is a quadratic residue modulo n. y 2 ≡ q(modn).Let q = r t and q ≡ 3(mod4), where r is a prime.Then r ≡ 3(mod4) and t is odd.Eq. ( * ) has solutions in F q if and only if Eq. ( * ) has solutions in F r .And r is a quadratic residue modulo n. (yr − t−1 2 ) 2 ≡ r(modn).Let p be an odd prime divisor of n. r is a quadratic residue modulo p. Then r p = 1.By Law of Quadratic Reciprocity, p|n, The Legendre symbol . Theorem 2 Let q = r t be a prime power, n|q − 1 and n be an odd integer.Then there exists a pair D 1 , D 2 of MDS odd-like duadic codes of length n and µ −1 (D i ) = D i+1( mod 2) , where even-like duadic codes are MDS self-orthogonal, and MDS Euclidean self-dual codes.(3) If q ≡ 3(mod4) and s i=1 e i is an odd integer, then MDS odd-like duadic codes.If there is a solution to ( * ), we want to prove MDS Euclidean self-dual codes, and we only need to prove that This is equivalent to prove that c ∞ = 0.It can be proved similarly by which proved in [5].When q = 2 t , there is a solution to ( * ) in MDS Euclidean self-dual codes by Lemma 2.

MDS Hermitian Self-Dual Codes
Let n ≤ q 2 .We choose n distinct elements {α 1 , • • • , α n } from F q 2 and n nonzero elements Theorem 3 Let n ≤ q and 2|n.Let For proving the generalized Reed-Solomon code GRS n 2 (α, v) is Hermitian self-dual over F q 2 , we only prove From the choose of α i , v i and [8, Corollary 2.3], So the generalized Reed-Solomon code Next we construct MDS Hermitian self-dual codes from constacyclic codes.Let C be an [n, k] λ−constacyclic code over F q 2 and (n, q) = 1.C is considered as an ideal, < g(x) >, of x n −λ , where g(x)|(x n − λ).Simply, C =< g(x) >.Lemma 4 [12] Let λ ∈ F * q 2 , r = ord q 2 (λ), and C be a λ−constacyclic code over F q 2 .If C is Hermitian self-dual, then r|q + 1.
Lemma 5 [12] Let n = 2 a n ′ (a > 0) and r = 2 b r ′ be integers such that 2 ∤ n ′ and 2 ∤ r ′ .Let q be an odd prime power such that (n, q) = 1 and r|q + 1, and let λ ∈ F q 2 has order r.Then Hermitian self-dual λ−constacyclic codes over F q 2 of length n exist if and only if b > 0 and q ≡ −1(mod2 a+b ).
C is MDS Hermitian self-dual by the relationship of roots of a constacyclic code and its Hermitian dual code's roots.
Remark The MDS Hermitian self-dual constacyclic code obtained from Theorem 4 is different with the MDS Hermitian self-dual constacyclic code in [12], because (q + 1, q − 1) = 2 for an odd prime power q.
If r = 2, C is negacyclic.Theorem 4 can be stated as follow.
Corollary 2 Let n = 2 a n ′ (a ≥ 1) and n ′ is odd.Let q ≡ −1(mod2 a n " ) and q ≡ 2 a − 1(mod2 a+1 ), where n ′ |n " and n " is odd.Then there exists an MDS Hermitian self-dual code C of length n which is negacyclic with defining set Especially, when a = 1, Corollary 2 is similar as [5, Theorem 11].From Theorem 3 and Theorem 4, we obtain the next theorem.Theorem 5 Let n ≤ q + 1 and n be even.There exists an MDS Hermitian self-dual code with length n over F q 2 .

MDS Hermitian Self-Dual Codes Obtained from Extended Cyclic Duadic Codes
Let D be an odd-like duadic code.Let γ ∈ F q 2 be a solution to 1 + γ q+1 n = 0.
Obviously, the equation always has a solution in Let D = { c|c ∈ D} be the extended code of D. Lemma 6 [2] Let D 1 and D 2 be a pair of odd-like duadic codes of length n over F q 2 .If µ −q gives the splitting for D 1 and D 2 , then D 1 and D 2 are Hermitian self-dual.
Lemma 7 [2] Let C be a cyclic code over F q 2 .The extended code C is Hermitian self-dual if and only if C is an odd-like duadic code whose splitting is given by µ −q .
Lemma 8 [2] Cyclic codes of length n over F q 2 whose extended code is Hermitian self-dual exist if and only if for every prime r dividing n, either ord r (q) is odd or ord r (q 2 ) is even.
In [5], Guenda give the next theorem.Theorem 6 [5,Theorem 8] Let q = r t be an odd prime power, and n = p m ∈ F r a divisor of q 2 + 1, where p m ≡ 1(mod4).Then there exists Hermitian self-dual codes over F q 2 which are MDS and extended duadic codes with the splitting given by µ −q and with parameters n + 1, n+1 2 , n+3 2 .In the analysis of Theorem 6 in [5], D 1 is an n, n+1 2 , n+1 2 MDS cyclic code with defining set And D 1 is considered as an odd-like duadic code, when n = p m (≡ 1(mod4)).Then the code where γ ∈ F q 2 is a root of 1 + γ q+1 n = 0, is an MDS Hermitian self-dual codes by Lemma 6.Sometimes, n and q satisfy conditions of Theorem 6, but D 1 , with defining set T , is not an odd-like duadic code.So it can be proved by Lemma 7 that D 1 is not an (MDS) Hermitian self-dual codes.
When n = 5 and n|q 2 + 1, it is easily to prove that Theorem 6 is correct, because = {2, 3}.Theorem 7 Let q = r t be an odd prime power, and n = 5 is a divisor of q 2 + 1.Then there exist Hermitian self-dual codes over F q 2 which are MDS and extended duadic codes with the splitting given by µ −q and with parameters [6, 3, 4].
If we want to obtain more extended cyclic duadic codes over F q 2 , which are Hermitian selfdual, we shall require that n|q − 1, (n, q + 1) = 1 and 2 ∤ n by the BCH bound of cyclic codes and Lemma 8.So we have the next theorem.

Conclusion
In this paper, we obtain many new MDS Euclidean self-dual codes by solving the equation ( * ) in F q .We generalize the work of [8] to MDS Hermitian self-dual codes, and we construct new MDS Hermitian self-dual codes from constacyclic codes.We obtain that there exists an MDS Hermitian self-dual code with length n over F q 2 , where n ≤ q + 1 and n is even.And we also discuss these MDS Hermitian self-dual codes, which are extended cyclic duadic codes.We give these corrections (Theorem 7 and Theorem 8) of Theorem 6 ([5, Theorem 8]).
) from Theorem 1 and Lemma 2. Theorem 2 is proved.We list some new MDS Euclidean self-dual codes in the next table.