THE WEIGHT DISTRIBUTION OF FAMILIES OF REDUCIBLE CYCLIC CODES THROUGH THE WEIGHT DISTRIBUTION OF SOME IRREDUCIBLE CYCLIC CODES

. The calculation of the weight distribution for some reducible cyclic codes can be reduced down to the corresponding one of a particular kind of ir- reducible cyclic codes. This reduction is achieved by means of a known identity (see [3, Theorem 1.1]). In fact, as will be shown here, the weight distribution of some families of reducible cyclic codes, recently reported in several works ([2, 5, 7, 11, 12]), and that of others not previously reported, can be obtained almost directly by means of this identity.


Introduction
A cyclic code C is reducible if its parity check polynomial h(x) is at least the product of two irreducible polynomials. Moreover, since cyclic codes are linear, the cyclic code C is the direct sum (as vector spaces) of the irreducible cyclic codes in which their parity check polynomials are the irreducible factors of h(x). Hence, determining the weight distribution (WD, for brevity) of a reducible cyclic code (RCC) is generally more difficult than determining the WD of an irreducible cyclic code (ICC). This work aims to show that the problem of determining the WD of some families of RCCs, recently reported in [2,5,7,11,12], can be reduced in terms of the WD of some already-studied ICCs, with well-known WDs. In fact, as will be shown later, this reduction can be generalized to a specific family of RCCs, whose WD can always be obtained in terms of the WD of a particular kind of ICC. Furthermore, using this generalization the WD of other RCCs not previously reported is also easily obtained.
In order to give a detailed picture of the above, we need to establish some notation and terminology. Consider the positive integers p, t, q and k with p prime and q = p t . Let v and w be integers, such that gcd(v, w) = 1. Then, the smallest positive integer i, such that w i ≡ 1 (mod v), is called the multiplicative order of w modulo v, and is denoted by ord v (w). γ will denote a fixed primitive element of F q k , and for any integer a, the polynomial h a (x) ∈ F q [x] will denote the minimal polynomial of γ −a . In addition, C (a) will denote the ICC whose parity check polynomial is h a (x). Note that C (a) is an [n, l] linear code, where n = q k −1 gcd(q k −1,a) , l = deg(h a (x)), and note that l must be a divisor of k. For integers a and e, such that e > 1 and e | q k − 1, m (a,e) (x) ∈ F q [x] will denote the least common multiple of the e polynomials h a (x), h a+ q k −1 e (x), . . ., h a+ q k −1 e (e−1) (x). M(a, e) denotes the cyclic code whose parity check polynomial is m (a,e) (x). Since the order of m (a,e) (x) is the least common multiple of the order of its irreducible factors (see [4,Theorem 3.9]), note that the order of m (a,e) (x) divides e(q k − 1)/ gcd(q k − 1, ae). Therefore, M(a, e) is a linear code of length e(q k − 1)/ gcd(q k − 1, ae) and dimension deg(m (a,e) (x)).
In this work we use a known identity among the weight enumerator polynomial of certain cyclic codes ([3, Theorem 1.1]), to show that the problem of determining the WD of the cyclic code M(a, e) can always be reduced to the problem of determining the WD of C (ae) (that is, the ICC whose parity check polynomial is h ae (x)). Unfortunately, this reduction is not a solution to the underlying problem (the WD of M(a, e)) because, in general, it is still a very hard problem to obtain the WD of an ICC ( [1]), nevertheless these distributions are well known for some families ( [8]). More specifically, it is known that the code C (ae) corresponds to either a one-weight ICC or a semiprimitive two-weight ICC if and only if N = 1 or 2, or N > 2, f is even and p f /2 ≡ −1 (mod N ), where N = gcd( q k −1 q−1 , ae) and f = ord N (p). The WD of these two kinds of ICCs is also well known; therefore, this knowledge will allow us to not only determine the WD of some hitherto not studied families of cyclic codes with a number of zeros, but will also allow us to almost directly obtain the WD of some RCCs of the form M(a, e), that have been recently studied. For example, Cases 1, 2 and 4 of the Concluding Remarks in [2, p. 8005], all cases studied in [5,7], Case 1 of the Conclusion in [11, p. 5992] (except when N = 3), and the family of codes studied in [12], can be solved directly through the WD of either a one-weight ICC or a semiprimitive two-weight ICC (for the analysis of these cases, note that gcd( q k −1 q−1 , ae) = gcd(k, ae) if ae|(q − 1)). Now, note that an imposed restriction regarding the aforementioned cases is that the parity check polynomial m (a,e) (x), of M(a, e), must be the product of irreducible polynomials of the same degree k (see, for example, Main Assumptions in [11, p. 5985]). A further purpose of this work is to get rid of this restriction by showing that, in spite of m (a,e) (x), it is always possible to obtain the WD of M(a, e) in terms of the WD of C (ae) .
Recently [9,Theorem 4], it was shown that it is possible to use the WD of some ICCs in order to obtain the WD of some RCCs whose parity check polynomials have the form h q y +1 , where y and σ are integers, such that y > 0, σ ≥ 0, and h q y +1 2 p σ (x), h q y +1 2 p σ + q k −1 2 (x) are two different irreducible polynomials of the same degree k. That is, in that work, the WD of a kind of RCCs of the form M(a, e) was obtained when e = 2, and when their parity check polynomials, m (a,e) (x), were given as a product of two irreducible polynomials of the same degree. Therefore, the present work can be considered as a generalization of [9], in that it extends the study of the family of RCCs of the form M(a, e), even in the case when their parity check polynomials, m (a,e) (x), are given as product of two or more irreducible polynomials (e ≥ 2 ) that do not necessarily have the same degree.

Definitions and known results
Along with the notation and terminology introduced previously, we now present some definitions and recall some already known results.
A subset C of vectors or words in F n q is called an [n, l] linear code over F q if C is an l−dimensional subspace of F n q : n is called the length and l is called the dimension of C. In this context, the elements of C are called code words. Let A i be the number of code words with Hamming weight i in C (recall that the Hamming weight of a word c is the number of nonzero coordinates in c, [6, p. 8]). Then, the sequence A 0 , A 1 , . . ., A n is called the weight distribution of C, and the polynomial A 0 + A 1 z + . . . + A n z n is called the weight enumerator polynomial of C.
The WD of a code is important because it contains information that determines the capability of error detection and correction of the code.
An M -weight code is a code such that the cardinality of the set of nonzero weights is M . That is, M = |{i : Cyclic codes have wide applications in storage and communication systems because, unlike encoding and decoding algorithms for linear codes, encoding/decoding algorithms for cyclic codes can be implemented easily and efficiently by employing shift registers with feedback connections ([6, p. 209]).
By identifying any vector (c 0 , , it follows that any linear code C of length n over F q corresponds to a subset of the residue class ring F q [x]/ x n − 1 . Moreover, it is well known that the linear code C is cyclic if and only if the corresponding subset is an ideal of F q [x]/ x n − 1 (see, for example, Theorem 9.36 in [4]). Now, note that every ideal of F q [x]/ x n − 1 is principal. In consequence, if C is a cyclic code of length n over F q , then C = g(x) , where g(x) is a monic polynomial, such that g(x) | (x n − 1). This polynomial is unique, and it is called the generator polynomial of C ([6, Theorem 1, p. 190]). On the other hand, the polynomial h(x) = (x n − 1)/g(x) is referred to as the parity check polynomial of C. In this context, if l is the dimension of C, then l = deg(h(x)) = n − deg(g(x)).
As usual in cyclic codes, we always assume that the length n of any cyclic code is relatively prime to q. Thus, x n − 1 has no repeated factors ( [6, p. 196]). Therefore, since h(x)|(x n − 1), we must keep in mind that the parity check polynomial of any cyclic code has no repeated factors.
A cyclic code over F q is called irreducible (reducible) if its parity check polynomial is irreducible (reducible) over F q .
Let v and w be integers, such that gcd(v, w) = 1. We say that w is semiprimitive modulo v, if there exists a positive integer j, such that w j ≡ −1 (mod v).
According to Definition 6 in [8], As already stated, one of the goals of this work is to determine the WD of the cyclic code M(a, e) using the WD of the ICC C (ae) . For this reason, it is important to explicitly know the WD of some ICCs. Fortunately, there exist characterizations that allow us to determine WDs for one-weight ICCs and for semiprimitive twoweight ICCs. We now recall them: Theorem 2). Let a be any integer. Also let ∆, n and u be integers, such that ∆ = (q k − 1)/(q − 1), n = (q k − 1)/ gcd(q k − 1, a) and u = gcd(∆, a). Assume that deg(h a (x)) = k. Then, h a (x) is the parity check polynomial of an [n, k] one-weight ICC over F q , whose nonzero weight is n ∆ q k−1 , if and only if u = 1.
Theorem 2.2 ([8], Theorem 7). Consider the same notation and assumption as in Theorem 2.1. Define f = ord u (p), and s = kt/f . Then, h a (x) is the parity check polynomial of a semiprimitive two-weight ICC C if and only if u = 2 or u > 2, f is even, and p f /2 ≡ −1 (mod u). In addition, if C is a semiprimitive two-weight ICC, then C is an [n, k] cyclic code over F q whose weight enumerator polynomial is The following is a known identity among the weight enumerator polynomials of some cyclic codes (see [3,Theorem 1.1] or [9, Theorem 3]). Theorem 2.3. For some integers n and l, let C be an [n, l] cyclic code over F q with parity check polynomial h(x), and whose weight enumerator polynomial is A(z). Let also e be any positive integer such that gcd(q, e) = 1. Then, h(x e ) is the parity check polynomial of an [en, el] cyclic code whose weight enumerator polynomial is A(z) e .

Preliminary results
The following preliminary result, which is essential for this work, shows that the parity check polynomial m (a,e) (x), of the cyclic code M(a, e), is nothing else than the polynomial h ae (x e ), where h ae (x) is the minimal polynomial of γ −ae and also the parity check polynomial of the ICC C (ae) .
Thus, since the parity check polynomial of the code M(a, e) is equal to h ae (x e ), we are now able to apply Theorem 2.3 to obtain the weight enumerator polynomial of the cyclic code M(a, e) using the weight enumerator polynomial of the ICC C (ae) of length n = (q k − 1)/ gcd(q k − 1, ae) and dimension l = deg(h ae (x)). We present this by means of the following: Theorem 3.2. Consider the same hypotheses as in the previous lemma. Also, let l and n be integers, such that n = (q k − 1)/ gcd(q k − 1, ae) and l = deg(h ae (x)). Assume that A(z) is the weight enumerator polynomial of the ICC C (ae) . Then M(a, e) is an [en, el] cyclic code with weight enumerator polynomial A(z) e .
Proof. According to Lemma 3.1, we have that m (a,e) (x) = h ae (x e ), thus, by Theorem 2.3, and since gcd(q, e) = 1, M(a, e) is an [en, el] cyclic code with weight enumerator polynomial A(z) e .
As mentioned earlier, by imposing the condition that the irreducible factors of m (a,e) (x) must be of the same degree k, several authors studied the WD of the family of cyclic codes of the form M(a, e). In consequence, a criterion was needed to decide when such condition was satisfied. The following result, established in [11], gives the sufficient numerical condition in order that the parity check polynomial m (a,e) (x), of the code M(a, e), is the product of exactly e irreducible polynomials of degree k. . Let a and e be integers, such that e > 1 and e | (q k − 1). Also let a 0 , a 1 , . . ., a e−1 be integers, such that a i = a + q k −1 e i, 0 ≤ i < e. If gcd( q k −1 q−1 , ae) ≤ q k/2 , then deg(h ai (x)) = k, and h ai (x) = h aj (x) for any 0 ≤ i = j < e.
Just by looking at the degree of the polynomial h ae (x), it is possible to provide a more accurate result than the previous one. More specifically, our next preliminary result gives simple necessary and sufficient numerical conditions in order to see that m (a,e) (x) is the product of e irreducible polynomials of degree k over F q . Conversely, suppose that deg(h ae (x)) = k. For some integer 0 ≤ i < e, let h a+ q k −1 e i (x) be an irreducible factor of m (a,e) (x). The degree of h a+ q k −1 e i (x) is the smallest positive integer l, such that l|k, and (a+ q k −1 e i)q l ≡ a+ q k −1 e i (mod q k −1). Consequently, aeq l ≡ ae (mod q k − 1), and since deg(h ae (x)) = k, we have that k|l. Thus, l = deg(h ae (x)) = k. Therefore, deg(h a+ q k −1 e i (x)) = k. But deg(m (a,e) (x) = h ae (x e )) = ek, and since m (a,e) (x) has not repeated factors, m (a,e) (x) is the product of e irreducible polynomials of degree k.
Since deg(h ae (x)) = l iff l is the smallest positive integer, such that aeq l ≡ ae (mod q k − 1), it is important to note that it is not necessary to explicitly construct the polynomial m (a,e) (x) in order to know the degree of h ae (x).

The weight distribution of an infinite family of cyclic codes of the form M(a, e)
Since the WDs of several ICCs are completely determined through Theorems 2.1 and 2.2, we can now use these distributions and Theorem 3.2 in order to obtain the WD of an infinite family of cyclic codes of the form M(a, e). We state this by means of the following: Theorem 4.1. Let a, e, l and n be integers, such that e > 1, e | (q k − 1) and n = (q k − 1)/ gcd(q k − 1, ae). Assume that deg(h ae (x)) = l, and consider N = gcd( q k −1 q−1 , ae)/( q k −1 q l −1 ), f = ord N (p), and s = lt/f . Thus: Proof. First, we are going to determine the WD of the code C (ae) . Clearly, C (ae) is an [n, l] ICC. Since l divides k, γ −ae ∈ F * q l = γ (q k −1)/(q l −1) , therefore ae = b q k −1 q l −1 for some integer b. Let u = gcd( q l −1 q−1 , b), and note that N = u. Thus, thanks to Theorems 2.1 and 2.2, the weight enumerator polynomial of C (ae) is if N = 2 or N > 2, f is even, and p f /2 ≡ −1 (mod N ). Lastly, the remaining part of the proof follows now directly from Theorem 3.2.

Some applications of Theorem 4.1
A common way of dealing with the WD problem of the family of codes of the form M(a, e) has been through a subdivision of such family, which is done by means of the possible values of the integer N = gcd( q k −1 q−1 , ae) (see, for example, Concluding Remarks and Conclusion in [2] and [11], respectively, and recall that gcd( q k −1 q−1 , ae) = gcd(k, ae) if ae|(q−1)). However, in view of Theorem 4.1 and its proof, it has become apparent why such subdivision is made in terms of the integer N . That is, note that the integer N = N/( q k −1 q l −1 ), in Theorem 4.1, determines whether the code C (ae) , of dimension l, is a one-weight or a semiprimitive two-weight ICC, or none of them. In order to appreciate this, consider the following family of codes of the form M(a, e), that has been recently studied. Theorem 7). Suppose that p is odd, and t is even. Let h be a positive even divisor of q − 1, e = 2. Define N 1 = gcd(k, (q − 1)e/h). Assume there exists a positive integer j such that p j ≡ −1 (mod N 1 ), and the j is the least such. Let q k = p 2jα , where α = kt/2j. Let C be a cyclic code with parity check polynomial . Assume that 2(q − 1)/hN 1 is odd and N 1 > 2.
(a) If α, p, and (p j + 1)/N 1 are all odd, C is an [ h(q k −1) q−1 , 2k] cyclic code over F q with the WD in Table 1, provided that N 1 < q k/2 + 1.
(b) In all other cases, C is an [ h(q k −1) q−1 , 2k] cyclic code over F q with the WD in Table 2, provided that N 1 < q k/2 + 1.

Remark 1.
There is a misprint in Table II, mentioned in Theorem 7 of [2]; the frequencies in the fourth and fifth rows are interchanged.
By using Theorem 4.1, we present a simple proof of the previous theorem. Table 1. Table 2.
It is quite important to note that, by using our proof, it was not necessary to assume that 2(q − 1)/hN 1 is odd, and this is because the case when 2(q − 1)/hN 1 is even is addressed by Theorem 8 in [2], and both Theorems 7 and 8 describe RCCs whose WD is given by (1) (in fact, taking γ = α, note that Tables III and IV in [2] are exactly the same as Tables 1 and 2, respectively).
The following family of codes has been also studied recently. . Let a, e and δ be integers such that e ≥ 2, e | (q k −1), and δ = gcd(q k −1, a, a+ q k −1 e , . . . , a+ q k −1 e (e−1)). If gcd( q k −1 q−1 , ae) = 1 and the e polynomials h a (x), h a+ q k −1 e (x), . . ., h a+ q k −1 e (e−1) (x) have degree k and are pairwise relatively prime polynomials, then the cyclic code C, whose parity check polynomial is The WD of C is listed in Table 3.
Again, we use Theorem 4.1 in order to present a simpler proof.
In a very similar way, it is possible to use Theorem 4.1 in order to almost directly obtain the WDs for the codes of the form M(a, e), studied in Cases 1), 2) and 4) of the Concluding Remarks in [2, p. 8005], all the cases studied in [5,7], Case 1) of the Conclusion in [11, p. 5992] (except when N = 3), and the family of codes studied in [12]. Now, it is important to note that an imposed restriction about the aforementioned cases is that the parity check polynomial m (a,e) (x), of M(a, e), must be the product of irreducible polynomials of the same degree k (see, for example, Main Assumptions in [11, p. 5985]). However, Theorems 3.2 and 4.1 reveal that we can get rid of this restriction in the sense that, in spite of m (a,e) (x), it is always possible to obtain the WD of M(a, e) in terms of the WD of the ICC C (ae) . Particularly, if C (ae) is either a one-weight ICC or a semiprimitive two-weight ICC, then the WD of M(a, e) is determined via Theorem 4.1. In order to show this, consider the following: Example 1. Let p = q = 3, k = 6, a = 26, and e = 7. Note that l = 2 is the smallest positive integer such that aeq l ≡ ae (mod q k − 1), therefore, deg(h ae (x)) = 2, n = (q k − 1)/ gcd(q k − 1, ae) = 4, and N = gcd( q k −1 q−1 , ae)/( q k −1 q l −1 ) = 2. Thus, due to Part (b) of Theorem 4.1, M(a, e) is a [28, 14] cyclic code, whose weight enumerator polynomial is (1+4z 2 +4z 4 ) 7 . However, due to Lemma 3.4, the polynomial m (a,e) (x) is not the product of 7 irreducible polynomials of degree 6. In fact, if F 3 6 = F 3 (γ), γ 6 + γ + 2 = 0, then m (a,e) (x) = h 26 (x)h 130 (x)h 546 (x) = (x 6 + x 5 + x 3 + x + 1)(x 6 + 2x 5 + 2x 3 + 2x + 1)(x 2 + 1) = ((x 7 ) 2 + 1) = h ae (x e ), with h 234 (x) = h 650 (x) = h 26 (x), and h 338 (x) = h 442 (x) = h 130 (x).

Conclusions
In this work, we have seen that the problem of determining the WD of the codes of the form M(a, e) can always be reduced to the problem of determining the WD of the ICC C (ae) (Theorem 3.2). We have also shown that it is possible to obtain, almost directly, the WD of all cyclic codes of the form M(a, e), when C (ae) is either a one-weight ICC, or a semiprimitive two-weight ICC (see Theorem 4.1). We also proved that, in spite of the degree of the irreducible factors of m (a,e) (x), it is always possible to obtain the WD of M(a, e) in terms of the WD of the ICC C (ae) .
Finally, we want to emphasize that most of the recent works that study the family of codes of the form M(a, e) resort to sophisticated techniques and tools (such as exponential sums, Gaussian periods, cyclotomic numbers, etc.), in order to obtain the possible WDs. In clear contrast, this work shows that, for such purpose, only two characterizations for some ICCs (Theorems 2.1 and 2.2) and an already known identity among the WD of some cyclic codes (Theorem 2.3) are needed.