I Introduction
The problem of obtaining the weight distribution of a given code is important because it plays a significant role in determining the capabilities of error detection and correction of such a code. For cyclic codes this problem is even more important because this kind of codes possess a rich algebraic structure (they are ideals in the principal ideal ring , where is the length of the cyclic codes). On the other hand, it is known that cyclic codes with few weights have a great practical importance in cryptography and coding theory since they are useful in the design of secret sharing schemes and association schemes (see [1, 2]). A characterization of a class of optimal threeweight cyclic codes of dimension 3, over any finite field , was presented in [11], and shortly thereafter, several classes of cyclic codes with either optimal three weights or a few weights were given in [5], showing that one of these classes can be constructed as a generalization of the sufficient numerical conditions of the characterization given in [11].
In this paper we use a particular kind of oneweight and semiprimitive twoweight irreducible cyclic codes of dimension to construct a new class of optimal threeweight cyclic codes of length and dimension 3, over any finite field , whose nonzero weights correspond to the three largest possible weights, that is , , and . The codes in this class are optimal in the sense that their lengths reach the Griesmer lower bound for linear codes. Furthermore, without the need of any exponential sum, we explicitly determine the weight distribution for the cyclic codes in this class. With the knowledge of this weight distribution, we then study the corresponding dual codes showing that, except for a single case, all of them have minimum Hamming distance . In consequence, since the length, dimension and minimum Hamming distance of the dual codes are , , and 4, respectively, we conclude that these codes are also optimal. As an application of the Krawtchouck polynomials, we obtain the weight distribution of the dual codes, in which it is clear that all of them are weight cyclic codes for . Therefore, in addition to our new class of optimal cyclic codes, this last result gives access to an infinite family of optimal weight cyclic codes of length , and dimension , whose minimum Hamming distance is .
This work is organized as follows: In Section II we establish some notation, recall some definitions and already known results related to the weight distributions of oneweight and semiprimitive twoweight irreducible cyclic codes of dimension . In addition, we also recall the Griesmer lower bound for linear codes, the five first identities of Pless, and the definition for the Krawtchouck polynomials. In Section III some preliminary results are presented. Particularly, a description of the nature of the codewords in either a oneweight or a semiprimitive twoweight irreducible cyclic code of dimension . This description is then used in Section IV to present a new class of optimal threeweight cyclic codes of dimension 3 over any finite field, showing that their dual codes are also optimal. Examples of optimal threeweight cyclic codes belonging to this new class, along with their corresponding dual codes, are presented at the end of this section. Finally, Section V is devoted to conclusions.
Ii Definitions, notation and some known results
Unless otherwise specified, throughout this work we are going to use the following:
Notation. By using and , we will denote positive integers such that is the power of a prime number. For integers and , with , will denote the multiplicative order of modulo . “” will denote the trace mapping from to . By using , we will denote a fixed primitive element of , and for any integer , the polynomial will denote the minimal polynomial of (see, for example, [7, p. 99]). In addition, will denote the irreducible cyclic code of length , whose paritycheck polynomial is . Note that is an linear code, where its dimension is a divisor of . Note also that is not several repetitions of an irreducible cyclic code of smaller block length.
Let be a linear code of length over . Then, the dual code, , of is the linear code defined by
where
is a scalar product in the vector space
. It is known that if is an linear code, then its dual code, , is an linear code. For , and will denote the number of codewords of weight in and in , respectively.An weight code is a code such that the cardinality of the set of nonzero weights is . That is, .
An alternative definition for an irreducible cyclic code is as follows:
Definition 1
[9, Definition 2.2] Let be a positive divisor of . Then, an irreducible cyclic code, , of length and dimension , over , is the set
where
Remark 1
Note that, thanks to Delsarte’s Theorem (see, for example, [3]), the paritycheck polynomial of the irreducible cyclic code under the previous definition is .
Now, for the particular case of , let and be divisors of and assume that and . Note that under these circumstances, is a primitive element of , , and . With this in mind, we present the following:
Definition 2
Let and be as before, and let . Then, a reducible cyclic code of length and dimension , , over , is given by the set:
where
When constructing a code, from an economical point of view, it is desirable to obtain an code over whose length is minimal for given values of , and . A lower bound for the length in terms of these values is as follows. Let be the minimum length for which an linear code, over , exists. If the values of , and are given, then a wellknown lower bound (see [4] and [10]) for is:
Theorem 1
(Griesmer bound) With the previous notation,
where denotes the smallest integer greater than or equal to .
Let be a linear code of length and dimension over . With our notation, fix , and suppose that the weight of the dual of is at least 2 (that is, ). Then, the five first identities of Pless (see either [6, pp. 259260] or [8] for the general result), for , are:
(1)  
When the weight distribution of a linear code is known, it is possible to obtain the weight distribution of its corresponding dual code using the Krawtchouck polynomials. Through the following, we recall such an important mathematical tool (see, for example, [6, pp. 256]).
Definition 3
Let , , and be positive integers such that is a prime power. Then, we define the Krawtchouck polynomial, , of degree to be
Let and be as before. Then, for a given linear code of length , the weight distribution of its dual code can be obtained by means of
(2) 
It was shown in [12] that all irreducible cyclic codes of dimension or are either oneweight or semiprimitive twoweight irreducible cyclic codes. Since such a result is important for this work, we recall it by means of the following:
Theorem 2
Let be a positive divisor of . Fix . In accordance with Definition 1, let be the irreducible cyclic code of length over . Thus, we have the following assertions.

If , then is either a oneweight or a semiprimitive twoweight irreducible cyclic code of dimension , whose weight enumerator polynomial is

If , then is an oneweight code, whose nonzero weight is (which is equivalent to a repetition code of length ).
Iii Some preliminary results
In this section, and for the rest of the paper, we will assume that is a fixed primitive element of .
The following two definitions will be important in order to achieve our goals.
Definition 4
Let be a vector of length over . We define the set of symbols of , , as the subset of symbols of appearing as entries in the vector . That is:
Definition 5
Let , and let be a vector of length over . We define the number of occurrences of the symbol in , , as the number of times that appears as an entry in the vector . That is:
Remark 2
Note that . In fact, clearly, iff .
The following is an easy result whose proof is given here in order to make this paper as selfcontained as possible.
Proposition 1
First note that . Thus, if is odd, then
but,
On the other hand, if is even, then
Remark 3
Note that in the case when and , in Definition 2, the codewords , in the reducible cyclic code , are of the form:
In fact, in this case, it is important to keep in mind that is a reducible cyclic code of length and dimension . In addition, observe that the reducible cyclic code is the sum, as vector spaces, of the irreducible cyclic codes and . Lastly, note that, owing to Part (b) of Theorem 2, is a oneweight irreducible cyclic code, while, owing to Part (a) of the same theorem, is either a oneweight or a semiprimitive twoweight irreducible cyclic code of length and dimension .
The following result is key to identify the number of occurrences of a given symbol in a codeword that belongs to an irreducible cyclic code of the form (see Definition 1).
Proposition 2
Let , and be integers such that . Then, iff .
iff
But , for all integer . Therefore,
Since , . Therefore,
Now, note that the previous equality will hold iff iff .
In the light of Remark 3, we can now describe the nature of a codeword that belongs to an irreducible cyclic code of the form .
Proposition 3
Let , and let be the index of (that is, ). Let be an integer. Then, for the codeword , we have

If , then .

If , then .

For all , .

Let . Then,

Let , such that . Then, is odd iff .

Let , such that . If is even, then .
Parts (a) and (b): First, note that because , we have iff iff . Thus, if , then there is no integer such that , which in turn implies, due to Proposition 2, that there is no integer such that . Therefore, . On the contrary, if , then there exists a unique integer such that , and for such an integer we have . Therefore, in this case, .
Part (c): If , then, clearly, . On the other hand, if , then Parts (a) and (b) show that is either or .
Part (d): Suppose that is odd. Let be the unique integer such that , and observe that if , for integers and , then . That is, since , . Then, the result follows from the fact that for each there exists a unique integer such that .
On the contrary, if is even, then Parts (a) and (b), and Proposition 1, show that if , then iff . Thus, the result follows from the fact that it is impossible to find a codeword such that , and .
Parts (e) and (f): Note that iff . Thus, these results follow from Parts (a) and (b), and Proposition 1.
Remark 4
Note that the proof of the previous result ensures the existence of at least two codewords, and in , such that and , for some symbols and such that and .
Example 1
Let , and . Then, for example, and . Therefore, we have , for all , and for all .
Example 2
Let , where , and , , , , , , , and . By taking , we have, for example, and . Therefore, we have , while for all , and .
By means of the following two results we determine the nonzero weights in the reducible cyclic code , and also obtain the frequency of occurrence of one of these nonzero weights.
Proposition 4
Let be the allones vector of length . Then,
where stands for the usual Hamming weight function.
Case 1: is odd. Let , such that . Thus, owing to Part (e) of Proposition 3, . By considering Part (d) of such a proposition, the result now follows from the facts that and
Case 2: is even. In this case, Part (d) of Proposition 3 shows that
and the result follows now directly.
Proposition 5
With our notation, is a threeweight cyclic code of length and dimension , whose nonzero weights are , , and . In addition, if denotes the number of codewords of weight in , then .
By Definition 2, is a reducible cyclic code of length and dimension .
Case 1: is odd. In this case, . Therefore, owing to Part (a) of Theorem 2, is a semiprimitive twoweight irreducible cyclic code of length and dimension , whose weight enumerator polynomial is . That is, the two nonzero weights of are and . Since (see Remark 3), these two nonzero weights also belong to . Now, owing to Remark 4 and Part (e) of Proposition 3, there exist a codeword such that for some symbol . Thus, note that and . On the other hand, by means of Part (c) of Proposition 3, we can see that the only nonzero weights of are , , and . Lastly, Proposition 4 shows now that .
Case 2: is even. In this case, . Therefore, owing to Part (a) of Theorem 2, is a oneweight irreducible cyclic code of length and dimension , whose nonzero weight is . This means that the weight appears in , times. Now, since (see Remark 3), and are two nonzero weights in . But, Remark 4 and Part (f) of Proposition 3, show that there exist a codeword such that , for some symbol . Therefore, note that and . On the other hand, Part (c) of Proposition 3 shows that the only nonzero weights of are , , and . Lastly, owing to Proposition 4, .
Iv Optimal threeweight cyclic codes of dimension 3 and their duals
We are now able to present our main results.
Theorem 3
With our notation, is an optimal threeweight cyclic code of length and dimension , whose nonzero weights are , , and . In addition, the weight enumerator polynomial of is
By Proposition 5, is a threeweight cyclic code of length and dimension , whose nonzero weights are , , and .
The dimension, , and minimum distance, , of are and , respectively. Therefore, a direct application of Theorem 1 shows that
Consequently, is an optimal linear code in the sense that its length, , reaches the lower bound in such a theorem.
It is well known that the minimum Hamming distance of the dual of any nonzero cyclic code is greater than 1 (see, for example, [13, Section V]). On the other hand, Proposition 5 tells us that . Thus, by using the first two identities in (II), we obtain the following two linear equations:
Comments
There are no comments yet.