In mathematics and computer algebra, factorization of polynomials or polynomial factorization expresses a polynomial with coefficients in a given field or in the integers as the product of irreducible factors with coefficients in the same domain. Polynomial factorization is one of the fundamental components of computer algebra systems.
The first polynomial factorization algorithm was published by Theodor von Schubert in 1793.[1] Leopold Kronecker rediscovered Schubert's algorithm in 1882 and extended it to multivariate polynomials and coefficients in an algebraic extension. But most of the knowledge on this topic is not older than circa 1965 and the first computer algebra systems:[2]
When the long-known finite step algorithms were first put on computers, they turned out to be highly inefficient. The fact that almost any uni- or multivariate polynomial of degree up to 100 and with coefficients of a moderate size (up to 100 bits) can be factored by modern algorithms in a few minutes of computer time indicates how successfully this problem has been attacked during the past fifteen years. (Erich Kaltofen, 1982)
Modern algorithms and computers can quickly factor univariate polynomials of degree more than 1000 having coefficients with thousands of digits.[3] For this purpose, even for factoring over the rational numbers and number fields, a fundamental step is a factorization of a polynomial over a finite field.
Polynomial rings over the integers or over a field are unique factorization domains. This means that every element of these rings is a product of a constant and a product of irreducible polynomials (those that are not the product of two non-constant polynomials). Moreover, this decomposition is unique up to multiplication of the factors by invertible constants.
Factorization depends on the base field. For example, the fundamental theorem of algebra, which states that every polynomial with complex coefficients has complex roots, implies that a polynomial with integer coefficients can be factored (with root-finding algorithms) into linear factors over the complex field C. Similarly, over the field of reals, the irreducible factors have degree at most two, while there are polynomials of any degree that are irreducible over the field of rationals Q.
The question of polynomial factorization makes sense only for coefficients in a computable field whose every element may be represented in a computer and for which there are algorithms for the arithmetic operations. However, this is not a sufficient condition: Fröhlich and Shepherdson give examples of such fields for which no factorization algorithm can exist.[4]
The fields of coefficients for which factorization algorithms are known include prime fields (that is, the field of the rational number and the fields of the integers modulo a prime number) and their finitely generated field extensions. Integer coefficients are also tractable. Kronecker's classical method is interesting only from a historical point of view; modern algorithms proceed by a succession of:
and reductions:
See also: Content (algebra) and Gauss's lemma (polynomial).
In this section, we show that factoring over Q (the rational numbers) and over Z (the integers) is essentially the same problem.
The content of a polynomial p ∈ Z[''X''], denoted "cont(p)", is, up to its sign, the greatest common divisor of its coefficients. The primitive part of p is primpart(p) = p/cont(p), which is a primitive polynomial with integer coefficients. This defines a factorization of p into the product of an integer and a primitive polynomial. This factorization is unique up to the sign of the content. It is a usual convention to choose the sign of the content such that the leading coefficient of the primitive part is positive.
For example,
-10x2+5x+5=(-5)(2x2-x-1)
Every polynomial q with rational coefficients may be written
q=
p | |
c |
,
cont(q)=
cont(p) | |
c |
,
For example,
x5 | |
3 |
+
7x2 | |
2 |
+2x+1=
2x5+21x2+12x+6 | |
6 |
Gauss proved that the product of two primitive polynomials is also primitive (Gauss's lemma). This implies that a primitive polynomial is irreducible over the rationals if and only if it is irreducible over the integers. This implies also that the factorization over the rationals of a polynomial with rational coefficients is the same as the factorization over the integers of its primitive part. Similarly, the factorization over the integers of a polynomial with integer coefficients is the product of the factorization of its primitive part by the factorization of its content.
In other words, an integer GCD computation reduces the factorization of a polynomial over the rationals to the factorization of a primitive polynomial with integer coefficients, and the factorization over the integers to the factorization of an integer and a primitive polynomial.
Everything that precedes remains true if Z is replaced by a polynomial ring over a field F and Q is replaced by a field of rational functions over F in the same variables, with the only difference that "up to a sign" must be replaced by "up to the multiplication by an invertible constant in F". This reduces the factorization over a purely transcendental field extension of F to the factorization of multivariate polynomials over F.
See main article: Square-free polynomial.
If two or more factors of a polynomial are identical, then the polynomial is a multiple of the square of this factor. The multiple factor is also a factor of the polynomial's derivative (with respect to any of the variables, if several).
For univariate polynomials, multiple factors are equivalent to multiple roots (over a suitable extension field). For univariate polynomials over the rationals (or more generally over a field of characteristic zero), Yun's algorithm exploits this to efficiently factorize the polynomial into square-free factors, that is, factors that are not a multiple of a square, performing a sequence of GCD computations starting with gcd(f(x), f '(x)). To factorize the initial polynomial, it suffices to factorize each square-free factor. Square-free factorization is therefore the first step in most polynomial factorization algorithms.
Yun's algorithm extends this to the multivariate case by considering a multivariate polynomial as a univariate polynomial over a polynomial ring.
In the case of a polynomial over a finite field, Yun's algorithm applies only if the degree is smaller than the characteristic, because, otherwise, the derivative of a non-zero polynomial may be zero (over the field with p elements, the derivative of a polynomial in xp is always zero). Nevertheless, a succession of GCD computations, starting from the polynomial and its derivative, allows one to compute the square-free decomposition; see Polynomial factorization over finite fields#Square-free factorization.
This section describes textbook methods that can be convenient when computing by hand. These methods are not used for computer computations because they use integer factorization, which is currently slower than polynomial factorization.
The two methods that follow start from a univariate polynomial with integer coefficients for finding factors that are also polynomials with integer coefficients.
All linear factors with rational coefficients can be found using the rational root test. If the polynomial to be factored is
n | |
a | |
nx |
+an-1xn-1+ … +a1x+a0
b1x-b0
b1
an
b0
a0
Kronecker's method is aimed to factor univariate polynomials with integer coefficients into polynomials with integer coefficients.
The method uses the fact that evaluating integer polynomials at integer values must produce integers. That is, if
f(x)
f(a)
g(x)
f(x),
g(a)
f(a).
If one searches for all factors of a given degree, one can consider
d+1
a0,\ldots,ad
(f(a0),\ldots,f(ad)).
f(ai)
bi,0
,\ldots,b | |
i,ki |
(d+1)
ith
f(ai)
(b | |
0,j1 |
,\ldots,
b | |
d,jd |
)
d
ai
f(ai)
For example, consider
f(x)=x5+x4+x2+x+2
If this polynomial factors over Z, then at least one of its factors
p(x)
p(x)
f(0)=2
f(1)=6
f(-1)=2
1×2, 2×1, (−1)×(−2), or (−2)×(−1).
Therefore, if a second degree integer polynomial factor exists, it must take one of the values
p(0) = 1, 2, −1, or −2
and likewise for p(1). There are eight factorizations of 6 (four each for 1×6 and 2×3), making a total of 4×4×8 = 128 possible triples (p(0), p(1), p(−1)), of which half can be discarded as the negatives of the other half. Thus, we must check 64 explicit integer polynomials
p(x)=ax2+bx+c
f(x)
p(x)=x2+x+1
constructed from (g(0), g(1), g(−1)) = (1,3,1) factors
f(x)
Dividing f(x) by p(x) gives the other factor
q(x)=x3-x+2
f(x)=p(x)q(x)
f(x)=p(x)q(x)=(x2+x+1)(x3-x+2).
See main article: Factorization of polynomials over finite fields, Berlekamp's algorithm and Cantor–Zassenhaus algorithm.
If
f(x)
B
g(x)
B
m
2B
g(x)
m
g(x)
m
The Zassenhaus algorithm proceeds as follows. First, choose a prime number
p
f(x)\bmodp
f(x)
f(x)\bmodp
f1(x),\ldots,fr(x)
f(x)\bmodp
fi(x)
f(x)\bmodpa
a
pa
2B
fi(x)
pa
f(x)
2r
\{f1(x),\ldots,fr(x)\}\bmodpa
pa
f(x)
Z[x]
Z[x]
2r
2r-1
f(x)
fi(x)
The first polynomial time algorithm for factoring rational polynomials was discovered by Lenstra, Lenstra and Lovász and is an application of the Lenstra–Lenstra–Lovász lattice basis reduction (LLL) algorithm .A simplified version of the LLL factorization algorithm is as follows: calculate a complex (or p-adic) root α of the polynomial
f(x)
f(x)
The exponential complexity in the Zassenhaus algorithm comes from a combinatorial problem: how to select the right subsets of
f1(x),\ldots,fr(x)
r
f1(x),\ldots,fr(x)
We can factor a polynomial
p(x)\inK[x]
K
Q
L=K[x]/p(x)
n=[L:Q]=\degp(x)[K:Q]
p(x)
p(x)
is the desired factorization of p(x), the ring decomposes uniquely into fields as:p(x)=
m \prod i=1 pi(x)
L=K[x]/p(x)\cong
m | |
\prod | |
i=1 |
K[x]/pi(x).
We will find this decomposition without knowing the factorization. First, we write L explicitly as an algebra over
Q
\alpha\inL
L
Q
q(y)\inQ[y]
\alpha
Q
Q
Q[y]
q(y)=
n | |
\prod | |
i=1 |
qi(y).
Thus we have:
L\congQ[y]/q(y)\cong
n | |
\prod | |
i=1 |
Q[y]/qi(y),
where
\alpha
y\leftrightarrow(y,y,\ldots,y)
L
The generators of L are x along with the generators of
K
Q
\alpha
x
K
Q[y]/qi(y)=K[x]/pi(x)
x
Q[y]/qi(y)
pi(x)
p(x)
K.
"Numerical factorization" refers commonly to the factorization of polynomials with real or complex coefficients, whose coefficients are only approximately known, generally because they are represented as floating point numbers.
For univariate polynomials with complex coefficients, factorization can easily be reduced to numerical computation of polynomial roots and multiplicities.
In the multivariate case, a random infinitesimal perturbation of the coefficients produces with probability one an irreducible polynomial, even when starting from a polynomial with many factors. So, the very meaning of numerical factorization needs to be clarified precisely.
Let
p
p=\alpha
m1 | |
p | |
1 |
…
mk | |
p | |
k |
\alpha\inC
p1,\ldots,pk
p
\tilde{p}
p
\tilde{p}
\tilde{p}.
If
k
mi
\tilde{p}
m1,\ldots,mk
m1,\ldots,mk
Several algorithms have been developed and implemented for numerical factorization as an on-going subject of research.[8] [9]
Shaker . H. . Topology and factorization of polynomials . Math. Scand. . 2009 . 104 . 51–59 . 10.7146/math.scand.a-15084 . 14121840 . 0704.3363 .