- Berlekamp's algorithm
In
mathematics , particularly computational algebra, Berlekamp's algorithm is a well-known method for factoring polynomials overfinite field s (also known as "Galois fields"). The algorithm consists mainly of matrix reduction and polynomial GCD computations. It was invented byElwyn Berlekamp in 1967. It was the dominant algorithm for solving the problem until theCantor–Zassenhaus algorithm of 1981. It is currently implemented in many well-knowncomputer algebra system s, includingPARI/GP .Overview
Berlekamp's algorithm takes as input a square-free polynomial (i.e. one with no repeated factors) of degree with coefficients in a finite field and gives as output a polynomial with coefficients in the same field such that divides . The algorithm may then be applied recursively to these and subsequent divisors, until we find the decomposition of into powers of
irreducible polynomial s (recalling that the ring of polynomials over a finite field is aunique factorization domain ).All possible factors of are contained within the
factor ring :The algorithm focuses on polynomials which satisfy the congruence::.These polynomials form a subalgebra of R (which can be considered as an -dimensional vector space over ), called the "Berlekamp subalgebra". The Berlekamp subalgebra is of interest because the polynomials it contains satisfy:
In general, not every GCD in the above product will be a non-trivial factor of , but some are, providing the factors we seek.
Berlekamp's algorithm finds polynomials suitable for use with the above result by computing a basis for the Berlekamp subalgebra. This is achieved via the observation that Berlekamp subalgebra is in fact the
null space of a certain matrix over , which is derived from the so-called Berlekamp matrix of the polynomial, denoted . If then is the coefficient of the -th power term in the reduction of modulo , i.e.::.
With a certain polynomial , say:
:
we may associate the row vector:
:
It is relatively straightforward to see that the row vector corresponds, in the same way, to the reduction of modulo . Consequently a polynomial is in the Berlekamp subalgebra if and only if (where is the
identity matrix , i.e. if and only if it is in the null space of .By computing the matrix and reducing it to
reduced row echelon form and then easily reading off a basis for the null space, we may find a basis for the Berlekamp subalgebra and hence construct polynomials in it. We then need to successively compute GCDs of the form above until we find a non-trivial factor. Since the ring of polynomials over a field is aEuclidean domain , we may compute these GCDs using theEuclidean algorithm .Applications
One important application of Berlekamp's algorithm is in computing
discrete logarithm s over finite fields , where is prime and . Computing discrete logarithms is an important problem inpublic key cryptography . For a finite field, the fastest known method is the index calculus method, which involves the factorisation of field elements. If we represent the field in the usual way - that is, as polynomials over the base field , reduced modulo an irreducible polynomial of degree - then this is simply polynomial factorisation, as provided by Berlekamp's algorithm.Implementation in Computer Algebra Systems
Berlekamp's algorithm may be accessed in the PARI/GP package using the [http://pari.math.u-bordeaux.fr/dochtml/html.stable/Arithmetic_functions.html#factormod factormod] command.
References
* Elwyn R. Berlekamp. "Factoring Polynomials Over Finite Fields". Bell Systems Technical Journal, 46:1853-1859, 1967. Later republished in: Elwyn R. Berlekamp. "Algebraic Coding Theory". Mc-Graw Hill, 1968.
Wikimedia Foundation. 2010.