Berlekamp's Factorisation Algorithm

Subjects: Field Theory
Links: Finite Fields, Polynomial Ring of a Single Variable

We outline the Berlekamp factorisation algorithm for factoring polynomial in Fp[x]. The efficiency of this algorithm is bases on the efficiency of computing greatest common divisors in Fp[x] by the Euclidean Algorithm and on the efficiency of row-reduction matrix algorithms for solving systems of linear equations.

Let f(x)Fp[x] be a monic polynomial of degree n and let f(x)=p1(x)pk(x) where p1(x),p2(x),,pk(x) are powers of distinct monic polynomials in Fp[x]. We know that it suffices to determine the factors p1(x),,pk(x), since the original irreducibles can be determined from their powers using the pth powers and by computing greatest common divisors with derivatives.

Lemma: Let g(x)Fp[x] be any polynomial of degree n. Denote R(h(x)) to be the remainder of h(x) after division by f(x). The following statements are equivalent.

The proof of this actually, relies on primary ideals, which i thought was neat.

Lemma: The polynomials g(x) of degree <n satisfying the equivalent conditions of the previous lemma form a Fp-vector space, call it V, of dimension k. The proof of this theorem relies on the Chinese Remainder Theorem for Rings.

Lemma: Let g(x)=b0+b1x+bn1xn1V. For 0j<n let $$R(x^{pj}) = \sum_{m = 0}^{n-1}a_{m, j}x^m,$$and let A be the n×n matrix $$A = \begin{pmatrix}a_{0,0} & a_{0,1} & \cdots & a_{0, n-1} \ a_{1,0} & a_{1,1} & \cdots & a_{1, n-1} \ \vdots & \vdots & \ddots & \vdots \ a_{n-1, 0} & a_{n-1, 1} & \cdots & a_{n-1, n-1} \end{pmatrix}.$$R(g(xp))=g(x) iff (AI)B=0, where B is the column matrix with entries b0,,bn1. This means that the rank of the matrix AI is nk, and, consequently, this already suffices to determine if f(x) is irreducible, without actually determining the factors.

Berlekamp's Algorithm: Let g1(x),,gk(x) be a basis of solutions for (AI)B=0, a basis for V, where we may take g1(x)=1. Beginning w(x)=f(x), we compute the greatest common divisor (w(x),gi(x)s) for 1<i<k and sFp for every factor of f(x) already computed. The process terminates when k relatively prime factors have been determined.