D Boucher

A note on the existence of self-dual skew codes over finite fields

Conditions on the existence of self-dual θ-codes defined over a finite field IF q are studied for θ automorphism of IF q . When q ≡ 1 (mod 4) it is proven that there always exists a self-dual θ-code in any dimension and that self-dual θ-codes of a given dimension are either all θ-cyclic or all θ-negacyclic. When q ≡ 3 (mod 4), there does not exist a selfdual θ-cyclic code and a necessary and sufficient condition for the existence of self-dual θ-negacyclic codes is given.

Introduction

Conditions for the existence of self-dual cyclic and negacyclic codes have been widely studied ( [START_REF] Hai | Repeated-root constacyclic codes of length 2p s Finite Fields and[END_REF], [START_REF] Guenda | Self-dual Repeated Root Cyclic and Negacyclic Codes over Finite Fields[END_REF]) as well as for quasi-cyclic codes ( [START_REF] Ling | On the algebraic structure of quasi-cyclic codes. I. Finite fields[END_REF], [START_REF] Ling | On the algebraic structure of quasi-cyclic codes[END_REF], [START_REF] Han | Construction of quasi-cyclic self-dual codes[END_REF]). In [START_REF] Boucher | Construction and number of self-dual skew codes over IF p 2[END_REF] a formula for the number of self-dual θ-cyclic codes and self-dual θ-negacyclic codes is given over IF p 2 where p is a prime number and θ is the Frobenius automorphism. The aim of this text is to give conditions for the existence of self-dual θ-cyclic codes and θ-negacyclic codes over any finite field IF q where θ is an automorphism of IF q .

The text is organized as follows. In Section 2, some facts about self-dual skew codes are recalled. In Section 3, the question of the existence of self-dual skew codes generated by skew binomials (Proposition 1) is studied. One deduces from this part that for q ≡ 1 (mod 4) there always exists a self-dual skew code in any dimension. In Section 4, a construction of self-dual skew codes over IF q using least common right multiples of skew polynomials and generalizing Proposition 28 of [START_REF] Boucher | Self-dual skew codes and factorization of skew polynomials[END_REF] is considered (Proposition 2). This proposition is used in Section 5 when q ≡ 3 (mod 4) to prove that there does not exist a self-dual θ-cyclic code in any dimension and to give a necessary and sufficient condition for the existence of self-dual θ-negacyclic codes (Proposition 4). Lastly when q ≡ 1 (mod 4), one proves that the sufficient conditions of existence of self-dual θ-cyclic and θ-negacyclic codes given by Proposition 1 are also necessary (Proposition 5). The results of Proposition 4 and Proposition 5 are summed up in Table 1.

Generalities on self-dual skew codes

For a finite field IF q and θ an automorphism of IF q the ring R is defined by R = IF q [X; θ] = {a n X n + . . . + a 1 X + a 0 | a i ∈ IF q and n ∈ IN} where addition is defined to be the usual addition of polynomials and where multiplication is defined by the basic rule X • a = θ(a) X (a ∈ IF q ) and extended to all elements of R by associativity and distributivity. The noncommutative ring R is called a skew polynomial ring or Ore ring (cf. [START_REF] Ore | Theory of Non-Commutative Polynomials[END_REF]) and its elements are skew polynomials. It is a left and right Euclidean ring whose left and right ideals are principal. Left and right gcd and lcm exist in R and can be computed using the left and right Euclidean algorithm. Recall that the center of R is the commutative polynomial ring Z(R) = IF θ q [X |θ| ] where IF θ q is the fixed field of θ and |θ| is the order of θ. Below, module θ-codes are defined using the skew polynomial ring R.

Definition 1 (Definition 1 of [2] ) A module θ-code (or module skew code) C is a left R-submodule Rg/Rf ⊂ R/Rf in the basis 1, X, . . . , X n-1 where g ∈ R = IF q [X; θ] and f is a left multiple of g in R of degree n. If there exists an a ∈ IF q \ {0} such that g divides X n -a on the right, then the code C is (θ,a)-constacyclic. If a = 1, the code is θ-cyclic and if a = -1, it is θ-negacyclic. The skew polynomial g is called skew generator polynomial of C.
If θ is the identity then a θ-cyclic (resp. θ-negacyclic) code is a cyclic code (resp. negacyclic) code. The (Euclidean) dual of a linear code C of length n over IF q is defined with the Euclidean scalar product < x, y >=

n i=1 x i y i in IF n q as C ⊥ = {x ∈ IF n q | ∀y ∈ C, < x, y >= 0}. A linear code C over IF q is Euclidean self-dual or self-dual if C = C ⊥ .
To characterize self-dual module θ-codes, the skew reciprocal polynomial of a skew polynomial (Definition 3 of [START_REF] Boucher | A note on the dual codes of module skew codes[END_REF]) and also the left monic skew reciprocal polynomial are used :

Definition 2 ([1], Definition 3) The skew reciprocal polynomial of h = m i=0 h i X i ∈ R of degree m is h * = m i=0 X m-i • h i = m i=0 θ i (h m-i ) X i . The left monic skew recipro- cal polynomial of h is h := 1 θ m (h 0 ) • h * .
Since θ is an automorphism, the map * : R → R given by h → h * is a bijection. In particular for any g ∈ R there exists a unique h ∈ R such that g = h * and, if g is monic, there exists a unique h ∈ R such that g = h .

In order to describe some properties of the skew reciprocal polynomial, the morphism of rings Θ : R → R given by n i=0 a i X i → n i=0 θ(a i )X i ([1], Lemma 1) is useful:

Lemma 1 (see also Lemma 1 of [START_REF] Boucher | A note on the dual codes of module skew codes[END_REF]) Let f and g be skew polynomials in R and n = deg(f ). Then

1. (f g) * = Θ n (g * )f * . 2. (f * ) * = Θ n (f ).
According to Proposition 5 of [START_REF] Boucher | Self-dual skew codes and factorization of skew polynomials[END_REF], a self-dual θ-code must be either θ-cyclic or θ-negacyclic. Furthermore, according to Corollary 1 of [START_REF] Boucher | Self-dual skew codes and factorization of skew polynomials[END_REF], a module θ-code with skew generator polynomial g ∈ IF q [X; θ] of degree k is self-dual if and only if there exists h ∈ R (called skew check polynomial of the code) such that g = h and

h h = X 2k -ε with ε ∈ {-1, 1}. (1)
Self-dual cyclic codes exist over IF q if and only if the characteristic of q is 2 (Theorem 3.3 of [START_REF] Kai | Shixin On Cyclic Self-Dual Codes Applicable Algebra in Engineering[END_REF] or Theorem 1 of [START_REF] Jia | On Self-Dual Cyclic Codes Over Finite Fields[END_REF]). Necessary and sufficient conditions for the existence of self-dual negacyclic codes are given in [START_REF] Guenda | Self-dual Repeated Root Cyclic and Negacyclic Codes over Finite Fields[END_REF] when q ≡ 1 (mod 4) and in [START_REF] Hai | Repeated-root constacyclic codes of length 2p s Finite Fields and[END_REF] when the dimension is a power of the characteristic of IF q .

According to Theorem 18 of [START_REF] Siap | Skew cyclic codes of arbitrary length[END_REF], a θ-cyclic code of length n is equivalent to a quasi-cyclic code of index where = gcd(|θ|, n). Therefore, as equivalence preserves self-duality, if there exists a self-dual θ-cyclic code of length n then there exists a self-dual quasi-cyclic code of length n and index = gcd(|θ|, n). According to Lemma 2.1 of [START_REF] Han | Construction of quasi-cyclic self-dual codes[END_REF], for m coprime with q, self-dual quasi-cyclic codes of index with length m exist over a finite field IF q if and only if q is of characteristic 2 and 2| or q ≡ 1 (mod 4) and 2| or q ≡ 3 (mod 4) and 4| . Therefore, if there exists a self-dual θ-cyclic code over IF q with n/gcd(|θ|, n) coprime with q, then gcd(|θ|, n) must be even if q is a power of 2 or q ≡ 1 (mod 4) and it must be divisible by 4 if q ≡ 3 (mod 4). If the characteristic of IF q is equal to 2, then for all nonnegative integer k there exists a self-dual θ-code of length 2k. Namely, the code (X k + 1) θ 2k is such a code as the relation ( 1) is satisfied for h = X k + 1 :

(X k + 1) (X k + 1) = (X k + 1)(X k + 1) = X 2k + 1.
In next section, necessary and sufficient conditions for the existence of self-dual codes generated by skew binomials are given when the characteristic of IF q is odd.

Self-dual skew codes generated by skew binomials

Over a finite field of odd characteristic, there is no self-dual cyclic code ( [START_REF] Jia | On Self-Dual Cyclic Codes Over Finite Fields[END_REF]). The example below shows that it is not the case for θ-cyclic codes when θ is not the identity.

Example 1 Consider IF 3 2 = IF 3 (a) with a 2 -a -1 = 0, α = a 2 and θ : x → x 3 . The skew polynomial X + α ∈ IF 3 2 [X; θ] is the skew check polynomial of a self-dual θ-cyclic code :

(X + α) = 1 α 3 (1 + α 3 X) = X + α and (X + α) (X + α) = (X + α)(X + α) = X 2 + (α + α 3 )X + α 2 = X 2 -1.
According to Section VI A of [START_REF] Ling | On the algebraic structure of quasi-cyclic codes. I. Finite fields[END_REF], this code is, up to equivalence, the unique self-dual code of length 2 over IF 3 2 , its generator matrix is (1, α).

The following proposition gives a necessary and sufficient condition for the existence of self-dual θ-cyclic codes and self-dual θ-negacyclic codes defined over finite fields of odd characteristic and generated by skew binomials.

Proposition 1 Assume that IF q is a finite field with q = p e , p odd prime number, e ∈ IN * . Consider r ∈ IN, θ the automorphism of IF q defined by θ : x → x p r and k a nonnegative integer.

1. There exists a self-dual θ-cyclic code over IF q of dimension k generated by a skew binomial if and only if p ≡ 3 (mod 4), e is even and r × k is odd.

2. There exists a self-dual θ-negacyclic code over IF q of dimension k generated by a skew binomial if and only if p ≡ 1 (mod 4) or p ≡ 3 (mod 4), e is even and r × k is even.

Proof.

• Consider h = X k + α ∈ R = IF q [X; θ] and = ±1.
The skew binomial h is the skew reciprocal polynomial of a self-dual (θ, )-constacyclic code if, and only if, h satisfies the relation (1) i.e.

X k + 1 θ k (α) • X k + α = X 2k -.
Developping this skew polynomial relation, one gets the equivalent conditions

θ k (α) + α = α 2 + 1 = 0.
• One then proves that there exists α ∈ IF q such that θ k (α) + α = α 2 + 1 = 0 if and only if p ≡ 3 (mod 4), e is even, r and k are odd.

Let us assume that p ≡ 3 (mod 4), e ≡ 0 (mod 2) and r, k ≡ 1 (mod 2). Then -1 is a square in IF q and one can consider α ∈ IF q such that α 2 = -1. As r and k are odd, p kr ≡ 3 (mod 4) so p kr -1 ≡ 2 (mod 4) and p kr -1 2 ≡ 1 (mod 2). Therefore

α p kr -1 = (α 2 ) p kr -1 2 = (-1) p kr -1 2 = -1 i.e. θ k (α) + α = 0.
Conversely, consider α in IF q such that θ k (α) + α = α 2 + 1 = 0. Assume that p ≡ 1 (mod 4) then -1 is a square in IF p so α belongs to IF p and α is left fixed by θ. The equality θ k (α) + α = 0 implies that 2α = 0, which is impossible as p is odd. Therefore p ≡ 3 (mod 4) and as -1 is a square in IF q , e must be even. As

θ k (α) + α = 0 = α 2 + 1, one gets -1 = α p kr -1 = (α 2 ) p kr -1 2 = (-1) p kr -1 2 so p kr -1 2
is odd, and p kr -1 ≡ 2 (mod 4). As p ≡ 3 (mod 4), kr must be odd.

• Lastly one proves that there exists α ∈ IF q such that θ k (α) -α = α 2 + 1 = 0 if and only if p ≡ 1 (mod 4) or (p ≡ 3 (mod 4), e and r × k are even).

First if p ≡ 1 (mod 4) then -1 is a square in IF p . Consider α in IF p such that α 2 = -1, then θ k (α) -α = 0 because α ∈ IF p is left fixed by θ. If p ≡ 3 (mod 4
), e ≡ 0 (mod 2) and rk ≡ 0 (mod 2), then -1 has a square root in IF q and p kr -1 ≡ 0 (mod 4).

Consider α ∈ IF q such that α 2 = -1. Then α p kr -1 = (α 2 ) p kr -1 2 = 1 because α 2 = -1 and (p kr -1)/2 is even. Conversely, consider α ∈ IF q such that θ k (α) -α = α 2 + 1 = 0.
Therefore -1 is a square in IF q and either p ≡ 1 (mod 4) or p ≡ 3 (mod 4) and e ≡ 0 (mod 2). If p ≡ 3 (mod 4) and rk ≡ 1 (mod 2) then p kr -1 ≡ 2 (mod 4) so (p kr -1)/2 would be odd and α p kr -1 would be equal to -1. As IF q has an odd characteristic, this contradicts the hypothesis α p kr -1 = 1. Therefore p ≡ 1 (mod 4) or p ≡ 3 (mod 4), e ≡ 0 (mod 2) and rk ≡ 0 (mod 2).

Corollary 1 Assume that IF q is a finite field with q = p e , p odd prime number, e ∈ IN * and q ≡ 1 (mod 4). Consider r ∈ IN, θ the automorphism of IF q defined by θ : x → x p r and k a nonnegative integer. Then there exists a self-dual θ-code of dimension k.

Proof. According to Proposition 1, if p ≡ 1 (mod 4) there exists a self-dual θ-negacyclic code of dimension k; if p ≡ 3 (mod 4) and e ≡ 0 (mod 2), then there exists a self-dual θ-cyclic code of dimension k if r × k is odd and there exists a self-dual θ-negacyclic code of dimension

k if r × k is even. Example 2 Consider IF 3 2 = IF 3 (a)
with a 2 -a -1 = 0 and θ : x → x 3 . For k ∈ IN * , there exists α such that X k + α is the skew check polynomial of a self-dual θ-cyclic code if and only if k is odd. In this case α satisfies α 2 + 1 = 0 and θ k (α) + α = 0 i.e. α 2 + 1 = 0 and α(α 2 + 1) = 0 (because θ k = θ if k is odd). So α must be equal to ±a 2 (see Example 1).

Remark 1 When r = 0 (i.e. θ is the identity), Proposition 1 gives necessary and sufficient conditions of existence of self-dual cyclic and negacyclic codes generated by binomials over finite fields of odd characteristic. If p ≡ 1 (mod 4) or p ≡ 3 (mod 4) and e ≡ 0 (mod 2), there always exists a self-dual negacyclic code of any dimension (see also Corollary 3.3 of [START_REF] Hai | Repeated-root constacyclic codes of length 2p s Finite Fields and[END_REF] when the dimension is p s for s > 0). This seems to contradict Example 3.8 of [START_REF] Guenda | Self-dual Repeated Root Cyclic and Negacyclic Codes over Finite Fields[END_REF] which states that a "self-dual negacyclic code of length 70 over IF 5 does not exist" and that there "is no self-dual negacyclic code of length 30 over IF 9 ". Namely, over IF 5 , X 35 + 2 generates a self-dual negacyclic code of dimension 35 whereas over IF 9 , X 15 + a (with a 2 = -1) generates a self-dual negacyclic code of dimension 15.

Self-dual skew codes generated by least common left multiples of skew polynomials

The following Lemma is inspired from Theorem 16 and Theorem 18 of [START_REF] Siap | Skew cyclic codes of arbitrary length[END_REF] which state that a θ-cyclic code is either a cyclic code or a quasi-cyclic code.

Lemma 2 Consider IF q a finite field, θ ∈ Aut(IF q ), R = IF q [X; θ], n a nonnegative integer, the greatest common divisor of n and of the order of θ, a ∈ (IF q ) θ \ {0} and h a right divisor of X n -a in R. Then X h = hX (which means that the coefficients of h belong to the fixed field of θ , (IF q ) θ ).

Proof. Consider m the order of θ, u, v

∈ IN such that = mu -nv. Consider 1 a v X mu h ∈ Rh/R(X n -a), one has 1 a v X mu h = hX mu × 1 a v = hX X nv × 1 a v = hX in R/R(X n -a)
, therefore hX ∈ Rh/R(X n -a) and there exists Q ∈ R monic of degree such that hX = Qh. The constant coefficient Q 0 of Q satisfies Q 0 h 0 = 0, as h 0 = 0, one gets Q 0 = 0. Furthermore, from the coefficients of degree 1, . . . , -1 of hX -Qh, one gets that the terms of Q with degrees ≤ -1 all cancel, therefore hX = X h.

The following proposition is a generalization of Proposition 28 of [START_REF] Boucher | Self-dual skew codes and factorization of skew polynomials[END_REF] (where θ was of order 2).

Proposition 2 Consider IF q a finite field, θ ∈ Aut(IF q ), R = IF q [X; θ], k a nonnegative integer and the greatest common divisor of 2k and of the order of θ, R = (IF q ) θ [X; θ] where θ is the restriction of θ to (IF q ) θ . Consider s ∈ IN and t ∈ IN not multiple of p, such that

2k = × p s × t. Let ε ∈ {-1, 1} and Y t -ε = f 1 (Y )f 2 (Y ) • • • f m (Y ) ∈ (IF q ) θ [Y ],
where f i (Y ) are monic polynomials that are pairwise coprime with the property that

f i = f i . The equation h h = X 2k -∈ R is equivalent to h h = X 2k -∈ R.
Its solutions are the skew polynomials h defined by h = lcrm(h 1 , . . . , h m ) ∈ R where for i = 1, . . . , m, h i h i = f p s i (X ) ∈ R.

Proof. According to Lemma 2, the equation

h h = X 2k -in R = IF q [X; θ] is equivalent to h h = X 2k -in R = (IF q ) θ [X; θ]
where (IF q ) θ is the fixed field of θ and θ is the restriction of θ to (IF q ) θ . As θ fixes (IF q ) θ , the order of θ divides and therefore it divides 2k.

Therefore in the following, without loss of generality, one can consider the equation h h = X 2k -in R = IF q [X; θ] with θ ∈ Aut(IF q ) of order dividing 2k. The proof of Proposition 28 of [START_REF] Boucher | Self-dual skew codes and factorization of skew polynomials[END_REF] can be adapted to this context and not all details are given.

1. (⇐) From h = lcrm(h 1 , . . . , h m ) one obtains that h = h i q i with q i ∈ R. Lemma 1

shows that there exists qi ∈ R such that h = qi h i . Therefore

h h = qi (h i h i )q i = qi f i p s (X )q i = qi q i f i p s (X ) (because f p s i (X ) ∈ (IF q ) θ [X ] is central), showing that lclm((f 1 ) p s (X ), . . . , (f m ) p s (X )) = f p s 1 (X ) • • • f p s m (X ) = X n -ε is a right divisor of h h in R.
Furthermore, the degree of h is equal to the sum of the degrees of the skew polynomials h i (because they are pairwise coprime), therefore the degree of h h is equal to m i=1 deg((f i ) p s (X )) = 2k which enables to conclude that h h = X 2k -.

(⇒): According to ([5]

, Theorem 4.1), h = lclm(h 1 , . . . , h m ) where h i = gcrd(f p s i (X ), h ) are pairwise coprime in R. In particular, according to [START_REF] Ore | Theory of Non-Commutative Polynomials[END_REF],

deg(lclm(h i , h j )) = deg(h i )+deg(h j ) for i = j and deg(h ) = deg(lclm(h i )) = deg(h i ).
Let us now show that h i divides f i p s (X ) and h on the left :

• Let δ i be the degree of f i p s (X ) and d i be the degree of

h i . Applying Lemma 1 to f i p s (X ) = q i h * i one obtains (f i p s (X )) * = Θ δ i -d i (h * i * )q * i = Θ δ i -d i (Θ d i (h i ))q * i = Θ δ i (h i )q * i = h i q * i
(because δ i is a multiple of the order of θ). One concludes that h i divides on the left (f i p s (X )) * and h i divides on the left (f i p s ) (X ) = f i p s (X ).

• Since h i divides h on the right, h * = p i h * i for some p i in R. Using Lemma 1, one obtains

Θ k (h) = h * * = Θ k-d i (h * i * )p * i . Therefore Θ k (h) = Θ k-d i (Θ d i (h i ))p * i = Θ k (h i )p * i .
Since Θ is a morphism of rings, h i divides h on the left.

Since h i divides h on the right and h i divides h on the left, there exist g i , gi such that h h = gi h i h i g i . Since two factors of a decomposition of the central polynomial h h = gi h i h i g i into two factors commute, h i h i divides h h = X n -ε on the right. According to Theorem 4.1 of [START_REF] Giesbrecht | Factoring in skew-polynomial rings over finite fields[END_REF],

h i h i = lclm(gcrd(h i h i , (f j ) p s (X )), j = 1, . . .

m). As both h i and h

i divide the central polynomial f i p s (X ), the product h i h i divides (f i p s ) 2 (X ). For j = i, gcrd(h i h i , (f j ) p s (X )) = 1 and h i h i = gcrd(h i h i , f i p s (X )), in particular, h i h i divides f i p s (X ).
For i ∈ {1, . . . , m} the polynomials f i p s (X ) are pairwise coprime, showing that their divisors h i h i are also pairwise coprime. Therefore

deg(lclm(h

i h i )) = m i=1 deg(h i h i ) = 2 deg(h ) = m i=1 deg(f i p s (X )). From m i=1 deg(h i h i ) = m i=1 deg(f i p s (X )
) and the fact that h i h i divides f i p s (X ), we

obtain h i h i = f i p s (X ).
As h i divides h on the left, lcrm(h i , i = 1, . . . , m) also divides h on the left. Since gcrd(h i , h j ) = 1 implies gcld(h i , h j ) = 1, one gets deg(lcrm

(h i , i = 1, . . . , m)) = deg(h i ) = deg(h). Therefore h = lcrm(h i , i = 1, . . . , m).
Corollary 2 Consider IF q a finite field with odd characteristic p, θ ∈ Aut(IF q ), R = IF q [X; θ]. Consider the greatest common divisor of 2 × k and of the order of θ, k

∈ IN * , s ∈ IN and t ∈ IN not multiple of p such that 2 × k = × p s × t.
1. If the order of θ is odd then there does not exist a self-dual θ-cyclic code of dimension k over IF q .

2. If the order of θ is odd and if

Y t + 1 ∈ (IF q ) θ [Y ]
has a self-reciprocal irreducible factor of degree > 1, then there does not exist a self-dual θ-negacyclic code of dimension k over IF q .

Proof.

1. Assume that there is a self-dual θ-cyclic code of dimension k, then the equation h h = X 2k -1 has a solution in R. Furthermore Y -1 divides Y t -1 and is self-reciprocal, therefore, according to Proposition 2, the intermediate equation H H = (X l -1) p s has a solution. But the order of θ is odd so is odd, therefore the right hand side of this intermediate equation has an odd degree which is impossible as the degree of the left hand side is even. The skew polynomials H and H must have the same number of irreducible factors, with the same degree and dividing f (X ) p s . This contradicts the fact that f (X ) p s has an odd number of irreducible factors with the same degree. Therefore, according to Proposition 2, the equation h h = X 2k + 1 has no solution in R.

Consider f

(Y ) = f (Y ) ∈ (IF q ) θ [Y ] irreducible dividing Y t + 1,
Remark 2 According to Theorem 2.2 of [START_REF] Guenda | Self-dual Repeated Root Cyclic and Negacyclic Codes over Finite Fields[END_REF], there does not exist a self-dual negacyclic code of length 2k over IF q , with IF q of odd characteristic, if the polynomial

X 2k + 1 ∈ IF q [X] has an irreducible factor f such that f = f .
From Proposition 1 one deduces that there cannot exist both a self-dual θ-cyclic code generated by a binomial and a self-dual θ-negacyclic code generated by a binomial and having the same dimension. The following proposition shows that more generally there cannot exist both a self-dual θ-cyclic and a self-dual θ-negacyclic code with the same dimension.

Proposition 3 Consider IF q a finite field with odd characteristic p and θ an automorphism of IF q . There cannot exist both a self-dual θ-cyclic code and a self-dual θ-negacyclic code with the same dimension over IF q .

Proof.

Consider k ∈ IN, ∈ {-1, 1}. According to Lemma 2, the equation h h = X 2k - in R = IF q [X; θ] is equivalent to h h = X 2k -in R = (IF q ) θ [X; θ]
where (IF q ) θ is the fixed field of θ and θ is the restriction of θ to (IF q ) θ . As θ fixes (IF q ) θ , the order of θ divides and therefore it divides 2k. Therefore in the following, without loss of generality, one can consider that the order of θ ∈ Aut(IF q ) divides 2 × k. Consider s ∈ IN and t ∈ IN such that 2 × k = × p s × t where t is not a multiple of p.

1. One first considers the particular case when t = 1 i.e. 2 × k = × p s . Assume that there exists a self-dual θ-cyclic code of dimension k. Consider h ∈ R monic such that h h = X 2k -1 and α the constant coefficient of h. The skew polynomial X -belongs to (IF q ) θ [X ] therefore it is central of degree 1 in X and the skew factors of any of its factorizations are all of degree 1. The skew polynomial X 2k -= (X -) p s shares the same property. As h divides X 2k -1 and as X 2k -1 factors as a product of linear skew polynomials, a factorization of

h is h = (X -α 1 ) • • • (X -α k ) where α i ∈ IF q and X -α i divides on the right X 2k -1 (because X 2k -1 is central). According to Equation (11) of [10], one has N 2k (α i ) = 1 where for m ∈ IN * and u ∈ IF q , N m (u) := uθ(u) • • • θ m-1 (u) is the norm of u. As α = (-1) k k i=1 α i , one gets N 2k (α) = 1. Furthermore the constant term of h h is equal to α/θ k (α) therefore, θ k (α) = -α and 1 = N 2k (α) = (-1) k N k (α) 2 .
Similarly if there exists a self-dual θ-negacyclic code of dimension k, then there exists

β in IF q such that N 2k (β) = (-1) k , θ k (β) = β and N k (β) 2 = (-1) k . If k is even then N k (α) 2 = 1, therefore N k (α) = ±1 so α p k -1 p-1 = ±1 and α p k -1 = (±1) p-1 . As p is odd, one gets α p k -1 = 1, which contradicts θ k (α) = -α. If k is odd then N k (β) 2 = -1 = N k (α) 2 , so N k (α) = ±N k (β) and N 2k (α) = N k (β) 2 = -1, which contradicts N 2k (α) = 1. Therefore if t = 1,
there cannot exist both a self-dual θ-cyclic code and a self-dual θ-negacyclic code with dimension k over IF q .

2. Consider now the case when t > 1. If t is even, then Y -1 and

Y + 1 divides Y t -1 in (IF q ) θ [Y ].
If there is a self-dual θ-cyclic code of dimension k then according to Proposition 2, the intermediate skew equation h 1 h 1 = X p s -1 and h 2 h 2 = X p s + 1 must have monic solutions h 1 , h 2 ∈ R, which is impossible according to the first part of the proof. Therefore no self-dual θ-cyclic code of dimension k exists. If t is odd then

Y -1 divides Y t -1 and Y + 1 divides Y t + 1 in (IF q ) θ [Y ].
According to Proposition 2, if there is a self-dual θ-cyclic code of dimension k, then the skew equation h 1 h 1 = X p s -1 must have a monic solution h 1 ∈ R. If there is a self-dual θ-negacyclic code of dimension k, then the skew equation h 2 h 2 = X p s + 1 must also have a monic solution h 2 ∈ R. This is impossible according to the first part of the proof.

Existence of self-dual skew codes over finite fields with odd characteristic

According to Proposition 1, if q ≡ 3 (mod 4), then there is no self-dual θ-code generated by skew binomials over IF q . The following proposition gives a necessary and sufficient condition of existence of self-dual θ-codes when q ≡ 3 (mod 4). The proof uses Corollary 2.

Proposition 4 Assume that IF q is a finite field of characteristic p with q ≡ 3 (mod 4).

Consider θ an automorphism of IF q and µ ≥ 2 the biggest integer such that 2 µ divides p + 1 (i.e. 2 µ divides exactly p + 1).

1. There does not exist a self-dual θ-cyclic code of dimension k over IF q .

2. There exists a self-dual θ-negacyclic code of dimension k over IF q if, and only if, k ≡ 0 (mod 2 µ-1 ).

Proof.

Assume that q = p e ≡ 3 (mod 4) i.e. p ≡ 3 (mod 4) and e ≡ 1 (mod 2). Consider r ∈ IN such that θ is defined by x → x p r .

1. The order of θ is e/gcd(e, r), therefore as e is odd, the order of θ is also odd. According to point 1. of Corollary 2, there cannot exist a self-dual θ-cyclic code of dimension k over IF q .

2. Consider α the biggest integer such that 2 α divides k and assume that α + 1 ≥ µ. Therefore 2k is divisible by 2 µ and the skew polynomial X 2k +1 is equal to (X k/2 µ-1 ) 2 µ + 1. One proves that the polynomial Y

Y 2 µ + 1 = (Y 2 µ+1 -1)/(Y 2 µ -1) factors in IF p 2 [Y ]
as the product of Y -w i where i describes the odd numbers of {0, . . . , 2 µ+1 -1}. This polynomial can also be written as the product of the polynomials h

i (Y )h i (Y ) where h i (Y ) = Y 2 -(w i + w ip )Y + w i(p+1) is in IF p [Y ]. One concludes that Y 2 µ +1 factors in IF p [Y ]
as the product of two polynomials h(Y ) and h (Y ). From this factorization, one deduces that

X 2k + 1 = H (X)H(X) ∈ IF p [X]
where H(X) = h(X k/2 µ-1 ). So there exists a [2k, k] p self-dual negacyclic code and as IF p is fixed by θ, the relation

X 2k + 1 = H (X)H(X) still holds in IF q [X; θ].
Conversely, assume that α < µ -1. Consider the greatest common divisor of 2k and of the order of θ, and t, s such that 2k = × t × p s where p does not divide t. Let us prove that

Y t + 1 ∈ (IF q ) θ [Y ] has an irreducible factor f (Y ) such that f (Y ) = f (Y ).
Consider e = gcd(e, r) and q = p e , then (IF q ) θ = IF q . As e is odd, and as the order of θ is equal to e/ gcd(e, r), the order of θ is odd and is also odd. As p ≡ -1 (mod 2 µ ) and q = p e with e odd, q ≡ -1 (mod 2 µ ), furthermore α ≤ µ -2, q ≡ -1 (mod 4 × 2 α ).

Let us consider w a primitive 4 × 2 α -th root of unity in IF q 2 . Such an w does exist as q 2 -1 ≡ 0 (mod 4 × 2 α ), furthermore w q = w -1 because 4 × 2 α divides q + 1. As 2 α+1 divides exactly 2k and as 2k = × t × p s , 2 α+1 divides exactly t, therefore 4 × 2 α divides exactly 2t, w 2t = 1 and

w t = -1. The minimal polynomial f ∈ IF q [Y ] of w divides Y 2t -1 but not Y t -1, so it divides Y t + 1. Furthermore f (w q ) = 0 and w q = w -1 therefore f (w -1 ) = 0 and f = f . Therefore Y t + 1 has an irreducible factor f ∈ IF q [Y ] = (IF q ) θ [Y ]
such that f = f . Furthermore, the order of θ is odd, so according to Corollary 2, there cannot exist a self-dual θ-negacyclic code of dimension k.

Remark 3 Assume that p ≡ 3 (mod 4), e is odd. Consider µ ≥ 2 the biggest integer such that 2 µ divides p + 1. Consider k = p s with s ∈ IN, then k ≡ 0 (mod 2 µ-1 ) and according to Proposition 4, there is no negacyclic code of dimension k. This result was previously obtained in Corollary 3.3. of [START_REF] Hai | Repeated-root constacyclic codes of length 2p s Finite Fields and[END_REF].

To conclude, it remains to decide, when q ≡ 1 (mod 4), if the existing self-dual θ-codes are θ-cyclic or θ-negacyclic. According to Theorem 1 of [START_REF] Boucher | Construction and number of self-dual skew codes over IF p 2[END_REF], over IF q = IF p 2 with θ : x → x p and p prime number, there exists a self-dual θ-cyclic code of length 2k if and only if k is an odd number and p ≡ 3 (mod 4) whereas there exists a self-dual θ-negacyclic code of dimension k if and only if p ≡ 1 (mod 4) or p ≡ 3 (mod 4) and k is even. The following proposition generalizes this result and states that the sufficient conditions of existence of self-dual skew codes given in Proposition 1 for q ≡ 1 (mod 4) are also necessary. Its proofs uses Proposition 3 which states that there cannot exist simultaneously a self-dual θ-cyclic code and a self-dual θ-negacyclic code with the same dimension : Proposition 5 Consider a finite field IF q with q = p e , p odd prime number, e ∈ IN * and q ≡ 1 (mod 4) (i.e. p ≡ 3 (mod 4) and e even or p ≡ 1 (mod 4)). Consider r ∈ IN, θ the automorphism of IF q defined by θ : x → x p r and k a nonnegative integer.

1. There exists a self-dual θ-cyclic code of dimension k over IF q if and only if p ≡ 3 (mod 4), e is even and r × k is odd.

2. There exists a self-dual θ-negacyclic code of dimension k over IF q if and only if p ≡ 1 (mod 4) or p ≡ 3 (mod 4), e is even and r × k is even.

Proof.

1. According to Proposition 1 point 1., if p ≡ 3 (mod 4), e is even and r × k is odd, there exists a self-dual θ-cyclic code of dimension k (generated by a skew binomial). Conversely, assume that there exists a self-dual θ-cyclic code of dimension k, then according to Proposition 3, there is no θ-negacyclic code with dimension k therefore according to Proposition 1 point 2., p ≡ 3 (mod 4), e ≡ 0 (mod 2) and r × k ≡ 1 (mod 2).

2. According to Proposition 1 point 2., if p ≡ 3 (mod 4), e ≡ 0 (mod 2) and r × k ≡ 0 (mod 2) or p ≡ 1 (mod 4), there exists a self-dual θ-negacyclic code of dimension k (generated by a skew binomial). Conversely, assume that there exists a self-dual θnegacyclic code of dimension k, then according to Proposition 3, there is no θ-cyclic code with dimension k therefore according to Proposition 1 point 1., p ≡ 3 (mod 4), e ≡ 0 (mod 2) and r × k ≡ 0 (mod 2) or p ≡ 1 (mod 4).

To conclude, Proposition 4 (q ≡ 3 (mod 4)) and Proposition 5 (q ≡ 1 (mod 4)) are summed up in Table 1 below.

  then the irreducible skew factors of f (X ) have the same degree as deg(f (Y )) and therefore a factorization of f (X ) p s into irreducible skew polynomials has × p s factors of degree deg(f (Y )). As the order of θ is odd, is odd and × p s is odd, therefore each factorization of f (X ) p s into the product of irreducible factors has an odd number of irreducible factors with the same degree. Consider H ∈ R satisfying the intermediate equation H H = f (X ) p s .

  2 µ + 1 factors in IF p [Y ] as the product of two polynomials h(Y ) and h (Y ). Namely, consider w a primitive 2 µ+1 -th root of unity in IF p . As 2 µ divides p + 1, 2 µ+1 divides p 2 -1 and w belongs to IF p 2 -IF p . The polynomial

Self-dual

Self-dual θ-cyclic θ-negacyclic q ≡ 1 (mod 4), p ≡ 3 (mod 4) r × k ≡ 1 (mod 2) r × k ≡ 0 (mod 2)

Table 1: Necessary and sufficient conditions for the existence of self-dual θ-cyclic and θnegacyclic codes of dimension k over IF q where IF q has odd characteristic p, µ ∈ IN is such that 2 µ divides exactly p + 1 and θ : x → x p r .