Research Article | Open Access
Xiaogang Liu, Yuan Luo, "The Weight Distributions of a Class of Cyclic Codes with Three Nonzeros over 𝔽3", Journal of Applied Mathematics, vol. 2014, Article ID 686138, 11 pages, 2014. https://doi.org/10.1155/2014/686138
The Weight Distributions of a Class of Cyclic Codes with Three Nonzeros over 𝔽3
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.
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  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.
Let be a prime. A linear code is a -dimensional subspace of with minimum (Hamming) distance . An linear code over is called cyclic if implies that where . By identifying the vector with any linear code of length over represents a subset of 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 of minimum degree in this subset is the generating polynomial of , and it is a factor of . When the ideal does not contain any smaller nonzero ideal, the corresponding cyclic code is called a minimal or an irreducible code. For any , the weight of is .
The weight enumerator of a code is defined by where denotes the number of codewords with Hamming weight . The sequence is called the weight distribution of the code, which is an important parameter of a linear block code.
Assume that and for an even integer . Let be a primitive element of . 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 with nonzeros , , and , and they are verified by using Matlab. Note that the length of the cyclic code is . Final conclusion is in Section 4. This paper is the counterpart of our other result in .
In this section, relevant knowledge from finite fields  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.
Let be an odd prime and let be a positive integer and is a primitive element of . Assume that the cyclic code over has length and nonconjugate nonzeros , where . Then the codewords in can be expressed by where and is the trace mapping from to . Therefore the Hamming weight of the codeword is where ( is imaginary unit), , , and .
For general functions of the form where , there are quadratic forms and corresponding symmetric matrices satisfying that . It is known that there exists such that where and . Let (set for ).
Lemma 1 (Lemma 1, ). (i) For the quadratic form ,
(ii) For , if has solution , then
Here denotes the Legendre symbol.
The cyclotomic coset containing is defined to be where is the smallest positive integer such that . Reference [26, Lemma 10] is about the size of cyclotomic coset; also refer to  for the binary case.
For with corresponding quadratic form , where . Reference [19, Corollary 1] is about its rank for a special case.
Note that in Section 3, 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 code with nonzeros and for the case is even; here . For this, the first five moments of exponential sum 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 of
Corresponding to Lemma 1 and [19, Corollary 1], we introduce the following notations for convenience. Let where and . Denote . Let for , where is the imaginary unit. By [19, Lemma 3], set for , since is odd. Using those, Lemma 2 can be restated in Lemma 3 when is even.
Proof. Substituting the symbols of (10) and (11) to Lemma 2
where the first one comes from the fact that there are elements in the set . Also, note that when .
Using for , the result is obtained by simplification.
3.2. The Fourth Moment of
For the fourth moment of in the particular case of , there is the following result about the number of solutions of the equation system: in Lemma 4, which is denoted by .
Lemma 4 (see ). Let and . Then
Lemma 5. Let and . The number of solutions of the following equation system is .
Lemma 6. Let and . Then
Corollary 7. Let and , where is an even integer. Then
3.3. The Fifth Moment of
For the fifth moment of , we need Magma  to find the number of solutions of the following equation system: which is denoted by .
The irreducible components corresponding to the projective variety defined by (19) are listed in Table 1 using Magma . Every block of Table 1 contains a system of three equations (“” 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 .
Lemma 8. Let and . Then
Proof. The number of nonzero solutions of is , where , and the number of nonzero elements in
is . From Lemma 5, the number of nonzero solutions of (16) is .
For the solutions of equation system (19), Table 1 shows that at least one of the elements 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 is .(ii)If two variables are zero, the number of such solutions is . Altogether, the number of solutions of equation system (19) is
Applying Lemma 8, the result about the fifth moment of exponential sum is obtained.
Lemma 9. Let and . Then
Corollary 10. Let and , where is an even integer. Then
3.4. MacWilliams’ Identities
MacWilliams’ theorem is for the Hamming weight enumerators of linear codes over finite field  (we consider prime field ). 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.
Let be the number of codewords of weight in a code with length and dimension , where . Let be the corresponding number in the dual code . Then where . Setting , (25) changes to Differentiating (26) with respect to , Setting , the first MacWilliams’ moment identity is obtained for Differentiating again, Substituting , the second MacWilliams’ moment identity is obtained: Differentiating for the third and fourth time, if , the fourth MacWilliams’ moment identity is
Lemma 11. Let , . Let denote the cyclic code with nonzeros , , and ; the weights of the dual code satisfy the following:
Proof. Below, codewords are considered in the dual code. It is easy to see that and . For the codewords with weight two, if the components at the two positions have the same value, we find that . Let us consider the following equation system about the positions:
which should be satisfied by the coordinates of the codewords. For any , is the other corresponding coordinate. That is, .
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: From the first two equations of (34), we find that contradicting the fact that should be different.(ii)If one value is different from the other two, consider Solving the above system, we have contradicting the fact that the coordinates should be different from .Combing the above two cases, .
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 . For a solution of (16), if two of them are equal, for example, , then (16) becomes Solving the above system, it can be found that or is zero, so the number of nonzero solutions of (36) is . Then all those nonzero solutions of (16) correspond to the codewords, where solutions correspond to a four-tuple and each tuple corresponds to two codewords. Therefore, there are codewords.
Case II. One value at the four nonzero positions is different from the other three values. Consider the solutions of the following system: Using Mamga , 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 is zero, so the solutions can not correspond to codewords.
Case III. Two values at the coordinates are the same. Let us consider Again the irreducible components are presented in Table 3, by which only the cases , , and , are the possible solutions which can correspond to codewords since coordinates should be different. The number of such solutions is which corresponds to codewords, since every four-tuple corresponds to solutions of (38). In fact, if is a weight-four codeword with nonzero positions and values , then , , and can all represent weight-four codewords.
Combing the above three cases, The result of the lemma is obtained.
Proof. Define the following notations for simplification: The use of MacWilliams’ identities in the following paragraphs implies the condition ; refer to [26, Lemma 10]. By (4) and [26, Lemma 9], has seven possible nonzero weights: With the above notations, the first four moments of codeword weights can be computed: