Weight distributions for projective binary linear codes from Weil sums

: A class of projective binary linear codes are constructed and their weight distributions are investigated using Weil sums. They have at most three nonzero weights, containing some optimal codes. Their dual codes are also studied and some of them are either optimal or almost optimal.


Introduction
Throughout this paper, we let q = 2 m for a positive integer m. An [n, κ, d] linear code C over the finite field F 2 is a κ-dimensional subspace of F n 2 with minimum distance d. A linear code C is called projective if its dual code has minimum distance at least 3. For a codeword c ∈ C the Hamming weight wt(c) is the number of nonzero coordinates in c. Let A i be the number of codewords with weight i in C of length n. The sequence (1, A 1 , . . . , A n ) is referred as the weight distribution of C. If the number of nonzero A i in the sequence (A 1 , . . . , A n ) is equal to t, we call C a t-weight code.
The weight distribution contains important information of a code. In classic coding theory, it gives the minimum distance of the code which determines the error correction capability of the code. In addition, the weight distribution allows the computation of the error probability of error detection and error correction with respect to some algorithms [2,16,31]. Thus, it is desirable to determine the weight distributions of linear codes. Moreover, linear codes with a few nonzero weights have many applications in constant composition codes [10], authentication codes [11] and secret sharing schemes [38] and some other fields. So it has provoked tremendous interests in determining the weight distributions of linear codes in literature. Different kinds of linear codes over finite fields and rings have been investigated explicitly for the past two decades, see [5, 9, 13, 15, 17-19, 24, 27, 29, 30, 34, 35, 39]. In particular, Ding et al. [13] studied the weight distributions of a class of binary linear codes. Heng et al. dealt with projective binary linear codes from special Boolean functions in their recent work [18].
Huang et al. [19] constructed primitive binary LCD BCH codes and determined their parameters.
Let q = p m for a prime p. Choose a subset D = {d 1 , d 2 , . . . , d n } of F * q , where F * q is the multiplicative group of F q . Denote by Tr the absolute trace function from F q to F p . A linear code of length n is defined by The set D is called the defining set. Ding [12] pointed out that the defining-set construction is a fundamental approach and is equivalent to the generator matrix construction of all linear codes. Therefore it has attracted extensive attention and many families of linear codes were proposed following this way [1, 13, 14, 21-23, 33, 36, 37], most of which have good parameters. Particularly, Wu et al. [33] investigated three-weight binary linear codes from generalized Moisio's exponential sums. We refer the reader to [25,28] and the references therein for an overall survey on recent results and problems on constructions of linear codes from cryptographic functions.
In the rest of the paper, we always take p = 2 unless otherwise stated. In [13], a class of three-weight binary code C D of (1.1) is constructed using the defining set Let α, β ∈ F * q , and u a positive integer less than m. We consider a special case of the defining-set construction by defining a class of linear codes where c(a, b) = (Tr(ax + by)) (x,y)∈D and The set D is also called the defining set of C D . Clearly, this is an extension of the work in [13]. The purpose of this paper is to study the weight distributions of C D by employing Weil sums. These linear codes are projective with at most three nonzero weights and can be utilized to construct secret sharing schemes with good access structures. Now we present the main results of this paper and their proofs are given in Section 3. Let v = gcd(m, u) stand for the greatest common divisor of m and u. Let g be a generator of the cyclic group F * q . Namely, F * q = g . The weight distributions of C D are given in the following four theorems. Theorem 1.1. Let C D be defined by (1.2) and (1.3). If m/v is odd, then C D is a [2 2m−1 − 1, 2m, 2 2m−2 − 2 m+v−2 ] three-weight binary code with the weight distribution in Table 1.
two-weight binary code with the weight distribution in Table 2.
three-weight binary code with the weight distribution in Table 3. If u = m/2, then C D is a simplex code with parameters [2 2m − 1, 2m, 2 2m−1 ] and the only nonzero weight 2 2m−1 . Moreover, the simplex code meets the Griesmer bound.
Theorem 1.4. Suppose that m/v is even and only one of α and β is in three-weight binary code with the weight distribution in Table 4.
Some examples are provided to illustrate our main results. All of the numerical results are verified by Magma programs.

Preliminaries
In this section, we present some results on group characters and Weil sums. Let G be a finite abelian group (written multiplicatively). A character χ of G is a homomorphism from G into the multiplicative group U of complex numbers of absolute value 1. That is, defines an additive character of F q , where Tr is the absolute trace function from F q to F 2 . The additive character χ 0 is called trivial, whereas other characters χ b with b ∈ F * q are called nontrivial. Especially χ 1 is called the canonical additive character and is denoted by χ for simplicity. See [26] for more information about characters over finite fields.
In [7], Coulter determined the value of Weil sums S u (α, β) defined by for all α, β ∈ F q , where q = 2 m and u is a positive integer. Recall that v = gcd(m, u) is the greatest common divisor of m and u.
When m/v is even, the evaluation of S u (α, β) for p = 2, where β 0, was due to Coulter [7], and it can be similarly proved as the case of an odd prime p, see the poofs of Theorems 1 and 2 in [6].
Lemma 2.4 (Theorem 5.3, [7]). Let β ∈ F * q and suppose m/v is even such that m = 2k for some integer k. Let f α (x) = α 2 u x 2 2u + αx ∈ F q [x]. There are two cases. (i) If α g t(2 v +1) for any integer t then f α is a permutation polynomial. Let x 0 ∈ F q be the unique element satisfying f α (x 0 ) = β 2 u . Then (ii) If α = g t(2 v +1) for some integer t then S u (α, β) = 0 unless the equation f α (x) = β 2 u is solvable. If the equation is solvable, with solution x 0 say, then

The proofs of the main results
In this section, we always fix α, β ∈ F * q and let g be a generator of F * q .

Auxiliary results
The code length is defined by Lemma 3.1. The code length n of (3.1) is given as follows.
The Pless power moments are useful tools when we calculate the weight distribution of a given code. Recall that the code C D is defined by (1.2) and (1.3) with length n and dimension κ = dim F 2 (C D ).

Hence, by (3.3), the weight wt
Put We now determine the number A w i of codewords with weight w i in C D . The first three Pless power moments yield the following system of equations: where n = 2 2m−1 − 1. Solving the system of equations in (3.5) leads to the weight distribution given in Table 1. This proves Theorem 1.1.
In the second case, if m/v is even and α, β g 2 v +1 , the length is n = 2 2m−1 + 2 m−1 − 1. It follows from Lemmas 2.3 and 2.4 that where a 0 and x 0 satisfies f α (x 0 ) = a 2 u . By (3.4), (c(a, b)) belongs to the set

From (3.3), the weight wt
Again by solving the system of equations where n = 2 2m−1 + 2 m−1 − 1, we get the weight distribution given in Table 2. This finishes the proof of Theorem 1.2.
In the third case, if m/v is even and α, β ∈ g 2 v +1 , the length is n = 2 2m−1 + 2 m+2v−1 − 1. Again from Lemma 2.3, we have Let a 0. It follows from Lemma 2.4 that S u (α, a) = 0 or if the equation f α (x) = a 2 u is solvable with a solution x 0 ∈ F q , then By (3.3) and (3.4), the weight wt (c(a, b)) belongs to the set The first three Pless power moments are given by (3.5), where n = 2 2m−1 + 2 m+2v−1 − 1. Solving these equations yields the weight distribution given in Table 3. This completes the proof of Theorem 1.3.
The last case is that m/v is even and α ∈ g 2 v +1 , β ). In this case, n = 2 2m−1 − 2 m+v−1 − 1. After a similar argument as we have done in the previous case, we obtain from (3.3) and (3.4) that wt(c(a, b)) belongs to the set From the first three Pless power moments (3.5), we get the weight distribution given in Table 4, completing the proof of Theorem 1.4.

The dual of the code C D
For the dual C ⊥ D of the code C D , we have the following conclusion. Theorem 4.1. Let m 2 and α, β ∈ F * q . The dual C ⊥ D of the code C D is a binary code with parameters [n, n − 2m, d ⊥ ], where n is given in Lemma 3.1 and d ⊥ = 3 if m is even and 3 d ⊥ 4 if m is odd.
Proof. The dimension of the code C ⊥ D is obvious. Since D does not contain the zero element of F 2 q , the minimum distance of C ⊥ D cannot be one. Similarly, since D is not a multiset, any two elements d i and d j of D must be distinct if i j. Hence, the minimum distance C ⊥ D cannot be 2. So we have d ⊥ 3. When m is even, we assume that (x 1 , 0), (0, y 2 ) ∈ D. We claim that (x 1 , y 2 ) is in D. Actually, Therefore, the minimum distance of C ⊥ D is 3. When m is odd, n = 2 2m−1 − 1 by Theorem 1.1. Let D = {d i = (d 1i , d 2i ) : i = 1, 2, . . . , n}. Consider the sums d i + d j for i j. The total number of such sums is equal to (2 2m−1 − 1)(2 2m−2 − 1) > 2 2m for m 2. Hence, there must be four distinct integers i, j, k, l ∈ {1, 2, . . . , n} such that d i + d j = d k + d l . This means that C ⊥ D has a codeword with Hamming weight 4. So we have 3 d ⊥ 4, completing the whole proof.
When m is odd, the code C ⊥ D is at least almost optimal. This is because the minimum weight of any binary code with length 2 2m−1 − 1 and dimension 2 2m−1 − 1 − 2m is at most 4 according to the sphere packing bound.

Conclusions
In this paper, a class of projective binary codes with two or three weights were constructed from a proper defining set. Their weight distributions were determined by applying Weil sums and the first three Pless power moments. Furthermore, we determined the parameters of their dual codes. Some optimal and almost optimal codes were also constructed. Due to [38], a linear code over F 2 is suitable to construct secret sharing schemes with interesting access structures if where w min and w max denote the minimum and maximum nonzero weights of the code, respectively. For the linear codes C D in Theorems 1.1-1.4, the inequality (5.1) always holds if m 2v + 2. So they can be used in secret sharing schemes with good access structures. Additionally, projective two-weight codes in Theorem 1.2 can be applied in strongly regular graphs [4,8] and projective three-weight codes in Theorems 1.1, 1.3 and 1.4 are related to association schemes with three classes [3].