Keywords

These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

1 Introduction

Much of the pioneering research on cyclic codes was carried out by Prange [5] in the 1950s and considerably developed by Peterson [4] in terms of generator and parity-check polynomials. MacWilliams and Sloane [2] showed that cyclic codes could be generated from idempotents and the Mattson–Solomon polynomial, first introduced by Mattson and Solomon in 1961 [3]. The binary idempotent polynomials follow directly from cyclotomic cosets.

2 Cyclotomic Cosets

Consider the expansion of polynomial \(a(x)=\prod _{i=0}^{m-1}(x-\alpha ^{2^i})\). The coefficients of a(x) are a cyclotomic coset of powers of \(\alpha \) or a sum of cyclotomic cosets of powers of \(\alpha \). For example, if \(m=4\)

$$\begin{aligned} a(x)=(x-\alpha )(x-\alpha ^2)(x-\alpha ^4)(x-\alpha ^8) \end{aligned}$$
(4.1)

and expanding a(x) produces

$$\begin{aligned} a(x)&=x^4-(\alpha +\alpha ^2+\alpha ^4+\alpha ^8)x^3+(\alpha ^3+\alpha ^6+\alpha ^{12}+\alpha ^9+ \alpha ^5+\alpha ^{10})x^2\nonumber \\&+(\alpha ^7+\alpha ^{14}+\alpha ^{13}+\alpha ^{11})x+\alpha ^{15}. \end{aligned}$$
(4.2)

Definition 4.1

(Cyclotomic Coset) Let s be a positive integer, and the \(2-\)cyclotomic coset of \(s \pmod n\) is given by

$$\begin{aligned} C_s = \{2^is \pmod { n}\;|\;0\le i \le t\}, \end{aligned}$$

where s is the smallest element in the set \(C_s\) and t is the smallest positive integer such that \(2^{t+1}s \equiv s \pmod { n}\).

For convenience, we will use the term cyclotomic coset to refer to \(2-\)cyclotomic coset. If \(\mathscr {N}\) is the set consisting of the smallest elements of all possible cyclotomic cosets, then it follows that

$$\begin{aligned} C = \bigcup _{s\in \mathscr {N}} C_s = \{0, 1, 2,\ldots ,n-1\}. \end{aligned}$$

Example 4.1

The entire cyclotomic cosets of 15 are as follows:

$$\begin{aligned} C_0&= \{0\}\\ C_1&= \{1, 2, 4, 8\}\\ C_3&= \{3, 6, 12, 9\}\\ C_5&= \{5, 10\}\\ C_7&= \{7, 14, 13, 11\} \end{aligned}$$

and \(\mathscr {N} = \{0, 1, 3, 5, 7\}\).

It can be seen that for \(GF(2^4)\) above, Eq. (4.2), the coefficients of a(x) are a cyclotomic coset of powers of \(\alpha \) or a sum of cyclotomic cosets of powers of \(\alpha \). For example, the coefficient of \(x^3\) is the sum of powers of \(\alpha \) from cyclotomic coset \(C_1\).

In the next step of the argument we note that there is an important property of Galois fields.

Theorem 4.1

For a Galois field \(GF(p^m)\), then

$$\begin{aligned} \big (b(x)+c(x)\big )^p=b(x)^p+c(x)^p. \end{aligned}$$

Proof

Expanding \(\big (b(x)+c(x)\big )^p\) produces

$$\begin{aligned} \big (b(x)+c(x)\big )^p =&\,b(x)^p+ \left( {\begin{array}{c}p\\ 1\end{array}}\right) b(x)^{p-1}c(x)+\left( {\begin{array}{c}p\\ 2\end{array}}\right) b(x)^{p-2}c(x)^2\,+\\&\ldots +\left( {\begin{array}{c}p\\ p-1\end{array}}\right) b(x)c(x)^{p-1}+ c(x)^p. \nonumber \end{aligned}$$
(4.3)

As p modulo \(p\;=0\), then all of the binomial coefficients \(\left( {\begin{array}{c}p\\ r\end{array}}\right) =0\) and

$$\begin{aligned} \big (b(x)+c(x)\big )^p=b(x)^p+c(x)^p. \end{aligned}$$

Another theorem follows.

Theorem 4.2

The sum of powers of \(\alpha \) that are from a cyclotomic coset \(C_i\) is equal to either 1 or 0.

Proof

The sum of powers of \(\alpha \) that are from a cyclotomic coset \(C_i\) must equal to a field element, some power, j of \(\alpha \), \(\alpha ^j\) or 0. Also, from Theorem 1.1,

$$\begin{aligned} \Big (\sum \alpha ^{C_i}\Big )^2=\sum \alpha ^{C_i}. \end{aligned}$$

If the sum of powers of \(\alpha \) is non-zero then

$$\begin{aligned} \Big (\sum \alpha ^{C_i}\Big )^2=\alpha ^{2j}=\sum \alpha ^{C_i}=\alpha ^j. \end{aligned}$$

The only non-zero field element that satisfies \(\alpha ^{2j}=\alpha ^{j}\) is \(\alpha ^{0}=1\). Hence, the sum of powers of \(\alpha \) that are from a cyclotomic coset \(C_i\) is equal to either 1 or 0.

In the example of \(C_1\) from \(GF(2^4)\) we have

$$\begin{aligned} (\alpha +\alpha ^2+\alpha ^4+\alpha ^8)^2=\alpha ^2+\alpha ^4+\alpha ^8+\alpha ^{16}=\alpha ^2+\alpha ^4+\alpha ^8+\alpha \end{aligned}$$

and so

$$\begin{aligned} \alpha +\alpha ^2+\alpha ^4+\alpha ^8=0\;\mathrm {or}\;1. \end{aligned}$$

Returning to the expansion of polynomial \(a(x)=\prod _{i=0}^{m-1}(x-\alpha ^{2^i})\). Since the coefficients of a(x) are a cyclotomic coset of powers of \(\alpha \) or a sum of cyclotomic cosets of powers of \(\alpha \), the coefficients of a(x) must be 0 or 1 and a(x) must have binary coefficients after noting that the coefficient of \(x^0\) is \(\prod _{i=0}^{m-1}\alpha ^{2^i}= \alpha ^{2^m-1}=1\), the maximum order of \(\alpha \). Considering the previous example of \(m=4\) (\(GF(2^4)\)), since a(x) is constrained to have binary coefficients, we have the following possible identities:

$$\begin{aligned} \alpha ^{15}= & {} 1\nonumber \\ \alpha +\alpha ^2+\alpha ^4+\alpha ^8= & {} 0\;\mathrm {or}\;1\nonumber \\ \alpha ^7+\alpha ^{14}+\alpha ^{13}+\alpha ^{11}= & {} 0\;\mathrm {or}\;1\nonumber \\ \alpha ^3+\alpha ^6+\alpha ^{12}+\alpha ^9+ \alpha ^5+\alpha ^{10}= & {} 0\;\mathrm {or}\;1.\nonumber \\ \end{aligned}$$
(4.4)

These identities are determined by the choice of primitive polynomial used to generate the extension field. This can be seen from the Trace function, \(T_m(x)\), defined as

$$\begin{aligned} T_m(x)=\sum _{i=0}^{m-1} x^{2^{i}} \end{aligned}$$
(4.5)

and expanding the product of \(T_m(x)\big (1+T_m(x)\big )\) produces the identity

$$\begin{aligned} T_m(x)\big (1+T_m(x)\big )=x(1-x^n). \end{aligned}$$
(4.6)

\(\alpha \) is a root of \((1-x^n)\) and so \(\alpha \) is a root of either \(T_m(x)\) or \(\big (1+T_m(x)\big )\), and so either \(T_m(\alpha )=0\) or \(\big (1+T_m(\alpha )\big )=0\). For \(GF(2^4)\)

$$\begin{aligned} T_m(x)=\sum _{i=0}^{3} x^{2^{i}}=x+x^2+x^4+x^8. \end{aligned}$$
(4.7)

Factorising produces

$$\begin{aligned} x+x^2+x^4+x^8=x(1+x)(1+x+x^2)(1+x+x^4), \end{aligned}$$
(4.8)

and

$$\begin{aligned} 1+T_m(x)=1+\sum _{i=0}^{3} x^{2^{i}}=1+x+x^2+x^4+x^8. \end{aligned}$$
(4.9)

Factorising produces

$$\begin{aligned} 1+x+x^2+x^4+x^8=(1+x^3+x^4)(1+x+x^2+x^3+x^4). \end{aligned}$$
(4.10)

It may be verified that

$$\begin{aligned} T_m(x)\big (1+T_m(x)\big )&=(x+x^2+x^4+x^8)(1+x+x^2+x^4+x^8)\\&=x(1+x)(1+x+x^2)(1+x+x^4)(1+x^3+x^4)\\&\qquad (1+x+x^2+x^3+x^4)\\&=x(1-x^{15}). \end{aligned}$$

Consequently, if \(1+x+x^4\) is used to generate the extension field GF(16) then \(\alpha +\alpha ^2+\alpha ^4+\alpha ^8=0\) and if \(1+x^3+x^4\) is used to generate the extension field GF(16), then \(1+\alpha +\alpha ^2+\alpha ^4+\alpha ^8=0\).

Taking the case that \(a(x)=1+x+x^4\) is used to generate the extension field GF(16) by comparing the coefficients given by Eq. (4.2), we can solve the identities of (4.4) after noting that \(\alpha ^5+\alpha ^{10}\) must equal 1 otherwise the order of \(\alpha \) is equal to 5, contradicting \(\alpha \) being a primitive root. All of the identities of the sum for each cyclotomic coset of powers of \(\alpha \) are denoted by \(S_{i\;m}\) and these are

$$\begin{aligned} S_{0\,4}= & {} \alpha ^0=1\nonumber \\ S_{1\,4}= & {} \alpha +\alpha ^2+\alpha ^4+\alpha ^8=0\nonumber \\ S_{3\,4}= & {} \alpha ^3+\alpha ^6+\alpha ^{12}+\alpha ^9=1\nonumber \\ S_{5\,4}= & {} \alpha ^5+\alpha ^{10}=1\nonumber \\ S_{7\,4}= & {} \alpha ^7+\alpha ^{14}+\alpha ^{13}+\alpha ^{11}=1\nonumber \\ S_{15\,4}= & {} \alpha ^{15}=1. \end{aligned}$$
(4.11)

The lowest degree polynomial that has \(\beta \) as a root is traditionally known as a minimal polynomial [2], and is denoted as \(M_{i\,m}\) where \(\beta =\alpha ^i\). With \(M_{i\,m}\) having binary coefficients

$$\begin{aligned} M_{i\,m}=\prod _{j=0}^{m-1}(x-\alpha ^{i2^j}). \end{aligned}$$
(4.12)

For \(GF(2^4)\) and considering \(M_{3\,4}\) for example,

$$\begin{aligned} M_{3\,4}=(x-\alpha ^3)(x-\alpha ^6)(x-\alpha ^{12})(x-\alpha ^9), \end{aligned}$$
(4.13)

and expanding leads to

$$\begin{aligned} M_{3\,4}&=x^4-(\alpha ^3+\alpha ^6+\alpha ^{12}+\alpha ^9)x^3+(\alpha ^{9}+\alpha ^3+\alpha ^6+\alpha ^{12})x^2\nonumber \\&+(\alpha ^6+\alpha ^{12}+\alpha ^{9}+\alpha ^{3})x+1. \end{aligned}$$
(4.14)

It will be noticed that this is the same as Eq. (4.2) with \(\alpha \) replaced with \(\alpha ^3\). Using the identities of Eq. (4.11), it is found that

$$\begin{aligned} M_{3\,4}=x^4+x^3+x^2+x+1. \end{aligned}$$
(4.15)

Similarly, it is found that for \(M_{5\,4}\) substitution produces \(x^4+x^2+1\) which is \((x^2+x+1)^2\), and so

$$\begin{aligned} M_{5\,4}=x^2+x+1; \end{aligned}$$
(4.16)

similarly, it is found that

$$\begin{aligned} M_{7\,4}=x^4+x^3+1 \end{aligned}$$
(4.17)

for \(M_{0\,4}\) with \(\beta =15\), and substitution produces \(x^4+1=(1+x)^4\) and

$$\begin{aligned} M_{0\,4}=x+1. \end{aligned}$$
(4.18)

It will be noticed that all of the minimal polynomials correspond to the factors of \(1+x^{15}\) given above. Also, it was not necessary to generate a table of \(GF(2^4)\) field elements in order to determine all of the minimal polynomials once \(M_{1\,4}\) was chosen.

A recurrence relation exists for the cyclotomic cosets with increasing m for

$$\begin{aligned} M_{i\,m+1}=\Big (\prod _{j=0}^{m-1}(x-\alpha ^{i2^j})\Big )x-\alpha ^{i2^m}. \end{aligned}$$
(4.19)

For \(m=4\),

$$\begin{aligned} M_{1\,4}=x^4+S_{1\,4}x^3+(S_{3\,4}+ S_{5\,4})x^2+S_{7\,4}x+\alpha ^{15} \end{aligned}$$
(4.20)

and so

$$\begin{aligned} M_{1\,5}=\Big (x^4+S_{1\,4}x^3+(S_{3\,4}+ S_{5\,4})x^2+S_{7\,4}x+\alpha ^{15}\Big )(x+\alpha ^{16})\nonumber \\ \end{aligned}$$
(4.21)

and

$$\begin{aligned} M_{1\,5}=&\,x^5+(\alpha ^{16}+S_{1\,4})x^4+(\alpha ^{16}S_{1\,4}+(S_{3\,4}+ S_{5\,4}))x^3\nonumber \\&+\big (\alpha ^{16}(S_{3\,4}+ S_{5\,4})+S_{7\,4}\big )x^2+(\alpha ^{16}S_{7\,4}+\alpha ^{15})x+\alpha ^{31} \end{aligned}$$
(4.22)

and we find that

$$\begin{aligned} M_{1\,5}=&\,x^5+S_{1\,5}x^4+(S_{3\,5}+S_{5\,5})x^3\nonumber \\&+(S_{7\,5}+S_{11\,5})x^2+S_{15\,5}x+\alpha ^{31}. \end{aligned}$$
(4.23)

We have the following identities, linking the cyclotomic cosets of \(GF(2^4)\) to \(GF(2^5)\)

$$\begin{aligned} S_{3\,5}+S_{5\,5}=\alpha ^{16}S_{1\,4}+S_{3\,4}+ S_{5\,4}\\ S_{7\,5}+S_{11\,5}=\alpha ^{16}(S_{3\,4}+ S_{5\,4})+S_{7\,4}\\ S_{15\,5}=\alpha ^{16}S_{7\,4}+\alpha ^{15}. \end{aligned}$$

With \(1+x^2+x^5\) used to generate the extension field GF(32), then \(\alpha +\alpha ^2+\alpha ^4+\alpha ^8+\alpha ^{16}=0\). Evaluating the cyclotomic cosets of powers of \(\alpha \) produces

$$\begin{aligned} S_{0\,5}= & {} \alpha ^0=1\nonumber \\ S_{1\,5}= & {} \alpha +\alpha ^2+\alpha ^4+\alpha ^8+\alpha ^{16}=0\nonumber \\ S_{3\,5}= & {} \alpha ^3+\alpha ^6+\alpha ^{12}+\alpha ^{24}+\alpha ^{17}=1\nonumber \\ S_{5\,5}= & {} \alpha ^5+\alpha ^{10}+\alpha ^{20}+\alpha ^{9}+\alpha ^{18}=1\nonumber \\ S_{7\,5}= & {} \alpha ^7+\alpha ^{14}+\alpha ^{28}+\alpha ^{25}+\alpha ^{19}=0\nonumber \\ S_{11\,5}= & {} \alpha ^{11}+\alpha ^{22}+\alpha ^{13}+\alpha ^{26}+\alpha ^{21}=1\nonumber \\ S_{15\,5}= & {} \alpha ^{15}+\alpha ^{30}+\alpha ^{29}+\alpha ^{27}+\alpha ^{23}=0.\nonumber \\ \end{aligned}$$
(4.24)

Substituting for the minimal polynomials, \(M_{i,5}\) produces

$$\begin{aligned} M_{0\,5}= & {} x+1\nonumber \\ M_{1\,5}= & {} x^5+x^2+1\nonumber \\ M_{3\,5}= & {} x^5+x^4+x^3+x^2+1\nonumber \\ M_{5\,5}= & {} x^5+x^4+x^2+x+1\nonumber \\ M_{7\,5}= & {} x^5+x^3+x^2+x+1\nonumber \\ M_{11\,5}= & {} x^5+x^4+x^3+x+1\nonumber \\ M_{15\,5}= & {} x^5+x^3+1.\nonumber \\ \end{aligned}$$
(4.25)

For \(GF(2^5)\), the order of a root of a primitive polynomial is 31, a prime number. Moreover, 31 is a Mersenne prime (\(2^p-1\)) and the first 12 Mersenne primes correspond to \(p = 2, 3, 5, 7, 13, 17, 19, 31, 61, 89, 107\) and 127. Interestingly, only 49 Mersenne primes are known. The last known Mersenne prime being \(2^{74207281} -1\), discovered in January 2016. As \((2^5-1)\) is prime, each of the minimal polynomials in Eq. (4.25) is primitive.

If \(\alpha \) is a root of \(T_m(x)\) and m is even, then \(1+T_{2m}(x)=1+T_{m}(x)+\big (1+T_{m}(x)\big )^{2^m}\) and \(\alpha ^{\frac{2^{2m}-1}{2^{m}-1}}\) is a root of \(x^{2^{2m}}\). For example, if \(\alpha \) is a root of \(1+x+x^2\), \(\alpha \) is of order 3 and \(\alpha ^5\) is a root of \(x+x^2+x^4+x^8\). Correspondingly, \(1+x+x^2\) is a factor of \(1+x^3\) and also a factor of\(1+x^{15}\) and necessarily \(2^{2m}-1\) cannot be prime. Similarly, if m is not a prime and \(m=ab\), then

$$\begin{aligned} \frac{{2^m-1}}{2^a-1}=2^{b(a-1)}+2^{b(a-2)}+2^{b(a-3)}\ldots +1 \end{aligned}$$
(4.26)

and so

$$\begin{aligned} 2^m-1=(2^{b(a-1)}+2^{b(a-2)}+2^{b(a-3)}\ldots +1){2^a-1}. \end{aligned}$$
(4.27)

Similarly

$$\begin{aligned} 2^m-1=(2^{a(b-1)}+2^{a(b-2)}+2^{a(b-3)}\ldots +1){2^b-1}. \end{aligned}$$
(4.28)

As a consequence

$$\begin{aligned} M_{(2^{b(a-1)}+2^{b(a-2)}+2^{b(a-3)}\ldots +1)\times j\,m}=M_{j\,a} \end{aligned}$$
(4.29)

for all minimal polynomials of \(x^{2^a-1}-1\), and

$$\begin{aligned} M_{(2^{a(b-1)}+2^{a(b-2)}+2^{a(b-3)}\ldots +1)\times j\,m}=M_{j\,b} \end{aligned}$$
(4.30)

for all minimal polynomials of \(x^{2^b-1}-1\).

For \(M_{1\,6}\), following the same procedure,

$$\begin{aligned} M_{1\,6}&=x^6+S_{1\,6}x^5+(S_{3\,6}+S_{5\,6}+S_{9\,6})x^4+(S_{7\,6}+S_{11\,6}+S_{13\,6}+S_{21\,6})x^3\nonumber \\&+(S_{15\,6}+S_{23\,6}+S_{27\,6})x^2+S_{15\,6}x^2+S_{31\,6}x+\alpha ^{63}. \end{aligned}$$
(4.31)

Substituting for the minimal polynomials, \(M_{i,6}\) produces

$$\begin{aligned} M_{0\,6}= & {} x+1\nonumber \\ M_{1\,6}= & {} x^6+x+1\nonumber \\ M_{3\,6}= & {} x^6+x^4+x^2+x+1\nonumber \\ M_{5\,6}= & {} x^6+x^5+x^2+x+1\nonumber \\ M_{7\,6}= & {} x^6+x^3+1\nonumber \\ M_{9\,6}= & {} x^3+x^2+1\nonumber \\ M_{11\,6}= & {} x^6+x^5+x^3+x^2+1\nonumber \\ M_{13\,6}= & {} x^6+x^4+x^3+x+1\nonumber \\ M_{15\,6}= & {} x^6+x^5+x^4+x^2+1\nonumber \\ M_{21\,6}= & {} x^2+x+1\nonumber \\ M_{23\,6}= & {} x^6+x^5+x^4+x+1\nonumber \\ M_{27\,6}= & {} x^3+x+1\nonumber \\ M_{31\,6}= & {} x^6+x^5+1. \end{aligned}$$
(4.32)

Notice that \(M_{9\,6}=M_{3\,4}\) because \(\alpha ^9+\alpha ^{18}+\alpha ^{36}=1\) and \(M_{27\,6}=M_{1\,4}\) because \(\alpha ^9+\alpha ^{18}+\alpha ^{36}=0\). \(M_{21\,6}=M_{1\,3}\) because \(\alpha ^{21}+\alpha ^{42}=1\). The order of \(\alpha \) is 63 which factorises to \(7 \times 3 \times 3\) and so \(x^{63}-1\) will have roots of order 7 (\(\alpha ^9\)) and roots of order 3 (\(\alpha ^21\)). Another way of looking at this is the factorisation of \(x^{63}-1\). \(x^{7}-1\) is a factor and \(x^{3}-1\) is a factor

$$\begin{aligned} x^{63}-1&=(x^{7}-1)(1+x^{7}+x^{14}+x^{21}\nonumber \\&\,+x^{28}+x^{35}+x^{42}+x^{49}+x^{56}) \end{aligned}$$
(4.33)

also

$$\begin{aligned} \begin{array}{cc} &{}x^{63}-1=(x^{3}-1)(1+x^{3}+x^{6}+x^{9}+x^{12}+x^{15}+x^{18}+x^{21}\\ &{}\qquad \qquad +\,x^{24}+x^{27}+x^{30}+x^{33}+x^{36}+x^{39}+x^{42}+x^{45}\\ &{}+\,x^{48}+x^{51}+x^{54}+x^{57}+x^{60})\\ \end{array} \end{aligned}$$
(4.34)

and

$$\begin{aligned} x^{3}-1&=(x+1)(x^2+x+1)\nonumber \\ x^{7}-1&=(x+1)(x^3+x+1)(x^3+x^2+1)\nonumber \\ x^{63}-1&=(x+1)(x^2+x+1)(x^3+x+1)(x^3+x^2+1)(x^6+x+1)\nonumber \\&\quad (x^6+x^4+x^2+x+1)\ldots (x^6+x^5+1). \end{aligned}$$
(4.35)

For \(M_{1\,7}\)

$$\begin{aligned} M_{1\,7}=x^7+S_{1\,7}x^6+(S_{3\,7}+S_{5\,7}+S_{9\,7})x^4+(S_{7\,7}+S_{11\,7}+S_{13\,7}+&S_{19\,7}+S_{21\,7})x^3\nonumber \\ +\,(S_{15\,7}+S_{23\,7}+S_{27\,7}+S_{29\,7})x^3+(S_{15\,7}+S_{31\,7}+S_{43\,7}+&S_{47\,7}+S_{55\,7})x^2\nonumber \\&+S_{63\,7}x+\alpha ^{127}. \nonumber \\ \end{aligned}$$
(4.36)

Although the above procedure using the sums of powers of \(\alpha \) from the cyclotomic cosets may be used to generate the minimal polynomials \(M_{i\,m}\) for any m, the procedure becomes tedious with increasing m, and it is easier to use the Mattson Polynomial or combinations of the idempotents as described in Sect. 4.4.

3 The Mattson–Solomon Polynomial

The Mattson–Solomon polynomial is very useful for it can be conveniently used to generate minimal polynomials and idempotents. It also may be used to design cyclic codes, RS codes and Goppa codes as well as determining the weight distribution of codes. The Mattson–Solomon polynomial [2] of a polynomial a(x) is a linear transformation of a(x) to A(z). The Mattson–Solomon polynomial is the same as the inverse Discrete Fourier Transform over a finite field. The polynomial variables x and z are used to distinguish the polynomials in either domain.

Let the splitting field of \(x^n-1\) over \(\mathbb {F}_2\) be \(\mathbb {F}_{2^m}\), where n is an odd integer and \(m > 1\), and let a generator of \(\mathbb {F}_{2^m}\) be \(\alpha \) and an integer \(r = (2^m-1)/n\). Let a(x) be a polynomial of degree at most \(n-1\) with coefficients over \(\mathbb {F}_{2^m}\).

Definition 4.2

(Mattson–Solomon polynomial) The Mattson–Solomon polynomial of a(x) is the linear transformation of a(x) to A(z) and is defined by [2]

$$\begin{aligned} A(z)&= \text {MS}(a(x)) = \sum _{j=0}^{n-1}a(\alpha ^{-rj})z^j. \end{aligned}$$
(4.37)

The inverse Mattson–Solomon transformation or Fourier transform is

$$\begin{aligned} a(x)&= \text {MS}^{-1}(A(z)) = \frac{1}{n}\sum _{i=0}^{n-1}A(\alpha ^{ri})x^i. \end{aligned}$$
(4.38)

The integer r comes into play when \(2^m-1\) is not a prime, that is, \(2^m-1\) is not a Mersenne prime, otherwise \(r=1\). As an example, we will consider \(\mathbb {F}_{2^4}\) and the extension field table of non-zero elements is given in Table 4.1 with \(1+\alpha +\alpha ^4=0\), modulo \(1+x^{15}\).

Table 4.1 GF(16) extension field defined by \(1+\alpha +\alpha ^4=0\)

Consider the polynomial a(x) denoted as

$$\begin{aligned} a(x)=\sum _{i=0}^{n-1}a_ix^i=1+x^3+x^4. \end{aligned}$$
(4.39)

We will evaluate the Mattson–Solomon polynomial coefficient by coefficient:

$$\begin{aligned} A(0)&=a_0+a_3+a_4=1+1+1=1 \nonumber \\ A(1)&=a_0+a_3\alpha ^{-3}+a_4\alpha ^{-4}=1+\alpha ^{12}+\alpha ^{11}=1+1+\alpha +\alpha ^2+\alpha ^3+\alpha +\alpha ^2+\alpha ^3=0\nonumber \\ A(2)&=a_0+a_3\alpha ^{-6}+a_4\alpha ^{-8}=1+\alpha ^{9}+\alpha ^{7}=1+\alpha +\alpha ^3+1+\alpha +\alpha ^3=0\nonumber \\ A(3)&=a_0+a_3\alpha ^{-9}+a_4\alpha ^{-12}=1+\alpha ^{6}+\alpha ^{3}=1+\alpha ^2+\alpha ^3+\alpha ^3=\alpha ^8\nonumber \\ A(4)&=a_0+a_3\alpha ^{-12}+a_4\alpha ^{-16}=1+\alpha ^{3}+\alpha ^{14}=1+\alpha ^3+1+\alpha ^3=0\nonumber \\ A(5)&=a_0+a_3\alpha ^{-15}+a_4\alpha ^{-20}=1+1+\alpha ^{10}=\alpha ^{10}\nonumber \\ A(6)&=a_0+a_3\alpha ^{-18}+a_4\alpha ^{-24}=1+\alpha ^{12}+\alpha ^{6}=\alpha \nonumber \\ A(7)&=a_0+a_3\alpha ^{-21}+a_4\alpha ^{-28}=1+\alpha ^{9}+\alpha ^{2}=1+\alpha +\alpha ^3+\alpha ^2=\alpha ^{12}\nonumber \\ A(8)&=a_0+a_3\alpha ^{-24}+a_4\alpha ^{-32}=1+\alpha ^{6}+\alpha ^{13}=0\nonumber \\ A(9)&=a_0+a_3\alpha ^{-27}+a_4\alpha ^{-36}=1+\alpha ^{3}+\alpha ^{9}=1+\alpha =\alpha ^{4}\nonumber \\ A(10)&=a_0+a_3\alpha ^{-30}+a_4\alpha ^{-40}=1+1+\alpha ^{5}=\alpha ^{5}\nonumber \\ A(11)&=a_0+a_3\alpha ^{-33}+a_4\alpha ^{-44}=1+\alpha ^{12}+\alpha =\alpha ^{6}\nonumber \\ A(12)&=a_0+a_3\alpha ^{-36}+a_4\alpha ^{-48}=1+\alpha ^{9}+\alpha ^{12}=\alpha ^{2}\nonumber \\ A(13)&=a_0+a_3\alpha ^{-39}+a_4\alpha ^{-52}=1+\alpha ^{6}+\alpha ^{8}=\alpha ^{3}\nonumber \\ A(14)&=a_0+a_3\alpha ^{-42}+a_4\alpha ^{-56}=1+\alpha ^{3}+\alpha ^{4}=\alpha ^{9}. \end{aligned}$$
(4.40)

It can be seen that A(z) is

$$\begin{aligned} A(z)=&\,1+\alpha ^8z^3+\alpha ^{10}z^5+\alpha z^6+\alpha ^{12}z^7+\alpha ^{4}z^9+\alpha ^{5}z^(10)+\alpha ^{6}z^{11}+\alpha ^{2}z^{12}\\&+\alpha ^{3}z^{13}+\alpha ^{9}z^{14}. \end{aligned}$$

A(z) has four zeros corresponding to the roots \(\alpha ^{-1}\), \(\alpha ^{-2}\), \(\alpha ^{-4}\) and \(\alpha ^{-8}\), and these are the roots of \(1+x^3+x^4\). These are also 4 of the 15 roots of \(1+x^{15}\). Factorising \(1+x^{15}\) produces the identity

$$\begin{aligned} 1+x^{15} =(1+x)(1+x+x^2)(1+x+x^4)(1+x^3+x^4)(1+x+x^2+x^3+x^4).\nonumber \\ \end{aligned}$$
(4.41)

It can be seen that \(1+x^3+x^4\) is one of the factors of \(1+x^{15}\).

Another point to notice is that \(A(z)=A(z)^2\) and A(z) is an idempotent. The reason for this is that the inverse Mattson–Solomon polynomial of A(z) will produce a(x) a polynomial that has binary coefficients. Let \(\cdot \) denote the dot product of polynomials, i.e.

$$\begin{aligned} \left( \sum A_iz^i\right) \cdot \left( \sum B_iz^i\right) = \sum A_iB_iz^i. \end{aligned}$$

It follows from the Mattson–Solomon polynomial that with \(a(x)b(x)=c(x)\), \(\sum C_iz^i=\sum A_iB_iz^i\).

This concept is analogous to multiplication and convolution in the time and frequency domains, where the Fourier and inverse Fourier transforms correspond to the inverse Mattson–Solomon and Mattson–Solomon polynomials, respectively. In the above example, A(z) is an idempotent which leads to the following lemma.

Lemma 4.1

The Mattson–Solomon polynomial of a polynomial having binary coefficients is an idempotent.

Proof

Let \(c(x)=a(x)\cdot b(x)\). The Mattson–Solomon polynomial of c(x) is \(C(z)=A(z)B(z)\). Setting \(b(x)=a(x)\) then \(C(z)=A(z)A(z)=A(z)^2\). If a(x) has binary coefficients, then \(c(x)=a(x)\cdot a(x)=a(x)\) and \(A(z)^2=A(z)\). Therefore A(z) is an idempotent.

Of course the reverse is true.

Lemma 4.2

The Mattson–Solomon polynomial of an idempotent is a polynomial having binary coefficients.

Proof

Let \(c(x)=a(x)b(x)\). The Mattson–Solomon polynomial of c(x) is \(C(z)=A(z)B(z)\). Setting \(b(x)=a(x)\) then \(C(z)=A(z)\cdot A(z)\). If a(x) is an idempotent then \(c(x)=a(x)^2=a(x)\) and \(A(z)=A(z)\cdot A(z)\). The only values for the coefficients of A(z) that satisfy this constraint are the values 0 and 1. Hence, the Mattson Solomon polynomial, A(z), has binary coefficients.

A polynomial that has binary coefficients and is an idempotent is a binary idempotent, and combining Lemmas 4.1 and 4.2 produces the following lemma.

Lemma 4.3

The Mattson–Solomon polynomial of a binary idempotent is also a binary idempotent.

Proof

The proof follows immediately from the proofs of Lemmas 4.1 and 4.2. As a(x) is an idempotent, then from Lemma 4.1, A(z) has binary coefficients. As a(x) also has binary coefficients, then from Lemma 4.2, A(z) is an idempotent. Hence, A(z) is a binary idempotent.

As an example consider the binary idempotent a(x) from GF(16) listed in Table 4.1:

$$\begin{aligned} a(x)=x+x^2+x^3+x^4+x^6+x^8+x^9+x^{12}. \end{aligned}$$

The Mattson–Solomon polynomial A(z) is

$$\begin{aligned} A(z)=z^{7}+z^{11}+z^{13}+z^{14}, \end{aligned}$$

which is also a binary idempotent.

Since the Mattson polynomial of \(a(x^{-1})\) is the same as the inverse Mattson polynomial of a(x) consider the following example:

$$\begin{aligned} a(x)=x^{-7}+x^{-11}+x^{-13}+x^{-14}=x+x^{2}+x^{4}+x^{4}. \end{aligned}$$

The Mattson–Solomon polynomial A(z) is the binary idempotent

$$\begin{aligned} A(z)=z+z^2+z^3+z^4+z^6+z^8+z^9+z^{12}. \end{aligned}$$

This is the reverse of the first example above.

The polynomial \(1+x+x^3\) has no roots of \(1+x^{15}\) and so defining b(x)

$$\begin{aligned} b(x)=(1+x+x^3)(1+x^3+x^4)=1+x+x^5+x^6+x^7. \end{aligned}$$
(4.42)

When the Mattson–Solomon polynomial is evaluated, B(z) is given by

$$\begin{aligned} B(z)=1+z+z^5+z^6+z^7. \end{aligned}$$
(4.43)

4 Binary Cyclic Codes Derived from Idempotents

In their book, MacWilliams and Sloane [2] describe the Mattson–Solomon polynomial and show that cyclic codes may be constructed straightforwardly from idempotents. An idempotent is a polynomial \(\theta (x)\) with coefficients from a base field GF(p) that has the property that \(\theta ^p(x)=\theta (x)\). The family of Bose–Chaudhuri–Hocquenghem (BCH) cyclic codes may be constructed directly from the Mattson–Solomon polynomial. From the idempotents, other cyclic codes may be constructed which have low-weight dual-code codewords or equivalently sparseness of the parity-check matrix (see Chap. 12).

Definition 4.3

(Binary Idempotent) Consider \(e(x) \in T(x)\), e(x) is an idempotent if the property of \(e(x) = e^2(x) = e(x^2)\text { mod }(x^n-1)\) is satisfied.

An (nk) binary cyclic code may be described by the generator polynomial \(g(x) \in T(x)\) of degree \(n-k\) and the parity-check polynomial \(h(x) \in T(x)\) of degree k, such that \(g(x)h(x) = x^n-1\). According to [2], as an alternative to g(x), an idempotent may also be used to generate cyclic codes. Any binary cyclic code can be described by a unique idempotent \(e_g(x) \in T(x)\) which consists of a sum of primitive idempotents. The unique idempotent \(e_g(x)\) is known as the generating idempotent and as the name implies, g(x) is a divisor of \(e_g(x)\), and to be more specific \(e_g(x) = m(x)g(x)\), where \(m(x) \in T(x)\) contains repeated factors or non-factors of \(x^n-1\).

Lemma 4.4

If \(e(x) \in T(x)\) is an idempotent, \(E(z) = \text {MS}(e(x)) \in T(z)\).

Proof

Since \(e(x) = e(x)^2 \pmod { x^n-1}\), from (4.37) it follows that \(e(\alpha ^{-rj}) = e(\alpha ^{-rj})^2\) for \(j = \{0, 1,\ldots ,n-1\}\) and some integer r. Clearly \(e(\alpha ^{-rj})\in \{0, 1\}\) implying that E(z) is a binary polynomial.

Definition 4.4

(Cyclotomic Coset) Let s be a positive integer, and the \(2-\)cyclotomic coset of \(s \pmod n\) is given by

$$\begin{aligned} C_s = \left\{ 2^is \pmod { n}\;|\;0\le i \le t\right\} , \end{aligned}$$

where we shall always assume that the subscript s is the smallest element in the set \(C_s\) and t is the smallest positive integer such that \(2^{t+1}s \equiv s \pmod { n}\).

For convenience, we will use the term cyclotomic coset to refer to \(2-\)cyclotomic coset throughout this book. If \(\mathscr {N}\) is the set consisting of the smallest elements of all possible cyclotomic cosets, then it follows that

$$\begin{aligned} C = \bigcup _{s\in \mathscr {N}} C_s = \{0, 1, 2,\ldots ,n-1\}. \end{aligned}$$

Definition 4.5

(Binary Cyclotomic Idempotent) Let the polynomial \(e_s(x) \in T(x)\) be given by

$$\begin{aligned} e_s(x)&= \sum _{0 \le i \le |C_s|-1} x^{C_{s,i}}, \end{aligned}$$
(4.44)

where \(|C_s|\) is the number of elements in \(C_s\) and \(C_{s,i}=2^is \pmod { n}\), the \((i+1)\)th element of \(C_s\). The polynomial \(e_s(x)\) is called a binary cyclotomic idempotent.

Example 4.2

The entire cyclotomic cosets of 63 and their corresponding binary cyclotomic idempotents are as follows:

$$\begin{aligned} C_0&= \{0\}&e_0(x)&= 1\\ C_1&= \{1, 2, 4, 8, 16, 32\}&e_1(x)&= x + x^2 + x^4 + x^8 + x^{16} + x^{32}\\ C_3&= \{3, 6, 12, 24, 48, 33\}&e_3(x)&= x^3 + x^6 + x^{12} + x^{24} + x^{33} + x^{48}\\ C_5&= \{5, 10, 20, 40, 17, 34\}&e_5(x)&= x^5 + x^{10} + x^{17} + x^{20} + x^{34} + x^{40}\\ C_7&= \{7, 14, 28, 56, 49, 35\}&e_7(x)&= x^7 + x^{14} + x^{28} + x^{35} + x^{49} + x^{56}\\ C_9&= \{9, 18, 36\}&e_9(x)&= x^9 + x^{18} + x^{36}\\ C_{11}&= \{11, 22, 44, 25, 50, 37\}&e_{11}(x)&= x^{11} + x^{22} + x^{25} + x^{37} + x^{44} + x^{50}\\ C_{13}&= \{13, 26, 52, 41, 19, 38\}&e_{13}(x)&= x^{13} + x^{19} + x^{26} + x^{38} + x^{41} + x^{52}\\ C_{15}&= \{15, 30, 60, 57, 51, 39\}&e_{15}(x)&= x^{15} + x^{30} + x^{39} + x^{51} + x^{57} + x^{60}\\ C_{21}&= \{21, 42\}&e_{21}(x)&= x^{21} + x^{42}\\ C_{23}&= \{23, 46, 29, 58, 53, 43\}&e_{23}(x)&= x^{23} + x^{29} + x^{43} + x^{46} + x^{53} + x^{58}\\ C_{27}&= \{27, 54, 45\}&e_{27}(x)&= x^{27} + x^{45} + x^{54}\\ C_{31}&= \{31, 62, 61, 59, 55, 47\}&e_{31}(x)&= x^{31} + x^{47} + x^{55} + x^{59} + x^{61} + x^{62} \end{aligned}$$

and \(\mathscr {N} = \{0, 1, 3, 5, 7, 9, 11, 13, 15, 21, 23, 27, 31\}\).

Definition 4.6

(Binary Parity-Check Idempotent) Let \(\mathscr {M} \subseteq \mathscr {N}\) and let the polynomial \(u(x) \in T(x)\) be defined by

$$\begin{aligned} u(x) = \sum _{s \in \mathscr {M}} e_s(x), \end{aligned}$$
(4.45)

where \(e_s(x)\) is an idempotent. The polynomial u(x) is called a binary parity-check idempotent.

The binary parity-check idempotent u(x) can be used to describe an [nk] cyclic code. Since GCD\((u(x), x^n-1)=h(x)\), the polynomial \(\bar{u}(x)=x^{\deg (u(x))}u(x^{-1})\) and its n cyclic shifts \(\pmod { x^n-1}\) can be used to define the parity-check matrix of a binary cyclic code. In general, \(\mathrm {wt}_H(\bar{u}(x))\) is much lower than \(\mathrm {wt}_H(h(x))\), and therefore a sparse parity-check matrix can be derived from \(\bar{u}(x)\). This is important for cyclic codes designed to be used as low-density parity-check (LDPC) codes, see Chap. 12.

4.1 Non-Primitive Cyclic Codes Derived from Idempotents

The factors of \(2^m-1\) dictate the degrees of the minimal polynomials through the order of the cyclotomic cosets. Some relatively short non-primitive cyclic codes have minimal polynomials of high degree which makes it tedious to derive the generator polynomial or parity-check polynomial using the Mattson–Solomon polynomial. The prime factors of \(2^m-1\) for \(m\le 43\) are tabulated below in Table 4.2.

The Mersenne primes shown in Table 4.2 are \(2^3-1\), \(2^5-1\), \(2^7-1\), \(2^{13}-1\), \(2^{17}-1\), \(2^{19}-1\), \(2^{23}-1\) and \(2^{31}-1\), and cyclic codes of these lengths are primitive cyclic codes. Non-primitive cyclic codes have lengths corresponding to factors of \(2^m-1\) which are not Mersenne primes. Also it may be seen in Table 4.2 that for m even, 3 is a common factor. Where m is congruent to 5, with \(m=5\times s\), 31 is a common factor and all \(M_{j\,5}\) minimal polynomials will be contained in the set, \(M_{j\,5\times s}\) of minimal polynomials.

As an example of how useful Table 4.2 can be, consider a code of length 113. Table 4.2 shows that \(2^{28}-1\) contains 113 as a factor. This means that there is a polynomial of degree 28 that has a root \(\beta \) of order 113. In fact, \(\beta =\alpha ^{2375535}\), where \(\alpha \) is a primitive root, because \(2^{28}-1=2375535 \times 113\).

The cyclotomic cosets of 113 are as follows:

$$\begin{aligned} C_0&= \{0\}\\ C_1&= \{1, 2, 4, 8, 16, 32, 64, 15, 30, 60, 7, 14, 28, 56,\\&\quad \quad 112, 111, 109, 105, 97, 81, 49, 98, 83, 53, 106, 99, 85, 57\}\\ C_3&= \{ 3, 6, 12, 24, 48, 96, 79, 45, 90, 67, 21, 42, 84,\\&\quad \quad 55, 110, 107, 101, 89, 65, 17, 34, 68, 23, 46, 92, 71, 29, 58\}\\ C_5&= \{ 5, 10, 20, 40, 80, 47, 94, 75, 37, 74, 35, 70, 27,\\&\quad \quad 54, 108, 103, 93, 73, 33, 66, 19, 38, 76, 39, 78, 43, 86, 59\}\\ C_7&= \{9, 18, 36, 72, 31, 62, 11, 22, 44, 88, 63, 13, 26,\\&\quad \quad 52, 104, 95, 77, 41, 82, 51, 102, 91, 69, 25, 50, 100, 87, 61\}. \end{aligned}$$
Table 4.2 Prime factors of \(2^m-1\)

Each coset apart from \(C_0\) may be used to define 28 roots from a polynomial having binary coefficients and of degree 28. Alternatively, each cyclotomic coset may be used to define the non-zero coefficients of a polynomial, a minimum weight idempotent (see Sect. 4.4). Adding together any combination of the 5 minimum weight idempotents generates a cyclic code of length 113. Consequently, there are only \(2^5-2=30\) non-trivial, different cyclic codes of length 113 and some of these will be equivalent codes. Using Euclid’s algorithm, it is easy to find the common factors of each idempotent combination and \(x^{113}-1\). The resulting polynomial may be used as the generator polynomial, or the parity-check polynomial of the cyclic code.

For example, consider the GCD of \(C_1+C_3= x + x^2 +x^3+ x^4 +x^6+ x^8 + \ \ldots \ + x^{109}+x^{110}+x^{111}+x^{112}\) and \(x^{113}-1\). This is the polynomial, u(x), which turns out to have degree 57

$$\begin{aligned} u(x)&= 1 + x + x^2+ x^3 + x^5 + x^6 + x^7 + x^{10} + x^{13} \\&\ldots + x^{51} + x^{52} + x^{54} + x^{55} + x^{56} + x^{57}. \end{aligned}$$

Using u(x) as the parity-check polynomial of the cyclic code produces a (113, 57, 18) code. This is quite a good code as the very best (113, 57) code has a minimum Hamming distance of 19.

As another example of using this method for non-primitive cyclic code construction, consider the factors of \(2^{39}-1\) in Table 4.2. It will be seen that 79 is a factor and so a cyclic code of length 79 may be constructed from polynomials of degree 39. The cyclotomic cosets of 79 are as follows:

$$\begin{aligned} C_0&= \{0\}\\ C_1&= \{1, 2, 4, 8, 16, 32, 64, 49, 19, 38, 76, 73,\ldots 20, 40\}\\ C_3&= \{ 3, 6, 12, 24, 48, 17, 34, 68, 57, 35, 70,\ldots 60, 41\}.\\ \end{aligned}$$

The GCD of the idempotent sum given by the cyclotomic cosets \(C_0+C_1\) and \(x^{79}-1\) is the polynomial, u(x), of degree 40:

$$\begin{aligned} u(x)&= 1 + x+ x^3 + x^5 + x^8 + x^{11} + x^{12} + x^{16} \\&\ldots + x^{28} + x^{29} + x^{34} + x^{36}+ x^{37} + x^{40}. \end{aligned}$$

Using u(x) as the parity-check polynomial of the cyclic code produces a (79, 40, 15) code. This is the quadratic residue cyclic code for the prime number 79 and is a best-known code.

In a further example Table 4.2 shows that \(2^{37}-1\) has 223 as a factor. The GCD of the idempotent given by the cyclotomic coset \(C_3\) \(x^3 +x^6+ x^{12} + x^{24}+ x^{48} + \ \ldots \ + x^{198}+x^{204} \) and \(x^{223}-1\) is the polynomial, u(x), of degree 111

$$\begin{aligned} u(x)&= 1 + x^2+ x^3 + x^5 + x^8 + x^9 + x^{10} + x^{12} \\&\ldots + x^{92} + x^{93} + x^{95} + x^{103} + x^{107} + x^{111}. \end{aligned}$$

Using u(x) as the parity-check polynomial of the cyclic code produces a (223, 111, 32) cyclic code.

5 Binary Cyclic Codes of Odd Lengths from 129 to 189

Since many of the best-known codes are cyclic codes, it is useful to have a table of the best cyclic codes. The literature already contains tables of the best cyclic codes up to length 127 and so the following table starts at 129. All possible binary cyclic codes up to length 189 have been constructed and their minimum Hamming distance has been evaluated.

The highest minimum distance attainable by all binary cyclic codes of odd lengths \(129 \le n \le 189\) is tabulated in Table 4.3. The column “Roots of g(x)” in Table 4.3 denotes the exponents of roots of the generator polynomial g(x), excluding the conjugate roots. All cyclic codes with generator polynomials \(1+x\) and \((x^n-1)/(1+x)\), since they are trivial codes, are excluded in Table 4.3 and since primes \(n=8m\pm 3\) contain these trivial cyclic codes only, there is no entry in the table for these primes. The number of permutation inequivalent and non-degenerate cyclic codes, excluding the two trivial codes mentioned earlier, for each odd integer n is given by \(N_{\mathscr {C}}\). The primitive polynomial m(x) defining the field is given in octal. Full details describing the derivation of Table 4.3 are provided in Sect. 5.3.

In Table 4.3, there is no cyclic code that improves the lower bound given by Brouwer [1], but there are 134 cyclic codes that meet this lower bound and these codes are printed in bold.

Table 4.3 The highest attainable minimum distance of binary cyclic codes of odd lengths from 129 to 189

6 Summary

The important large family of binary cyclic codes has been explored in this chapter. Starting with cyclotomic cosets, the minimal polynomials were introduced. The Mattson–Solomon polynomial was described and it was shown to be an inverse discrete Fourier transform based on a primitive root of unity. The usefulness of the Mattson–Solomon polynomial in the design of cyclic codes was demonstrated. The relationship between idempotents and the Mattson–Solomon polynomial of a polynomial that has binary coefficients was described with examples given. It was shown how binary cyclic codes may be easily derived from idempotents and the cyclotomic cosets. In particular, a method was described based on cyclotomic cosets for the design of high-degree non-primitive binary cyclic codes. Code examples using the method were presented.

A table listing the complete set of the best binary cyclic codes, having the highest minimum Hamming distance, has been included for all code lengths from 129 to 189 bits.