Primitive polynomial (field theory)
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 is the entire field. This implies that is a primitive ()-root of unity in.
Properties
- Because all minimal polynomials are irreducible, all primitive polynomials are also irreducible.
- A primitive polynomial must have a non-zero constant term, for otherwise it will be divisible by x. Over GF(2), is a primitive polynomial and all other primitive polynomials have an odd number of terms, since any polynomial mod 2 with an even number of terms is divisible by .
- An irreducible polynomial F of degree m over GF, where p is prime, is a primitive polynomial if the smallest positive integer n such that F divides is.
- A primitive polynomial of degree has different roots in, which all have order, meaning that any of them generates the multiplicative group of the field.
- Over GF there are exactly primitive elements and primitive polynomials, each of degree, where is Euler's totient function.
- The algebraic conjugates of a primitive element in are,,, …, and so the primitive polynomial has explicit form. That the coefficients of a polynomial of this form, for any in, not necessarily primitive, lie in follows from the property that the polynomial is invariant under application of the Frobenius automorphism to its coefficients and from the fact that the fixed field of the Frobenius automorphism is.
Examples
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:
Applications
Field element representation
Primitive polynomials can be used to represent the elements of a finite field. If α in GF is a root of a primitive polynomial F, then the nonzero elements of GF are represented as successive powers of α: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 This representation makes multiplication easy, as it corresponds to addition of exponents modulo
Pseudo-random bit generation
Primitive polynomials over GF, the field with two elements, can be used for pseudorandom bit generation. In fact, every linear-feedback shift register with maximum cycle length may be built from a primitive polynomial.In general, for a primitive polynomial of degree m over GF, this process will generate pseudo-random bits before repeating the same sequence.
CRC codes
The cyclic redundancy check is an error-detection code that operates by interpreting the message bitstring as the coefficients of a polynomial over GF and dividing it by a fixed generator polynomial also over GF; 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.Primitive trinomials
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. A number of results give techniques for locating and testing primitiveness of trinomials.For polynomials over GF, where is a Mersenne prime, a polynomial of degree r is primitive if and only if it is irreducible. 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. This can be used to create a pseudo-random number generator of the huge period ≈.