TWO CLASSES OF LINEAR CODES WITH DEFINING SETS DERIVED FROM THE KERNEL OF NORM OR TRACE
arXiv:1511.02093v1 [cs.IT] 6 Nov 2015
ZILING HENG AND QIN YUE Abstract. Recently, linear codes with a few weights were widely investigated due to their applications in secret sharing schemes and authentication codes. In this paper, we present two classes of linear codes with the defining sets derived from the kernel of either norm or trace function. We use Gauss sums to represent their Hamming weights and obtain the lower bounds of their minimum distances. In some special cases, the weight distributions of the linear codes are explicitly determined. In particular, we obtain some codes which are optimal or almost optimal with respect to some certain bounds on linear codes.
1. Introduction Let Fq denote the finite field with q elements. An [n, l, d] linear code C over Fq is a l-dimensional subspace of Fnq with minimum Hamming distance d. There are some upper bounds of the minimum Hamming distances of linear codes. For instance, any [n, l, d] linear code over Fq meeting the Singleton bound d ≤ n − l + 1 with equality is called an MDS code. A linear [n, l, n − l] code is called an almost-MDS code [2]. An [n, l, d] code is called optimal if no [n, l, d + 1] code exists, and is called almost optimal if the [n, l, d + 1] code is optimal. Let Ai denote the number of codewords with Hamming weight i in a code C with length n. The weight enumerator of C is defined by 1 + A1 z + · · · + An z n . The sequence (A1 , A2 , · · · , An ) is called the weight distribution of C. The code C is called to be t-weight if the number of nonzero Aj , 1 ≤ j ≤ n, in the sequence (A1 , A2 , · · · , An ) equals to t. Weight distribution is an interesting topic and was investigated by [1, 4, 10, 11, 17, 18, 20, 21]. It could be used to estimate the errorcorrecting capability and the error probability of error detection of a code. 2010 Mathematics Subject Classification. 11T71, 11T55. Key words and phrases. linear codes, Griesmer bound, weight distribution, secret sharing schemes. The paper is supported by NNSF of China (No. 11171150) Fundamental Research Funds for the Central Universities (No. NZ2015102); Funding of Jiangsu Innovation Program for Graduate Eduction (the Fundamental Research Funds for the Central Universities; No. KYZZ15 0086). 1
2
Z. HENG AND Q. YUE
Let D = {d1 , d2 , . . . , dn } ⊆ Fr , where r is a power of q. Let Trr/q be the trace function from Fr onto Fq . We define a linear code of length n over Fq by CD = {(Trr/q (xd1 ), Trr/q (xd2 ), . . . , Trr/q (xdn )) : x ∈ Fr }.
(1.1)
Although different orderings of the elements of D result in different codes CD , these codes are permutation equivalent and have the same length, dimension and weight distribution. Hence, the orderings of the elements of D will not affect the results in this correspondence. This construction is generic in the sense that many known codes [5, 6, 7, 8, 12, 13, 17, 22, 24, 26, 27, 28, 29, 31] could be produced by selecting the defining set. If the set D is well chosen, the code CD may have good parameters. In this paper, by using the generic construction (1.1), we present two classes of linear codes with the defining sets derived from the kernel of either norm or trace function. We use Gauss sums to represent their Hamming weights and obtain the lower bounds of their minimum distances. In some special cases, the weight distributions of the linear codes are explicitly determined. Some codes with two weights, three weights and four weights are obtained. In particular, we obtain some codes which are optimal or almost optimal with respect to some certain bounds on linear codes. Two-weights codes are closely related to strongly regular graphs, partial geometries and projective sets [14, 15]. Linear codes with a few weights have applications in secret sharing schemes [25, 30] and authentication codes [9]. For convenience, we introduce the following notations in this paper: q e-th power of a prime p, Fq k finite field with q k elements and k a positive integer, α primitive element of Fqk , q k −1
β = α q−1 χ χ′ ψ ψ′ η Trqk /q √ ω = −1+2 −3 √ i = −1 Re(x)
primitive element of Fq , canonical additive character of Fq , canonical additive character of Fqk , multiplicative character of Fq , multiplicative character of Fqk , quadratic multiplicative character of Fq , trace function from Fqk to Fq , primitive 3-th root of complex unity, primitive 4-th root of complex unity, real part of a complex number x. 2. Preliminaries
2.1. Gauss sums. Let Fq be a finite field with q elements, where q is a power of a prime p. The canonical additive character of Fq is defined as follows: Trq/p (x)
χ : Fq −→ C∗ , χ(x) = ζp
,
LINEAR CODES
3
where ζp denotes the p-th primitive root of unity and Trq/p is the trace function from Fq to Fp . The orthogonal property of additive characters [23] is given by: ( X q, if a = 0, χ(ax) = 0 otherwise. x∈F q
F∗q
∗
Let ψ : −→ C be a multiplicative character of F∗q . The trivial multiplicative character ψ0 is defined by ψ0 (x) = 1 for all x ∈ F∗q . It is known [23] that all the b∗ , which is isomorphic to F∗ . multiplicative characters form a multiplication group F q q The orthogonal property of a multiplicative character ψ is given by (see [23]): ( X q − 1, if ψ = ψ0 , ψ(x) = 0 otherwise. x∈F∗ q
The Gauss sum over Fq is defined by G(ψ, χ) =
X
ψ(x)χ(x).
x∈F∗q
¯ χ) = ψ(−1)G(ψ, χ). Gauss sum is an It is easy to see that G(ψ0 , χ) = −1 and G(ψ, important tool in this paper to compute exponential sums. In general, the explicit determination of Gauss sums is a difficult problem. In some cases, Gauss sums are explicitly determined in [10, 23]. Let ( p· ) denote the Legendre symbol. The well-known quadratic Gauss sums are given in the following. Lemma 2.1. [23] Suppose that q = pe and η is the quadratic multiplicative character of Fq , where p is an odd prime. Then ( √ if p ≡ 1 (mod 4), (−1)e−1 q, √ G(η, χ) = e√ e−1 (−1) ( −1) q, if p ≡ 3 (mod 4). For q ≡ 1 (mod 4), it is known that q can be uniquely written as q = m2 + m′2 with odd m and even m′ , i.e., either m ≡ 1 (mod 4) if 4|m′ , or m ≡ 3 (mod 4) √ if 2||m′. Let π = m + m′ i be a primary element (see [19]), where i = −1. For the multiplicative character ϕ of order 4, the Gauss sum G(ϕ, χ) is given in [19] as follows. Lemma 2.2. (Prop. 9.9.5, [19]) For ord(ϕ) = 4 and q ≡ 1 (mod 4), G(ϕ, χ)4 = π 3 π ¯ = qπ 2 . 2.2. Jacobi sums. If ψ is a multiplicative character of Fq , then ψ is defined for all nonzero elements of Fq . It is now convenient to extend the definition of ψ by setting ψ(0) = 1 if ψ is the trivial character and ψ(0) = 0 if ψ is a nontrivial character. Let ψ1 , . . . , ψm be m multiplicative characters of Fq . Then the sum X ψ1 (c1 ) · · · ψm (cm ), J(ψ1 , . . . , ψm ) = c1 +···+cm =1
4
Z. HENG AND Q. YUE
with the summation extended over all m-tuples (c1 , . . . , cm ) of elements of Fq satisfying c1 + · · · + cm = 1, is called a Jacobi sum in Fq . A relationship between Jacobi sums and Gauss sums is given in the following. Lemma 2.3. ([19]) If ϕ is a cubic multiplicative character of Fq , then G(ϕ, χ)3 = qJ(ϕ, ϕ). Let ϕ be a cubic multiplicative character of Fq . We give some brief facts about √ J(ϕ, ϕ). It is clear that the values of ϕ are in the set {1, ω, ω 2}, where ω = −1+2 −3 . Hence X J(ϕ, ϕ) = ϕ(u)ϕ(v) ∈ Z[ω]. u+v=1
Then we have J(ϕ, ϕ) = a + bω with a, b ∈ Z and
q = |J(ϕ, ϕ)|2 = a2 − ab + b2 . The following lemma, which can be found in [19], will be used in this correspondence. Lemma 2.4. Suppose that q ≡ 1 (mod 3) and that ϕ is a cubic multiplicative character of Fq . Set J(ϕ, ϕ) = a + bω as above. Then (a) b ≡ 0 (mod 3); (b) a ≡ −1 (mod 3). Let A = 2a − b and B = b/3. Then A ≡ 1 (mod 3) and 4q = A2 + 27B 2 . And A is uniquely determined by 4q = A2 + 27B 2 . Jacobi sums have been widely used in coding theory. For more details about Jacobi sums, the reader is referred to [19, 23]. 3. The first class Let k be a positive integer and Fqk a finite field with q k elements. Let α be a q k −1
primitive element of Fqk and β = α q−1 a primitive element of Fq . In this section, we assume that gcd(k, q − 1) = h. Let Trqk /q be the trace function from Fqk onto Fq and Nqk /q the norm function from ∗ Fqk onto F∗q . We define a linear code of length n over Fq by CD = {(Trqk /q (xd1 ), Trqk /q (xd2 ), . . . , Trqk /q (xdn )) : x ∈ Fqk },
(3.1)
where the defining set q k −1
D = {d1 , d2 , . . . , dn } = {x ∈ Fqk : Nqk /q (x) = x q−1 = 1}. In fact, D = hαq−1 i is the multiplicative subgroup of F∗qk . Then n = |D| = every b ∈ F∗qk , we define q k −1
Nb = |x ∈ Fq : Trqk /q (bx) = 0 and x q−1 = 1|.
q k −1 . q−1
For
LINEAR CODES
5
Let χ be the canonical additive character of Fq . And let χ′ = χ ◦ Trqk /q, which is a lift of χ from Fq to Fqk , be the canonical character of Fqk . By the basic facts of additive characters, for any b ∈ F∗qk , we have Nb =
X q k −1 1 X X q−1 − 1))) χ(z(x χ(y Tr k (bx)))( ( q /q q 2 x∈F y∈F z∈F
= q k−2 +
q
q
qk
q k −1 1 X X 1 X X q−1 − 1)) χ(y Tr χ(z(x k /q (bx)) + q q 2 x∈F y∈F∗ q 2 x∈F z∈F∗ qk
qk
q
q
q k −1 1 X XX χ(y Trqk /q (bx))χ(z(x q−1 − 1)) + 2 q x∈F y∈F∗ z∈F∗ qk
q
q
q k −1 1 X X 1 X X ′ χ (ybx) + 2 χ(z(x q−1 − 1)) = q k−2 + 2 q x∈F y∈F∗ q x∈F z∈F∗ qk
qk
q
q
q k −1 1 X XX ′ χ (ybx)χ(z(x q−1 − 1)). + 2 q x∈F y∈F∗ z∈F∗ qk
q
q
By the orthogonal property of additive characters, we have X X X X χ′ (ybx) = 0. χ′ (ybx) = y∈F∗q x∈Fqk
x∈Fqk y∈F∗q
For convenience, we denote S(b) =
X X
χ′ (bx)χ(z(x
q k −1 q−1
x∈Fqk z∈F∗q
and T (b) =
P
− 1))
S(yb). Hence,
y∈F∗q
Nb = q k−2 +
q k −1 1 X X 1 q−1 − 1)) + χ(z(x T (b). q 2 x∈F z∈F∗ q2 qk
(3.2)
q
For any b ∈ F∗qk , the Hamming weight of a code word cb = (Trqk /q (bd1 ), Trqk /q (bd1 ), . . . , Trqk /q (bdn )) equals to w(cb ) = n − Nb . Therefore, it is sufficient to compute the exponential sums q k −1 P P χ(z(x q−1 − 1)) and T (b). x∈Fqk z∈F∗q
Lemma 3.1. Let χ be the canonical additive character of Fq . Then X X
x∈Fqk z∈F∗q
q k −1
χ(z(x q−1 − 1)) =
qk − q . q−1
6
Z. HENG AND Q. YUE
Proof. X X
χ(z(x
q k −1 q−1
− 1))
x∈Fqk z∈F∗q
= −q k +
X X
x∈Fqk z∈Fq
q k −1
χ(z(x q−1 − 1)) q k −1
= −q k + q|{x ∈ Fqk : x q−1 = 1}| = qn − q k =
qk − q . q−1
To compute T (b), we need two lemmas below. Lemma 3.2. [23] Let χ be a nontrivial additive character of Fq and ψ a multiplicative character of Fq of order s = gcd(t, q − 1). Then X
χ(axt + b) = χ(b)
s−1 X
ψ¯j (a)G(ψ j , χ)
j=1
x∈Fq
for any a, b ∈ Fq with a 6= 0. Lemma 3.3. (Davenport-Hasse Theorem [23]) Let χ be an additive and ψ a multiplicative character of Fq , not both of them trivial. Suppose χ and ψ are lifted to characters χ′ and ψ ′ , respectively, of the finite field Fqk of Fq with [Fqk : Fq ] = k. Then G(ψ ′ , χ′ ) = (−1)k−1 G(ψ, χ)k . In the following lemma, we use Gauss sums to represent the exponential sum T (b), b ∈ F∗qk . Lemma 3.4. Let χ be the canonical additive characters of Fq , gcd(k, q − 1) = h and b ∈ F∗qk . If h = 1, then T (b) = −q. If h > 1, then T (b) = −q + q(−1)k−1
h−1 X
q k −1
G(ϕj , χ)k ϕ¯j (b q−1 ),
j=1
where ϕ is the multiplicative character of order h of Fq .
LINEAR CODES
7
Proof. For 0 ≤ j ≤ q k −2, let j = (q −1)s + t with 0 ≤ s ≤ Hence, for F∗qk = hαi and F∗q = hβi, we have
S(b) =
X
X X
χ(−z) +
z∈F∗q
z∈F∗q
χ′ (bx)χ(z(x
q k −1 q−1
q k −1 q−1
x∈F∗k q
−1 and 0 ≤ t ≤ q −2.
− 1))
k
= −1 +
−2 X qX
= −1 +
q k −1 j q−1
z∈F∗q j=0
q k −1
= −1 +
χ′ (bαj )χ(z(α −1
q−2 X X X q−1 t=0
s=0
z∈F∗q
q−2 XX
z∈F∗q t=0
− 1))
χ′ (bα(q−1)s+t )χ(z(β t − 1))
χ(z(β t − 1))
X
χ′ (bαt θ)
θ∈hαq−1 i
q−2 X 1 XX χ′ (bαt xq−1 ). χ(z(β t − 1)) = −1 + q − 1 z∈F∗ t=0 x∈F∗ q
qk
Let Nqk /q be the norm mapping from Fqk to Fq . For a multiplicative character ψ of Fq , it can be lifted from Fq to Fqk by ψ ′ = ψ ◦ Nqk /q . Moreover, if ψ ′ is of order ′ q − 1, then ψ is of order q − 1. Let ψ0 a trivial multiplicative character of Fqk , then G(ψ0′ , χ′ ) = −1. By Lemmas 3.3 and 3.4, we have
X
x∈F∗k
χ′ (bαt xq−1 ) = −1 +
q
X
x∈Fqk
=
G(ψ0′ , χ′ )
=
X
b∗ ψ∈F q
χ′ (bαt xq−1 )
+
q−2 X
(ψ¯′ )j (bαt )G(ψ j , χ′ ) ′
j=1
¯ qk /q (bαt )) G(ψ ◦ Nqk /q , χ′ )ψ(N
= (−1)k−1
X
¯ qk /q (bαt )) G(ψ, χ)k ψ(N
b∗ ψ∈F q
= (−1)k−1
X
b∗q ψ∈F
q k −1
¯ q−1 β t ). G(ψ, χ)k ψ(b
8
Z. HENG AND Q. YUE
Therefore, q−2 X q k −1 (−1)k−1 X X ¯ q−1 β t ) G(ψ, χ)k ψ(b χ(z(β t − 1)) S(b) = −1 + q − 1 z∈F∗ t=0 ∗ b ψ∈F q
q
= −1 +
X q k −1 (−1)k−1 X X ¯ q−1 x) χ(z(x − 1)) G(ψ, χ)k ψ(b q − 1 x∈F∗ ∗ z∈F ∗ q
= −1 + −
bq ψ∈F
q
X q k −1 (−1)k−1 ¯ q−1 ) G(ψ, χ)k ψ(b ((q − 1) q−1 ∗ b ψ∈F q
X
X
q k −1
¯ q−1 x)) G(ψ, χ)k ψ(b
b∗ x∈F∗q \{1} ψ∈F q
= −1 + = −1 + = −1 +
X X q k −1 q k −1 (−1)k−1 X ¯ q−1 ) − ¯ q−1 x)) G(ψ, χ)k ψ(b (q G(ψ, χ)k ψ(b q−1 x∈F∗ b∗ ψ∈F q
q
b∗ ψ∈F q
X X q k −1 q k −1 (−1)k−1 X ¯ q−1 ) − ¯ q−1 x)) G(ψ, χ)k ψ(b ψ(b (q G(ψ, χ)k q−1 ∗ x∈F∗ ∗ b ψ∈F q
b ψ∈F q
q
q k −1 (−1)k−1 X ¯ q−1 ) − (−1)k (q − 1)) G(ψ, χ)k ψ(b (q q−1 ∗
b ψ∈F q
due to G(ψ0 , χ) = −1. Then T (b) =
X
S(yb)
y∈F∗q q k −1 (−1)k−1 X X ¯ k b q−1 ) − (q − 1)2 (−1)k ) G(ψ, χ)k ψ(y = −(q − 1) + (q q−1 y∈F∗ ∗ q
bq ψ∈F
X q k −1 q(−1)k−1 X ¯ q−1 ) ¯ k ), G(ψ, χ)k ψ(b = ψ(y q−1 y∈F∗ b∗ ψ∈F q
q
where h = gcd(k, q − 1). Note that X
y∈F∗q
¯ h) = ψ(y
(
q − 1, if ψ h = ψ0 , 0, otherwise.
q k −1
If h = 1, then T (b) = q(−1)k−1 G(ψ0 , χ)k ψ¯0 (b q−1 ) = −q.
LINEAR CODES
9
If h > 1, then T (b) = q(−1)
k−1
h−1 X
q k −1
G(ϕi , χ)k ϕ¯i (b q−1 )
j=0
= q(−1)
k−1
h−1 X
k
((−1) +
q k −1
G(ϕi , χ)k ϕ¯i (b q−1 ))
j=1
= −q + q(−1)k−1
h−1 X
q k −1
G(ϕi , χ)k ϕ¯i (b q−1 ),
j=1
where ϕ is the multiplicative character of order h of Fq .
In general, the explicit values of T (b) in Lemma 3.4 are very difficult to determine for d ≥ 2. However, for some small d, we obtain the value distribution of T (b). Lemma 3.5. Let gcd(k, q − 1) = h. Then we have the following results. (1) If h = 2, then the value distribution of T (b), b ∈ F∗qk , is given by ( k k+2 −q + q 2 , q 2−1 times, T (b) = k k+2 −q − q 2 , q 2−1 times. (2) If h = 3, a = given by
A+3B 2
and b = 3B, then the value distribution of T (b), b ∈ F∗qk , is
k k+3 −q + 2q 3 Re((a + bω) 3 ), k+3 k T (b) = −q + 2q 3 Re((a + bω) 3 ω 2 ), k+3 k −q + 2q 3 Re((a + bω) 3 ω),
q k −1 3 q k −1 3 q k −1 3
times, times times,
where 4q = A2 + 27B 2 with A ≡ 1 (mod 3). (3) If h = 4, the value distribution of T (b), b ∈ F∗qk , is given by k+4 k k q k −1 times, −q − q 4 (2Re((m + m′ i) 2 ) + q 4 ), 4 k −1 k k −q − q k+4 q ′ 4 (2Re(−i(m + m i) 2 ) − q 4 ), times, 4 T (b) = k −1 k+4 k k q −q − q 4 (2Re(−(m + m′ i) 2 ) + q 4 ), times, 4 k −1 k+4 k k q ′ times, −q − q 4 (2Re(i(m + m i) 2 ) − q 4 ), 4
where q = m2 + m′2 with odd m and even m′ .
Proof. (1) For h = 2, we have that q ≡ 1 (mod 2) and ϕ is just the quadratic (2,q) multiplicative character η. Let Cj , j = 0, 1, be the cyclotomic classes of order 2 of (2,q) F∗q , where Cj = β j hβ 2 i. Then q 2 −1
T (b) = −q − qG(η, χ)k η(b q−1 ) ke
where p∗ = (−1) which occurs
p−1 2
q k −1 2
q 2 −1
q 2 −1
= −q − q(p∗ ) 2 η(b q−1 ), (2,q)
p. If b q−1 ∈ C0
q 2 −1
q 2 −1
ke
, we have η(b q−1 ) = 1 and T (b) = −q − q(p∗ ) 2 (2,q)
times. If b q−1 ∈ C1
q 2 −1
, we have η(b q−1 ) = −1 and T (b) =
10
Z. HENG AND Q. YUE k
ke
−q + q(p∗ ) 2 which occurs q 2−1 times. Then the value distribution of T (b), b ∈ F∗qk , follows. (2) For h = 3, we have that q ≡ 1 (mod 3). By Lemma 2.4, 4q can be uniquely written as 4q = A2 +27B 2 with A ≡ 1 (mod 3). For the cubic multiplicative character ϕ, we have G(ϕ, χ)3 = qJ(ϕ, ϕ) = q(a + bω) (3,q)
by Lemmas 2.3 and 2.4, where a = A+3B and b = 3B. Let Cj , j = 0, 1, 2, be the 2 (3,q) ∗ cyclotomic classes of order 3 of Fq , where Ci = β i hβ 3 i. Since (−1)3 = −1, we have ϕ(−1) = 1. Then
T (b) = −q + q
2 X
q 3 −1
G(ϕi , χ)k ϕ¯i (b q−1 )
i=1
q 3 −1
q 3 −1
¯ χ)k ϕ(b q−1 )) = −q + q(G(ϕ, χ)k ϕ(b ¯ q−1 ) + G(ϕ, q 3 −1
= −q + 2qRe(G(ϕ, χ)k ϕ(b ¯ q−1 )) = −q + 2q
k+3 3
k
q 3 −1
Re((a + bω) 3 ϕ(b ¯ q−1 )). q 3 −1
(3,q)
Without loss of generality, we assume that ϕ(β) = ω. If b q−1 ∈ C0
, we have
q 3 −1
ϕ(b q−1 ) = 1 and
T (b) = −q + 2q which occurs
q k −1 3
q 3 −1
(3,q)
times. If b q−1 ∈ C1 T (b) = −q + 2q
which occurs
q k −1 3
k+3 3
q 3 −1
T (b) = −q + 2q
q 3 −1
, we have ϕ(b q−1 ) = ω and
k+3 3
(3,q)
times. If b q−1 ∈ C2
k
Re((a + bω) 3 )
k
Re((a + bω) 3 ω 2) q 3 −1
, we have ϕ(b q−1 ) = ω 2 and
k+3 3
k
Re((a + bω) 3 ω).
k
which occurs q 3−1 times. (3) For h = 4, we have that q ≡ 1 (mod 4). It is known that q can be uniquely written as q = m2 + m′2 with odd m and even m′ . For ord(ϕ) = 4, by Lemma 2.2, we have G(ϕ, χ)4 = q(m + m′ i)2 .
LINEAR CODES 4
11
4
Since G(ϕ, ¯ χ)4 = ϕ(−1)4 G(ϕ, χ) = G(ϕ, χ) , we have T (b) = −q − q
3 X
q 4 −1
G(ϕi , χ)k ϕ¯i (b q−1 )
i=1
q 4 −1
q 4 −1
q 4 −1
¯ χ)k ϕ(b q−1 )) = −q − q(G(ϕ, χ)k ϕ(b ¯ q−1 ) + G(η, χ)k η(b q−1 ) + G(ϕ, k
k
q 4 −1
k
k
q 4 −1
q 4 −1
¯ q−1 )) + G(η, χ)k η(b q−1 )) = −q − q(2q 4 Re((m + m′ i) 2 ϕ(b q 4 −1
k
= −q − q(2q 4 Re((m + m′ i) 2 ϕ(b ¯ q−1 )) + q 2 η(b q−1 )) (4,q)
by Lemma 2.1. Let Cj , i = 0, 1, 2, 3, be the cyclotomic classes of order 6 of Fq , √ (4,q) where Cj = β i hβ 4 i. Without loss of generality, we assume that ϕ(β) = i = −1. q 4 −1
(4,q)
If b q−1 ∈ C0
q 4 −1
q 4 −1
, we have ϕ(b q−1 ) = 1, η(b q−1 ) = 1, and k
k
k
T (b) = −q − q(2q 4 Re((m + m′ i) 2 ) + q 2 ) which occurs
q k −1 4
q 4 −1
(4,q)
times. If b q−1 ∈ C1
q 4 −1
k
k
k
T (b) = −q − q(2q 4 Re(−i(m + m′ i) 2 ) − q 2 ) which occurs
q k −1 4
q 4 −1
(4,q)
times. If b q−1 ∈ C2
k
q 4 −1
which occurs
q k −1 4
q k −1 4
q 4 −1
(4,q)
times. If b q−1 ∈ C3
q 4 −1
, we have ϕ(b q−1 ) = −1, η(b q−1 ) = 1, and k
k
T (b) = −q − q(2q 4 Re(−(m + m′ i) 2 ) + q 2 ) which occurs
q 4 −1
, we have ϕ(b q−1 ) = i, η(b q−1 ) = −1, and
q 4 −1
q 4 −1
, we have ϕ(b q−1 ) = −i, η(b q−1 ) = −1, and
k
k
k
T (b) = −q − q(2q 4 Re(i(m + m′ i) 2 ) − q 2 ) times.
From the discussions above, we obtain the weight distributions of CD for d = 1, 2, 3, 4 in the following. Lemma 3.6. (Griesmer bound) Let nq (l, d) be the minimum length n for which an [n, l, d] linear code over Fq exists. Then l−1 X d nq (l, d) ≥ ⌈ j ⌉. q j=0
Theorem 3.7. Let CD be the linear code with defining set D = hαq−1 i, where F∗qk = hαi and gcd(q − 1, k) = h. Then for a codeword cb ∈ CD , b ∈ F∗qk , the Hamming weight h−1 q k −1 (−1)k−1 X k−1 G(ϕi , χ)k ϕ¯i (b q−1 ), w(cb ) = q − q j=1
where ϕ is a multiplicative character of order h of Fq . And CD is a [
k−2 qk − 1 , k, d ≥ q k−1 − (h − 1)q 2 ] q−1
12
Z. HENG AND Q. YUE
linear code. In particular, for h = 1, 2, 3, 4, we have: k
−1 , k, q k−1] one-weight linear code achieving the (1) If h = 1, CD is an optimal [ qq−1 Griesmer bound and its weight distribution given in Table I. k −1 k−2 , k, q k−1 − q 2 ] two-weight linear code with the weight (2) If h = 2, CD is a [ qq−1 distribution given in Table II. (3) If h = 3, a = A+3B and b = 3B, the weight distribution of CD , which has at 2 most three weights, is given in Table III, where 4q = A2 + 27B 2 with A ≡ 1 (mod 3). (4) If h = 4, the weight distribution of CD , which has at most four weights, is given in Table IV, where q = m2 + m′2 with odd m and even m′ .
Table I. Weight distribution of the code in Theorem 3.7 for h = 1 weight Frequency 0 1 k−1 k q q −1 Table II. Weight distribution of the code in Theorem 3.7 for h = 2 weight Frequency 0 1 q k−1 − q q k−1 + q
q k −1 2 q k −1 2
k−2 2 k−2 2
Table III. Weight distribution of the code in Theorem 3.7 for h = 3 weight Frequency 0 1 q k−1 − 2q
q k−1 − 2q
q k−1 − 2q
k−3 3
k−3 3
k−3 3
q k −1 3 q k −1 3 q k −1 3
k
Re((a + bω) 3 ) k
Re((a + bω) 3 ω) k
Re((a + bω) 3 ω 2 )
Table IV. Weight distribution of the code in Theorem 3.7 for h = 4 weight Frequency 0 1 q k−1 + q q k−1 + q
k−4 4
k−4 4
q k−1 + q
k
k
k
(2Re(−i(m + m′ i) 2 ) − q 4 )
k−4 4
q k−1 + q
k
(2Re((m + m′ i) 2 ) + q 4 ) k
k
(2Re(−(m + m′ i) 2 ) + q 4 )
k−4 4
k
k
(2Re(i(m + m′ i) 2 ) − q 4 )
q k −1 4 q k −1 4 q k −1 4 q k −1 4
Proof. By Equation 3.2, Lemmas 3.1 and 3.4, for a codeword cb ∈ CD , we have h−1
X q k −1 1 G(ϕj , χ)k ϕ¯j (b q−1 ) w(cb ) = n − Nb = q k−1 − (−1)k−1 q j=1
LINEAR CODES
13
q k −1 P k−2 i k i q−1 )| ≤ (h − 1)q 2 , the miniG(ϕ , χ) ϕ ¯ (b with ord(ϕ) = h. Since | 1q (−1)k−1 h−1 i=1 mum Hamming distance d of CD satisfies
d ≥ q k−1 − (h − 1)q
k−2 2
> 0.
Then the dimension of CD is k. The weight distributions of CD can be obtained by k −1 , k, q k−1]. By Lemma 3.6, Lemmas 3.4 and 3.5. If d = 1, the parameters are [ qq−1 k−1 X q k−1 qk − 1 ⌈ j ⌉ = q k−1 + q k−2 + · · · + 1 = . q q − 1 j=0
Hence, CD is optimal if h = 1.
From Theorem 3.7, we can make CD a linear code with only two weights for h = 3, 4 if we select some special q. Corollary 3.8. In Theorem 3.7, if we let 4q = A2 +27B 2 with A ≡ 1 (mod 3), B = 0 for h = 3, then CD is a two-weight linear code with weight distribution given in Table k −1 k−2 , k, q k−1 − q 2 ] V; if we let q = m2 + m′2 with m′ = 0 for h = 4, then CD is a [ qq−1 two-weight linear code with weight distribution given in Table VI. Table V. Weight distribution of the code in Corollary 3.8 for h = 3 and B = 0 weight Frequency 0 1 q k−1 − 2q q k−1 + q
k−3 3
k−3 3
q k −1 3 2(q k −1) 3
k
( A2 ) 3 k
( A2 ) 3
Table VI. Weight distribution of the code in Corollary 3.8 for h = 4 and m′ = 0 weight Frequency 0 1 q k−1 + 3q q k−1 − q
k−2 2
k−2 2
q k −1 4 3(q k −1) 4
Remark 3.9. In Theorem 3.6, if k = 2 and h = 2, then CD is a [q + 1, 2, q − 1] almost-MDS linear code. Example 3.10. Let q = 4, k = 2, then CD in Theorem 3.7 is an optimal [5, 2, 4] MDS linear code with weight enumerator 1 + 15z 4 . This is confirmed by a Magma experiment. Example 3.11. Let q = 3, k = 2, then CD in Theorem 3.7 is a [4, 2, 2] almost-MDS code with weight enumerator 1 + 4z 2 + 4z 4 . This is confirmed by a Magma experiment.
14
Z. HENG AND Q. YUE
Example 3.12. Let q = 4, k = 3, then CD in Theorem 3.7 is a [21, 3, 12] code with weight enumerator 1 + 21z 12 + 42z 18 . This is confirmed by a Magma experiment. Example 3.13. Let q = 9, k = 4, then CD in Theorem 3.7 is a [820, 4, 720] code with weight enumerator 1 + 4920z 720 + 1640z 756 . This is confirmed by a Magma experiment. 4. The second class Let p be a prime and q = pe with a positive integer e > 1. Let χ, χ′ be the canonical additive characters of Fq and Fqk , respectively. In this section, a class of p-ary linear code CD is defined by CD = {(Trqk /p (xd1 ), Trqk /p (xd2 ), . . . , Trqk /p (xdn )) : x ∈ Fqk }
(4.1)
with the defining set q k −1
D = {d1 , d2 , · · · , dn } = {x ∈ F∗qk : Trq/p (x q−1 ) = 0}. To determine the length n of CD , we need a lemma below. Lemma 4.1. For the canonical additive character χ of Fq , we have X X q k −1 (q k − 1)(p − 1) . χ(yx q−1 ) = p + q k − 1 − q − 1 x∈F y∈F qk
p
k
−1 Proof. For 0 ≤ j ≤ q k −2, let j = (q −1)s + t with 0 ≤ s ≤ qq−1 −1 and 0 ≤ t ≤ q −2. Then X X X X q k −1 q k −1 χ(yx q−1 ) = p + q k − 1 + χ(yx q−1 ) x∈F∗k y∈F∗p
x∈Fqk y∈Fp
q
k
= p + qk − 1 +
−2 X qX
y∈F∗p j=0
q k −1
k
= p+q −1+ = p + qk − 1 +
q k −1
χ(yα q−1 t ) −1
q−2 X X X q−1
y∈F∗p
t=0
s=0
qk − 1 X X χ(yz) q − 1 y∈F∗ z∈F∗ p
= p + qk − 1 −
q k −1
χ(yα q−1 ((q−1)s+t) )
q
k
(q − 1)(p − 1) . q−1
LINEAR CODES
15
q k −1
Let n0 = |{x ∈ Fqk : Trq/p (x q−1 ) = 0}|. Then n0
k
q −1 1 X X Trq/p (yx q−1 ) = ζp p x∈F y∈F p
qk
q k −1 1 X X χ(yx q−1 ) p x∈F y∈F
=
p
qk
(q k − 1)(q − p) p(q − 1)
= 1+ by Lemma 4.1. Hence, n = n0 − 1 = For each b ∈ F∗qk , let
(q k − 1)(q − p) . p(q − 1)
(4.2)
q k −1
Nb = |{x ∈ Fqk : Trq/p (x q−1 ) = 0 and Trqk /p (bx) = 0}|. By the basic facts of additive characters, for any b ∈ F∗qk we have k
Nb
q −1 1 X X Trq/p (yx q−1 ) X Trqk /p (bzx) ζp ) )( ζp ( = 2 p x∈F y∈F z∈F p
p
qk
X q k −1 1 X X χ(yx q−1 ))( ( = 2 χ′ (bzx)) p x∈F y∈F z∈F p
qk
=
p
q k −1 1 X X qk 1 X X ′ q−1 )) + χ(yx χ (bzx)) ( ( + p2 p2 x∈F y∈F∗ p2 x∈F z∈F∗ qk
qk
p
p
q k −1 1 X XX χ(yx q−1 )χ′ (bzx). + 2 p x∈F y∈F∗ z∈F∗ qk
p
p
By Lemma 4.1, we have X X X X q k −1 q k −1 χ(yx q−1 )) = −q k + χ(yx q−1 )) ( ( x∈Fqk y∈F∗p
x∈Fqk y∈Fp
=
(p − 1)(q − q k ) . q−1
By the orthogonal relation of additive characters, we have X X X X χ′ (bzx) = 0. χ′ (bzx)) = ( x∈Fqk z∈F∗p
Let Ω(b) :=
P P
q k −1
z∈F∗p x∈Fqk
χ(yx q−1 )χ′ (bx) and ∆(b) :=
x∈Fqk y∈F∗p
P
Ω(bz). Then we have
z∈F∗p
Nb =
q k (q − p) + (p − 1)q 1 + 2 ∆(b). 2 p (q − 1) p
(4.3)
16
Z. HENG AND Q. YUE
In the following, we compute the exponential sum ∆(b), b ∈ F∗qk . Lemma 4.2. Let q = pe with e > 1, then 2
∆(b) =
k−1
q(p − 1) (−1) q(p − 1) + q−1 q−1
2
q−1 −1 p−1
X
q k −1
j
ϕj (−1)G(ϕ , χ)k−1 ϕ¯j (b q−1 ),
j=1
where ϕ is a multiplicative character of order
q−1 p−1
of Fq and b ∈ F∗qk .
Proof. By the same method used to compute S(b) in the proof of Lemma 3.4, we can similarly obtain X q k −1 (−1)k−1 X X ¯ q−1 x) G(ψ, χ)k ψ(b χ(yx) Ω(b) = (p − 1) + q − 1 x∈F∗ y∈F∗ ∗ q
= (p − 1) + = (p − 1) + This implies that X Ω(bz) ∆(b) =
b ψ∈F q
p
X q k −1 (−1)k−1 X X ¯ q−1 y −1 ) ¯ G(ψ, χ)k ψ(b ψ(yx)χ(yx) q−1 ∗ ∗ x∈F ∗ y∈F bq ψ∈F
p
q
X q k −1 (−1)k−1 X ¯ χ)ψ(b ¯ q−1 ) G(ψ, χ)k G(ψ, ψ(y). q−1 ∗ y∈F b∗ ψ∈F q
p
z∈F∗p
= (p − 1)2 +
X X q k −1 (−1)k−1 X ¯ χ)ψ(b ¯ q−1 ) ¯ k ). G(ψ, χ)k G(ψ, ψ(z ψ(y) q−1 ∗ z∈F∗ y∈F∗ b ψ∈F q
p
p
q−1
Since the norm function Nq/p : F∗q → F∗p , x 7→ x p−1 = y, is an epimorphism, X q−1 p−1 X ψ(y) = ψ(x p−1 ). q − 1 x∈F∗ y∈F∗ p
Similarly, we have
q
q−1 X ¯ p−1 k ). ¯ k) = p − 1 ψ(x ψ(z 1 q − 1 x ∈F∗ z∈F∗
X
1
p
Therefore,
q k −1 (−1)k−1 (p − 1)2 X k ¯ χ)ψ(b ¯ q−1 ) G(ψ, χ) G( ψ, (q − 1)3
∆(b) = (p − 1)2 + X
q
b∗ ψ∈F q
q−1
ψ(x p−1 )
X
¯ ψ(x 1
)=
(
q−1 k p−1
).
x1 ∈F∗q
x∈F∗q
Note that X
x∈F∗q
ψ(x
q−1 p−1
q−1
q − 1, ψ p−1 = ψ0 , 0, otherwise,
LINEAR CODES
and X
q−1 k p−1
¯ ψ(x 1
)=
x1 ∈F∗q
(
17
q−1
q − 1, ψ p−1 k = ψ0 , 0, otherwise.
Hence, we have ∆(b) = (p − 1)2 + 2
=
(−1)
k−1
(p − 1) q−1 k−1
2
q(p − 1) (−1) (p − 1) + q−1 q−1
q−1 −1 p−1
X
q k −1
j
G(ϕ , χ)k G(ϕ¯j , χ)ϕ¯j (b q−1 )
j=0
2
q−1 −1 p−1
X
q k −1
j
G(ϕ , χ)k G(ϕ¯j , χ)ϕ¯j (b q−1 )
j=1
q−1 −1 p−1
=
q k −1 q(p − 1)2 (−1)k−1 (p − 1)2 X j G(ϕ , χ)k ϕj (−1)G(ϕj , χ)ϕ¯j (b q−1 ) + q−1 q−1 j=1 q−1
−1
p−1 q k −1 q(p − 1)2 (−1)k−1 q(p − 1)2 X j j = ϕ (−1)G(ϕ , χ)k−1 ϕ¯j (b q−1 ), + q−1 q−1 j=1
where ϕ is a multiplicative character of order
q−1 p−1
j
of Fq and G(ϕ , χ)G(ϕj , χ) = q.
By Lemma 4.2, determining the value distribution of ∆(b) is a very difficult problem. However, for some special q, we can attack this problem. In the following, we determine the value distribution of ∆(b) if q = p2 . The semi-primitive case Gauss sums, which will be used later, are known as follows. Lemma 4.3. [3] Assume that N 6= 2 and their exists a least positive integer j such that pj ≡ −1 (mod N). Let q = p2jr for some integer r. Then the Gauss sums of order N over Fq are given by ( √ if p = 2, (−1)r−1 q, j G(ψ, χ) = r−1+ r(pN+1) √ q, if p ≥ 3. (−1) Further more, for 1 ≤ s ≤ N − 1, the Gauss sums G(ψ s ) are given by ( j √ (−1)s q, if N is even, p, r and p N+1 are odd, s G(ψ , χ) = √ (−1)r−1 q, otherwise. Lemma 4.4. For an odd prime p, let ζp+1 be the primitive p + 1-th root of complex , we have unity. Then for any integer 1 ≤ s ≤ p and s 6= p+1 2 ps s 3s 5s ζp+1 + ζp+1 + ζp+1 + · · · + ζp+1 = 0,
and (p−1)s
2s 4s 6s ζp+1 + ζp+1 + ζp+1 + · · · + ζp+1
= −1.
18
Z. HENG AND Q. YUE
ps s 3s 5s Proof. It is clear that {ζp+1 , ζp+1 , ζp+1 , · · · , ζp+1 } is a geometric progression. Hence ps s 3s 5s ζp+1 + ζp+1 + ζp+1 + · · · + ζp+1 2s· p+1
s ζp+1 (1 − ζp+1 2 ) = 0. = 2s 1 − ζp+1
Similarly, (p−1)s
2s 4s 6s ζp+1 + ζp+1 + ζp+1 + · · · + ζp+1 (p−1)s
2s 2s ζp+1 − ζp+1 ζp+1 = −1. = 2s 1 − ζp+1
Lemma 4.5. If q = pe with e = 2, then the value distribution of ∆(b), b ∈ F∗qk , is given as follows: (1) If p = 2, then ( 4(1+(−1)k−1 2k ) 4k −1 , times, 3 3 ∆(b) = 2(4k −1) 4(1−(−1)k−1 2k−1 ) , times. 3 3 (2) If p > 2, then p2 (p−1) p+1 k−1 + 2p+1 (1 + 2 p p (p−1) p+1 k−1 ∆(b) = (1 − 2 p + p+1 p2 (p−1) (1 − (−p)k−1 ), p+1
p−1 (−p)k−1 ), 2 p−1 (−p)k−1 ), 2
p2k −1 times, p+1 p2k −1 times, p+1 (p2k −1)(p−1) times. p+1
q−1 Proof. If we let e = 2, then q = p2 and p−1 = p + 1. For the multiplicative character ψ of order N = p + 1, G(ψ, χ) is just a semi-primitive case Gauss sum over Fq by Lemma 4.3. q−1 = 3. For the cubic multiplicative character ϕ, (1) Let p = 2, then q = 4 and p−1 we have G(ϕ, χ) = 2 by Lemma 4.3. It is clear that ϕ(−1) = 1. Then by Lemma 4.2, 4k −1 4k −1 4 (1 + (−1)k−1 (G(ϕ, χ)k−1ϕ(b ¯ 3 ) + G(ϕ, ¯ χ))k−1 ϕ(b 3 )) 3 4k −1 4 = (1 + 2(−1)k−1Re(G(ψ, ϕ)k−1 ϕ(b ¯ 3 ))) 3 4k −1 4 = (1 + (−1)k−1 2k Re(ϕ(b ¯ 3 ))). 3
∆(b) =
Since the values of ϕ are in the set {1, ω, ω 2}, we have Re(ϕ(b ¯ (3,q)
Cj
(3,q)
C0
4k −1 3
) ∈ {1, − 12 }. Let
= β j hβ 3i, j = 0, 1, 2, be the cyclotomic classes of Fq of order 3. If b
, we have Re(ϕ(b ¯ 4k −1 3
4k −1 3
) = 1 occurring
we have Re(ϕ(b ¯ ) = − 12 occurring ∆(b), b ∈ F∗4k , follows.
2(4k −1) 3
4k −1 3
times. If b
4k −1 3
(3,q)
∈ C1
4k −1 3
∈
(3,q)
∪ C2
,
times. Then the value distribution of
LINEAR CODES
19
(2) Let p > 2. For the multiplicative character ϕ of order p + 1, we have G(ϕj ) = (p+1)(p−1) q−1 2 ) = 1. By Lemma (−1)j p, 1 ≤ j ≤ p. It is easy that ψ(−1) = ψ(β 2 ) = ψ(β 4.2, we have
p
q k −1 (−1)k−1 (p − 1) X j ∆(b) = (p − 1) + G(ϕ , χ)k G(ϕ¯j , χ)ϕ¯j (b q−1 ). p+1 j=0
2
(p+1,q)
Let Cs = β s hβ p+1i, s = 0, 1, · · · , p, be the cyclotomic classes of order p + 1 over Fq . Without loss of generality, we assume that ϕ(β) ¯ = ζp+1 . It is clear that q k −1
q k −1
(p+1,q)
sj when b q−1 ∈ Cs ϕ¯j (b q−1 ) = ζp+1
ϕ¯0 (β 0 ) ϕ¯0 (β) ϕ¯0 (β 2 ) .. .
ϕ¯1 (β 0 ) ϕ¯1 (β) ϕ¯1 (β 2 ) .. .
T := 0 p+1 p+1 ϕ¯ (β 2 ) ϕ¯1 (β 2 ) .. .. . . 0 p−1 1 ϕ¯ (β ) ϕ¯ (β p−1 ) ϕ¯0 (β p ) ϕ¯1 (β p ) 1 1 1 ... 2 1 ζp+1 ζp+1 . . . 2 4 1 ζp+1 ζp+1 ... .. .. .. .. . . . . = 1 ... 1 −1 .. .. . . .. .. . . 1 ζ p−1 ζ 2(p−1) . . . p+1 p+1 p 2p 1 ζp+1 ζp+1 ...
, s = 0, 1, · · · , p. Let
ϕ¯2 (β 0 ) ϕ¯2 (β) ϕ¯2 (β 2 ) .. .
... ... ... .. .
ϕ¯p−1(β 0 ) ϕ¯p−1 (β) ϕ¯p−1(β 2 ) .. .
ϕ¯p (β 0) ϕ¯p (β) ϕ¯p (β 2) .. .
p+1 p+1 p+1 2 p−1 p ϕ¯ (β 2 ) . . . ϕ¯ (β 2 ) ϕ¯ (β 2 ) .. .. .. .. . . . . 2 p−1 p−1 p−1 p p−1 ϕ¯ (β ) . . . ϕ¯ (β ) ϕ¯ (β ) ϕ¯2 (β p ) . . . ϕ¯p−1 (β p ) ϕ¯p (β p ) (p+1)×(p+1) 1 1 p p−1 ζp+1 ζp+1 2(p−1) 2p ζp+1 ζp+1 .. .. . . 1 −1 .. .. . . (p−1)2 p(p−1) ζp+1 ζp+1 (p−1)p p2 ζp+1 ζp+1 (p+1)×(p+1)
which is called the character matrix of Fq . Choose bs ∈ F∗qk , s = 0, 1, · · · , p, such that q k −1 q−1
bs
(p+1,q)
∈ Cs
, s = 0, 1, · · · , p. Denote
ts =
p X j=0
j
q k −1
G(ϕ , χ)k G(ϕ¯j , χ)ϕ¯j (bsq−1 ), s = 0, 1, · · · , p.
20
Z. HENG AND Q. YUE
Hence, ∆(b) = (p − 1)2 +
(−1)k−1 (p−1) ts , p+1
G(ϕ0 , χ)k G(ϕ¯0 , χ) G(ϕ, χ)k G(ϕ, ¯ χ) G(ϕ2 , χ)k G(ϕ¯2 , χ) G(ϕ3 , χ)k G(ϕ¯3 , χ) .. .
T G(ϕp−2 , χ)k G(ϕ¯p−2 , χ) G(ϕp−1 , χ)k G(ϕ¯p−1 , χ) G(ϕp , χ)k G(ϕ¯p , χ)
s = 0, 1, · · · , p, and
(−1)k+1 p2 · (−p)k−1 p2 · pk−1 p2 · (−p)k−1 .. .
= T p2 · (−p)k−1 p2 · pk−1 p2 · (−p)k−1
=
t0 t1 .. . tp−1 tp
.
Note that t0 = (−1)k+1 + p+1 p2 (−p)k−1 + p−1 p2 pk−1 , 2 2 ps t s 3s = (−1)k+1 + (ζp+1 + ζp+1 + · · · + ζp+1 )p2 (−p)k−1 + s (p−1)s 2s 4s (ζp+1 + ζp+1 + · · · + ζp+1 )p2 pk−1 , p2 (−p)k−1 + p−1 p2 pk−1 , t p+1 = (−1)k+1 − p+1 2 2 2
where 1 ≤ s ≤ p and s 6= p+1 . By Lemma 4.4, 2 p2 (−p)k−1 + = (−1)k+1 + p+1 t0 2 ts = (−1)k+1 − p2 pk−1 , t p+1 = (−1)k+1 − p+1 p2 (−p)k−1 + 2 2
p−1 2 k−1 pp , 2 p−1 2 k−1 p p , 2
where 1 ≤ s ≤ p and s 6= p+1 . The frequency of each value is easy to obtain. Then 2 the value distribution of ∆(b), b ∈ F∗qk , follows. Theorem 4.6. Let k > 1 be a positive integer and q = pe with e > 1. Let CD be the linear code defined by (4.1). The for a codeword cb = (Trqk /p (bd1 ), · · · , Trqk /p (bd1 )), b ∈ F∗qk , the Hamming weight of it equals to q−1
−1
p−1 q k −1 (p − 1)q k (q − p) (−1)k−1 q(p − 1)2 X j j k−1 j q−1 ), ϕ (−1)G(ϕ , χ) ϕ ¯ (b w(cb ) = − p2 (q − 1) p2 (q − 1) j=1
where ϕ is a multiplicative character of order
q−1 p−1
over Fq . And CD is a
(p − 1)(q − p)(q k − q (q k − 1)(q − p) , ke, d ≥ [ p(q − 1) p2 (q − 1)
k+1 2
)
]
linear code. In particular, if p = e = 2, the weight distribution of it is given in Table 2k−1 k−1 2k −1 , 2k, (p−1)(p p+1 −p ) ] two-weight code VII; if e = 2, p > 2 and k is even, CD is a [ pp+1 with the weight distribution given in Table VIII; if e = 2, p > 2 and k is odd, CD is a 2k−1 k 2k −1 [ pp+1 , 2k, (p−1)(pp+1 −p ) ] two-weight code with the weight distribution given in Table IX.
LINEAR CODES
21
Table VII. Weight distribution of the code in Theorem 4.6 for p = e = 2 weight Frequency 0 1 4k −(−1)k−1 2k+1 6 4k +(−1)k−1 2k 6
4k −1 3 2(4k −1) 3
Table VIII. Weight distribution of the code in Theorem 4.6 for e = 2, p > 2 and even k weight Frequency 0 1 (p−1)(p2k−1 +pk ) p+1 (p−1)(p2k−1 −pk−1 ) p+1
p2k −1 p+1 p(p2k −1) p+1
Table IX. Weight distribution of the code in Theorem 4.6 for e = 2, p > 2 and odd k weight Frequency 0 1 (p−1)(p2k−1 −pk ) p+1 (p−1)(p2k−1 +pk−1 ) p+1
p2k −1 p+1 p(p2k −1) p+1
Proof. For a codeword cb = (Trqk /p (bd1 ), · · · , Trqk /p (bd1 )), b ∈ F∗qk , the Hamming weight of it equals to n0 − Nb . Then by Equations (4.2) and (4.3), Lemma 4.2, we have k
w(cb ) =
k−1
(p − 1)q (q − p) (−1) q(p − 1) − p2 (q − 1) p2 (q − 1)
where ϕ is a multiplicative character of order q−1
2
q−1 −1 p−1
X
j
q k −1
ϕj (−1)G(ϕ , χ)k−1 ϕ¯j (b q−1 ).
j=1
q−1 p−1
over Fq . Note that
−1
p−1 q k −1 (−1)k−1q(p − 1)2 X j j k−1 j q−1 )| ϕ (−1)G(ϕ , χ) ϕ ¯ (b | p2 (q − 1) j=1
≤
q(p − 1)2 q − 1 √ ( − 1)( q)k−1 2 p (q − 1) p − 1
Then we have (p − 1)(q − p)(q k − q w(cb ) ≥ p2 (q − 1)
k+1 2
)
>0
due to k > 1, e > 1. Then the dimension of CD is ke. For e = 2, the weight distributions can be obtained by Equations (4.2) and (4.3), Lemma 4.2 and 4.5. Remark 4.7. For p = e = 2, the weight distribution of CD is not new (see the semi-primitive case dealt with in [1]). For p > 2, e = 2, we remark that the weight distribution of CD is new.
22
Z. HENG AND Q. YUE
Example 4.8. Let p = e = 2 and k = 2, by a Magma experiment, CD in Theorem 4.6 is a [5, 4, 2] MDS linear code with weight enumerator 1 + 5z 4 + 10z 2 . This coincides with the result given in Theorem 4.6. Example 4.9. Let p = 3, e = 2 and k = 2, by a Magma experiment, CD in Theorem 4.6 is a [20, 4, 12] linear code, which is optimal with respect to the Griesmer bound, with weight enumerator 1 + 60z 12 + 20z 18 . This coincides with the result given in Theorem 4.6. Example 4.10. Let p = 5, e = 2 and k = 2, by a Magma experiment, CD in Theorem 4.6 is a [104, 4, 80] linear code with weight enumerator 1 + 520z 80 + 104z 100 . This coincides with the result given in Theorem 4.6. We remark the best known code with length 104 and dimension 4 has minimum distance 81 ≤ h ≤ 82 according to [16]. It is observed that the weights of CD in Tables VIII and IX have a common divisor p − 1. This indicates that the code CD can be punctured into a shorter code CDe as follows. q k −1 q k −1 q k −1 Note that Trq/p ((ax) q−1 ) = Trq/p (ax q−1 ) = 0 for all a ∈ Fp if Trq/p (x q−1 ) = 0. Hence, the defining set of CD defined by (4.1) can be expressed as e = {ade : a ∈ F∗ , de ∈ D}, e D = F∗p D p
(4.4)
e Then by Lemma 4.6, where dei /dej 6∈ F∗p for every pair of distinct elements dei , dej in D. we have the following result. Corollary 4.11. Let p > 2 and q = p2 . Let CDe be the linear code with defining set e defined in (4.4). Then C e is a [ p2k2 −1 , 2k] linear code with the weight distributions D D p −1 given in Tables X and XI for even k and odd k, respectively. Table X. Weight distribution of the code in Corollary 4.11 for even k weight Frequency 0 1 p2k−1 +pk p+1 p2k−1 −pk−1 p+1
p2k −1 p+1 p(p2k −1) p+1
LINEAR CODES
23
Table XI. Weight distribution of the code in Corollary 4.11 for odd k weight Frequency 0 1 p2k−1 −pk p+1 p2k−1 +pk−1 p+1
p2k −1 p+1 p(p2k −1) p+1
Remark 4.12. Let k = 2. Then the linear code CDe in Corollary 4.11 has parameters [p2 + 1, 4, p2 − p] achieving the Griesmer bound. Example 4.13. Let p = 3, e = 2 and k = 2, then CDe in Corollary 4.11 is a [10, 4, 6] linear code, which is optimal with respect to the Griesmer bound, with weight enumerator 1 + 60z 6 + 20z 9 . Example 4.14. Let p = 5, e = 2 and k = 2, then CDe in Corollary 4.11 is a [26, 4, 20] linear code, which is optimal with respect to the Griesmer bound, with weight enumerator 1 + 520z 20 + 104z 25 . 5. concluding remarks In this paper, we have presented two classes of linear codes with only a few weights and determined their weight distributions in some special cases. Some optimal or almost optimal codes are obtained. An application of a linear code C over Fq is , then constructing secret sharing schemes introduced in [25, 30]. If wmin/wmax > q−1 q the linear code can be used to construct secret sharing schemes with interesting access structures [30]. For the code in Theorem 3.7 for h = 1, we have wmin q−1 =1> . wmax q For the code in Theorem 3.7 for h = 2, we have k−2
q k−1 − q 2 wmin q−1 = k−2 > k−1 wmax q q +q 2 if k > 2. For the code in Corollary 3.8 for h = 4 and n = 0, we have k−2
wmin q−1 q k−1 − q 2 = k−2 > wmax q q k−1 + 3q 2 if k ≥ 4. For the code in Theorem 4.6 for e = 2, p > 2 and even k, we have wmin p2k−1 − pk−1 p−1 = 2k−1 > wmax p + pk p
if k > 2. For the code in Theorem 4.6 for e = 2, p > 2 and odd k, we have p2k−1 − pk p−1 wmin = 2k−1 > k−1 wmax p +p p
24
Z. HENG AND Q. YUE
if k > 1. Hence, these linear codes in this paper can be employed in secret sharing schemes using the framework in [30]. To conclude this paper, we present some open problems in the following: (1) Determine the weight distribution of the q-ary linear code CD defined in (3.1) for gcd(k, q − 1) ≥ 5. (2) Determine the weight distribution of the p-ary linear code CD defined in (4.1) for q = pe and e ≥ 3. In fact, in [17], the authors gave the weight distribution of the linear code CD defined in (4.1) for p = 2 and e = 3. (3) Determine the weight distribution of the p-ary linear code CD defined in (4.1) q k −1
with a different defining set D = {x ∈ Fqk : Trq/p (x q−1 ) = 1}.
It is interesting if these problems could be solved.
References [1] L. D. Baumert and R. J. McEliece, Weights of irreducible cyclic codes, Inf. Contr., 20 (1972) pp. 158-175. [2] M. A. D. Boer, Almost MDS codes, Des. Codes Cryptogr., 9 (1996), pp. 143-155. [3] B. C. Berndt, R. J. Evans, K. S. Williams, Gauss and Jacobi sums, J. Wiley and Sons Company, New York, 1997. [4] C. Carlet, C. Ding, and J. Yuan, Linear codes from perfect nonlinear mappings and their secret sharing schemes, IEEE Trans. Inf. Theory, 51 (June 2005), pp. 2089-2102. [5] C. Ding, A Construction of Binary Linear Codes from Boolean Functions, arXiv:1511.00321 [cs. IT]. [6] C. Ding, Linear codes from some 2-designs, IEEE Trans. Inf. Theory, 61 (2015), pp. 32653275. [7] C. Ding, J. Luo, H. Niederreiter, Two-weight codes punctured from irreducible cyclic codes, in Proc. 1st Int. Workshop Coding Theory Cryptography, Y. Li, S. Ling, H. Niederreiter, H. Wang, C. Xing, and S. Zhang, Eds., Singapore, 2008, 119-124. [8] C. Ding, H. Niederreiter, Cyclotomic linear codes of order 3, IEEE Trans. Inf. Theory, 53 (June 2007), pp. 2274-2277. [9] C. Ding, X. Wang, A coding theory construction of new systematic authentication codes, Theoretical Computer Science, 330 (2005), pp. 81-99. [10] C. Ding, J. Yang, Hamming weights in irreducible cyclic codes, Discrete Math., 313 (Feb. 2013), pp. 434-446. [11] C. Ding, Y. Gao, Z. Zhou, Five families of three-weight ternary cyclic codes and their duals, IEEE Trans. Inf. Theory, 59 (Dec. 2013), pp. 7940-7946. [12] K. Ding, C. Ding, Binary linear codes with three weights, IEEE Commun. Letters, 18 (2014), pp. 1879-1882. [13] K. Ding, C. Ding, A Class of Two-Weight and Three-Weight Codes and Their Applications in Secret Sharing, IEEE Trans. Inf. Theory, 61 (Nov. 2015), pp. 5835-5842. [14] F. De Clerk, M. Delanote, Two-weight codes, partial geometries and Steiner systems, Des. Codes Cryptogr., 21 (2000), pp. 87-98. [15] P. Delsarte, Weights of linear codes and strongly regular normed spaces, Discrete Math., 3 (1972), pp. 47-64.
LINEAR CODES
25
[16] M. Grassl, Bounds on the minimum distance of linear codes, available online at http://www.codetables.de. [17] Z. Heng, Q. Yue, A class of binary linear codes with at most three weights, IEEE Commun. Letters, 19 (2015), pp. 1488-1491. [18] Z. Heng, Q. Yue, Several classes of cyclic codes with either optimal three weights or a few weights, arXiv:1510.05355 [cs. IT]. [19] K. Ireland, M. Rosen, A Classical Introduction to Modern Number Theory, Springer-Verlag, New York, 1982. [20] C. Li, Q. Yue, and F. Li, Weight distributions of cyclic codes with respect to pairwise coprime order elements, Finite Fields Appli., 28 (2014), pp. 94-114. [21] C. Li, Q. Yue, and F. Li, Hamming weights of the duals of cyclic codes with two zeros, IEEE Trans. Inform. Theory, 56 (2014), pp. 2568-2570. [22] C. Li, S. Bae, J. Ahn, et al, Complete weight enumerators of some linear codes and their applications, Des. Codes Crypto., DOI 10.1007/s10623-015-0136-9. [23] R. Lidl, H. Niederreiter, Finite Fields, Cambridge Univ. Press, Cambridge, 1984. [24] F. Li, Q. Wang, D. Lin, A class of three-weight and five-weight linear codes, arXiv:1509.06242 [cs. IT]. [25] A. Shamir, How to share a secret, Commun. Assoc. Comp. Mach., 22 (1979), 612-613. [26] C. Tang, Y. Qi, Two-weight and three-weight linear codes from weakly regular bent functions, arXiv:1507.06148 [cs. IT]. [27] Q. Wang, K. Ding, R. Xue, Binary Linear Codes With Two Weights, IEEE Commun. Letters, 19 (2015), pp. 1097 - 1100. [28] C. Xiang, Linear codes from a generic construction, Crypto. Commun., DOI 10.1007/s12095015-0158-1. [29] C. Xiang, A Family of Three-Weight Binary Linear Codes, arXiv:1505.07726 [cs. IT]. [30] J. Yuan, C. Ding, Secret sharing schemes from three classes of linear codes, IEEE Trans. Inf. Theory, 52 (2006), pp. 206-212. [31] Z. Zhou, N. Li, C. Fan, et al., Linear Codes with Two or Three Weights From Quadratic Bent Functions, Des. Codes Cryptogr., DOI 10.1007/s10623-015-0144-9. Department of Mathematics, Nanjing University of Aeronautics and Astronautics, Nanjing, 211100, P. R. China E-mail address:
[email protected] Department of Mathematics, Nanjing University of Aeronautics and Astronautics, Nanjing, 211100, P. R. China E-mail address:
[email protected]