In finite field theory, a branch of mathematics, a primitive polynomial is the minimal polynomial of a primitive element of the finite field . This means that a polynomial of degree with coefficients in is a primitive polynomial if it is monic and has a root in such that
\{0,1,\alpha,\alpha2,\alpha3,\ldots
pm-2 | |
\alpha |
\}
Over the polynomial is irreducible but not primitive because it divides : its roots generate a cyclic group of order 4, while the multiplicative group of is a cyclic group of order 8. The polynomial, on the other hand, is primitive. Denote one of its roots by . Then, because the natural numbers less than and relatively prime to are 1, 3, 5, and 7, the four primitive roots in are,,, and . The primitive roots and are algebraically conjugate. Indeed . The remaining primitive roots and are also algebraically conjugate and produce the second primitive polynomial: .
For degree 3, has primitive elements. As each primitive polynomial of degree 3 has three roots, all necessarily primitive, there are primitive polynomials of degree 3. One primitive polynomial is . Denoting one of its roots by, the algebraically conjugate elements are and . The other primitive polynomials are associated with algebraically conjugate sets built on other primitive elements with relatively prime to 26:
\begin{align}x3+2x+1&=(x-\gamma)(x-\gamma3)(x-\gamma9)\\ x3+2x2+x+1&=(x-\gamma5)(x-\gamma5 ⋅ 3)(x-\gamma5 ⋅ 9)=(x-\gamma5)(x-\gamma15)(x-\gamma19)\\ x3+x2+2x+1&=(x-\gamma7)(x-\gamma7 ⋅ 3)(x-\gamma7 ⋅ 9)=(x-\gamma7)(x-\gamma21)(x-\gamma11)\\ x3+2x2+1&=(x-\gamma17)(x-\gamma17 ⋅ 3)(x-\gamma17 ⋅ 9)=(x-\gamma17)(x-\gamma25)(x-\gamma23). \end{align}
Primitive polynomials can be used to represent the elements of a finite field. If α in GF(pm) is a root of a primitive polynomial F(x), then the nonzero elements of GF(pm) are represented as successive powers of α:
GF(pm)=\{0,1=\alpha0,\alpha,\alpha2,\ldots,
pm-2 | |
\alpha |
\}.
This allows an economical representation in a computer of the nonzero elements of the finite field, by representing an element by the corresponding exponent of
\alpha.
pm-1.
Primitive polynomials over GF(2), the field with two elements, can be used for pseudorandom bit generation. In fact, every linear-feedback shift register with maximum cycle length (which is, where n is the length of the linear-feedback shift register) may be built from a primitive polynomial.[2]
In general, for a primitive polynomial of degree m over GF(2), this process will generate pseudo-random bits before repeating the same sequence.
The cyclic redundancy check (CRC) is an error-detection code that operates by interpreting the message bitstring as the coefficients of a polynomial over GF(2) and dividing it by a fixed generator polynomial also over GF(2); see Mathematics of CRC. Primitive polynomials, or multiples of them, are sometimes a good choice for generator polynomials because they can reliably detect two bit errors that occur far apart in the message bitstring, up to a distance of for a degree n primitive polynomial.
A useful class of primitive polynomials is the primitive trinomials, those having only three nonzero terms: . Their simplicity makes for particularly small and fast linear-feedback shift registers.[3] A number of results give techniques for locating and testing primitiveness of trinomials.[4]
For polynomials over GF(2), where is a Mersenne prime, a polynomial of degree r is primitive if and only if it is irreducible. (Given an irreducible polynomial, it is not primitive only if the period of x is a non-trivial factor of . Primes have no non-trivial factors.) Although the Mersenne Twister pseudo-random number generator does not use a trinomial, it does take advantage of this.
Richard Brent has been tabulating primitive trinomials of this form, such as .[5] [6] This can be used to create a pseudo-random number generator of the huge period ≈ .