HOME

TheInfoList



OR:

In
mathematics Mathematics is an area of knowledge that includes the topics of numbers, formulas and related structures, shapes and the spaces in which they are contained, and quantities and their changes. These topics are represented in modern mathematics ...
and
computer algebra In mathematics and computer science, computer algebra, also called symbolic computation or algebraic computation, is a scientific area that refers to the study and development of algorithms and software for manipulating mathematical expressions ...
the factorization of a polynomial consists of decomposing it into a
product Product may refer to: Business * Product (business), an item that serves as a solution to a specific consumer problem. * Product (project management), a deliverable or set of deliverables that contribute to a business solution Mathematics * Produ ...
of irreducible factors. This decomposition is theoretically possible and is unique for
polynomial In mathematics, a polynomial is an expression consisting of indeterminates (also called variables) and coefficients, that involves only the operations of addition, subtraction, multiplication, and positive-integer powers of variables. An exampl ...
s with
coefficient In mathematics, a coefficient is a multiplicative factor in some term of a polynomial, a series, or an expression; it is usually a number, but may be any expression (including variables such as , and ). When the coefficients are themselves ...
s 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 mathematics and computer science, an algorithm () is a finite sequence of rigorous instructions, typically used to solve a class of specific problems or to perform a computation. Algorithms are used as specifications for performing ...
. In practice, algorithms have been designed only for polynomials with coefficients in a
finite field In mathematics, a finite field or Galois field (so-named in honor of Évariste Galois) 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, subtr ...
, in the
field of rationals In mathematics, a rational number is a number that can be expressed as the quotient or fraction of two integers, a numerator and a non-zero denominator . For example, is a rational number, as is every integer (e.g. ). The set of all rationa ...
or in a
finitely generated field extension In mathematics, particularly in algebra, a field extension is a pair of fields E\subseteq F, such that the operations of ''E'' are those of ''F'' restricted to ''E''. In this case, ''F'' is an extension field of ''E'' and ''E'' is a subfield of ...
of one of them. All factorization algorithms, including the case of multivariate polynomials over the rational numbers, reduce the problem to this case; see
polynomial factorization 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 dom ...
. It is also used for various applications of finite fields, such as
coding theory Coding theory is the study of the properties of codes and their respective fitness for specific applications. Codes are used for data compression, cryptography, error detection and correction, data transmission and data storage. Codes are studied ...
( cyclic redundancy codes and
BCH code In coding theory, the Bose–Chaudhuri–Hocquenghem codes (BCH codes) form a class of cyclic error-correcting codes that are constructed using polynomials over a finite field (also called ''Galois field''). BCH codes were invented in 1959 ...
s),
cryptography Cryptography, or cryptology (from grc, , translit=kryptós "hidden, secret"; and ''graphein'', "to write", or '' -logia'', "study", respectively), is the practice and study of techniques for secure communication in the presence of adv ...
(
public key cryptography Public-key cryptography, or asymmetric cryptography, is the field of cryptographic systems that use pairs of related keys. Each key pair consists of a public key and a corresponding private key. Key pairs are generated with cryptographic al ...
by the means of
elliptic curves In mathematics, an elliptic curve is a smooth, projective, algebraic curve of genus one, on which there is a specified point . An elliptic curve is defined over a field and describes points in , the Cartesian product of with itself. If t ...
), and
computational number theory In mathematics and computer science, computational number theory, also known as algorithmic number theory, is the study of computational methods for investigating and solving problems in number theory and arithmetic geometry, including algorithm ...
. As the reduction of the factorization of
multivariate polynomial In mathematics, a polynomial is an expression consisting of indeterminates (also called variables) and coefficients, that involves only the operations of addition, subtraction, multiplication, and positive-integer powers of variables. An exampl ...
s to that of univariate polynomials does not have any specificity in the case of coefficients in a finite field, only polynomials with one variable are considered in this article.


Background


Finite field

The theory of finite fields, whose origins can be traced back to the works of
Gauss Johann Carl Friedrich Gauss (; german: Gauß ; la, Carolus Fridericus Gauss; 30 April 177723 February 1855) was a German mathematician and physicist who made significant contributions to many fields in mathematics and science. Sometimes refer ...
and Galois, has played a part in various branches of mathematics. Due to the applicability of the concept in other topics of mathematics and sciences like computer science there has been a resurgence of interest in finite fields and this is partly due to important applications in
coding theory Coding theory is the study of the properties of codes and their respective fitness for specific applications. Codes are used for data compression, cryptography, error detection and correction, data transmission and data storage. Codes are studied ...
and
cryptography Cryptography, or cryptology (from grc, , translit=kryptós "hidden, secret"; and ''graphein'', "to write", or '' -logia'', "study", respectively), is the practice and study of techniques for secure communication in the presence of adv ...
. Applications of finite fields introduce some of these developments in
cryptography Cryptography, or cryptology (from grc, , translit=kryptós "hidden, secret"; and ''graphein'', "to write", or '' -logia'', "study", respectively), is the practice and study of techniques for secure communication in the presence of adv ...
,
computer algebra In mathematics and computer science, computer algebra, also called symbolic computation or algebraic computation, is a scientific area that refers to the study and development of algorithms and software for manipulating mathematical expressions ...
and
coding theory Coding theory is the study of the properties of codes and their respective fitness for specific applications. Codes are used for data compression, cryptography, error detection and correction, data transmission and data storage. Codes are studied ...
. A finite field or
Galois field In mathematics, a finite field or Galois field (so-named in honor of Évariste Galois) 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, subtr ...
is a field with a
finite Finite is the opposite of infinite. It may refer to: * Finite number (disambiguation) * Finite set, a set whose cardinality (number of elements) is some natural number * Finite verb, a verb form that has a subject, usually being inflected or marke ...
order (number of elements). The order of a finite field is always a
prime A prime number (or a prime) is a natural number greater than 1 that is not a product of two smaller natural numbers. A natural number greater than 1 that is not prime is called a composite number. For example, 5 is prime because the only ways ...
or a power of prime. For each
prime power In mathematics, a prime power is a positive integer which is a positive integer power of a single prime number. For example: , and are prime powers, while , and are not. The sequence of prime powers begins: 2, 3, 4, 5, 7, 8, 9, 11, 13, 16, 17 ...
''q'' = ''pr'', there exists exactly one finite field with ''q'' elements,
up to Two mathematical objects ''a'' and ''b'' are called equal up to an equivalence relation ''R'' * if ''a'' and ''b'' are related by ''R'', that is, * if ''aRb'' holds, that is, * if the equivalence classes of ''a'' and ''b'' with respect to ''R'' ...
isomorphism. This field is denoted ''GF''(''q'') or F''q''. If ''p'' is prime, ''GF''(''p'') is the
prime field In mathematics, the characteristic of a ring , often denoted , is defined to be the smallest number of times one must use the ring's multiplicative identity (1) in a sum to get the additive identity (0). If this sum never reaches the additive ide ...
of order ''p''; it is the field of
residue class In mathematics, modular arithmetic is a system of arithmetic for integers, where numbers "wrap around" when reaching a certain value, called the modulus. The modern approach to modular arithmetic was developed by Carl Friedrich Gauss in his bo ...
es modulo ''p'', and its ''p'' elements are denoted 0, 1, ..., ''p''−1. Thus ''a'' = ''b'' in ''GF''(''p'') means the same as ''a'' ≡ ''b'' (mod ''p'').


Irreducible polynomials

Let ''F'' be a finite field. As for general fields, a non-constant polynomial ''f'' in ''F'' 'x''is said to be irreducible over ''F'' if it is not the product of two polynomials of positive degree. A polynomial of positive degree that is not irreducible over ''F'' is called ''reducible over'' ''F''. Irreducible polynomials allow us to construct the finite fields of non-prime order. In fact, for a prime power ''q'', let F''q'' be the finite field with ''q'' elements, unique up to isomorphism. A polynomial ''f'' of degree ''n'' greater than one, which is irreducible over F''q'', defines a field extension of degree ''n'' which is isomorphic to the field with ''q''''n'' elements: the elements of this extension are the polynomials of degree lower than ''n''; addition, subtraction and multiplication by an element of F''q'' are those of the polynomials; the product of two elements is the remainder of the division by ''f'' of their product as polynomials; the inverse of an element may be computed by the extended GCD algorithm (see Arithmetic of algebraic extensions). It follows that, to compute in a finite field of non prime order, one needs to generate an irreducible polynomial. For this, the common method is to take a polynomial at random and test it for irreducibility. For sake of efficiency of the multiplication in the field, it is usual to search for polynomials of the shape ''x''''n'' + ''ax'' + ''b''. Irreducible polynomials over finite fields are also useful for
Pseudorandom A pseudorandom sequence of numbers is one that appears to be statistically random, despite having been produced by a completely deterministic and repeatable process. Background The generation of random numbers has many uses, such as for rand ...
number generators using feedback shift registers and
discrete logarithm In mathematics, for given real numbers ''a'' and ''b'', the logarithm log''b'' ''a'' is a number ''x'' such that . Analogously, in any group ''G'', powers ''b'k'' can be defined for all integers ''k'', and the discrete logarithm log''b ...
over F2''n''. The number of irreducible
monic polynomial In algebra, a monic polynomial is a single-variable polynomial (that is, a univariate polynomial) in which the leading coefficient (the nonzero coefficient of highest degree) is equal to 1. Therefore, a monic polynomial has the form: :x^n+c_x^+\ ...
s of degree n over F''q'' is the number of aperiodic necklaces, given by
Moreau's necklace-counting function In combinatorial mathematics, the necklace polynomial, or Moreau's necklace-counting function, introduced by , counts the number of distinct necklaces of ''n'' colored beads chosen out of α available colors. The necklaces are assumed to be aperio ...
''M''''q''(''n''). The closely related necklace function ''N''''q''(''n'') counts monic polynomials of degree ''n'' which are primary (a power of an irreducible); or alternatively irreducible polynomials of all degrees d which divide n.


Example

The polynomial ''P'' = ''x''4 + 1 is irreducible over Q but not over any finite field. * On any field extension of F2, ''P'' = (''x''+1)4. *On every other finite field, at least one of −1, 2 and −2 is a square, because the product of two non-squares is a square and so we have #If -1=a^2, then P=(x^2+a)(x^2-a). #If 2=b^2, then P=(x^2+bx+1)(x^2-bx+1). #If -2=c^2, then P=(x^2+cx-1)(x^2-cx-1).


Complexity

Polynomial factoring algorithms use basic polynomial operations such as products, divisions, gcd, powers of one polynomial modulo another, etc. A
multiplication Multiplication (often denoted by the Multiplication sign, cross symbol , by the mid-line #Notation and terminology, dot operator , by juxtaposition, or, on computers, by an asterisk ) is one of the four Elementary arithmetic, elementary Op ...
of two polynomials of degree at most ''n'' can be done in ''O''(''n''2) operations in F''q'' using "classical" arithmetic, or in ''O''(''n''log(''n'') log(log(''n'')) ) operations in F''q'' using "fast" arithmetic. A
Euclidean division In arithmetic, Euclidean division – or division with remainder – is the process of dividing one integer (the dividend) by another (the divisor), in a way that produces an integer quotient and a natural number remainder strictly smaller than ...
(division with remainder) can be performed within the same time bounds. The cost of a
polynomial greatest common divisor In algebra, the greatest common divisor (frequently abbreviated as GCD) 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 ...
between two polynomials of degree at most ''n'' can be taken as ''O''(''n''2) operations in F''q'' using classical methods, or as ''O''(''n''log2(''n'') log(log(''n'')) ) operations in F''q'' using fast methods. For polynomials ''h'', ''g'' of degree at most ''n'', the exponentiation ''hq'' mod ''g'' can be done with ''O''(log(''q'')) polynomial products, using
exponentiation by squaring Exponentiation is a mathematical operation, written as , involving two numbers, the '' base'' and the ''exponent'' or ''power'' , and pronounced as " (raised) to the (power of) ". When is a positive integer, exponentiation corresponds to re ...
method, that is ''O''(''n''2log(''q'')) operations in F''q'' using classical methods, or ''O''(''n''log(''q'')log(''n'') log(log(''n''))) operations in F''q'' using fast methods. In the algorithms that follow, the complexities are expressed in terms of number of arithmetic operations in F''q'', using classical algorithms for the arithmetic of polynomials.


Factoring algorithms

Many algorithms for factoring polynomials over finite fields include the following three stages: #
Square-free factorization In mathematics, a square-free polynomial is a polynomial defined over a field (or more generally, an integral domain) that does not have as a divisor any square of a non-constant polynomial. A univariate polynomial is square free if and only if i ...
# Distinct-degree factorization # Equal-degree factorization An important exception is
Berlekamp's algorithm In mathematics, particularly computational algebra, Berlekamp's algorithm is a well-known method for factoring polynomials over finite fields (also known as ''Galois fields''). The algorithm consists mainly of matrix reduction and polynomial G ...
, which combines stages 2 and 3.


Berlekamp's algorithm

The Berlekamp's algorithm is historically important as being the first factorization algorithm, which works well in practice. However, it contains a loop on the elements of the ground field, which implies that it is practicable only over small finite fields. For a fixed ground field, its
time complexity In computer science, the time complexity is the computational complexity that describes the amount of computer time it takes to run an algorithm. Time complexity is commonly estimated by counting the number of elementary operations performed by t ...
is polynomial, but, for general ground fields, the complexity is exponential in the size of the ground field.


Square-free factorization

The algorithm determines a
square-free {{no footnotes, date=December 2015 In mathematics, a square-free element is an element ''r'' of a unique factorization domain ''R'' that is not divisible by a non-trivial square. This means that every ''s'' such that s^2\mid r is a unit of ''R''. A ...
factorization for polynomials whose coefficients come from the finite field F''q'' of order ''q'' = ''pm'' with ''p'' a prime. This algorithm firstly determines the
derivative In mathematics, the derivative of a function of a real variable measures the sensitivity to change of the function value (output value) with respect to a change in its argument (input value). Derivatives are a fundamental tool of calculus. ...
and then computes the gcd of the polynomial and its derivative. If it is not one then the gcd is again divided into the original polynomial, provided that the derivative is not zero (a case that exists for non-constant polynomials defined over finite fields). This algorithm uses the fact that, if the derivative of a polynomial is zero, then it is a polynomial in ''x''''p'', which is, if the coefficients belong to F''p'', the ''p''th power of the polynomial obtained by substituting ''x'' by ''x''1/''p''. If the coefficients do not belong to F''p'', the ''p''-th root of a polynomial with zero derivative is obtained by the same substitution on ''x'', completed by applying the inverse of the
Frobenius automorphism In commutative algebra and field theory, the Frobenius endomorphism (after Ferdinand Georg Frobenius) is a special endomorphism of commutative rings with prime characteristic , an important class which includes finite fields. The endomorphism m ...
to the coefficients. This algorithm works also over a field of characteristic zero, with the only difference that it never enters in the blocks of instructions where ''p''th roots are computed. However, in this case, Yun's algorithm is much more efficient because it computes the greatest common divisors of polynomials of lower degrees. A consequence is that, when factoring a polynomial over the integers, the algorithm which follows is not used: one first computes the square-free factorization over the integers, and to factor the resulting polynomials, one chooses a ''p'' such that they remain square-free modulo ''p''. Algorithm: SFF (Square-Free Factorization) Input: A
monic polynomial In algebra, a monic polynomial is a single-variable polynomial (that is, a univariate polynomial) in which the leading coefficient (the nonzero coefficient of highest degree) is equal to 1. Therefore, a monic polynomial has the form: :x^n+c_x^+\ ...
''f'' in F''q'' 'x''where ''q=pm'' Output: Square-free factorization of ''f'' ''R'' ← 1 # Make ''w'' be the product (without multiplicity) of all factors of ''f'' that have # multiplicity not divisible by ''p'' ''c'' ← gcd(''f'', ''f''′) ''w'' ← ''f''/''c'' # Step 1: Identify all factors in ''w'' ''i''←1 while ''w'' ≠ 1 do ''y'' ← gcd(''w'', ''c'') ''fac'' ← ''w''/''y'' ''R'' ← ''R''·''fac''''i'' ''w'' ← ''y''; ''c'' ← ''c''/''y''; ''i'' ← ''i+1'' end while # ''c'' is now the product (with multiplicity) of the remaining factors of ''f'' # Step 2: Identify all remaining factors using recursion # Note that these are the factors of ''f'' that have multiplicity divisible by ''p'' if ''c'' ≠ 1 then ''c'' ← ''c''1/''p'' ''R'' ← ''R''·SFF(''c'')''p'' end if Output(''R'') The idea is to identify the product of all irreducible factors of ''f'' with the same multiplicity. This is done in two steps. The first step uses the formal derivative of ''f'' to find all the factors with multiplicity not divisible by ''p''. The second step identifies the remaining factors. As all of the remaining factors have multiplicity divisible by ''p'', meaning they are powers of ''p'', one can simply take the ''p''-th square root and apply recursion.


Example of a square-free factorization

Let : f = x^ + 2 x^9 + 2x^8 + x^6 + x^5 + 2x^3 + 2x^2 +1 \in \mathbf_3 to be factored over the field with three elements. The algorithm computes first : c = \gcd(f, f') = x^9 + 2x^6 + x^3 + 2. Since the derivative is non-zero we have and we enter the while loop. After one loop we have , and with updates , and . The second time through the loop gives , , , with updates , and . The third time through the loop also does not change . For the fourth time through the loop we get , , , with updates , and . Since ''w'' = 1, we exit the while loop. Since ''c'' ≠ 1, it must be a perfect cube. The cube root of ''c'', obtained by replacing ''x''3 by ''x'' is ''x''2 + 1, and calling the square-free procedure recursively determines that it is square-free. Therefore, cubing it and combining it with the value of ''R'' to that point gives the square-free decomposition : f= (x+1)(x^2+1)^3(x+2)^4.


Distinct-degree factorization

This algorithm splits a square-free polynomial into a product of polynomials whose irreducible factors all have the same degree. Let ''f'' ∈ F''q'' 'x''of degree ''n'' be the polynomial to be factored. Algorithm Distinct-degree factorization(DDF) Input: A monic square-free polynomial Output: The set of all pairs , such that has an irreducible factor of degree and is the product of all monic irreducible factors of of degree . Begin i:=1;\qquad S:=\emptyset,\qquad f^*:=f; while \deg f^*\ge 2i do g=\gcd(f^*, x^-x) if , then S:=S\cup\; f^*:=f^*/g end if end while; if f^*\ne 1, then S:= S\cup\; if S=\emptyset, then return , else return End The correctness of the algorithm is based on the following:
Lemma. For ''i'' ≥ 1 the polynomial :x^-x \in \mathbf_q /math> is the product of all monic irreducible polynomials in F''q'' 'x''whose degree divides ''i''.
At first glance, this is not efficient since it involves computing the GCD of polynomials of a degree which is exponential in the degree of the input polynomial. However :g=\gcd \left (f^*, x^-x \right ) may be replaced by :g=\gcd \left (f^*, \left (x^-x \mod f^* \right ) \right ). Therefore, we have to compute: :x^-x \mod f^*, there are two methods:
Method I. Start from the value of :x^\mod f^* computed at the preceding step and to compute its ''q''-th power modulo the new ''f*'', using
exponentiation by squaring Exponentiation is a mathematical operation, written as , involving two numbers, the '' base'' and the ''exponent'' or ''power'' , and pronounced as " (raised) to the (power of) ". When is a positive integer, exponentiation corresponds to re ...
method. This needs :O \left (\log(q) \deg(f)^2 \right ) arithmetic operations in F''q'' at each step, and thus :O \left (\log(q) \deg(f)^3 \right ) arithmetic operations for the whole algorithm.
Method II. Using the fact that the ''q''-th power is a linear map over F''q'' we may compute its matrix with :O \left (\deg(f)^2(\log(q)+\deg(f)) \right ) operations. Then at each iteration of the loop, compute the product of a matrix by a vector (with ''O''(deg(''f'')2) operations). This induces a total number of operations in F''q'' which is :O \left (\deg(f)^2 (\log(q)+\deg(f)) \right ). Thus this second method is more efficient and is usually preferred. Moreover, the matrix that is computed in this method is used, by most algorithms, for equal-degree factorization (see below); thus using it for the distinct-degree factorization saves further computing time.


Equal-degree factorization


Cantor–Zassenhaus algorithm

In this section, we consider the factorization of a monic squarefree univariate polynomial ''f'', of degree ''n'', over a finite field F''q'', which has ''r'' ≥ 2 pairwise distinct irreducible factors f_1,\ldots,f_r each of degree ''d''. We first describe an algorithm by Cantor and Zassenhaus (1981) and then a variant that has a slightly better complexity. Both are probabilistic algorithms whose running time depends on random choices (
Las Vegas algorithm In computing, a Las Vegas algorithm is a randomized algorithm that always gives correct results; that is, it always produces the correct result or it informs about the failure. However, the runtime of a Las Vegas algorithm differs depending on the ...
s), and have a good average running time. In next section we describe an algorithm by Shoup (1990), which is also an equal-degree factorization algorithm, but is deterministic. All these algorithms require an odd order ''q'' for the field of coefficients. For more factorization algorithms see e.g. Knuth's book
The Art of Computer Programming ''The Art of Computer Programming'' (''TAOCP'') is a comprehensive monograph written by the computer scientist Donald Knuth presenting programming algorithms and their analysis. Volumes 1–5 are intended to represent the central core of com ...
volume 2. Algorithm Cantor–Zassenhaus algorithm. Input: A finite field F''q'' of odd order ''q''. A monic square free polynomial ''f'' in F''q'' 'x''of degree ''n'' = ''rd'', which has ''r'' ≥ 2 irreducible factors each of degree ''d'' Output: The set of monic irreducible factors of ''f''. Factors := ; while Size(Factors) < ''r'' do, Choose ''h'' in F''q'' 'x''with deg(''h'') < ''n'' at random; g:=h^- 1 \pmod f for each ''u'' in Factors with deg(''u'') > ''d'' do if gcd(''g'', ''u'') ≠ 1 and gcd(''g'', ''u'') ≠ ''u'', then Factors:= Factors\,\setminus\, \\cup\; endif endwhile return Factors The correctness of this algorithm relies on the fact that the ring F''q'' 'x''''f'' is a direct product of the fields F''q'' 'x''''fi'' where ''fi'' runs on the irreducible factors of ''f''. As all these fields have ''qd'' elements, the component of ''g'' in any of these fields is zero with probability :\frac \sim \tfrac. This implies that the polynomial gcd(''g'', ''u'') is the product of the factors of ''g'' for which the component of ''g'' is zero. It has been shown that the average number of iterations of the while loop of the algorithm is less than 2.5 \log_2 r, giving an average number of arithmetic operations in F''q'' which is O(dn^2\log(r)\log(q)). In the typical case where ''d''log(''q'') > ''n'', this complexity may be reduced to :O(n^2(\log(r)\log(q)+n)) by choosing ''h'' in the kernel of the linear map : v \to v^q-v \pmod f and replacing the instruction :g:=h^- 1 \pmod f by :g:=h^- 1 \pmod f. The proof of validity is the same as above, replacing the direct product of the fields F''q'' 'x''''fi'' by the direct product of their subfields with ''q'' elements. The complexity is decomposed in O(n^2\log(r)\log(q)) for the algorithm itself, O(n^2(\log(q)+n)) for the computation of the matrix of the linear map (which may be already computed in the square-free factorization) and ''O''(''n''3) for computing its kernel. It may be noted that this algorithm works also if the factors have not the same degree (in this case the number ''r'' of factors, needed for stopping the while loop, is found as the dimension of the kernel). Nevertheless, the complexity is slightly better if square-free factorization is done before using this algorithm (as ''n'' may decrease with square-free factorization, this reduces the complexity of the critical steps).


Victor Shoup's algorithm

Like the algorithms of the preceding section, Victor Shoup's algorithm is an equal-degree factorization algorithm. Unlike them, it is a deterministic algorithm. However, it is less efficient, in practice, than the algorithms of preceding section. For Shoup's algorithm, the input is restricted to polynomials over prime fields F''p''. The worst case
time complexity In computer science, the time complexity is the computational complexity that describes the amount of computer time it takes to run an algorithm. Time complexity is commonly estimated by counting the number of elementary operations performed by t ...
of Shoup's algorithm has a factor \sqrt. Although exponential, this complexity is much better than previous deterministic algorithms (Berlekamp's algorithm) which have as a factor. However, there are very few polynomials for which the computing time is exponential, and the average time complexity of the algorithm is polynomial in d\log(p), where is the degree of the polynomial, and is the number of elements of the ground field. Let ''g'' = ''g''1 ... ''gk'' be the desired factorization, where the ''gi'' are distinct monic irreducible polynomials of degree ''d''. Let ''n'' = deg(''g'') = ''kd''. We consider the ring ''R'' = F''q'' 'x''''g'' and denote also by ''x'' the image of ''x'' in ''R''. The ring ''R'' is the direct product of the fields ''Ri'' = F''q'' 'x''''gi'', and we denote by ''pi'' the natural
homomorphism In algebra, a homomorphism is a morphism, structure-preserving map (mathematics), map between two algebraic structures of the same type (such as two group (mathematics), groups, two ring (mathematics), rings, or two vector spaces). The word ''homo ...
from the ''R'' onto ''Ri''. The
Galois group In mathematics, in the area of abstract algebra known as Galois theory, the Galois group of a certain type of field extension is a specific group associated with the field extension. The study of field extensions and their relationship to the po ...
of ''Ri'' over F''q'' is cyclic of order ''d'', generated by the
field automorphism In mathematics, an automorphism is an isomorphism from a mathematical object to itself. It is, in some sense, a symmetry of the object, and a way of mapping the object to itself while preserving all of its structure. The set of all automorphisms ...
''u'' → ''up''. It follows that the roots of ''gi'' in ''Ri'' are : p_i(x), p_i(x^q), p_i \left (x^ \right ), \ldots, p_i \left (x^ \right ). Like in the preceding algorithm, this algorithm uses the same
subalgebra In mathematics, a subalgebra is a subset of an algebra, closed under all its operations, and carrying the induced operations. "Algebra", when referring to a structure, often means a vector space or module equipped with an additional bilinear operat ...
''B'' of ''R'' as the
Berlekamp's algorithm In mathematics, particularly computational algebra, Berlekamp's algorithm is a well-known method for factoring polynomials over finite fields (also known as ''Galois fields''). The algorithm consists mainly of matrix reduction and polynomial G ...
, sometimes called the "Berlekamp subagebra" and defined as :\begin B &= \left \ \\ &= \ \end A subset ''S'' of ''B'' is said a
separating set In mathematics, a set S of functions with domain D is called a and is said to (or just ) if for any two distinct elements x and y of D, there exists a function f \in S such that f(x) \neq f(y).. Separating sets can be used to formulate a vers ...
if, for every 1 ≤ ''i'' < ''j'' ≤ ''k'' there exists ''s'' ∈ ''S'' such that p_i(s) \ne p_j(s). In the preceding algorithm, a separating set is constructed by choosing at random the elements of ''S''. In Shoup's algorithm, the separating set is constructed in the following way. Let ''s'' in ''R'' 'Y''be such that :\begin s&=(Y-x) \left (Y-x^q \right )\cdots \left (Y-x^ \right ) \\ &=s_0+\cdots+s_Y^+Y^d \end Then \ is a separating set because p_i(s)=g_i for ''i'' =1, ..., ''k'' (the two monic polynomials have the same roots). As the ''gi'' are pairwise distinct, for every pair of distinct indexes (''i'', ''j''), at least one of the coefficients ''sh'' will satisfy p_i(s_h)\ne p_j(s_h). Having a separating set, Shoup's algorithm proceeds as the last algorithm of the preceding section, simply by replacing the instruction "choose at random ''h'' in the kernel of the linear map v \to v^q-v \pmod f" by "choose ''h'' + ''i'' with ''h'' in ''S'' and ''i'' in ".


Time complexity

As described in previous sections, for the factorization over finite fields, there are
randomized algorithm A randomized algorithm is an algorithm that employs a degree of randomness as part of its logic or procedure. The algorithm typically uses uniformly random bits as an auxiliary input to guide its behavior, in the hope of achieving good performa ...
s of polynomial
time complexity In computer science, the time complexity is the computational complexity that describes the amount of computer time it takes to run an algorithm. Time complexity is commonly estimated by counting the number of elementary operations performed by t ...
(for example Cantor-Zassenhaus algorithm). There are also deterministic algorithms with a polynomial average complexity (for example Shoup's algorithm). The existence of a deterministic algorithm with a polynomial worst-case complexity is still an open problem.


Rabin's test of irreducibility

Like distinct-degree factorization algorithm, Rabin's algorithm is based on the Lemma stated above. Distinct-degree factorization algorithm tests every ''d'' not greater than half the degree of the input polynomial. Rabin's algorithm takes advantage that the factors are not needed for considering fewer ''d''. Otherwise, it is similar to distinct-degree factorization algorithm. It is based on the following fact. Let ''p''1, ..., ''pk'', be all the prime divisors of ''n'', and denote n/p_i=n_i, for 1 ≤ ''i'' ≤ ''k'' polynomial ''f'' in F''q'' 'x''of degree ''n'' is irreducible in F''q'' 'x''if and only if \gcd \left (f,x^-x \right )=1, for 1 ≤ ''i'' ≤ ''k'', and ''f'' divides x^-x. In fact, if ''f'' has a factor of degree not dividing ''n'', then ''f'' does not divide x^-x; if ''f'' has a factor of degree dividing ''n'', then this factor divides at least one of the x^-x. Algorithm Rabin Irreducibility Test Input: A monic polynomial ''f'' in F''q'' 'x''of degree ''n'', ''p''1, ..., ''pk'' all distinct prime divisors of ''n''. Output: Either "''f'' is irreducible" or "''f'' is reducible". for ''j'' = 1 to ''k'' do n_j=n/p_j; for ''i'' = 1 to ''k'' do h:=x^-x \bmod f; ''g'' := gcd(''f'', ''h''); if ''g'' ≠ 1, then return "''f'' is reducible" and STOP; end for; g:= x^-x \bmod f; if ''g'' = 0, then return "''f'' is irreducible", else return "''f'' is reducible" The basic idea of this algorithm is to compute x^ \bmod f starting from the smallest n_1,\ldots,n_k by repeated squaring or using the
Frobenius automorphism In commutative algebra and field theory, the Frobenius endomorphism (after Ferdinand Georg Frobenius) is a special endomorphism of commutative rings with prime characteristic , an important class which includes finite fields. The endomorphism m ...
, and then to take the correspondent gcd. Using the elementary polynomial arithmetic, the computation of the matrix of the Frobenius automorphism needs O(n^2 (n+\log q)) operations in F''q'', the computation of :x^-x \pmod f needs ''O''(''n''3) further operations, and the algorithm itself needs ''O''(''kn''2) operations, giving a total of O(n^2 (n+\log q)) operations in F''q''. Using fast arithmetic (complexity O(n\log n) for multiplication and division, and O(n(\log n)^2) for GCD computation), the computation of the x^-x \bmod f by repeated squaring is O(n^2\log n\log q), and the algorithm itself is O(kn(\log n)^2), giving a total of O(n^2\log n\log q) operations in F''q''.


See also

*
Berlekamp's algorithm In mathematics, particularly computational algebra, Berlekamp's algorithm is a well-known method for factoring polynomials over finite fields (also known as ''Galois fields''). The algorithm consists mainly of matrix reduction and polynomial G ...
*
Cantor–Zassenhaus algorithm In computational algebra, the Cantor–Zassenhaus algorithm is a method for factoring polynomials over finite fields (also called Galois fields). The algorithm consists mainly of exponentiation and polynomial GCD computations. It was invented by ...
*
Polynomial factorization 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 dom ...


References

*KEMPFERT,H (1969
On the ''Factorization of Polynomials''
Department of Mathematics, The Ohio State University,Columbus,Ohio 43210 *Shoup,Victor (1996)
Smoothness and Factoring Polynomials over Finite Fields
' Computer Science Department University of Toronto * Von Zur Gathen, J.; Panario, D. (2001)
Factoring Polynomials Over Finite Fields: A Survey
Journal of Symbolic Computation The ''Journal of Symbolic Computation'' is a peer-reviewed monthly scientific journal covering all aspects of symbolic computation published by Academic Press and then by Elsevier. It is targeted to both mathematicians and computer scientists. It ...
, Volume 31, Issues 1–2, January 2001, 3--17. *Gao Shuhong, Panario Daniel,''Test and Construction of Irreducible Polynomials over Finite Fields'' Department of mathematical Sciences, Clemson University, South Carolina, 29634–1907, USA. and Department of computer science University of Toronto, Canada M5S-1A4 *Shoup, Victor (1989
New Algorithms for Finding Irreducible Polynomials over Finite Fields
Computer Science Department University of Wisconsin–Madison * Geddes, Keith O.; Czapor, Stephen R.; Labahn, George (1992)
Algorithms for computer algebra
Boston, MA: Kluwer Academic Publishers. pp. xxii+585. .


Notes

{{Reflist


External links

* Some irreducible polynomials http://www.math.umn.edu/~garrett/m/algebra/notes/07.pdf * Field and Galois Theory :http://www.jmilne.org/math/CourseNotes/FT.pdf * Galois Field:http://designtheory.org/library/encyc/topics/gf.pdf * Factoring polynomials over finite fields: http://www.science.unitn.it/~degraaf/compalg/polfact.pdf Polynomials Algebra Computer algebra Coding theory Cryptography Computational number theory Polynomials factorization algorithms