Abstract
In this article, we show explicitly all possible weight enumerators for every irreducible cyclic code of length \(n\) over a finite field \({\mathbb {F}}_q\), in the case which each prime divisor of \(n\) is also a divisor of \(q-1\).
Similar content being viewed by others
Avoid common mistakes on your manuscript.
1 Introduction
A code of length \(n\) and dimension \(k\) over a finite field \({\mathbb {F}}_q\) is a linear \(k\)-dimensional subspace of \({\mathbb {F}}_q^n\). A \([n,k]_q\)-code \(\mathcal C\) is called cyclic if it is invariant by the shift permutation, i.e., if \((a_1,a_2,\dots ,a_n)\in \mathcal C\) then the shift \((a_n,a_1,\ldots ,a_{n-1})\) is also in \(\mathcal C\). The cyclic code \(\mathcal C\) can be viewed as an ideal in the group algebra \({\mathbb {F}}_qC_n\), where \(C_n\) is the cyclic group of order \(n\). We note that \({\mathbb {F}}_qC_n\) is isomorphic to \(\mathcal R_n=\frac{{\mathbb {F}}_q[x]}{\langle x^n-1\rangle }\) and since subspaces of \(\mathcal R_n\) are ideals and \(\mathcal R_n\) is a principal ideal domain, it follows that each ideal is generated by a polynomial \(g(x)\in {\mathcal {R}}_n\), where \(g\) is a divisor of \(x^n-1\).
Codes generated by a polynomial of the form \(\frac{x^n-1}{g(x)}\), where \(g\) is an irreducible factor of \(x^n-1\), are called minimal cyclic codes. Thus, each minimal cyclic code is associated of natural form with an irreducible factor of \(x^n-1\) in \({\mathbb {F}}_q[x]\). An example of minimal cyclic code is the Golay code that was used on the Mariner Jupiter-Saturn Mission (see [7]), the BCH code used in communication systems like VOIP telephones and Reed–Solomon code used in two-dimensional bar codes and storage systems like compact disc players, DVDs, disk drives, etc (see [5, Sects. 5.8 and 5.9]). The advantage of the cyclic codes, with respect to other linear codes, is that they have efficient encoding and decoding algorithms (see [5, Sect. 3.7]).
For each element of \(g\in {\mathcal {R}}_n\), \(\omega (g)\) is defined as the number of non-zero coefficients of \(g\) and is called the Hamming weight of the word \(g\). Denote by \(A_j\) the number of codewords with weight \(i\) and by \(d=\min \{i>0| A_i\ne 0\}\) the minimum distance of the code. A \([n,k]_q\)-code with minimum distance \(d\) will be denoted by \([n,k,d]_q\)-code. The sequence \(\{A_i\}_{i=0}^n\) is called the weight distribution of the code and \(A(z):=\sum _{i=0}^n A_iz^i\) is its weight enumerator. The importance of the weight distribution is that it allows us to measure the probability of non-detecting an error of the code: For instance, the probability of undetecting an error in a binary symmetric channel is \(\sum \limits _{i=0}^n A_i p^i(1-p)^{n-i}\), where \(p\) is the probability that, when the transmitter sends a binary symbol (\(0\) or \(1\)), the receptor gets the wrong symbol.
The weight distribution of irreducible cyclic codes has been determined for a small number of special cases. For a survey about this subject see [3, 4] and their references.
In this article, we show all the possible weight distributions of length \(n\) over a finite field \({\mathbb {F}}_q\) in the case that every prime divisor of \(n\) divides \(q-1\).
2 Preliminaries
Throughout this article, \({\mathbb {F}}_q\) denotes a finite field of order \(q\), where \(q\) is a power of a prime, \(n\) is a positive integer such that \(\text{ gcd }(n,q)=1\), \(\theta \) is a generator of the cyclic group \({\mathbb {F}}_q^*\) and \(\alpha \) is a generator of the cyclic group \({\mathbb {F}}_{q^2}^*\) such that \(\alpha ^{q+1}=\theta \). For each \(a\in {\mathbb {F}}_q^*\), \(\mathop {\mathrm{ord}}\nolimits _q a\) denotes the minimal positive integer \(k\) such that \(a^k=1\), for each prime \(p\) and each integer \(m\), \(\nu _p(m)\) denotes the maximal power of \(p\) that divides \(m\) and \(\mathop {\mathrm{rad}}(m)\) denotes the radical of \(m\), i.e., if \(m=p_1^{\alpha _1}p_2^{\alpha _2},\ldots , p_l^{\alpha _l}\) is the factorization of \(m\) in prime factors, then \(\mathop {\mathrm{rad}}(m)=p_1p_2,\ldots , p_l\). Finally, \(a_{_{\div b}}\) denotes the integer \(\frac{a}{\gcd (a,b)}\).
Since each irreducible factor of \(x^n-1\in {\mathbb {F}}_q[x]\) generates an irreducible cyclic code of length \(n\), then a fundamental problem of code theory is to characterize these irreducible factors. The problem of finding a “generic algorithm” to split \(x^n-1\) in \({\mathbb {F}}_q[x]\), for any \(n\) and \(q\), is an open one and only some particular cases are known. Since \(x^n-1=\prod _{d|n} \varPhi _d(x)\), where \(\varPhi _d(x)\) denotes the \(d\)-th cyclotomic polynomial (see [8] Theorem 2.45), it follows that the factorization of \(x^n-1\) strongly depends on the factorization of the cyclotomic polynomial that has been studied by several authors (see [6, 9, 11] and [2]).
In particular, a natural question is to find conditions in order to have all the irreducible factors binomials or trinomials. In this direction, some results are the following ones
Lemma 1
[1, Corollary 3.3] Suppose that
-
1.
\(\mathop {\mathrm{rad}}(n)|(q-1)\) and
-
2.
\(8\not \mid n\) or \(q\not \equiv 3 \pmod 4\).
Then the factorization of \(x^n-1\) in irreducible factors of \({\mathbb {F}}_q[x]\) is
where \(m=n_{_{\div (q-1)}}\) and \(l=(q-1)_{_{\div n}}\). In addition, for each \(t\) such that \(t|m\), the number of irreducible factors of degree \(t\) is \(\frac{\varphi (t)}{t}\cdot \gcd (n,q-1)\), where \(\varphi \) denotes the Euler Totient function.
Lemma 2
[1, Corollary 3.6] Suppose that
-
1.
\(\mathop {\mathrm{rad}}(n)|(q-1)\) and
-
2.
\(8\mid n\) and \(q\equiv 3 \pmod 4\).
Then the factorization of \(x^n-1\) in irreducible factors of \({\mathbb {F}}_q[x]\) is
where \(m'=n_{_{\div (q^2-1)}}\) and \(l=(q-1)_{_{\div n}}\), \(l'=(q^2-1)_{_{\div n}}\), \(r=\min \{\nu _2(\frac{n}{2}),\nu _2(q+1)\}\) and \({\mathcal {S}}_t\) is the set
where \(\{a\}_b\) denotes the remainder of the division of \(a\) by \(b\), i.e., it is the number \(0\le c<b\) such that \(a\equiv c\pmod b\) .
Moreover, for each \(t\) odd such that \(t|m'\), the number of irreducible binomials of degree \(t\) and \(2t\) is \(\dfrac{\varphi (t)}{t}\cdot \gcd (n,q-1)\) and \(\dfrac{\varphi (t)}{2t}\cdot \gcd (n,q-1)\) respectively, and the number irreducible trinomials of degree \(2t\) is
3 Weight distribution
Throughout this section, we assume that \(\mathop {\mathrm{rad}}(n)\) divides \(q-1\) and \(m\), \(m'\) \(l\), \(l'\) and \(r\) are as in the Lemmas 1 and 2. The following results characterize all the possible cyclic codes of length \(n\) over \({\mathbb {F}}_q\) and show explicitly the weight distribution in each case.
Theorem 1
If \(8\not \mid n\) or \(q\not \equiv 3 \pmod 4\), then every irreducible code of length \(n\) over \({\mathbb {F}}_q\) is an \([n, t, \frac{n}{t}]_q\)-code where \(t\) divides \(m\) and its weight enumerator is
Proof
As a consequence of Lemma 1, every irreducible factor of \(x^n-1\) is of the form \(x^t-a\) where \(t|n\) and \(a^{n/t}=1\), so every irreducible code \(\mathcal C\) of length \(n\) is generated by a polynomial of the form
and \(\{g(x), xg(x), \dots , x^{t-1}g(x)\} \) is a basis of the \({\mathbb {F}}_q\)-linear subspace \(\mathcal C\). Thus, every codeword in \(\mathcal C\) is of the form \(a_0g+a_1xg+\cdots +a_{t -1} x^{t-1}g \), with \(a_j\in {\mathbb {F}}_q\) and
Since \(\omega (g)=\frac{n}{t}\), it follows that
Clearly we have \({A}_k = 0\), for all \(k\) that is not divisible by \(\frac{n}{t}\). On the other hand, if \(k = j\frac{n}{t}\), then exactly \(j\) elements of this base have non-zero coefficients in the linear combination and each non-zero coefficient can be chosen of \( q-1 \) distinct forms. Hence \({A}_k = {t \atopwithdelims ()j} (q-1)^ j. \) Then the weight distribution is
as we want to prove. \(\square \)
Remark 1
The previous result generalizes Theorem 3 in [10] (see also Theorem 22 in [4]).
Remark 2
As a direct consequence of Lemma 1, for all positive divisor \(t\) of \(m\), there exist \(\frac{\varphi (t)}{t} \gcd (n,q-1)\) irreducible cyclic \([n,t,\frac{n}{t}]_q\)-codes.
In order to find the weight distribution in the case that \(q\equiv 3 \pmod 4\) and \(8|n\), we need some additional lemmas.
Lemma 3
Let \(t\) be a positive integer such that \(t\) divides \(m'\) and assume that \(q\equiv 3 \pmod 4\) and \(8\not \mid n\). If \(x^{2t}-(a+a^q)x^t+a^{q+1} \in {\mathbb {F}}_q[x] \) is an irreducible trinomial, where \(a=\alpha ^{ul'}\in {\mathbb {F}}_{q^2}\), and \(g(x)\) is the polynomial \( \dfrac{x^{n}-1}{x^{2t}-(a + a^q)x^t + a^{q+1}}\in {\mathbb {F}}_q[x]\), then \(\nu _2(u)\le r-2\) and
where \(\Lambda _u=\left\{ \left. \dfrac{a^{i}-a^{qi}}{a^{i+1} - a^{q(i+1)}} \right| i=0,1,\ldots , 2^{r-\nu _2(u)}-2\right\} \).
Proof
Since \(x^{2t}-(a+a^q)x^t+a^{q+1} \) is an irreducible trinomial in \({\mathbb {F}}_q[x]\), then \(\gcd (t,u)=1\), \(2^r\not \mid u\) and \(a\ne -a^q\). In particular, \(\mathop {\mathrm{ord}}\nolimits _{q^2} a\) does not divide either \(q-1\) or \(2(q-1)\). Observe that
and for each odd prime \(p\), we have
Therefore, \(\mathop {\mathrm{ord}}\nolimits _{q^2} a\not \mid 2(q-1)\) implies that \(\nu _2(\mathop {\mathrm{ord}}\nolimits _{q^2} a)>\nu _2(2(q-1))=2\), and since
we conclude that \(\nu _2(u)\le r-2\).
On the other hand
is a polynomial whose degree is \(n-2t\) and every non-zero monomial is such that its degree is divisible by \(t\). Now, suppose that there exist \(1\le i<j\le \frac{n}{t} -2\) such that the coefficients of the monomials \(x^{n-t-jt}\) and \(x^{n-t-it}\) in the polynomial \(g_{\lambda }:=g(x)-\lambda x^t g(x)\) are simultaneously zero. Then
So, in the case of \(\lambda \ne 0\), we have
This last equality is equivalent to \( a^{(q-1)(j-i)} = 1\), i.e., \(\mathop {\mathrm{ord}}\nolimits _{q^2} a\) divides \((q-1)(j-i)\). In the case of \(\lambda =0\), we obtain that \(\mathop {\mathrm{ord}}\nolimits _{q^2} a\) divides \((q-1)j\) and \((q-1)i\) by the same argument. Therefore, we can treat this case as a particular case of the above one making \(i = 0\). It follows that \(\frac{2^r\gcd (q-1, n)}{\gcd ( 2^r(q-1),n,u)}\) divides \((q-1)(j-i)\).
So, by Eq. (1), the condition \(\mathop {\mathrm{ord}}\nolimits _{q^2} a|(q-1)(j-i)\) is equivalent to
and thus \(2^{r-\nu _2(u)}|(j-i)\).
In other words, if the coefficient of the monomial of degree \(n-t-it\) is zero, then all the coefficients of the monomials of degree \(n-t-jt\) with \(j\equiv i\pmod {2^{r-\nu _2(u)}} \) are zero. Thus, if \(\lambda \notin \Lambda _u\), then any coefficient of the form \(x^{tj}\) is zero and the weight of \(g_{\lambda }\) is \(\frac{n}{t}\). Otherwise, exactly \(\frac{n}{t}\cdot \frac{1}{2^{r-\nu _2(u)}}\) coefficients of the monomials of the form \(x^{tj}\) are zero, then the weight of \(g_{\lambda }\) is \(\frac{n}{t}(1-\frac{1}{2^{r-\nu _2(u)}})\), as we want to prove. \(\square \)
Corollary 1
Let \(g\) be a polynomial in the same condition of Lemma 3. Then
Proof
If \(\mu = 0\) and \(\lambda \ne 0\), then \(\omega (\lambda x^{t}g(x)) = \frac{n}{t}(1-\frac{1}{2^{r-\nu _2(u)}})\) and we have \((q-1)\) ways to choose \(\lambda \).
Suppose that \(\mu \ne 0\), then \(\omega (\mu g(x) + \lambda x^{t}g(x)) = \omega (g(x) + \frac{\lambda }{\mu }x^{t}g(x)),\) i.e., the weight only depends on the quotient \( \frac{\lambda }{\mu }\). By Lemma 3, there exist \(2^{r-\nu _2(u)}-1\) values of \( \frac{\lambda }{\mu }\) such that \(g(x) + \frac{\lambda }{\mu } x^tg(x)\) has weight \(\frac{n}{t}(1-\frac{1}{2^{r-\nu _2(u)}})\), so we have \((q-1)(2^{r-\nu _2(u)}-1)\) pairs of this type. \(\square \)
Theorem 2
If \(8|n\) and \(q\equiv 3 \pmod 4\), then every irreducible code of length \(n\) over \({\mathbb {F}}_q\) is one of the following class:
-
(a)
A \([n, t, \frac{n}{t}]_q\)-code, where \(4\not \mid t\), \(t|m'\) and its weight enumerator is
$$\begin{aligned} A(z)=\sum _{j=0}^{t} {t \atopwithdelims ()j}(q-1)^j z^{j \frac{n}{t}}=\Big (1+(q-1)z^{\frac{n}{t}}\Big )^t. \end{aligned}$$ -
(b)
A \([n,2t, d ]_q\)-code, where \(t|m'\), \(d=\frac{n}{t}(1-\frac{1}{2^{r-\nu _2(u)}})\), \(0\le u\le r-2\) and its weight enumerator is
$$\begin{aligned} A(z)=\left( 1+2^{r-\nu _2(u)}(q-1)z^d+(q-1)(q+1-2^{r-\nu _2(u)})z^{\frac{n}{t}}\right) ^t. \end{aligned}$$In particular, if \(\frac{n}{t2^{r-\nu _2(u)}}\not \mid k\), then \(A_k=0\).
Proof
Observe that every irreducible code is generated by a polynomial of the form \(\frac{x^n-1}{x^t-a}\), where \(a\in {\mathbb {F}}_q\), or a polynomial of the form \(g(x)=\frac{x^n-1}{(x^t-a)(x^t-a^q)}\), where \(a\) satisfies the condition of Lemma 3. In the first case, the result is the same as Theorem 1. In the second case, each codeword is of the form
where \(h_j=\lambda _j x^jg(x)+\lambda _{t+j} x^{t+j}g(x)\). Since, for \(0\le i<j\le t-1\), the polynomial \(h_i\) and \(h_j\) do not have non-zero monomials of the same degree, it follows that
By Lemma 3, \(h_j\) has weight \(\frac{n}{t}\), \(d\) or \(0\), for all \(j = 0, \dots , t-1\). For each \(j=0,1,\dots ,t-1\), there exist \((q^2-1)\) non-zero pairs \((\lambda _j, \lambda _{j+t})\) , and by Corollary 1, we know that there exist \(2^{r-\nu _2(u)}(q-1)\) pairs with weight \(d\). Therefore, there exist
pairs with weight \(\frac{n}{t}\).
So, in order to calculate \(A_k\), we need to select the polynomials \(h_l\)’s which have weight \(d=\frac{n}{t}(1-\frac{1}{2^{r-\nu _2(u)}})\) and those ones which have weight \(\frac{n}{t}\) in such a way that the total weight is \(k\).
If we chose \(i\) of the first type and \(j\) of the second type, the first \(h_l\)’s can be chosen by \( {t \atopwithdelims ()i}(2^{r-\nu _2(u)}(q-1))^i\) ways and for the other \(t-i\) ones, there are \( {{t-i} \atopwithdelims ()j}((q-1)(q+1-2^{r-\nu _2{u}}))^j\) ways of choosing \(j\) with weight \(\frac{n}{t}\). The remaining \(h_j\)’s have weight zero. Therefore
and
In particular, the minimum distance is \(d\) and every non-zero weight is divisible by \(\gcd (d,\frac{n}{t})=\frac{n}{t2^{r-\nu _2(u)}}\). \(\square \)
Remark 3
As a direct consequence of Lemma 2, for all positive divisor \(t\) of \(m'\), there exist \(2^{r-1-\nu _2(u)}\frac{\varphi (t)}{t} \gcd (n,q-1)\) irreducible cyclic \([n,t,d]_q\)-codes if \(t\) is odd, and \(2^{r-1}\frac{\varphi (t)}{t} \gcd (n,q-1)\) irreducible cyclic \([n,2t,\frac{n}{t}(1-\frac{1}{2^r})]_q\)-codes if \(t\) is even.
Example 1
Let \(q=31\) and \(n=288=2^5\times 3\). Then \(m'=3\), \(l'=10\), \(r=4\). If \(h(x)\) denotes a irreducible factor of \(x^{288}-1\), then \(h(x)\) is a binomial of degree \(1\), \(2\), \(3\) or \(6\), or a trinomial of degree \(2\) or \(6\). The irreducible codes generated by \(\frac{x^{n}-1}{h(x)}\) (and therefore parity check polynomial is \(h\)), and its weight enumerators are shown in the following tables
Codes generated by binomials
\(\,[n,t,\frac{n}{t}]_q\)-code | \(h(x)\) | Weight enumerator |
---|---|---|
\(\,[288,1,288]_{31}\) | \(\begin{array}{c} x + 1\\ x + 5\\ x + 6\\ x + 25\\ x + 26\\ x + 30\\ \end{array}\) | \(1+30z^{288}\) |
\(\,[288,2,144]_{31}\) | \(\begin{array}{c} x^2 + 1\\ x^2 + 5\\ x^2 + 25\\ \end{array}\) | \((1+30z^{144})^2\) |
\([288,3,96]_{31}\) | \(\begin{array}{c}x^3 + 5\\ x^3 + 6\\ x^3 + 25\\ x^3 + 26\\ \end{array}\) | \((1+30z^{96})^3\) |
\(\,[288,6,48]_{31}\) | \(\begin{array}{c} x^6 + 5\\ x^6 + 25\\ \end{array}\) | \((1+30z^{48})^6\) |
References
Brochero Martínez F.E., Giraldo Vergara C.R., Batista de Oliveira L.: Explicit factorization of \(x^{n}-1\in {\mathbb{F}}_q[x]\). Des. Codes Cryptogr. (Accepted).
Chen B., Li L., Tuerhong R.: Explicit factorization of \(x^{2^mp^n}-1 \) over a finite field. Finite Fields Appl. 24, 95–104 (2013).
Ding C.: The weight distribution of some irreducible cyclic codes. IEEE Trans. Inf. Theory 55, 955–960 (2009).
Ding C., Yang J.: Hamming weights in irreducible cyclic codes. Discret. Math. 313, 434–446 (2013).
Farrell P.G., Castieira Moreira J.: Essentials of Error-Control Coding. Wiley, Hoboken (2006).
Fitzgerald R.W., Yucas J.L.: Explicit factorization of cyclotomic and Dickson polynomials over finite fields. In Arithmetic of Finite Fields. Lecture Notes in Computer Science, vol. 4547, pp. 1–10. Springer, Berlin (2007).
Golay M.J.E.: Notes on digital coding. Proc. IRE 37, 657 (1949).
Lidl R., Niederreiter H.: Finite Fields. Encyclopedia of Mathematics and Its Applications, vol. 20. Addison-Wesley, Boston (1983).
Meyn H.: Factorization of the cyclotomic polynomials \(x^{2^n}+1\) over finite fields. Finite Fields Appl. 2, 439–442 (1996).
Sharma A., Bakshi G.: The weight distribution of some irreducible cyclic codes. Finite Fields Appl. 18, 144–159 (2012).
Wang L., Wang Q.: On explicit factors of cyclotomic polynomials over finite fields. Des. Codes Cryptogr. 63(1), 87–104 (2012).
Author information
Authors and Affiliations
Corresponding author
Additional information
Communicated by J. D. Key.
Rights and permissions
About this article
Cite this article
Brochero Martínez, F.E., Giraldo Vergara, C.R. Weight enumerator of some irreducible cyclic codes. Des. Codes Cryptogr. 78, 703–712 (2016). https://doi.org/10.1007/s10623-014-0026-6
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10623-014-0026-6