Factorization of polynomials

Last updated

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.

Contents

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)

Nowadays, 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.

Formulation of the question

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:

Primitive part–content factorization

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 pZ[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,

is a factorization into content and primitive part.

Every polynomial q with rational coefficients may be written

where pZ[X] and cZ: it suffices to take for c a multiple of all denominators of the coefficients of q (for example their product) and p = cq. The content of q is defined as:

and the primitive part of q is that of p. As for the polynomials with integer coefficients, this defines a factorization into a rational number and a primitive polynomial with integer coefficients. This factorization is also unique up to the choice of a sign.

For example,

is a factorization into content and primitive part.

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.

Square-free factorization

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.

Classical methods

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.

Obtaining linear factors

All linear factors with rational coefficients can be found using the rational root test. If the polynomial to be factored is , then all possible linear factors are of the form , where is an integer factor of and is an integer factor of . All possible combinations of integer factors can be tested for validity, and each valid one can be factored out using polynomial long division. If the original polynomial is the product of factors at least two of which are of degree 2 or higher, this technique only provides a partial factorization; otherwise the factorization is complete. In particular, if there is exactly one non-linear factor, it will be the polynomial left after all linear factors have been factorized out. In the case of a cubic polynomial, if the cubic is factorizable at all, the rational root test gives a complete factorization, either into a linear factor and an irreducible quadratic factor, or into three linear factors.

Kronecker's method

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 is a polynomial with integer coefficients, then is an integer as soon as a is an integer. There are only a finite number of possible integer values for a factor of a. So, if is a factor of the value of must be one of the factors of

If one searches for all factors of a given degree d, one can consider values, for a, which give a finite number of possibilities for the tuple Each has a finite number of divisors , and, each -tuple where the entry is a divisor of , that is, a tuple of the form , produces a unique polynomial of degree at most , which can be computed by polynomial interpolation. Each of these polynomials can be tested for being a factor by polynomial division. Since there were finitely many and each has finitely many divisors, there are finitely many such tuples. So, an exhaustive search allows finding all factors of degree at most d.

For example, consider

.

If this polynomial factors over Z, then at least one of its factors must be of degree two or less, so is uniquely determined by three values. Thus, we compute three values , and . If one of these values is 0, we have a linear factor. If the values are nonzero, we can list the possible factorizations for each. Now, 2 can only factor as

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 as possible factors of . Testing them exhaustively reveals that

constructed from (g(0), g(1), g(−1)) = (1,3,1) factors .

Dividing f(x) by p(x) gives the other factor , so that . Now one can test recursively to find factors of p(x) and q(x), in this case using the rational root test. It turns out they are both irreducible, so the irreducible factorization of f(x) is: [5]

Modern methods

Factoring over finite fields

Factoring univariate polynomials over the integers

If is a univariate polynomial over the integers, assumed to be content-free and square-free, one starts by computing a bound such that any factor has coefficients of absolute value bounded by . This way, if is an integer larger than , and if is known modulo , then can be reconstructed from its image mod .

The Zassenhaus algorithm proceeds as follows. First, choose a prime number such that the image of remains square-free, and of the same degree as . Then factor . This produces integer polynomials whose product matches . Next, apply Hensel lifting; this updates the in such a way that their product matches , where is large enough that exceeds : thus each corresponds to a well-defined integer polynomial. Modulo , the polynomial has factors (up to units): the products of all subsets of . These factors modulo need not correspond to "true" factors of in , but we can easily test them by division in . This way, all irreducible true factors can be found by checking at most cases, reduced to cases by skipping complements. If is reducible, the number of cases is reduced further by removing those that appear in an already found true factor. The Zassenhaus algorithm processes each case (each subset) quickly, however, in the worst case, it considers an exponential number of cases.

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 ( Lenstra, Lenstra & Lovász 1982 ). A simplified version of the LLL factorization algorithm is as follows: calculate a complex (or p-adic) root α of the polynomial to high precision, then use the Lenstra–Lenstra–Lovász lattice basis reduction algorithm to find an approximate linear relation between 1, α, α2, α3, . . . with integer coefficients, which might be an exact linear relation and a polynomial factor of . One can determine a bound for the precision that guarantees that this method produces either a factor, or an irreducibility proof. Although this method finishes in polynomial time, it is not used in practice because the lattice has high dimension and huge entries, which makes the computation slow.

The exponential complexity in the Zassenhaus algorithm comes from a combinatorial problem: how to select the right subsets of . State-of-the-art factoring implementations work in a manner similar to Zassenhaus, except that the combinatorial problem is translated to a lattice problem that is then solved by LLL. [6] In this approach, LLL is not used to compute coefficients of factors, but rather to compute vectors with entries in {0,1} that encode the subsets of corresponding to the irreducible true factors.

Factoring over algebraic extensions (Trager's method)

We can factor a polynomial , where the field is a finite extension of . First, using square-free factorization, we may suppose that the polynomial is square-free. Next we define the quotient ring of degree ; this is not a field unless is irreducible, but it is a reduced ring since is square-free. Indeed, if

is the desired factorization of p(x), the ring decomposes uniquely into fields as:

We will find this decomposition without knowing the factorization. First, we write L explicitly as an algebra over : we pick a random element , which generates over with high probability by the primitive element theorem. If this is the case, we can compute the minimal polynomial of over , by finding a -linear relation among 1, α, . . . , αn. Using a factoring algorithm for rational polyomials, we factor into irreducibles in :

Thus we have:

where corresponds to . This must be isomorphic to the previous decomposition of .

The generators of L are x along with the generators of over ; writing these as a polynomials in , we can determine the embeddings of and into each component . By finding the minimal polynomial of in , we compute , and thus factor over

Numerical factorization

"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 be a polynomial with complex coefficients with an irreducible factorization

where and the factors are irreducible polynomials with complex coefficients. Assume that is approximated through a polynomial whose coefficients are close to those of . The exact factorization of is pointless, since it is generally irreducible. There are several possible definitions of what can be called a numerical factorization of

If and 's are known, an approximate factorization consists of finding a polynomial close to that factors as above. If one does not know the factorization scheme, identifying becomes necessary. For example, the number of irreducible factors of a polynomial is the nullity of its Ruppert matrix. [7] Thus the multiplicities can be identified by square-free factorization via numerical GCD computation and rank-revealing on Ruppert matrices.

Several algorithms have been developed and implemented for numerical factorization as an on-going subject of research. [8] [9]

See also

Bibliography

  1. FT Schubert: De Inventione Divisorum Nova Acta Academiae Scientiarum Petropolitanae v.11, pp. 172–182(1793)
  2. Kaltofen (1982)
  3. An example of degree 2401, taking 7.35 seconds, is found in Section 4 in: Hart, van Hoeij, Novocin: Practical Polynomial Factoring in Polynomial Time ISSAC'2011 Proceedings, pp. 163–170 (2011).
  4. Fröhlich, A.; Shepherdson, J. C. (1955). "On the factorisation of polynomials in a finite number of steps". Mathematische Zeitschrift. 62 (1): 331–334. doi:10.1007/bf01180640. ISSN   0025-5874. S2CID   119955899.
  5. Van der Waerden, Sections 5.4 and 5.6
  6. M. van Hoeij: Factoring polynomials and the knapsack problem. Journal of Number Theory, 95, 167–189, (2002).
  7. Ruppert, W. (1999). "Reducibility of polynomials f(x,y)". J. Number Theory. 77: 62–70. arXiv: math/9808021 . doi:10.1006/jnth.1999.2381. S2CID   14316123.

    Shaker, H. (2009). "Topology and factorization of polynomials". Math. Scand. 104: 51–59. arXiv: 0704.3363 . doi:10.7146/math.scand.a-15084. S2CID   14121840.

  8. For example: W. Wu and Z. Zeng (2017). "The numerical factorization of polynomials". Foundations of Computational Mathematics. 17: 259–286. arXiv: 2103.04888 . doi:10.1007/s10208-015-9289-1. S2CID   254171366.
  9. E. Kaltofen, J.P. May, Z. Yang and L. Zhi (2008). "Approximate factorization of multivariate polynomials using singular value decomposition". J. Symbolic Comput. 43 (5): 359–376. doi: 10.1016/j.jsc.2007.11.005 .{{cite journal}}: CS1 maint: multiple names: authors list (link)

Further reading

Related Research Articles

In mathematics, a finite field or Galois field is a field that contains a finite number of elements. As with any field, a finite field is a set on which the operations of multiplication, addition, subtraction and division are defined and satisfy certain basic rules. The most common examples of finite fields are given by the integers mod p when p is a prime number.

In mathematics, particularly in algebra, a field extension is a pair of fields such that the operations of K are those of L restricted to K. In this case, L is an extension field of K and K is a subfield of L. For example, under the usual notions of addition and multiplication, the complex numbers are an extension field of the real numbers; the real numbers are a subfield of the complex numbers.

In mathematics, an integral domain is a nonzero commutative ring in which the product of any two nonzero elements is nonzero. Integral domains are generalizations of the ring of integers and provide a natural setting for studying divisibility. In an integral domain, every nonzero element a has the cancellation property, that is, if a ≠ 0, an equality ab = ac implies b = c.

In mathematics, a polynomial is a mathematical expression consisting of indeterminates and coefficients, that involves only the operations of addition, subtraction, multiplication, and positive-integer powers of variables. An example of a polynomial of a single indeterminate x is x2 − 4x + 7. An example with three indeterminates is x3 + 2xyz2yz + 1.

<span class="mw-page-title-main">Factorization</span> (Mathematical) decomposition into a product

In mathematics, factorization (or factorisation, see English spelling differences) or factoring consists of writing a number or another mathematical object as a product of several factors, usually smaller or simpler objects of the same kind. For example, 3 × 5 is an integer factorization of 15, and (x – 2)(x + 2) is a polynomial factorization of x2 – 4.

In algebraic number theory, an algebraic integer is a complex number that is integral over the integers. That is, an algebraic integer is a complex root of some monic polynomial whose coefficients are integers. The set of all algebraic integers A is closed under addition, subtraction and multiplication and therefore is a commutative subring of the complex numbers.

In number theory, the general number field sieve (GNFS) is the most efficient classical algorithm known for factoring integers larger than 10100. Heuristically, its complexity for factoring an integer n (consisting of ⌊log2n⌋ + 1 bits) is of the form

In mathematics, an irreducible polynomial is, roughly speaking, a polynomial that cannot be factored into the product of two non-constant polynomials. The property of irreducibility depends on the nature of the coefficients that are accepted for the possible factors, that is, the field to which the coefficients of the polynomial and its possible factors are supposed to belong. For example, the polynomial x2 − 2 is a polynomial with integer coefficients, but, as every integer is also a real number, it is also a polynomial with real coefficients. It is irreducible if it is considered as a polynomial with integer coefficients, but it factors as if it is considered as a polynomial with real coefficients. One says that the polynomial x2 − 2 is irreducible over the integers but not over the reals.

In algebra, a monic polynomial is a non-zero univariate polynomial in which the leading coefficient is equal to 1. That is to say, a monic polynomial is one that can be written as

In mathematics, especially in the field of algebra, a polynomial ring or polynomial algebra is a ring formed from the set of polynomials in one or more indeterminates with coefficients in another ring, often a field.

In mathematics, the ring of integers of an algebraic number field is the ring of all algebraic integers contained in . An algebraic integer is a root of a monic polynomial with integer coefficients: . This ring is often denoted by or . Since any integer belongs to and is an integral element of , the ring is always a subring of .

In number theory, Hilbert's irreducibility theorem, conceived by David Hilbert in 1892, states that every finite set of irreducible polynomials in a finite number of variables and having rational number coefficients admit a common specialization of a proper subset of the variables to rational numbers such that all the polynomials remain irreducible. This theorem is a prominent theorem in number theory.

In mathematics, the resultant of two polynomials is a polynomial expression of their coefficients that is equal to zero if and only if the polynomials have a common root, or, equivalently, a common factor. In some older texts, the resultant is also called the eliminant.

In algebra, Gauss's lemma, named after Carl Friedrich Gauss, is a statement about polynomials over the integers, or, more generally, over a unique factorization domain. Gauss's lemma underlies all the theory of factorization and greatest common divisors of such polynomials.

In mathematics, and more specifically in analysis, a holonomic function is a smooth function of several variables that is a solution of a system of linear homogeneous differential equations with polynomial coefficients and satisfies a suitable dimension condition in terms of D-modules theory. More precisely, a holonomic function is an element of a holonomic module of smooth functions. Holonomic functions can also be described as differentiably finite functions, also known as D-finite functions. When a power series in the variables is the Taylor expansion of a holonomic function, the sequence of its coefficients, in one or several indices, is also called holonomic. Holonomic sequences are also called P-recursive sequences: they are defined recursively by multivariate recurrences satisfied by the whole sequence and by suitable specializations of it. The situation simplifies in the univariate case: any univariate sequence that satisfies a linear homogeneous recurrence relation with polynomial coefficients, or equivalently a linear homogeneous difference equation with polynomial coefficients, is holonomic.

In mathematics, particularly computational algebra, Berlekamp's algorithm is a well-known method for factoring polynomials over finite fields. The algorithm consists mainly of matrix reduction and polynomial GCD computations. It was invented by Elwyn Berlekamp in 1967. It was the dominant algorithm for solving the problem until the Cantor–Zassenhaus algorithm of 1981. It is currently implemented in many well-known computer algebra systems.

In algebra, the greatest common divisor of two polynomials is a polynomial, of the highest possible degree, that is a factor of both the two original polynomials. This concept is analogous to the greatest common divisor of two integers.

In algebra, the content of a nonzero polynomial with integer coefficients is the greatest common divisor of its coefficients. The primitive part of such a polynomial is the quotient of the polynomial by its content. Thus a polynomial is the product of its primitive part and its content, and this factorization is unique up to the multiplication of the content by a unit of the ring of the coefficients.

In mathematics, an algebraic number field is an extension field of the field of rational numbers such that the field extension has finite degree . Thus is a field that contains and has finite dimension when considered as a vector space over .

In mathematics and computer algebra the factorization of a polynomial consists of decomposing it into a product of irreducible factors. This decomposition is theoretically possible and is unique for polynomials with coefficients in any field, but rather strong restrictions on the field of the coefficients are needed to allow the computation of the factorization by means of an algorithm. In practice, algorithms have been designed only for polynomials with coefficients in a finite field, in the field of rationals or in a finitely generated field extension of one of them.