# The Weight Distributions of a Class of Cyclic Codes with Three Nonzeros over𝔽

Authors: Xiaogang Liu; Yuan Luo
Journal: Journal of Applied Mathematics
 (2014)

---

## Abstract

Cyclic codes have efficient encoding and decoding algorithms. The decoding error probability
and the undetected error probability are usually bounded by or given from the weight distributions of the codes. Most researches are about the determination of the weight distributions of
cyclic codes with few nonzeros, by using quadratic forms and exponential sums but limited to low moments. In this paper, we focus on the application of higher moments of the exponential
sums to determine the weight distributions of a class of ternary cyclic codes with three nonzeros, combining with not only quadratic forms but also MacWilliams’ identities. Another application
of this paper is to emphasize the computer algebra system Magma for the investigation of the higher moments. In the end, the result is verified by one example using Matlab.


---

## Body

## 1. Introduction

Cyclic codes have a lot of applications in communication system, storage system, and computers, and they have been studied for a long time [1, 2]. The decoding error probability and the undetected error probability are closely related to the weight distributions, for example, permutation decoding, majority decoding, locator decoding, decoding from the covering polynomials, and so on [3–6]. In general the weight distributions are complicated [7] and difficult to be determined. In fact, as shown in [8, 9], the problem of computing weight distribution of a cyclic code is connected with the evaluation of certain exponential sums, which are generally hard to be determined explicitly. For more researches, refer to [10–13] for the irreducible case, [14–17] for the reducible case, and [18–21] for recent studies. For related problems in the binary case with two nonzeros especially, refer to [22–24].In this paper, we focus on the application of higher moments of the exponential sums to determine the weight distributions of a class of ternary cyclic codes with three nonzeros, combining with not only quadratic forms but also MacWilliams’ identities, with the help of the computer algebra system Magma.Letp be a prime. A linear [
n
,
k
,
d
;
p
] code is a k-dimensional subspace of F
p
n with minimum (Hamming) distance d. An [
n
,
k
] linear code C over F
p is called cyclic if (
c
0
,
c
1
,
…
,
c
n
-
1
)
∈
C implies that (
c
n
-
1
,
c
0
,
c
1
,
…
,
c
n
-
2
)
∈
C where gcd
(
n
,
p
)
=
1. By identifying the vector (
a
0
,
a
1
,
…
,
a
n
-
1
)
∈
F
p
n with
(1)
a
0
+
a
1
x
+
⋯

+
a
n
-
1
x
n
-
1
∈
F
p
[
x
]
(
x
n
-
1
)
,
any linear code C of length n over F
p represents a subset of F
p
[
x
]
/
(
x
n
-
1
) which is a principle ideal domain. The fact that the code is cyclic is equivalent to the fact that the subset is an ideal. The unique monic polynomial g
(
x
) of minimum degree in this subset is the generating polynomial of C, and it is a factor of x
n
-
1. When the ideal does not contain any smaller nonzero ideal, the corresponding cyclic code C is called a minimal or an irreducible code. For any v
=
(
c
0
,
c
1
,
…
,
c
n
-
1
)
∈
C, the weight of v is w
t
(
v
)
=
#
{
c
i
≠
0
,
i
=
0,1
,
…
,
n
-
1
}.The weight enumerator of a codeC is defined by
(2)
1
+
A
1
x
+
A
2
x
2
+
⋯
+
A
n
x
n
,
where A
i denotes the number of codewords with Hamming weight i. The sequence 1
,
A
1
,
…
,
A
n is called the weight distribution of the code, which is an important parameter of a linear block code.Assume thatp
=
3 and q
=
p
m for an even integer m. Let π be a primitive element of F
q. In this paper, Section 2 presents the basic notations and preliminaries about cyclic codes. Section 3 determines the weight distributions of a class of cyclic codes over F
3 with nonzeros π
-
2, π
-
4, and π
-
10, and they are verified by using Matlab. Note that the length of the cyclic code is l
=
q
-
1
=
3
m
-
1. Final conclusion is in Section 4. This paper is the counterpart of our other result in [19].


## 2. Preliminaries

In this section, relevant knowledge from finite fields [25] is presented for our study of cyclic codes. It is about the calculations of exponential sums, the sizes of cyclotomic cosets, and the ranks of certain quadratic forms. First, some known properties about the codeword weight are listed.Letp be an odd prime and let m be a positive integer and π is a primitive element of F
q. Assume that the cyclic code C over F
p has length l
=
q
-
1
=
p
m
-
1 and nonconjugate nonzeros π
-
s
λ, where 1
≤
s
λ
≤
q
-
2  (
1
≤
λ
≤
ι
). Then the codewords in C can be expressed by
(3)
c
(
α
1
,
…
,
α
ι
)
=
(
c
0
,
c
1
,
…
,
c
l
-
1
)
(
α
1
,
…
,
α
ι
∈
F
q
)
,
where c
i
=
∑
λ
=
1
ι
Tr
⁡
(
α
λ
π
i
s
λ
)  (
0
≤
i
≤
l
-
1
) and Tr
⁡
:
F
q
→
F
p is the trace mapping from F
q to F
p. Therefore the Hamming weight of the codeword c
=
c
(
α
1
,
…
,
α
ι
) is
(4)
w
H
(
c
)
=
#
{
i
∣
0
≤
i
≤
l
-
1
,
c
i
≠
0
}
=
l
-
l
p
-
1
p
∑
a
=
1
p
-
1
‍
∑
x
∈
F
q
*
‍
ζ
p
Tr
⁡
(
a
f
(
x
)
)
=
p
m
-
1
(
p
-
1
)
-
1
p
∑
a
=
1
p
-
1
‍
S
(
a
α
1
,
…
,
a
α
ι
)
=
p
m
-
1
(
p
-
1
)
-
1
p
R
(
α
1
,
…
,
α
ι
)
,
where ζ
p
=
e
2
π
i
/
p (i is imaginary unit), f
(
x
)
=
α
1
x
s
1
+
α
2
x
s
2
+
⋯
+
α
ι
x
s
ι
∈
F
q
[
x
],  F
q
*
=
F
q
∖
{
0
},
(5)
S
(
α
1
,
…
,
α
ι
)
=
∑
x
∈
F
q
‍
ζ
p
Tr
⁡
(
α
1
x
s
1
+
⋯
+
α
ι
x
s
ι
)
,
and R
(
α
1
,
…
,
α
ι
)
=
∑
a
=
1
p
-
1
S
(
a
α
1
,
…
,
a
α
ι
).For general functions of the formf
α
,
…
,
γ
(
x
)
=
α
x
p
i
+
1
+
⋯
+
γ
x
p
j
+
1 where 0
≤
i
,
…
,
j
≤
⌊
m
/
2
⌋, there are quadratic forms F
α
,
…
,
γ
(
X
) and corresponding symmetric matrices H
α
,
…
,
γ satisfying that F
α
,
…
,
γ
(
X
)
=
X
H
α
,
…
,
γ
X
T
=
Tr
⁡
(
f
α
,
…
,
γ
(
x
)
). It is known that there exists M
α
,
…
,
γ
∈
G
L
m
(
F
p
) such that
(6)
H
α
,
…
,
γ
′
=
M
α
,
…
,
γ
H
α
,
…
,
γ
M
α
,
…
,
γ
T
=
diag
⁡
(
a
1
,
…
,
a
r
α
,
…
,
γ
,
0
,
…
,
0
)
,
where a
i
∈
F
p
*  (
1
≤
i
≤
r
α
,
…
,
γ
) and r
α
,
…
,
γ
=
rank
⁡
H
α
,
…
,
γ. Let Δ
=
a
1
⋯
a
r
α
,
…
,
γ (set Δ
=
1 for r
α
,
…
,
γ
=
0).Lemma 1 (Lemma 1, [15]).
(i) For the quadratic formF
(
X
)
=
X
H
X
T,
(7)
∑
X
∈
F
p
m
‍
ζ
p
F
(
X
)
=
{
(
Δ
p
)
p
m
-
r
/
2
i
f
p
≡
1
(
mod
⁡
4
)
,
i
r
(
Δ
p
)
p
m
-
r
/
2
i
f
p
≡
3
(
mod
⁡
4
)
.
(ii) For A
=
(
a
1
,
…
,
a
m
)
∈
F
p
m, if  2
Y
H
+
A
=
0 has solution Y
=
B
∈
F
p
m, then
(8)
∑
X
∈
F
p
m
‍
ζ
p
F
(
X
)
+
A
X
T
=
ζ
p
c
∑
X
∈
F
p
m
‍
ζ
p
F
(
X
)
w
h
e
r
e
c
=
1
2
A
B
T
∈
F
p
.
Otherwise ∑
X
∈
F
p
m
ζ
p
F
(
X
)
+
A
X
T
=
0.
Here(
Δ
/
p
) denotes the Legendre symbol.References [26, Lemma 9] and [19, Lemma 3] are about the calculations of exponential sums that will be needed in the sequel. For more details, refer to [15].The cyclotomic coset containings is defined to be
(9)
D
s
=
{
s
,
s
p
,
s
p
2
,
…
,
s
p
m
s
-
1
}
,
where m
s is the smallest positive integer such that p
m
s
·
s
≡
s
(
mod
⁡
p
m
-
1
). Reference [26, Lemma 10] is about the size of cyclotomic coset; also refer to [27] for the binary case.Forf
d
′
(
x
)
=
α
0
x
2
+
α
1
x
p
+
1
+
⋯
+
α
d
x
p
d
+
1 with corresponding quadratic form F
d
′
(
X
)
=
Tr
⁡
(
f
d
′
(
x
)
)
=
X
H
d
′
X
T, where (
α
0
,
α
1
,
…
,
α
d
)
∈
F
q
d
+
1
∖
{
(
0,0
,
…
,
0
)
}. Reference [19, Corollary 1] is about its rank for a special case.Note that in Section3, a nonzero solution of an equation system means that all the variable values are nonzero.


## 3. Main Result

In this section, the main result of this paper is obtained; that is, the weight distribution of the cyclic codeC with nonzeros π
-
2
,
π
-
(
p
+
1
) and π
-
(
p
2
+
1
) for the case m is even; here p
=
3. For this, the first five moments of exponential sum S
(
α
,
β
,
γ
) are computed in Sections 3.1, 3.2, and 3.3, and the MacWlliams’ identities are calculated in Section 3.4.


### 3.1. The First Three Moments ofS
(
α
,
β
,
γ
)

For an odd primep and even integer m, this subsection calculates the first three moments of the exponential sum S
(
α
,
β
,
γ
) (5); see Lemma 2 and its other form Lemma 3.Lemma 2 (see [19]).
Letp be an odd prime satisfying p
≡
3
mod
⁡
4 and q
=
p
m. Then there are the following results about the exponential sum S
(
α
,
β
,
γ
) (5) corresponding to f
2
′
(
x
)
=
α
x
2
+
β
x
p
+
1
+
γ
x
p
2
+
1:(i)
∑
α
,
β
,
γ
∈
F
q
S
(
α
,
β
,
γ
)
=
p
3
m,
(ii)
∑
α
,
β
,
γ
∈
F
q
S
(
α
,
β
,
γ
)
2
=
p
3
m,
(iii)
∑
α
,
β
,
γ
∈
F
q
S
(
α
,
β
,
γ
)
3
=
(
(
p
+
1
)
(
p
m
-
1
)
+
1
)
p
3
m.Corresponding to Lemma1 and [19, Corollary 1], we introduce the following notations for convenience. Let
(10)
N
ɛ
,
j
=
{
(
α
,
β
,
γ
)
∈
F
q
3
∖
{
(
0,0
,
0
)
}
∣
S
(
α
,
β
,
γ
)
=
ɛ
p
(
m
+
j
)
/
2
}
,
where ɛ
=
±
1 and j
=
0,2
,
4. Denote n
ɛ
,
j
=
|
N
ɛ
,
j
|. Let
(11)
N
ɛ
,
j
=
{
(
α
,
β
,
γ
)
∈
F
q
3
∖
{
(
0,0
,
0
)
}
∣
S
(
α
,
β
,
γ
)
=
ɛ
i
p
(
m
+
j
)
/
2
}
for j
=
1,3, where i is the imaginary unit. By [19, Lemma 3], set n
j
=
n
ɛ
,
j
=
|
N
ɛ
,
j
| for j
=
1,3, since m
-
j is odd. Using those, Lemma 2 can be restated in Lemma 3 when m is even.Lemma 3.
Letp be an odd prime satisfying p
≡
3
mod
⁡
4, and q
=
p
m, where m is an even integer. Then the notations defined in (10) and (11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n
-
1,3
)
+
p
m
+
4
(
n
1,4
+
n
-
1,4
)
+
p
2
m
=
p
3
m
,
∑
α
,
β
,
γ
∈
F
q
‍
S
(
α
,
β
,
γ
)
3
=
p
3
m
/
2
(
n
1,0
-
n
-
1,0
)
-
i
p
3
(
m
+
1
)
/
2
(
n
1,1
-
n
-
1,1
)
+
p
3
(
m
+
2
)
/
2
(
n
1,2
-
n
-
1,2
)
-
i
p
3
(
m
+
3
)
/
2
(
n
1,3
-
n
-
1,3
)
+
p
3
(
m
+
4
)
/
2
(
n
1,4
-
n
-
1,4
)
+
p
3
m
=
p
3
m
/
2
(
n
1,0
-
n
-
1,0
)
+
p
3
(
m
+
2
)
/
2
(
n
1,2
-
n
-
1,2
)
+
p
3
(
m
+
4
)
/
2
(
n
1,4
-
n
-
1,4
)
+
p
3
m
=
(
(
p
+
1
)
(
p
m
-
1
)
+
1
)
p
3
m
,
where the first one comes from the fact that there are p
3
m
-
1 elements in the set F
q
3
∖
{
(
0,0
,
0
)
}. Also, note that S
(
α
,
β
,
γ
)
=
p
m when α
=
β
=
γ
=
0.
Usingn
j
=
n
ɛ
,
j
=
|
N
ɛ
,
j
| for j
=
1,3, the result is obtained by simplification.


### 3.2. The Fourth Moment ofS
(
α
,
β
,
γ
)

For the fourth moment ofS
(
α
,
β
,
γ
) in the particular case of p
=
3, there is the following result about the number of solutions of the equation system:
(14)
x
2
+
y
2
+
z
2
+
1
=
0
,
x
p
+
1
+
y
p
+
1
+
z
p
+
1
+
1
=
0
,
x
p
2
+
1
+
y
p
2
+
1
+
z
p
2
+
1
+
1
=
0
in Lemma 4, which is denoted by T
4.Lemma 4 (see [19]).
Letp
=
3 and q
=
p
m. Then
(15)
T
4
=
4
(
2
p
m
-
3
)
.Using Lemma4 and M
3 in Lemma 2, M
4 is calculated in Lemma 5, where M
4
=
M
3
+
(
q
-
1
)
T
4.Lemma 5.
Letp
=
3 and q
=
p
m. The number of solutions of the following equation system
(16)
x
2
+
y
2
+
z
2
+
w
2
=
0
,
x
p
+
1
+
y
p
+
1
+
z
p
+
1
+
w
p
+
1
=
0
,
x
p
2
+
1
+
y
p
2
+
1
+
z
p
2
+
1
+
w
p
2
+
1
=
0
is M
4
=
8
(
p
m
-
1
)
2
+
1.Corresponding to Lemma2, the result of the fourth moment is provided in Lemma 6 by applying Lemma 5.Lemma 6.
Letp
=
3 and q
=
p
m. Then
(17)
∑
α
,
β
,
γ
∈
F
q
‍
S
(
α
,
β
,
γ
)
4
=
M
4
·
p
3
m
=
(
8
(
p
m
-
1
)
2
+
1
)
p
3
m
.Corresponding to Lemma3, Lemma 6 can be rewritten as the following corollary using the symbols of (10) and (11).Corollary 7.
Letp
=
3 and q
=
p
m, where m is an even integer. Then
(18)
n
1,0
+
n
-
1,0
+
2
n
1
p
2
+
p
4
(
n
1,2
+
n
-
1,2
)
+
2
n
3
p
6
+
p
8
(
n
1,4
+
n
-
1,4
)
=
(
8
(
p
m
-
1
)
2
-
p
m
+
1
)
p
m
.


### 3.3. The Fifth Moment ofS
(
α
,
β
,
γ
)

For the fifth moment ofS
(
α
,
β
,
γ
), we need Magma [28] to find the number of solutions of the following equation system:
(19)
x
2
+
y
2
+
z
2
+
w
2
+
u
2
=
0
,
x
p
+
1
+
y
p
+
1
+
z
p
+
1
+
w
p
+
1
+
u
p
+
1
=
0
,
x
p
2
+
1
+
y
p
2
+
1
+
z
p
2
+
1
+
w
p
2
+
1
+
u
p
2
+
1
=
0
which is denoted by M
5.The irreducible components corresponding to the projective variety defined by (19) are listed in Table 1 using Magma [28]. Every block of Table 1 contains a system of three equations (“=
0” is omitted), the solutions of which satisfy (19). The union of all the solutions in each block presents the solutions of (19) exactly. Those equation systems are circulant symmetric about the variables. In general, few works are provided to deal with the moments using five variables. In this paper, Magma helps us on the reduction of such systems in Lemmas 8 and 9 and Corollary 10. For relevant knowledge of algebraic geometry, the reader is referred to [29].Table 1
Irreducible components corresponding to the projective variety defined by (19).
x
2,
x
2,
x
2,
x
2,
x
2,
x
2,
x
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,
y
-
z
+
w,
y
+
z
-
w,Lemma 8.
Letp
=
3 and q
=
p
m. Then
(20)
M
5
=
5
(
p
m
-
1
)
(
8
p
m
-
2
p
-
10
)
+
1
.Proof.
The number of nonzero solutions ofx
2
+
y
2
=
x
p
+
1
+
y
p
+
1
=
x
p
2
+
1
+
y
p
2
+
1
=
0 is M
2
′
=
M
2
-
1
=
0, where M
2
=
1 [19], and the number of nonzero elements in
(21)
M
3
=
#
{
(
z
.
.
1
)
1

(
x
,
y
,
z
)
∈
F
q
3
∣
x
2
+
y
2
+
z
2
=
0
,
1111111111111111
x
p
+
1
+
y
p
+
1
+
z
p
+
1
=
0
,
111111111111.111
x
p
2
+
1
+
y
p
2
+
1
+
z
p
2
+
1
=
0
(
z
.
.
1
)
-
}
=
(
p
+
1
)
(
q
-
1
)
+
1
[
19
]
is M
3
′
=
(
p
+
1
)
(
q
-
1
). From Lemma 5, the number of nonzero solutions of (16) is M
4
′
=
M
4
-
4
M
3
′
-
1
=
(
p
m
-
1
)
(
8
p
m
-
4
p
-
12
).
For the solutions of equation system (19), Table 1 shows that at least one of the elements x
,
y
,
z
,
w
,
u is zero, and there are two cases to be considered.(i)
If only one of the five variables is zero, the number of such solutions is5
M
4
′
=
5
(
p
m
-
1
)
(
8
p
m
-
4
p
-
12
).
(ii)
If two variables are zero, the number of such solutions is(
5
2
)
M
3
′
=
10
(
p
+
1
)
(
q
-
1
). Altogether, the number of solutions of equation system (19) is
(22)
5
M
4
′
+
10
M
3
′
+
1
=
5
(
p
m
-
1
)
(
8
p
m
-
2
p
-
10
)
+
1
.Applying Lemma8, the result about the fifth moment of exponential sum S
(
α
,
β
,
γ
) is obtained.Lemma 9.
Letp
=
3 and q
=
p
m. Then
(23)
∑
α
,
β
,
γ
∈
F
q
‍
S
(
α
,
β
,
γ
)
5
=
M
5
·
p
3
m
=
(
5
(
p
m
-
1
)
(
8
p
m
-
2
p
-
10
)
+
1
)
p
3
m
.Corollary 10.
Letp
=
3 and q
=
p
m, where m is an even integer. Then
(24)
n
1,0
-
n
-
1,0
+
p
5
(
n
1,2
-
n
-
1,2
)
+
p
10
(
n
1,4
-
n
-
1,4
)
=
(
5
(
p
m
-
1
)
(
8
p
m
-
2
p
-
10
)
-
p
2
m
+
1
)
p
m
/
2
.


### 3.4. MacWilliams’ Identities

MacWilliams’ theorem is for the Hamming weight enumerators of linear codes over finite field [30] (we consider prime field F
p). Using this theorem, Lemma 12 is provided for the weight distribution using dual code’s first few weights of Lemma 11. The two identities in Lemma 12 will combine with previous identities in final result.LetA
i be the number of codewords of weight i in a code C with length l and dimension k, where 0
≤
i
≤
l. Let A
i
′ be the corresponding number in the dual code C
⊥. Then
(25)
W
C
(
x
,
y
)
=
1
|
C
⊥
|
W
C
⊥
(
x
+
(
p
-
1
)
y
,
x
-
y
)
,
where W
C
(
x
,
y
)
=
∑
i
=
0
l
A
i
x
l
-
i
y
i. Setting x
=
1, (25) changes to
(26)
∑
i
=
0
l
‍
A
i
y
i
=
1
p
l
-
k
∑
i
=
0
l
‍
A
i
′
(
1
+
(
p
-
1
)
y
)
l
-
i
(
1
-
y
)
i
.
Differentiating (26) with respect to y,
(27)
∑
i
=
1
l
‍
i
A
i
y
i
-
1
=
1
p
l
-
k
∑
i
=
0
l
‍
A
i
′
(
(
l
-
i
)
(
p
-
1
)
(
1
+
(
p
-
1
)
y
)
l
-
i
-
1
(
1
-
y
)
i
1111111111111
+
(
1
+
(
p
-
1
)
y
)
l
-
i
i
(
-
1
)
(
1
-
y
)
i
-
1
)
.
Setting y
=
1, the first MacWilliams’ moment identity is obtained for l
≥
2
(28)
∑
i
=
1
l
‍
i
A
i
p
k
=
1
p
(
(
p
-
1
)
l
-
A
1
′
)
=
1
p
(
p
-
1
)
l
if
A
1
′
=
0
.
Differentiating again,
(29)
∑
i
=
1
l
‍
i
(
i
-
1
)
A
i
y
i
-
2
=
1
p
l
-
k
∑
i
=
0
l
‍
A
i
′
{
(
1
+
(
p
-
1
)
y
)
l
-
i
i
(
i
-
1
)
(
1
-
y
)
i
-
2

(
l
-
i
)
(
l
-
i
-
1
)
(
p
-
1
)
2
11111111111111
×
(
1
+
(
p
-
1
)
y
)
l
-
i
-
2
(
1
-
y
)
i
11111111111111
+
2
(
l
-
i
)
(
p
-
1
)
(
1
+
(
p
-
1
)
y
)
l
-
i
-
1
11111111111111
×
i
(
-
1
)
(
1
-
y
)
i
-
1
11111111111111
+
(
1
+
(
p
-
1
)
y
)
l
-
i
i
(
i
-
1
)
(
1
-
y
)
i
-
2
}
.
Substituting y
=
1, the second MacWilliams’ moment identity is obtained:
(30)
∑
i
=
1
l
‍
i
(
i
-
1
)
A
i
=
1
p
l
-
k
(
l
(
l
-
1
)
(
p
-
1
)
2
p
l
-
2
+
2
A
2
′
p
l
-
2
)
if
A
1
′
=
0
.
Differentiating for the third and fourth time, if A
1
′
=
A
3
′
=
0, the fourth MacWilliams’ moment identity is
(31)
∑
i
=
1
l
‍
i
(
i
-
1
)
(
i
-
2
)
(
i
-
3
)
A
i
=
1
p
l
-
k
(
p
l
.
-
4
l
(
l
-
1
)
(
l
-
2
)
(
l
-
3
)
p
l
-
4
(
p
-
1
)
4
+
12
A
2
′
(
l
-
2
)
(
l
-
3
)
(
p
-
1
)
2
p
l
-
4
+
24
A
4
′
p
l
-
4
)
.Lemma 11.
Letp
=
3, q
=
p
m. Let C denote the cyclic code with nonzeros π
-
2, π
-
(
p
+
1
), and π
-
(
p
2
+
1
); the weights of the dual code C
⊥ satisfy the following:
(32)
A
0
′
=
1
,
A
1
′
=
0
,
A
2
′
=
p
m
-
1
,
A
3
′
=
0
,
A
4
′
=
(
p
m
-
1
)
(
2
p
m
-
p
-
3
)
3
+
(
p
m
-
1
)
(
p
m
-
3
)
2
.Proof.
Below, codewords are considered in the dual code. It is easy to see thatA
0
′
=
1 and A
1
′
=
0. For the codewords with weight two, if the components at the two positions have the same value, we find that M
2
′
=
0. Let us consider the following equation system about the positions:
(33)
x
2
-
y
2
=
0
,
x
p
+
1
-
y
p
+
1
=
0
,
x
p
2
+
1
-
y
p
2
+
1
=
0
,
which should be satisfied by the coordinates of the codewords. For any y
∈
F
q
*, x
=
-
y is the other corresponding coordinate. That is, A
2
′
=
p
m
-
1.
As to weight-three codewords, there are two cases to be considered.(i)
If all the values corresponding to the three coordinates of the codewords are the same, then study the solutions of the following equation system:(34)
x
2
+
y
2
+
1
=
0
,
x
p
+
1
+
y
p
+
1
+
1
=
0
,
x
p
2
+
1
+
y
p
2
+
1
+
1
=
0
.
From the first two equations of (34), we find that x
2
=
y
2
=
1 contradicting the fact that x
,
y
,
1 should be different.
(ii)
If one value is different from the other two, consider(35)
x
2
-
y
2
+
1
=
0
,
x
p
+
1
-
y
p
+
1
+
1
=
0
,
x
p
2
+
1
-
y
p
2
+
1
+
1
=
0
.
Solving the above system, we have x
=
0 contradicting the fact that the coordinates should be different from 0.Combing the above two cases, A
3
′
=
0.
Now, let us consider the number of codewords with weight four in three cases.
Case I. At the four positions, the components have the same value. According to the proof of Lemma 8, the number of nonzero solutions of equation system (16) is M
4
′
=
(
p
m
-
1
)
(
8
p
m
-
4
p
-
12
). For a solution (
x
,
y
,
z
,
w
) of (16), if two of them are equal, for example, z
=
w
=
v, then (16) becomes
(36)
x
2
+
y
2
-
v
2
=
0
,
x
p
+
1
+
y
p
+
1
-
v
p
+
1
=
0
,
x
p
2
+
1
+
y
p
2
+
1
-
v
p
2
+
1
=
0
.
Solving the above system, it can be found that x or y is zero, so the number of nonzero solutions of (36) is 0. Then all those M
4
′ nonzero solutions of (16) correspond to the codewords, where 24
=
4
! solutions correspond to a four-tuple and each tuple corresponds to two codewords. Therefore, there are 2
·
M
4
′
/
24
=
M
4
′
/
12 codewords.
Case II. One value at the four nonzero positions is different from the other three values. Consider the solutions of the following system:
(37)
x
2
+
y
2
+
z
2
-
w
2
=
0
,
x
p
+
1
+
y
p
+
1
+
z
p
+
1
-
w
p
+
1
=
0
,
x
p
2
+
1
+
y
p
2
+
1
+
z
p
2
+
1
-
w
p
2
+
1
=
0
.
Using Mamga [28], the irreducible components of the projective variety defined by (37) are provided by the polynomials listed in Table 2. It is easy to see that at least one of x
,
y
,
z
,
w is zero, so the solutions can not correspond to codewords.
Case III. Two values at the coordinates are the same. Let us consider
(38)
x
2
+
y
2
-
z
2
-
w
2
=
0
,
x
p
+
1
+
y
p
+
1
-
z
p
+
1
-
w
p
+
1
=
0
,
x
p
2
+
1
+
y
p
2
+
1
-
z
p
2
+
1
-
w
p
2
+
1
=
0
.
Again the irreducible components are presented in Table 3, by which only the cases x
=
-
z, y
=
-
w, and x
=
-
w, y
=
-
z are the possible solutions which can correspond to codewords since coordinates should be different. The number of such solutions is 2
(
p
m
-
1
)
(
p
m
-
3
) which corresponds to 4
·
(
2
(
p
m
-
1
)
(
p
m
-
3
)
/
16
)
=
(
p
m
-
1
)
(
p
m
-
3
)
/
2 codewords, since every four-tuple (
x
0
,
y
0
,
z
0
,
w
0
) corresponds to 4

·

2

·

2 solutions of (38). In fact, if c is a weight-four codeword with nonzero positions and values (
x
0
,
y
0
,
-
x
0
,
-
y
0
)
→
(
1,1
,
-
1
,
-
1
), then (
x
0
,
y
0
,
-
x
0
,
-
y
0
)
→
(
-
1
,
-
1,1
,
1
), (
x
0
,
y
0
,
-
x
0
,
-
y
0
)
→
(
-
1,1
,
1
,
-
1
), and (
x
0
,
y
0
,
-
x
0
,
-
y
0
)
→
(
1
,
-
1
,
-
1,1
) can all represent weight-four codewords.
Combing the above three cases,(39)
A
4
′
=
M
4
′
12
+
(
p
m
-
1
)
(
p
m
-
3
)
2
=
(
p
m
-
1
)
(
2
p
m
-
p
-
3
)
3
+
(
p
m
-
1
)
(
p
m
-
3
)
2
.
The result of the lemma is obtained.Table 2
Irreducible components corresponding to (37).
y
4,
y
4,
z
4,
z
4,
z
4,
x
2
+
y
2,
x
2
+
y
2,
x
2
+
z
2,
x
2
+
z
2,
y
2
+
z
2,
z
-
w,
z
+
w,
y
-
w,
y
+
w,
x
-
w,
z
4,
w
4,
w
4,
w
4,
w
4,
y
2
+
z
2,
y
2
-
y
z
+
z
2
+
w
2,
y
2
-
y
z
+
z
2
+
w
2,
y
2
+
y
z
+
z
2
+
w
2,
y
2
+
y
z
+
z
2
+
w
2,
x
+
w,
x
-
y
+
z,
x
+
y
-
z,
x
-
y
-
z,
x
+
y
+
z,Table 3
Irreducible components corresponding to (38).
x
-
z,
x
-
z,
x
+
z,
x
+
z,
x
-
w,
x
-
w,
x
+
w,
x
+
w,
y
-
w,
y
+
w,
y
-
w,
y
+
w,
y
-
z,
y
+
z,
y
-
z,
y
+
z,Lemma 12.
Letp
=
3, q
=
p
m, where m
≥
6 is an even integer. The notations defined in (10) and (11) satisfy
(40)
n
1,0
+
n
-
1,0
+
p
2
(
n
1,2
+
n
-
1,2
)
+
p
4
(
n
1,4
+
n
-
1,4
)
=
a
,
n
1,0
+
n
-
1,0
+
p
4
(
n
1,2
+
n
-
1,2
)
+
p
8
(
n
1,4
+
n
-
1,4
)
=
b
,
where
(41)
a
=
(
p
3
m
-
2
(
(
p
m
-
1
)
(
p
m
-
2
)
(
p
-
1
)
2
+
2
A
2
′
)
-
p
2
(
m
-
1
)
(
p
-
1
)
2
(
p
3
m
-
2
p
2
m
+
1
)
+
(
p
-
1
)
(
p
m
-
1
)
p
3
m
-
1
)
×
(
(
p
-
1
)
2
p
m
-
2
)
-
1
,
b
=
{
(
(
p
-
1
)
(
p
m
-
1
)
p
3
m
-
1
)
p
3
m
-
4
(
(
p
m
-
1
)
(
p
m
-
2
)
(
p
m
-
3
)
(
p
m
-
4
)
(
p
-
1
)
4
+
12
A
2
′
(
p
m
-
3
)
(
p
m
-
4
)
(
p
-
1
)
2
+
24
A
4
′
)
-
(
p
-
1
)
5
p
3
(
m
-
1
)
a
-
p
4
(
m
-
1
)
(
p
-
1
)
4
×
(
p
3
m
-
4
p
2
m
-
16
p
m
+
19
)
+
6
(
(
p
-
1
)
3
p
2
(
m
-
1
)
a
+
p
3
(
m
-
1
)
(
p
-
1
)
3
×
(
p
3
m
-
p
2
m
+
1
-
4
p
m
+
6
)

(
p
-
1
)
3
p
2
(
m
-
1
)
a
)
-
11
(
(
p
-
1
)
2
(
p
3
m
-
2
p
2
m
+
1
)
(
p
-
1
)
2
p
m
-
2
a
+
p
2
(
m
-
1
)
(
p
-
1
)
2
(
p
3
m
-
2
p
2
m
+
1
)
)
+
6
(
(
p
-
1
)
(
p
m
-
1
)
p
3
m
-
1
)
}
×
(
(
p
-
1
)
4
p
2
m
-
4
)
-
1
,
and A
2
′
,
A
4
′ are defined in Lemma 11.Proof.
Define the following notations for simplification:(42)
R
00
=
p
m
-
1
(
p
-
1
)
,
R
0
=
p
-
1
p
p
m
/
2
,
R
2
=
p
-
1
p
p
(
m
+
2
)
/
2
,
R
4
=
p
-
1
p
p
(
m
+
4
)
/
2
.
The use of MacWilliams’ identities in the following paragraphs implies the condition m
≥
6; refer to [26, Lemma 10]. By (4) and [26, Lemma 9], C has seven possible nonzero weights:
(43)
A
R
00
=
2
(
n
1
+
n
3
)
,
A
R
00
-
R
0
=
n
1,0
,
A
R
00
+
R
0
=
n
-
1,0
,
A
R
00
-
R
2
=
n
1,2
,
A
R
00
+
R
2
=
n
-
1,2
,
A
R
00
-
R
4
=
n
1,4
,
A
R
00
+
R
4
=
n
-
1,4
.
With the above notations, the first four moments of codeword weights can be computed:
(44)
∑
i
=
0
l
‍
i
A
i
=
R
00
2
(
n
1
+
n
3
)
+
(
R
00
-
R
0
)
n
1,0
+
(
R
00
+
R
0
)
n
-
1,0
+
(
R
00
-
R
2
)
n
1,2
+
(
R
00
+
R
2
)
n
-
1,2
+
(
R
00
-
R
4
)
n
1,4
+
(
R
00
+
R
4
)
n
-
1,4
=
R
00
(
2
(
n
1
+
n
3
)
+
n
1,0
+
n
-
1,0
+
n
1,2
+
n
-
1,2
+
n
1,4
+
n
-
1,4
)
-
(
R
0
(
n
1,0
-
n
-
1,0
)
+
R
2
(
n
1,2
-
n
-
1,2
)
+
R
4
(
n
1,4
-
n
-
1,4
)
)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
n
-
1,2
)
+
R
4
4
(
n
1,4
+
n
-
1,4
)
)
=
(
p
-
1
)
5
p
3
(
m
-
1
)
×
(
n
1,0
+
n
-
1,0
+
p
2
(
n
1,2
+
n
-
1,2
)
+
p
4
(
n
1,4
+
n
-
1,4
)
)
+
(
p
-
1
)
4
p
2
m
-
4
×
(
n
1,0
+
n
-
1,0
+
p
4
(
n
1,2
+
n
-
1,2
)
+
p
8
(
n
1,4
+
n
-
1,4
)
)
+
p
4
(
m
-
1
)
(
p
-
1
)
4
(
p
3
m
-
4
p
2
m
-
16
p
m
+
19
)
.
From (30), (44), and (45) we have
(48)
∑
i
=
1
l
‍
i
(
i
-
1
)
A
i
=
1
p
l
-
k
(
l
(
l
-
1
)
(
p
-
1
)
2
p
l
-
2
+
2
A
2
′
p
l
-
2
)
=
p
3
m
-
2
(
l
(
l
-
1
)
(
p
-
1
)
2
+
2
A
2
′
)
=
∑
i
=
1
l
‍
i
2
A
i
-
∑
i
=
1
l
‍
i
A
i
=
(
p
-
1
)
2
p
m
-
2
(
n
1,0
+
n
-
1,0
+
p
2
(
n
1,2
+
n
-
1,2
)
+
p
4
(
n
1,4
+
n
-
1,4
)
)
+
p
2
(
m
-
1
)
(
p
-
1
)
2
(
p
3
m
-
2
p
2
m
+
1
)
-
(
p
-
1
)
(
p
m
-
1
)
p
3
m
-
1
,
and the first one of (40) is obtained after simplification.
According to the MacWilliams’ fourth moment identity (31), (44), (45), (46), and (47),
(49)
∑
i
=
1
l
‍
i
(
i
-
1
)
(
i
-
2
)
(
i
-
3
)
A
i
=
1
p
l
-
k
(
l
(
l
-
1
)
(
l
-
2
)
(
l
-
3
)
p
l
-
4
(
p
-
1
)
4
+
12
A
2
′
(
l
-
2
)
(
l
-
3
)
(
p
-
1
)
2
p
l
-
4
+
24
A
4
′
p
l
-
4
)
=
p
3
m
-
4
(
(
p
m
-
1
)
(
p
m
-
2
)
(
p
m
-
3
)
(
p
m
-
4
)
(
p
-
1
)
4
+
12
A
2
′
(
p
m
-
3
)
(
p
m
-
4
)
(
p
-
1
)
2
+
24
A
4
′
)
=
∑
i
=
1
l
‍
i
4
A
i
-
6
∑
i
=
1
l
‍
i
3
A
i
+
11
∑
i
=
1
l
‍
i
2
A
i
-
6
∑
i
=
1
l
‍
i
A
i
=
(
p
-
1
)
4
p
2
m
-
4
×
(
n
1,0
+
n
-
1,0
+
p
4
(
n
1,2
+
n
-
1,2
)
+
p
8
(
n
1,4
+
n
-
1,4
)
)
+
(
p
-
1
)
5
p
3
(
m
-
1
)
a
+
p
4
(
m
-
1
)
(
p
-
1
)
4
(
p
3
m
-
4
p
2
m
-
16
p
m
+
19
)
-
6
(
(
p
-
1
)
3
p
2
(
m
-
1
)
a
+
p
3
(
m
-
1
)
(
p
-
1
)
3
(
p
3
m
-
p
2
m
+
1
-
4
p
m
+
6
)
)
+
11
(
(
p
-
1
)
2
p
m
-
2
a
+
p
2
(
m
-
1
)
(
p
-
1
)
2
(
p
3
m
-
2
p
2
m
+
1
)
)
-
6
(
(
p
-
1
)
(
p
m
-
1
)
p
3
m
-
1
)
,
and the second one of (40) is obtained after simplification.


### 3.5. Weight Distribution ofC

In this subsection, the parameters defined in (10) and (11) are calculated in Lemma 13, and the weight distribution of the cyclic code C is determined in Theorem 15.Lemma 13.
Letp
=
3, q
=
p
m where m
≥
6 is an even integer. The notations defined in (10) and (11) satisfy
(50)
n
1,0
=
(
-
(
b
+
c
6
-
a
p
2
-
a
p
3
-
a
p
4
-
a
p
5
-
b
p
2
+
c
1
p
6
+
c
2
p
6
+
c
3
p
3
+
c
3
p
5
-
c
4
p
2
-
c
4
p
4
+
c
5
p
2
)
)
×
(
-
2
p
6
+
2
p
4
+
2
p
2
-
2
)
-
1
,
n
-
1,0
=
(
-
(
b
-
c
6
-
a
p
2
-
a
p
3
-
a
p
4
-
a
p
5
-
b
p
2
+
c
1
p
6
-
c
2
p
6
+
c
3
p
3
+
c
3
p
5
+
c
4
p
2
+
c
4
p
4
+
c
5
p
2
)
)
×
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lemma3, Corollaries 7 and 10, and Lemma 12, the following equations hold:
(52)
2
(
n
1
+
n
3
)
+
n
-
1,0
+
n
1,0
+
n
-
1,2
+
n
1,2
+
n
1,4
+
n
-
1,4
=
c
1
,
n
1,0
-
n
-
1,0
+
p
(
n
1,2
-
n
-
1,2
)
+
p
2
(
n
1,4
-
n
-
1,4
)
=
c
2
,
-
2
(
p
n
1
+
p
3
n
3
)
+
n
1,0
+
n
-
1,0
+
p
2
(
n
1,2
+
n
-
1,2
)
+
p
4
(
n
1,4
+
n
-
1,4
)
=
c
3
,
n
1,0
-
n
-
1,0
+
p
3
(
n
1,2
-
n
-
1,2
)
+
p
6
(
n
1,4
-
n
-
1,4
)
=
c
4
,
n
1,0
+
n
-
1,0
+
2
n
1
p
2
+
p
4
(
n
1,2
+
n
-
1,2
)
+
2
n
3
p
6
+
p
8
(
n
1,4
+
n
-
1,4
)
=
c
5
,
n
1,0
-
n
-
1,0
+
p
5
(
n
1,2
-
n
-
1,2
)
+
p
10
(
n
1,4
-
n
-
1,4
)
=
c
6
,
n
1,0
+
n
-
1,0
+
p
2
(
n
1,2
+
n
-
1,2
)
+
p
4
(
n
1,4
+
n
-
1,4
)
=
a
,
n
1,0
+
n
-
1,0
+
p
4
(
n
1,2
+
n
-
1,2
)
+
p
8
(
n
1,4
+
n
-
1,4
)
=
b
.
Solving the above equation system, the result is obtained.Lemma 14.
Letp
=
3, q
=
p
m, where m
≥
6 is an even integer. The number of solutions of the equation system
(53)
x
2
+
y
2
+
z
2
+
w
2
+
u
2
+
v
2
=
0
,
x
p
+
1
+
y
p
+
1
+
z
p
+
1
+
w
p
+
1
+
u
p
+
1
+
v
p
+
1
=
0
,
x
p
2
+
1
+
y
p
2
+
1
+
z
p
2
+
1
+
w
p
2
+
1
+
u
p
2
+
1
+
v
p
2
+
1
=
0
,
is
(54)
n
1,0
+
n
-
1,0
+
p
6
(
n
1,2
+
n
-
1,2
)
+
p
12
(
n
1,4
+
n
-
1,4
)
-
p
3
(
n
1,1
+
n
-
1,1
)
-
p
9
(
n
1,3
+
n
-
1,3
)
+
p
3
m
.Proof.
The sixth moment of exponential sumS
(
α
,
β
,
γ
) satisfies
(55)
∑
α
,
β
,
γ
∈
F
q
‍
S
(
α
,
β
,
γ
)
6
=
p
3
m
(
n
1,0
+
n
-
1,0
)
+
p
3
(
m
+
2
)
(
n
1,2
+
n
-
1,2
)
+
p
3
(
m
+
4
)
(
n
1,4
+
n
-
1,4
)
-
p
3
(
m
+
1
)
(
n
1,1
+
n
-
1,1
)
-
p
3
(
m
+
3
)
(
n
1,3
+
n
-
1,3
)
+
p
6
m
=
M
6
·
p
3
m
,
where M
6 is the number of solutions of (53). Solving the above equation for M
6, the result is obtained.Equation (53) considers the case for 6 variables. Using the seventh moment of S
(
α
,
β
,
γ
), the number of solutions can be calculated when there are 7 variables and so forth.Theorem 15.
Letp
=
3, q
=
p
m, where m
≥
6 is an even integer. The cyclic code C with nonzeros π
-
2
,
π
-
(
p
+
1
) and π
-
(
p
2
+
1
) has seven nonzero weights:
(56)
A
p
m
-
1
(
p
-
1
)
=
2
(
n
1
+
n
3
)
,
A
p
m
-
1
(
p
-
1
)
-
(
(
p
-
1
)
/
p
)
p
m
/
2
=
n
1,0
,
A
p
m
-
1
(
p
-
1
)
+
(
(
p
-
1
)
/
p
)
p
m
/
2
=
n
-
1,0
,
A
p
m
-
1
(
p
-
1
)
-
(
(
p
-
1
)
/
p
)
p
(
m
+
2
)
/
2
=
n
1,2
,
A
p
m
-
1
(
p
-
1
)
+
(
(
p
-
1
)
/
p
)
p
(
m
+
2
)
/
2
=
n
-
1,2
,
A
p
m
-
1
(
p
-
1
)
-
(
(
p
-
1
)
/
p
)
p
(
m
+
4
)
/
2
=
n
1,4
,
A
p
m
-
1
(
p
-
1
)
+
(
(
p
-
1
)
/
p
)
p
(
m
+
4
)
/
2
=
n
-
1,4
,
where π is a primitive element of the finite field F
q.It is interesting to consider the symmetric property about the weights of the cyclic codeC. If there is a weight of the form p
m
-
1
(
p
-
1
)
+
(
(
p
-
1
)
/
p
)
p
(
m
+
2
i
)
/
2  (
i
=
0,1
,
2
), then there is a weight of the form p
m
-
1
(
p
-
1
)
-
(
(
p
-
1
)
/
p
)
p
(
m
+
2
i
)
/
2. It seems that the weights are symmetric about the value p
m
-
1
(
p
-
1
) which is also a weight of C. This phenomenon may be explained by the fact that, for symmetric matrices with corresponding quadratic residue Δ, there are symmetric matrices with corresponding nonresidue Δ
′ (Lemma 1). As the following example illustrates, in general the higher the value i the less the number of corresponding weights.Example 16.
Letp
=
3, q
=
p
m, where m
=
6. The cyclic code C has nonzeros π
-
2, π
-
(
p
+
1
), and π
-
(
p
2
+
1
), where π is a primitive element of the finite field F
q. Using Theorem 15, it has seven nonzero weights:
(57)
A
486
=
124245576
,
A
468
=
128432304
,
A
504
=
119277522
,
A
432
=
8591310
,
A
540
=
6866496
,
A
324
=
4732
,
A
648
=
2548
,
which are verified by using Matlab.


## 3.1. The First Three Moments ofS
(
α
,
β
,
γ
)

For an odd primep and even integer m, this subsection calculates the first three moments of the exponential sum S
(
α
,
β
,
γ
) (5); see Lemma 2 and its other form Lemma 3.Lemma 2 (see [19]).
Letp be an odd prime satisfying p
≡
3
mod
⁡
4 and q
=
p
m. Then there are the following results about the exponential sum S
(
α
,
β
,
γ
) (5) corresponding to f
2
′
(
x
)
=
α
x
2
+
β
x
p
+
1
+
γ
x
p
2
+
1:(i)
∑
α
,
β
,
γ
∈
F
q
S
(
α
,
β
,
γ
)
=
p
3
m,
(ii)
∑
α
,
β
,
γ
∈
F
q
S
(
α
,
β
,
γ
)
2
=
p
3
m,
(iii)
∑
α
,
β
,
γ
∈
F
q
S
(
α
,
β
,
γ
)
3
=
(
(
p
+
1
)
(
p
m
-
1
)
+
1
)
p
3
m.Corresponding to Lemma1 and [19, Corollary 1], we introduce the following notations for convenience. Let
(10)
N
ɛ
,
j
=
{
(
α
,
β
,
γ
)
∈
F
q
3
∖
{
(
0,0
,
0
)
}
∣
S
(
α
,
β
,
γ
)
=
ɛ
p
(
m
+
j
)
/
2
}
,
where ɛ
=
±
1 and j
=
0,2
,
4. Denote n
ɛ
,
j
=
|
N
ɛ
,
j
|. Let
(11)
N
ɛ
,
j
=
{
(
α
,
β
,
γ
)
∈
F
q
3
∖
{
(
0,0
,
0
)
}
∣
S
(
α
,
β
,
γ
)
=
ɛ
i
p
(
m
+
j
)
/
2
}
for j
=
1,3, where i is the imaginary unit. By [19, Lemma 3], set n
j
=
n
ɛ
,
j
=
|
N
ɛ
,
j
| for j
=
1,3, since m
-
j is odd. Using those, Lemma 2 can be restated in Lemma 3 when m is even.Lemma 3.
Letp be an odd prime satisfying p
≡
3
mod
⁡
4, and q
=
p
m, where m is an even integer. Then the notations defined in (10) and (11) satisfy
(12)
2
(
n
1
+
n
3
)
+
n
-
1,0
+
n
1,0
+
n
-
1,2
+
n
1,2
+
n
1,4
+
n
-
1,4
=
p
3
m
-
1
,
n
1,0
-
n
-
1,0
+
p
(
n
1,2
-
n
-
1,2
)
+
p
2
(
n
1,4
-
n
-
1,4
)
=
p
m
/
2
(
p
2
m
-
1
)
,
-
2
(
p
n
1
+
p
3
n
3
)
+
n
1,0
+
n
-
1,0
+
p
2
(
n
1,2
+
n
-
1,2
)
+
p
4
(
n
1,4
+
n
-
1,4
)
=
p
m
(
p
m
-
1
)
,
n
1,0
-
n
-
1,0
+
p
3
(
n
1,2
-
n
-
1,2
)
+
p
6
(
n
1,4
-
n
-
1,4
)
=
(
p
+
1
)
p
3
m
/
2
(
p
m
-
1
)
.Proof.
Substituting the symbols of (10) and (11) to Lemma 2
(13)
2
(
n
1
+
n
3
)
+
n
-
1,0
+
n
1,0
+
n
-
1,2
+
n
1,2
+
n
1,4
+
n
-
1,4
=
p
3
m
-
1
,
∑
α
,
β
,
γ
∈
F
q
‍
S
(
α
,
β
,
γ
)
=
p
m
/
2
(
n
1,0
-
n
-
1,0
)
+
i
p
(
m
+
1
)
/
2
(
n
1,1
-
n
-
1,1
)
+
p
(
m
+
2
)
/
2
(
n
1,2
-
n
-
1,2
)
+
i
p
(
m
+
3
)
/
2
(
n
1,3
-
n
-
1,3
)
+
p
(
m
+
4
)
/
2
(
n
1,4
-
n
-
1,4
)
+
p
m
=
p
m
/
2
(
n
1,0
-
n
-
1,0
)
+
p
(
m
+
2
)
/
2
(
n
1,2
-
n
-
1,2
)
+
p
(
m
+
4
)
/
2
(
n
1,4
-
n
-
1,4
)
+
p
m
=
p
3
m
,
∑
α
,
β
,
γ
∈
F
q
‍
S
(
α
,
β
,
γ
)
2
=
p
m
(
n
1,0
+
n
-
1,0
)
-
p
m
+
1
(
n
1,1
+
n
-
1,1
)
+
p
m
+
2

(
n
1,2
+
n
-
1,2
)
-
p
m
+
3
(
n
1,3
+
n
-
1,3
)
+
p
m
+
4
(
n
1,4
+
n
-
1,4
)
+
p
2
m
=
p
3
m
,
∑
α
,
β
,
γ
∈
F
q
‍
S
(
α
,
β
,
γ
)
3
=
p
3
m
/
2
(
n
1,0
-
n
-
1,0
)
-
i
p
3
(
m
+
1
)
/
2
(
n
1,1
-
n
-
1,1
)
+
p
3
(
m
+
2
)
/
2
(
n
1,2
-
n
-
1,2
)
-
i
p
3
(
m
+
3
)
/
2
(
n
1,3
-
n
-
1,3
)
+
p
3
(
m
+
4
)
/
2
(
n
1,4
-
n
-
1,4
)
+
p
3
m
=
p
3
m
/
2
(
n
1,0
-
n
-
1,0
)
+
p
3
(
m
+
2
)
/
2
(
n
1,2
-
n
-
1,2
)
+
p
3
(
m
+
4
)
/
2
(
n
1,4
-
n
-
1,4
)
+
p
3
m
=
(
(
p
+
1
)
(
p
m
-
1
)
+
1
)
p
3
m
,
where the first one comes from the fact that there are p
3
m
-
1 elements in the set F
q
3
∖
{
(
0,0
,
0
)
}. Also, note that S
(
α
,
β
,
γ
)
=
p
m when α
=
β
=
γ
=
0.
Usingn
j
=
n
ɛ
,
j
=
|
N
ɛ
,
j
| for j
=
1,3, the result is obtained by simplification.


## 3.2. The Fourth Moment ofS
(
α
,
β
,
γ
)

For the fourth moment ofS
(
α
,
β
,
γ
) in the particular case of p
=
3, there is the following result about the number of solutions of the equation system:
(14)
x
2
+
y
2
+
z
2
+
1
=
0
,
x
p
+
1
+
y
p
+
1
+
z
p
+
1
+
1
=
0
,
x
p
2
+
1
+
y
p
2
+
1
+
z
p
2
+
1
+
1
=
0
in Lemma 4, which is denoted by T
4.Lemma 4 (see [19]).
Letp
=
3 and q
=
p
m. Then
(15)
T
4
=
4
(
2
p
m
-
3
)
.Using Lemma4 and M
3 in Lemma 2, M
4 is calculated in Lemma 5, where M
4
=
M
3
+
(
q
-
1
)
T
4.Lemma 5.
Letp
=
3 and q
=
p
m. The number of solutions of the following equation system
(16)
x
2
+
y
2
+
z
2
+
w
2
=
0
,
x
p
+
1
+
y
p
+
1
+
z
p
+
1
+
w
p
+
1
=
0
,
x
p
2
+
1
+
y
p
2
+
1
+
z
p
2
+
1
+
w
p
2
+
1
=
0
is M
4
=
8
(
p
m
-
1
)
2
+
1.Corresponding to Lemma2, the result of the fourth moment is provided in Lemma 6 by applying Lemma 5.Lemma 6.
Letp
=
3 and q
=
p
m. Then
(17)
∑
α
,
β
,
γ
∈
F
q
‍
S
(
α
,
β
,
γ
)
4
=
M
4
·
p
3
m
=
(
8
(
p
m
-
1
)
2
+
1
)
p
3
m
.Corresponding to Lemma3, Lemma 6 can be rewritten as the following corollary using the symbols of (10) and (11).Corollary 7.
Letp
=
3 and q
=
p
m, where m is an even integer. Then
(18)
n
1,0
+
n
-
1,0
+
2
n
1
p
2
+
p
4
(
n
1,2
+
n
-
1,2
)
+
2
n
3
p
6
+
p
8
(
n
1,4
+
n
-
1,4
)
=
(
8
(
p
m
-
1
)
2
-
p
m
+
1
)
p
m
.


## 3.3. The Fifth Moment ofS
(
α
,
β
,
γ
)

For the fifth moment ofS
(
α
,
β
,
γ
), we need Magma [28] to find the number of solutions of the following equation system:
(19)
x
2
+
y
2
+
z
2
+
w
2
+
u
2
=
0
,
x
p
+
1
+
y
p
+
1
+
z
p
+
1
+
w
p
+
1
+
u
p
+
1
=
0
,
x
p
2
+
1
+
y
p
2
+
1
+
z
p
2
+
1
+
w
p
2
+
1
+
u
p
2
+
1
=
0
which is denoted by M
5.The irreducible components corresponding to the projective variety defined by (19) are listed in Table 1 using Magma [28]. Every block of Table 1 contains a system of three equations (“=
0” is omitted), the solutions of which satisfy (19). The union of all the solutions in each block presents the solutions of (19) exactly. Those equation systems are circulant symmetric about the variables. In general, few works are provided to deal with the moments using five variables. In this paper, Magma helps us on the reduction of such systems in Lemmas 8 and 9 and Corollary 10. For relevant knowledge of algebraic geometry, the reader is referred to [29].Table 1
Irreducible components corresponding to the projective variety defined by (19).
x
2,
x
2,
x
2,
x
2,
x
2,
x
2,
x
2,
x
2,
y
-
w
-
u,
y
-
w
-
u,
y
-
w
+
u,
y
-
w
+
u,
y
+
w
-
u,
y
+
w
-
u,
y
+
w
+
u,
y
+
w
+
u,
z
-
w
+
u,
z
+
w
-
u,
z
-
w
-
u,
z
+
w
+
u,
z
-
w
-
u,
z
+
w
+
u,
z
-
w
+
u,
z
+
w
-
u,
y
2,
y
2,
y
2,
y
2,
y
2,
y
2,
y
2,
y
2,
x
-
w
-
u,
x
-
w
-
u,
x
-
w
+
u,
x
-
w
+
u,
x
+
w
-
u,
x
+
w
-
u,
x
+
w
+
u,
x
+
w
+
u,
z
-
w
+
u,
z
+
w
-
u,
z
-
w
-
u,
z
+
w
+
u,
z
-
w
-
u,
z
+
w
+
u,
z
-
w
+
u,
z
+
w
-
u,
z
2,
z
2,
z
2,
z
2,
z
2,
z
2,
z
2,
z
2,
x
-
w
-
u,
x
-
w
-
u,
x
-
w
+
u,
x
-
w
+
u,
x
+
w
-
u,
x
+
w
-
u,
x
+
w
+
u,
x
+
w
+
u,
y
-
w
+
u,
y
+
w
-
u,
y
-
w
-
u,
y
+
w
+
u,
y
-
w
-
u,
y
+
w
+
u,
y
-
w
+
u,
y
+
w
-
u,
w
2,
w
2,
w
2,
w
2,
w
2,
w
2,
w
2,
w
2,
x
-
z
-
u,
x
-
z
-
u,
x
-
z
+
u,
x
-
z
+
u,
x
+
z
-
u,
x
+
z
-
u,
x
+
z
+
u,
x
+
z
+
u,
y
-
z
+
u,
y
+
z
-
u,
y
-
z
-
u,
y
+
z
+
u,
y
-
z
-
u,
y
+
z
+
u,
y
-
z
+
u,
y
+
z
-
u,
u
2,
u
2,
u
2,
u
2,
u
2,
u
2,
u
2,
u
2,
x
-
z
-
w,
x
-
z
-
w,
x
-
z
+
w,
x
-
z
+
w,
x
+
z
-
w,
x
+
z
-
w,
x
+
z
+
w,
x
+
z
+
w,
y
-
z
+
w,
y
+
z
-
w,
y
-
z
-
w,
y
+
z
+
w,
y
-
z
-
w,
y
+
z
+
w,
y
-
z
+
w,
y
+
z
-
w,Lemma 8.
Letp
=
3 and q
=
p
m. Then
(20)
M
5
=
5
(
p
m
-
1
)
(
8
p
m
-
2
p
-
10
)
+
1
.Proof.
The number of nonzero solutions ofx
2
+
y
2
=
x
p
+
1
+
y
p
+
1
=
x
p
2
+
1
+
y
p
2
+
1
=
0 is M
2
′
=
M
2
-
1
=
0, where M
2
=
1 [19], and the number of nonzero elements in
(21)
M
3
=
#
{
(
z
.
.
1
)
1

(
x
,
y
,
z
)
∈
F
q
3
∣
x
2
+
y
2
+
z
2
=
0
,
1111111111111111
x
p
+
1
+
y
p
+
1
+
z
p
+
1
=
0
,
111111111111.111
x
p
2
+
1
+
y
p
2
+
1
+
z
p
2
+
1
=
0
(
z
.
.
1
)
-
}
=
(
p
+
1
)
(
q
-
1
)
+
1
[
19
]
is M
3
′
=
(
p
+
1
)
(
q
-
1
). From Lemma 5, the number of nonzero solutions of (16) is M
4
′
=
M
4
-
4
M
3
′
-
1
=
(
p
m
-
1
)
(
8
p
m
-
4
p
-
12
).
For the solutions of equation system (19), Table 1 shows that at least one of the elements x
,
y
,
z
,
w
,
u is zero, and there are two cases to be considered.(i)
If only one of the five variables is zero, the number of such solutions is5
M
4
′
=
5
(
p
m
-
1
)
(
8
p
m
-
4
p
-
12
).
(ii)
If two variables are zero, the number of such solutions is(
5
2
)
M
3
′
=
10
(
p
+
1
)
(
q
-
1
). Altogether, the number of solutions of equation system (19) is
(22)
5
M
4
′
+
10
M
3
′
+
1
=
5
(
p
m
-
1
)
(
8
p
m
-
2
p
-
10
)
+
1
.Applying Lemma8, the result about the fifth moment of exponential sum S
(
α
,
β
,
γ
) is obtained.Lemma 9.
Letp
=
3 and q
=
p
m. Then
(23)
∑
α
,
β
,
γ
∈
F
q
‍
S
(
α
,
β
,
γ
)
5
=
M
5
·
p
3
m
=
(
5
(
p
m
-
1
)
(
8
p
m
-
2
p
-
10
)
+
1
)
p
3
m
.Corollary 10.
Letp
=
3 and q
=
p
m, where m is an even integer. Then
(24)
n
1,0
-
n
-
1,0
+
p
5
(
n
1,2
-
n
-
1,2
)
+
p
10
(
n
1,4
-
n
-
1,4
)
=
(
5
(
p
m
-
1
)
(
8
p
m
-
2
p
-
10
)
-
p
2
m
+
1
)
p
m
/
2
.


## 3.4. MacWilliams’ Identities

MacWilliams’ theorem is for the Hamming weight enumerators of linear codes over finite field [30] (we consider prime field F
p). Using this theorem, Lemma 12 is provided for the weight distribution using dual code’s first few weights of Lemma 11. The two identities in Lemma 12 will combine with previous identities in final result.LetA
i be the number of codewords of weight i in a code C with length l and dimension k, where 0
≤
i
≤
l. Let A
i
′ be the corresponding number in the dual code C
⊥. Then
(25)
W
C
(
x
,
y
)
=
1
|
C
⊥
|
W
C
⊥
(
x
+
(
p
-
1
)
y
,
x
-
y
)
,
where W
C
(
x
,
y
)
=
∑
i
=
0
l
A
i
x
l
-
i
y
i. Setting x
=
1, (25) changes to
(26)
∑
i
=
0
l
‍
A
i
y
i
=
1
p
l
-
k
∑
i
=
0
l
‍
A
i
′
(
1
+
(
p
-
1
)
y
)
l
-
i
(
1
-
y
)
i
.
Differentiating (26) with respect to y,
(27)
∑
i
=
1
l
‍
i
A
i
y
i
-
1
=
1
p
l
-
k
∑
i
=
0
l
‍
A
i
′
(
(
l
-
i
)
(
p
-
1
)
(
1
+
(
p
-
1
)
y
)
l
-
i
-
1
(
1
-
y
)
i
1111111111111
+
(
1
+
(
p
-
1
)
y
)
l
-
i
i
(
-
1
)
(
1
-
y
)
i
-
1
)
.
Setting y
=
1, the first MacWilliams’ moment identity is obtained for l
≥
2
(28)
∑
i
=
1
l
‍
i
A
i
p
k
=
1
p
(
(
p
-
1
)
l
-
A
1
′
)
=
1
p
(
p
-
1
)
l
if
A
1
′
=
0
.
Differentiating again,
(29)
∑
i
=
1
l
‍
i
(
i
-
1
)
A
i
y
i
-
2
=
1
p
l
-
k
∑
i
=
0
l
‍
A
i
′
{
(
1
+
(
p
-
1
)
y
)
l
-
i
i
(
i
-
1
)
(
1
-
y
)
i
-
2

(
l
-
i
)
(
l
-
i
-
1
)
(
p
-
1
)
2
11111111111111
×
(
1
+
(
p
-
1
)
y
)
l
-
i
-
2
(
1
-
y
)
i
11111111111111
+
2
(
l
-
i
)
(
p
-
1
)
(
1
+
(
p
-
1
)
y
)
l
-
i
-
1
11111111111111
×
i
(
-
1
)
(
1
-
y
)
i
-
1
11111111111111
+
(
1
+
(
p
-
1
)
y
)
l
-
i
i
(
i
-
1
)
(
1
-
y
)
i
-
2
}
.
Substituting y
=
1, the second MacWilliams’ moment identity is obtained:
(30)
∑
i
=
1
l
‍
i
(
i
-
1
)
A
i
=
1
p
l
-
k
(
l
(
l
-
1
)
(
p
-
1
)
2
p
l
-
2
+
2
A
2
′
p
l
-
2
)
if
A
1
′
=
0
.
Differentiating for the third and fourth time, if A
1
′
=
A
3
′
=
0, the fourth MacWilliams’ moment identity is
(31)
∑
i
=
1
l
‍
i
(
i
-
1
)
(
i
-
2
)
(
i
-
3
)
A
i
=
1
p
l
-
k
(
p
l
.
-
4
l
(
l
-
1
)
(
l
-
2
)
(
l
-
3
)
p
l
-
4
(
p
-
1
)
4
+
12
A
2
′
(
l
-
2
)
(
l
-
3
)
(
p
-
1
)
2
p
l
-
4
+
24
A
4
′
p
l
-
4
)
.Lemma 11.
Letp
=
3, q
=
p
m. Let C denote the cyclic code with nonzeros π
-
2, π
-
(
p
+
1
), and π
-
(
p
2
+
1
); the weights of the dual code C
⊥ satisfy the following:
(32)
A
0
′
=
1
,
A
1
′
=
0
,
A
2
′
=
p
m
-
1
,
A
3
′
=
0
,
A
4
′
=
(
p
m
-
1
)
(
2
p
m
-
p
-
3
)
3
+
(
p
m
-
1
)
(
p
m
-
3
)
2
.Proof.
Below, codewords are considered in the dual code. It is easy to see thatA
0
′
=
1 and A
1
′
=
0. For the codewords with weight two, if the components at the two positions have the same value, we find that M
2
′
=
0. Let us consider the following equation system about the positions:
(33)
x
2
-
y
2
=
0
,
x
p
+
1
-
y
p
+
1
=
0
,
x
p
2
+
1
-
y
p
2
+
1
=
0
,
which should be satisfied by the coordinates of the codewords. For any y
∈
F
q
*, x
=
-
y is the other corresponding coordinate. That is, A
2
′
=
p
m
-
1.
As to weight-three codewords, there are two cases to be considered.(i)
If all the values corresponding to the three coordinates of the codewords are the same, then study the solutions of the following equation system:(34)
x
2
+
y
2
+
1
=
0
,
x
p
+
1
+
y
p
+
1
+
1
=
0
,
x
p
2
+
1
+
y
p
2
+
1
+
1
=
0
.
From the first two equations of (34), we find that x
2
=
y
2
=
1 contradicting the fact that x
,
y
,
1 should be different.
(ii)
If one value is different from the other two, consider(35)
x
2
-
y
2
+
1
=
0
,
x
p
+
1
-
y
p
+
1
+
1
=
0
,
x
p
2
+
1
-
y
p
2
+
1
+
1
=
0
.
Solving the above system, we have x
=
0 contradicting the fact that the coordinates should be different from 0.Combing the above two cases, A
3
′
=
0.
Now, let us consider the number of codewords with weight four in three cases.
Case I. At the four positions, the components have the same value. According to the proof of Lemma 8, the number of nonzero solutions of equation system (16) is M
4
′
=
(
p
m
-
1
)
(
8
p
m
-
4
p
-
12
). For a solution (
x
,
y
,
z
,
w
) of (16), if two of them are equal, for example, z
=
w
=
v, then (16) becomes
(36)
x
2
+
y
2
-
v
2
=
0
,
x
p
+
1
+
y
p
+
1
-
v
p
+
1
=
0
,
x
p
2
+
1
+
y
p
2
+
1
-
v
p
2
+
1
=
0
.
Solving the above system, it can be found that x or y is zero, so the number of nonzero solutions of (36) is 0. Then all those M
4
′ nonzero solutions of (16) correspond to the codewords, where 24
=
4
! solutions correspond to a four-tuple and each tuple corresponds to two codewords. Therefore, there are 2
·
M
4
′
/
24
=
M
4
′
/
12 codewords.
Case II. One value at the four nonzero positions is different from the other three values. Consider the solutions of the following system:
(37)
x
2
+
y
2
+
z
2
-
w
2
=
0
,
x
p
+
1
+
y
p
+
1
+
z
p
+
1
-
w
p
+
1
=
0
,
x
p
2
+
1
+
y
p
2
+
1
+
z
p
2
+
1
-
w
p
2
+
1
=
0
.
Using Mamga [28], the irreducible components of the projective variety defined by (37) are provided by the polynomials listed in Table 2. It is easy to see that at least one of x
,
y
,
z
,
w is zero, so the solutions can not correspond to codewords.
Case III. Two values at the coordinates are the same. Let us consider
(38)
x
2
+
y
2
-
z
2
-
w
2
=
0
,
x
p
+
1
+
y
p
+
1
-
z
p
+
1
-
w
p
+
1
=
0
,
x
p
2
+
1
+
y
p
2
+
1
-
z
p
2
+
1
-
w
p
2
+
1
=
0
.
Again the irreducible components are presented in Table 3, by which only the cases x
=
-
z, y
=
-
w, and x
=
-
w, y
=
-
z are the possible solutions which can correspond to codewords since coordinates should be different. The number of such solutions is 2
(
p
m
-
1
)
(
p
m
-
3
) which corresponds to 4
·
(
2
(
p
m
-
1
)
(
p
m
-
3
)
/
16
)
=
(
p
m
-
1
)
(
p
m
-
3
)
/
2 codewords, since every four-tuple (
x
0
,
y
0
,
z
0
,
w
0
) corresponds to 4

·

2

·

2 solutions of (38). In fact, if c is a weight-four codeword with nonzero positions and values (
x
0
,
y
0
,
-
x
0
,
-
y
0
)
→
(
1,1
,
-
1
,
-
1
), then (
x
0
,
y
0
,
-
x
0
,
-
y
0
)
→
(
-
1
,
-
1,1
,
1
), (
x
0
,
y
0
,
-
x
0
,
-
y
0
)
→
(
-
1,1
,
1
,
-
1
), and (
x
0
,
y
0
,
-
x
0
,
-
y
0
)
→
(
1
,
-
1
,
-
1,1
) can all represent weight-four codewords.
Combing the above three cases,(39)
A
4
′
=
M
4
′
12
+
(
p
m
-
1
)
(
p
m
-
3
)
2
=
(
p
m
-
1
)
(
2
p
m
-
p
-
3
)
3
+
(
p
m
-
1
)
(
p
m
-
3
)
2
.
The result of the lemma is obtained.Table 2
Irreducible components corresponding to (37).
y
4,
y
4,
z
4,
z
4,
z
4,
x
2
+
y
2,
x
2
+
y
2,
x
2
+
z
2,
x
2
+
z
2,
y
2
+
z
2,
z
-
w,
z
+
w,
y
-
w,
y
+
w,
x
-
w,
z
4,
w
4,
w
4,
w
4,
w
4,
y
2
+
z
2,
y
2
-
y
z
+
z
2
+
w
2,
y
2
-
y
z
+
z
2
+
w
2,
y
2
+
y
z
+
z
2
+
w
2,
y
2
+
y
z
+
z
2
+
w
2,
x
+
w,
x
-
y
+
z,
x
+
y
-
z,
x
-
y
-
z,
x
+
y
+
z,Table 3
Irreducible components corresponding to (38).
x
-
z,
x
-
z,
x
+
z,
x
+
z,
x
-
w,
x
-
w,
x
+
w,
x
+
w,
y
-
w,
y
+
w,
y
-
w,
y
+
w,
y
-
z,
y
+
z,
y
-
z,
y
+
z,Lemma 12.
Letp
=
3, q
=
p
m, where m
≥
6 is an even integer. The notations defined in (10) and (11) satisfy
(40)
n
1,0
+
n
-
1,0
+
p
2
(
n
1,2
+
n
-
1,2
)
+
p
4
(
n
1,4
+
n
-
1,4
)
=
a
,
n
1,0
+
n
-
1,0
+
p
4
(
n
1,2
+
n
-
1,2
)
+
p
8
(
n
1,4
+
n
-
1,4
)
=
b
,
where
(41)
a
=
(
p
3
m
-
2
(
(
p
m
-
1
)
(
p
m
-
2
)
(
p
-
1
)
2
+
2
A
2
′
)
-
p
2
(
m
-
1
)
(
p
-
1
)
2
(
p
3
m
-
2
p
2
m
+
1
)
+
(
p
-
1
)
(
p
m
-
1
)
p
3
m
-
1
)
×
(
(
p
-
1
)
2
p
m
-
2
)
-
1
,
b
=
{
(
(
p
-
1
)
(
p
m
-
1
)
p
3
m
-
1
)
p
3
m
-
4
(
(
p
m
-
1
)
(
p
m
-
2
)
(
p
m
-
3
)
(
p
m
-
4
)
(
p
-
1
)
4
+
12
A
2
′
(
p
m
-
3
)
(
p
m
-
4
)
(
p
-
1
)
2
+
24
A
4
′
)
-
(
p
-
1
)
5
p
3
(
m
-
1
)
a
-
p
4
(
m
-
1
)
(
p
-
1
)
4
×
(
p
3
m
-
4
p
2
m
-
16
p
m
+
19
)
+
6
(
(
p
-
1
)
3
p
2
(
m
-
1
)
a
+
p
3
(
m
-
1
)
(
p
-
1
)
3
×
(
p
3
m
-
p
2
m
+
1
-
4
p
m
+
6
)

(
p
-
1
)
3
p
2
(
m
-
1
)
a
)
-
11
(
(
p
-
1
)
2
(
p
3
m
-
2
p
2
m
+
1
)
(
p
-
1
)
2
p
m
-
2
a
+
p
2
(
m
-
1
)
(
p
-
1
)
2
(
p
3
m
-
2
p
2
m
+
1
)
)
+
6
(
(
p
-
1
)
(
p
m
-
1
)
p
3
m
-
1
)
}
×
(
(
p
-
1
)
4
p
2
m
-
4
)
-
1
,
and A
2
′
,
A
4
′ are defined in Lemma 11.Proof.
Define the following notations for simplification:(42)
R
00
=
p
m
-
1
(
p
-
1
)
,
R
0
=
p
-
1
p
p
m
/
2
,
R
2
=
p
-
1
p
p
(
m
+
2
)
/
2
,
R
4
=
p
-
1
p
p
(
m
+
4
)
/
2
.
The use of MacWilliams’ identities in the following paragraphs implies the condition m
≥
6; refer to [26, Lemma 10]. By (4) and [26, Lemma 9], C has seven possible nonzero weights:
(43)
A
R
00
=
2
(
n
1
+
n
3
)
,
A
R
00
-
R
0
=
n
1,0
,
A
R
00
+
R
0
=
n
-
1,0
,
A
R
00
-
R
2
=
n
1,2
,
A
R
00
+
R
2
=
n
-
1,2
,
A
R
00
-
R
4
=
n
1,4
,
A
R
00
+
R
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
-
2
p
2
m
+
1
)
-
(
p
-
1
)
(
p
m
-
1
)
p
3
m
-
1
,
and the first one of (40) is obtained after simplification.
According to the MacWilliams’ fourth moment identity (31), (44), (45), (46), and (47),
(49)
∑
i
=
1
l
‍
i
(
i
-
1
)
(
i
-
2
)
(
i
-
3
)
A
i
=
1
p
l
-
k
(
l
(
l
-
1
)
(
l
-
2
)
(
l
-
3
)
p
l
-
4
(
p
-
1
)
4
+
12
A
2
′
(
l
-
2
)
(
l
-
3
)
(
p
-
1
)
2
p
l
-
4
+
24
A
4
′
p
l
-
4
)
=
p
3
m
-
4
(
(
p
m
-
1
)
(
p
m
-
2
)
(
p
m
-
3
)
(
p
m
-
4
)
(
p
-
1
)
4
+
12
A
2
′
(
p
m
-
3
)
(
p
m
-
4
)
(
p
-
1
)
2
+
24
A
4
′
)
=
∑
i
=
1
l
‍
i
4
A
i
-
6
∑
i
=
1
l
‍
i
3
A
i
+
11
∑
i
=
1
l
‍
i
2
A
i
-
6
∑
i
=
1
l
‍
i
A
i
=
(
p
-
1
)
4
p
2
m
-
4
×
(
n
1,0
+
n
-
1,0
+
p
4
(
n
1,2
+
n
-
1,2
)
+
p
8
(
n
1,4
+
n
-
1,4
)
)
+
(
p
-
1
)
5
p
3
(
m
-
1
)
a
+
p
4
(
m
-
1
)
(
p
-
1
)
4
(
p
3
m
-
4
p
2
m
-
16
p
m
+
19
)
-
6
(
(
p
-
1
)
3
p
2
(
m
-
1
)
a
+
p
3
(
m
-
1
)
(
p
-
1
)
3
(
p
3
m
-
p
2
m
+
1
-
4
p
m
+
6
)
)
+
11
(
(
p
-
1
)
2
p
m
-
2
a
+
p
2
(
m
-
1
)
(
p
-
1
)
2
(
p
3
m
-
2
p
2
m
+
1
)
)
-
6
(
(
p
-
1
)
(
p
m
-
1
)
p
3
m
-
1
)
,
and the second one of (40) is obtained after simplification.


## 3.5. Weight Distribution ofC

In this subsection, the parameters defined in (10) and (11) are calculated in Lemma 13, and the weight distribution of the cyclic code C is determined in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
1,2
+
n
-
1,2
)
+
p
8
(
n
1,4
+
n
-
1,4
)
=
b
.
Solving the above equation system, the result is obtained.Lemma 14.
Letp
=
3, q
=
p
m, where m
≥
6 is an even integer. The number of solutions of the equation system
(53)
x
2
+
y
2
+
z
2
+
w
2
+
u
2
+
v
2
=
0
,
x
p
+
1
+
y
p
+
1
+
z
p
+
1
+
w
p
+
1
+
u
p
+
1
+
v
p
+
1
=
0
,
x
p
2
+
1
+
y
p
2
+
1
+
z
p
2
+
1
+
w
p
2
+
1
+
u
p
2
+
1
+
v
p
2
+
1
=
0
,
is
(54)
n
1,0
+
n
-
1,0
+
p
6
(
n
1,2
+
n
-
1,2
)
+
p
12
(
n
1,4
+
n
-
1,4
)
-
p
3
(
n
1,1
+
n
-
1,1
)
-
p
9
(
n
1,3
+
n
-
1,3
)
+
p
3
m
.Proof.
The sixth moment of exponential sumS
(
α
,
β
,
γ
) satisfies
(55)
∑
α
,
β
,
γ
∈
F
q
‍
S
(
α
,
β
,
γ
)
6
=
p
3
m
(
n
1,0
+
n
-
1,0
)
+
p
3
(
m
+
2
)
(
n
1,2
+
n
-
1,2
)
+
p
3
(
m
+
4
)
(
n
1,4
+
n
-
1,4
)
-
p
3
(
m
+
1
)
(
n
1,1
+
n
-
1,1
)
-
p
3
(
m
+
3
)
(
n
1,3
+
n
-
1,3
)
+
p
6
m
=
M
6
·
p
3
m
,
where M
6 is the number of solutions of (53). Solving the above equation for M
6, the result is obtained.Equation (53) considers the case for 6 variables. Using the seventh moment of S
(
α
,
β
,
γ
), the number of solutions can be calculated when there are 7 variables and so forth.Theorem 15.
Letp
=
3, q
=
p
m, where m
≥
6 is an even integer. The cyclic code C with nonzeros π
-
2
,
π
-
(
p
+
1
) and π
-
(
p
2
+
1
) has seven nonzero weights:
(56)
A
p
m
-
1
(
p
-
1
)
=
2
(
n
1
+
n
3
)
,
A
p
m
-
1
(
p
-
1
)
-
(
(
p
-
1
)
/
p
)
p
m
/
2
=
n
1,0
,
A
p
m
-
1
(
p
-
1
)
+
(
(
p
-
1
)
/
p
)
p
m
/
2
=
n
-
1,0
,
A
p
m
-
1
(
p
-
1
)
-
(
(
p
-
1
)
/
p
)
p
(
m
+
2
)
/
2
=
n
1,2
,
A
p
m
-
1
(
p
-
1
)
+
(
(
p
-
1
)
/
p
)
p
(
m
+
2
)
/
2
=
n
-
1,2
,
A
p
m
-
1
(
p
-
1
)
-
(
(
p
-
1
)
/
p
)
p
(
m
+
4
)
/
2
=
n
1,4
,
A
p
m
-
1
(
p
-
1
)
+
(
(
p
-
1
)
/
p
)
p
(
m
+
4
)
/
2
=
n
-
1,4
,
where π is a primitive element of the finite field F
q.It is interesting to consider the symmetric property about the weights of the cyclic codeC. If there is a weight of the form p
m
-
1
(
p
-
1
)
+
(
(
p
-
1
)
/
p
)
p
(
m
+
2
i
)
/
2  (
i
=
0,1
,
2
), then there is a weight of the form p
m
-
1
(
p
-
1
)
-
(
(
p
-
1
)
/
p
)
p
(
m
+
2
i
)
/
2. It seems that the weights are symmetric about the value p
m
-
1
(
p
-
1
) which is also a weight of C. This phenomenon may be explained by the fact that, for symmetric matrices with corresponding quadratic residue Δ, there are symmetric matrices with corresponding nonresidue Δ
′ (Lemma 1). As the following example illustrates, in general the higher the value i the less the number of corresponding weights.Example 16.
Letp
=
3, q
=
p
m, where m
=
6. The cyclic code C has nonzeros π
-
2, π
-
(
p
+
1
), and π
-
(
p
2
+
1
), where π is a primitive element of the finite field F
q. Using Theorem 15, it has seven nonzero weights:
(57)
A
486
=
124245576
,
A
468
=
128432304
,
A
504
=
119277522
,
A
432
=
8591310
,
A
540
=
6866496
,
A
324
=
4732
,
A
648
=
2548
,
which are verified by using Matlab.


## 4. Conclusion

Since the weight distributions play an important role in the applications of cyclic codes, this paper focuses on the determination of those for a class of cyclic codes with three nonzeros. Relevant results received a lot of attention by using methods with lower moments of exponential sums. Here we try to apply higher moments to deal with the problem.



---

*Source: 686138-2014-07-09.xml*