fbpx
Wikipedia

Factorization of polynomials over finite fields

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.

All factorization algorithms, including the case of multivariate polynomials over the rational numbers, reduce the problem to this case; see polynomial factorization. It is also used for various applications of finite fields, such as coding theory (cyclic redundancy codes and BCH codes), cryptography (public key cryptography by the means of elliptic curves), and computational number theory.

As the reduction of the factorization of multivariate polynomials 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 edit

Finite field edit

The theory of finite fields, whose origins can be traced back to the works of Gauss 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 and cryptography. Applications of finite fields introduce some of these developments in cryptography, computer algebra and coding theory.

A finite field or Galois field is a field with a finite order (number of elements). The order of a finite field is always a prime or a power of prime. For each prime power q = pr, there exists exactly one finite field with q elements, up to isomorphism. This field is denoted GF(q) or Fq. If p is prime, GF(p) is the prime field of order p; it is the field of residue classes modulo p, and its p elements are denoted 0, 1, ..., p−1. Thus a = b in GF(p) means the same as ab (mod p).

Irreducible polynomials edit

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 Fq be the finite field with q elements, unique up to isomorphism. A polynomial f of degree n greater than one, which is irreducible over Fq, defines a field extension of degree n which is isomorphic to the field with qn elements: the elements of this extension are the polynomials of degree lower than n; addition, subtraction and multiplication by an element of Fq 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 xn + ax + b.[citation needed][1]

Irreducible polynomials over finite fields are also useful for pseudorandom number generators using feedback shift registers and discrete logarithm over F2n.

The number of irreducible monic polynomials of degree n over Fq is the number of aperiodic necklaces, given by Moreau's necklace-counting function Mq(n). The closely related necklace function Nq(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.[2]

Example edit

The polynomial P = x4 + 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
  1. If   then  
  2. If   then  
  3. If   then  

Complexity edit

Polynomial factoring algorithms use basic polynomial operations such as products, divisions, gcd, powers of one polynomial modulo another, etc. A multiplication of two polynomials of degree at most n can be done in O(n2) operations in Fq using "classical" arithmetic, or in O(nlog(n) log(log(n)) ) operations in Fq using "fast" arithmetic. A Euclidean division (division with remainder) can be performed within the same time bounds. The cost of a polynomial greatest common divisor between two polynomials of degree at most n can be taken as O(n2) operations in Fq using classical methods, or as O(nlog2(n) log(log(n)) ) operations in Fq 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 method, that is O(n2log(q)) operations in Fq using classical methods, or O(nlog(q)log(n) log(log(n))) operations in Fq using fast methods.

In the algorithms that follow, the complexities are expressed in terms of number of arithmetic operations in Fq, using classical algorithms for the arithmetic of polynomials.

Factoring algorithms edit

Many algorithms for factoring polynomials over finite fields include the following three stages:

  1. Square-free factorization
  2. Distinct-degree factorization
  3. Equal-degree factorization

An important exception is Berlekamp's algorithm, which combines stages 2 and 3.

Berlekamp's algorithm edit

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 is polynomial, but, for general ground fields, the complexity is exponential in the size of the ground field.

Square-free factorization edit

The algorithm determines a square-free factorization for polynomials whose coefficients come from the finite field Fq of order q = pm with p a prime. This algorithm firstly determines the derivative 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 xp, which is, if the coefficients belong to Fp, the pth power of the polynomial obtained by substituting x by x1/p. If the coefficients do not belong to Fp, the pth root of a polynomial with zero derivative is obtained by the same substitution on x, completed by applying the inverse of the Frobenius automorphism to the coefficients.[citation needed]

This algorithm works also over a field of characteristic zero, with the only difference that it never enters in the blocks of instructions where pth 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 f in Fq[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 cgcd(f, f′) wf/c # Step 1: Identify all factors in w i ← 1 while w ≠ 1 do ygcd(w, c) facw / y RR · faci wy; cc / y; ii + 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 cc1/p RR·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 pth square root and apply recursion.

Example of a square-free factorization edit

Let

 

to be factored over the field with three elements.

The algorithm computes first

 

Since the derivative is non-zero we have w = f/c = x2 + 2 and we enter the while loop. After one loop we have y = x + 2, z = x + 1 and R = x + 1 with updates i = 2, w = x + 2 and c = x8 + x7 + x6 + x2+x+1. The second time through the loop gives y = x + 2, z = 1, R = x + 1, with updates i = 3, w = x + 2 and c = x7 + 2x6 + x + 2. The third time through the loop also does not change R. For the fourth time through the loop we get y = 1, z = x + 2, R = (x + 1)(x + 2)4, with updates i = 5, w = 1 and c = x6 + 1. 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 x3 by x is x2 + 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

 

Distinct-degree factorization edit

This algorithm splits a square-free polynomial into a product of polynomials whose irreducible factors all have the same degree. Let fFq[x] of degree n be the polynomial to be factored.

Algorithm Distinct-degree factorization(DDF) Input: A monic square-free polynomial fFq[x] Output: The set of all pairs (g, d), such that f has an irreducible factor of degree d and g is the product of all monic irreducible factors of f of degree d. Begin   while   do   if g ≠ 1, then  ;   end if i := i + 1; end while; if  , then  ; if  , then return {(f, 1)}, else return S End 

The correctness of the algorithm is based on the following:

Lemma. For i ≥ 1 the polynomial

 

is the product of all monic irreducible polynomials in Fq[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,

 

may be replaced by

 

Therefore, we have to compute:

 

there are two methods:

Method I. Start from the value of

 

computed at the preceding step and to compute its qth power modulo the new f*, using exponentiation by squaring method. This needs

 

arithmetic operations in Fq at each step, and thus

 

arithmetic operations for the whole algorithm.

Method II. Using the fact that the qth power is a linear map over Fq we may compute its matrix with

 

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 Fq which is

 

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 edit

Cantor–Zassenhaus algorithm edit

In this section, we consider the factorization of a monic squarefree univariate polynomial f, of degree n, over a finite field Fq, which has r ≥ 2 pairwise distinct irreducible factors   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 algorithms), 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 volume 2.

Algorithm Cantor–Zassenhaus algorithm. Input: A finite field Fq of odd order q. A monic square free polynomial f in Fq[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 := {f}; while Size(Factors) < r do, Choose h in Fq[x] with deg(h) < n at random;   for each u in Factors with deg(u) > d do if gcd(g, u) ≠ 1 and gcd(g, u) ≠ u, then Factors:= Factors ; endif endwhile return Factors 

The correctness of this algorithm relies on the fact that the ring Fq[x]/f is a direct product of the fields Fq[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

 

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  , giving an average number of arithmetic operations in Fq which is  .[3]

In the typical case where dlog(q) > n, this complexity may be reduced to

 

by choosing h in the kernel of the linear map

 

and replacing the instruction

 

by

 

The proof of validity is the same as above, replacing the direct product of the fields Fq[x]/fi by the direct product of their subfields with q elements. The complexity is decomposed in   for the algorithm itself,   for the computation of the matrix of the linear map (which may be already computed in the square-free factorization) and O(n3) 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 edit

Like the algorithms of the preceding section, Victor Shoup's algorithm is an equal-degree factorization algorithm.[4] 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 Fp.

The worst case time complexity of Shoup's algorithm has a factor   Although exponential, this complexity is much better than previous deterministic algorithms (Berlekamp's algorithm) which have p 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   where d is the degree of the polynomial, and p is the number of elements of the ground field.

Let g = g1 ... 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 = Fq[x]/g and denote also by x the image of x in R. The ring R is the direct product of the fields Ri = Fq[x]/gi, and we denote by pi the natural homomorphism from the R onto Ri. The Galois group of Ri over Fq is cyclic of order d, generated by the field automorphism uup. It follows that the roots of gi in Ri are

 

Like in the preceding algorithm, this algorithm uses the same subalgebra B of R as the Berlekamp's algorithm, sometimes called the "Berlekamp subagebra" and defined as

 

A subset S of B is said a separating set if, for every 1 ≤ i < j ≤ k there exists s ∈ S such that  . 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

 

Then   is a separating set because   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  

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  " by "choose h + i with h in S and i in {1, ..., k−1}".

Time complexity edit

As described in previous sections, for the factorization over finite fields, there are randomized algorithms of polynomial time complexity (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 edit

Like distinct-degree factorization algorithm, Rabin's algorithm[5] 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 p1, ..., pk, be all the prime divisors of n, and denote  , for 1 ≤ ik polynomial f in Fq[x] of degree n is irreducible in Fq[x] if and only if  , for 1 ≤ i ≤ k, and f divides  . In fact, if f has a factor of degree not dividing n, then f does not divide  ; if f has a factor of degree dividing n, then this factor divides at least one of the  

Algorithm Rabin Irreducibility Test Input: A monic polynomial f in Fq[x] of degree n, p1, ..., pk all distinct prime divisors of n. Output: Either "f is irreducible" or "f is reducible". for j = 1 to k do  ; for i = 1 to k do  ; g := gcd(f, h); if g ≠ 1, then return "f is reducible" and STOP; end for;  ; if g = 0, then return "f is irreducible", else return "f is reducible" 

The basic idea of this algorithm is to compute   starting from the smallest   by repeated squaring or using the Frobenius automorphism, and then to take the correspondent gcd. Using the elementary polynomial arithmetic, the computation of the matrix of the Frobenius automorphism needs   operations in Fq, the computation of

 

needs O(n3) further operations, and the algorithm itself needs O(kn2) operations, giving a total of   operations in Fq. Using fast arithmetic (complexity   for multiplication and division, and   for GCD computation), the computation of the   by repeated squaring is  , and the algorithm itself is  , giving a total of   operations in Fq.

See also edit

References edit

  • 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, 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. ISBN 0-7923-9259-0.

Notes edit

  1. ^ "Reducibility over $\mathbb{Z}_2$?". Mathematics Stack Exchange. Retrieved 2023-09-10.
  2. ^ Christophe Reutenauer, Mots circulaires et polynomes irreductibles, Ann. Sci. math Quebec, vol 12, no 2, pp. 275-285
  3. ^ Flajolet, Philippe; Steayaert, Jean-Marc (1982), Automata, languages and programming, Lecture Notes in Comput. Sci., vol. 140, Aarhus: Springer, pp. 239–251, doi:10.1007/BFb0012773, ISBN 978-3-540-11576-2
  4. ^ Victor Shoup, On the deterministic complexity of factoring polynomials over finite fields, Information Processing Letters 33:261-267, 1990
  5. ^ Rabin, Michael (1980). "Probabilistic algorithms in finite fields". SIAM Journal on Computing. 9 (2): 273–280. CiteSeerX 10.1.1.17.5653. doi:10.1137/0209024.

External links edit

factorization, polynomials, over, finite, fields, mathematics, computer, algebra, factorization, polynomial, consists, decomposing, into, product, irreducible, factors, this, decomposition, theoretically, possible, unique, polynomials, with, coefficients, fiel. 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 All factorization algorithms including the case of multivariate polynomials over the rational numbers reduce the problem to this case see polynomial factorization It is also used for various applications of finite fields such as coding theory cyclic redundancy codes and BCH codes cryptography public key cryptography by the means of elliptic curves and computational number theory As the reduction of the factorization of multivariate polynomials 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 Contents 1 Background 1 1 Finite field 1 2 Irreducible polynomials 1 3 Example 1 4 Complexity 2 Factoring algorithms 2 1 Berlekamp s algorithm 2 2 Square free factorization 2 2 1 Example of a square free factorization 2 3 Distinct degree factorization 2 4 Equal degree factorization 2 4 1 Cantor Zassenhaus algorithm 2 4 2 Victor Shoup s algorithm 3 Time complexity 4 Rabin s test of irreducibility 5 See also 6 References 7 Notes 8 External linksBackground editFinite field edit Main article Finite field The theory of finite fields whose origins can be traced back to the works of Gauss 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 and cryptography Applications of finite fields introduce some of these developments in cryptography computer algebra and coding theory A finite field or Galois field is a field with a finite order number of elements The order of a finite field is always a prime or a power of prime For each prime power q pr there exists exactly one finite field with q elements up to isomorphism This field is denoted GF q or Fq If p is prime GF p is the prime field of order p it is the field of residue classes 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 edit 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 Fq be the finite field with q elements unique up to isomorphism A polynomial f of degree n greater than one which is irreducible over Fq defines a field extension of degree n which is isomorphic to the field with qn elements the elements of this extension are the polynomials of degree lower than n addition subtraction and multiplication by an element of Fq 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 xn ax b citation needed 1 Irreducible polynomials over finite fields are also useful for pseudorandom number generators using feedback shift registers and discrete logarithm over F2n The number of irreducible monic polynomials of degree n over Fq is the number of aperiodic necklaces given by Moreau s necklace counting function Mq n The closely related necklace function Nq 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 2 Example edit The polynomial P x4 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 haveIf 1 a 2 displaystyle 1 a 2 nbsp then P x 2 a x 2 a displaystyle P x 2 a x 2 a nbsp If 2 b 2 displaystyle 2 b 2 nbsp then P x 2 b x 1 x 2 b x 1 displaystyle P x 2 bx 1 x 2 bx 1 nbsp If 2 c 2 displaystyle 2 c 2 nbsp then P x 2 c x 1 x 2 c x 1 displaystyle P x 2 cx 1 x 2 cx 1 nbsp Complexity edit Polynomial factoring algorithms use basic polynomial operations such as products divisions gcd powers of one polynomial modulo another etc A multiplication of two polynomials of degree at most n can be done in O n2 operations in Fq using classical arithmetic or in O nlog n log log n operations in Fq using fast arithmetic A Euclidean division division with remainder can be performed within the same time bounds The cost of a polynomial greatest common divisor between two polynomials of degree at most n can be taken as O n2 operations in Fq using classical methods or as O nlog2 n log log n operations in Fq 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 method that is O n2log q operations in Fq using classical methods or O nlog q log n log log n operations in Fq using fast methods In the algorithms that follow the complexities are expressed in terms of number of arithmetic operations in Fq using classical algorithms for the arithmetic of polynomials Factoring algorithms editMany algorithms for factoring polynomials over finite fields include the following three stages Square free factorization Distinct degree factorization Equal degree factorizationAn important exception is Berlekamp s algorithm which combines stages 2 and 3 Berlekamp s algorithm edit Main article Berlekamp s algorithm 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 is polynomial but for general ground fields the complexity is exponential in the size of the ground field Square free factorization edit The algorithm determines a square free factorization for polynomials whose coefficients come from the finite field Fq of order q pm with p a prime This algorithm firstly determines the derivative 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 xp which is if the coefficients belong to Fp the pth power of the polynomial obtained by substituting x by x1 p If the coefficients do not belong to Fp the pth root of a polynomial with zero derivative is obtained by the same substitution on x completed by applying the inverse of the Frobenius automorphism to the coefficients citation needed This algorithm works also over a field of characteristic zero with the only difference that it never enters in the blocks of instructions where pth 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 f in Fq 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 faci 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 c1 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 pth square root and apply recursion Example of a square free factorization edit Let f x 11 2 x 9 2 x 8 x 6 x 5 2 x 3 2 x 2 1 F 3 x displaystyle f x 11 2x 9 2x 8 x 6 x 5 2x 3 2x 2 1 in mathbf F 3 x nbsp to be factored over the field with three elements The algorithm computes first c gcd f f x 9 2 x 6 x 3 2 displaystyle c gcd f f x 9 2x 6 x 3 2 nbsp Since the derivative is non zero we have w f c x2 2 and we enter the while loop After one loop we have y x 2 z x 1 and R x 1 with updates i 2 w x 2 and c x8 x7 x6 x2 x 1 The second time through the loop gives y x 2 z 1 R x 1 with updates i 3 w x 2 and c x7 2x6 x 2 The third time through the loop also does not change R For the fourth time through the loop we get y 1 z x 2 R x 1 x 2 4 with updates i 5 w 1 and c x6 1 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 x3 by x is x2 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 displaystyle f x 1 x 2 1 3 x 2 4 nbsp Distinct degree factorization edit This algorithm splits a square free polynomial into a product of polynomials whose irreducible factors all have the same degree Let f Fq x of degree n be the polynomial to be factored Algorithm Distinct degree factorization DDF Input A monic square free polynomial f Fq x Output The set of all pairs g d such that f has an irreducible factor of degree d and g is the product of all monic irreducible factors of f of degree d Begin i 1 S f f displaystyle i 1 qquad S emptyset qquad f f nbsp while deg f 2 i displaystyle deg f geq 2i nbsp do g gcd f x q i x displaystyle g gcd f x q i x nbsp if g 1 then S S g i displaystyle S S cup g i nbsp f f g displaystyle f f g nbsp end if i i 1 end while if f 1 displaystyle f neq 1 nbsp then S S f deg f displaystyle S S cup f deg f nbsp if S displaystyle S emptyset nbsp then return f 1 else return S End The correctness of the algorithm is based on the following Lemma For i 1 the polynomialx q i x F q x displaystyle x q i x in mathbf F q x nbsp is the product of all monic irreducible polynomials in Fq 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 f x q i x displaystyle g gcd left f x q i x right nbsp may be replaced by g gcd f x q i x mod f displaystyle g gcd left f left x q i x mod f right right nbsp Therefore we have to compute x q i x mod f displaystyle x q i x mod f nbsp there are two methods Method I Start from the value ofx q i 1 mod f displaystyle x q i 1 mod f nbsp computed at the preceding step and to compute its qth power modulo the new f using exponentiation by squaring method This needs O log q deg f 2 displaystyle O left log q deg f 2 right nbsp arithmetic operations in Fq at each step and thus O log q deg f 3 displaystyle O left log q deg f 3 right nbsp arithmetic operations for the whole algorithm Method II Using the fact that the qth power is a linear map over Fq we may compute its matrix withO deg f 2 log q deg f displaystyle O left deg f 2 log q deg f right nbsp 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 Fq which is O deg f 2 log q deg f displaystyle O left deg f 2 log q deg f right nbsp 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 edit Cantor Zassenhaus algorithm edit Main article Cantor Zassenhaus algorithm In this section we consider the factorization of a monic squarefree univariate polynomial f of degree n over a finite field Fq which has r 2 pairwise distinct irreducible factors f 1 f r displaystyle f 1 ldots f r nbsp 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 algorithms 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 volume 2 Algorithm Cantor Zassenhaus algorithm Input A finite field Fq of odd order q A monic square free polynomial f in Fq 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 f while Size Factors lt r do Choose h in Fq x with deg h lt n at random g h q d 1 2 1 mod f displaystyle g h frac q d 1 2 1 pmod f nbsp for each u in Factors with deg u gt d do if gcd g u 1 and gcd g u u then Factors Factors u gcd g u u gcd g u displaystyle setminus u cup gcd g u u gcd g u nbsp endif endwhile return Factors The correctness of this algorithm relies on the fact that the ring Fq x f is a direct product of the fields Fq 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 q d 1 2 q d 1 2 displaystyle frac q d 1 2q d sim tfrac 1 2 nbsp 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 displaystyle 2 5 log 2 r nbsp giving an average number of arithmetic operations in Fq which is O d n 2 log r log q displaystyle O dn 2 log r log q nbsp 3 In the typical case where dlog q gt n this complexity may be reduced to O n 2 log r log q n displaystyle O n 2 log r log q n nbsp by choosing h in the kernel of the linear map v v q v mod f displaystyle v to v q v pmod f nbsp and replacing the instruction g h q d 1 2 1 mod f displaystyle g h frac q d 1 2 1 pmod f nbsp by g h q 1 2 1 mod f displaystyle g h frac q 1 2 1 pmod f nbsp The proof of validity is the same as above replacing the direct product of the fields Fq x fi by the direct product of their subfields with q elements The complexity is decomposed in O n 2 log r log q displaystyle O n 2 log r log q nbsp for the algorithm itself O n 2 log q n displaystyle O n 2 log q n nbsp for the computation of the matrix of the linear map which may be already computed in the square free factorization and O n3 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 edit Like the algorithms of the preceding section Victor Shoup s algorithm is an equal degree factorization algorithm 4 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 Fp The worst case time complexity of Shoup s algorithm has a factor p displaystyle sqrt p nbsp Although exponential this complexity is much better than previous deterministic algorithms Berlekamp s algorithm which have p 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 displaystyle d log p nbsp where d is the degree of the polynomial and p is the number of elements of the ground field Let g g1 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 Fq x g and denote also by x the image of x in R The ring R is the direct product of the fields Ri Fq x gi and we denote by pi the natural homomorphism from the R onto Ri The Galois group of Ri over Fq is cyclic of order d generated by the field automorphism u up It follows that the roots of gi in Ri are p i x p i x q p i x q 2 p i x q d 1 displaystyle p i x p i x q p i left x q 2 right ldots p i left x q d 1 right nbsp Like in the preceding algorithm this algorithm uses the same subalgebra B of R as the Berlekamp s algorithm sometimes called the Berlekamp subagebra and defined as B a R p 1 a p k a F q u R u q u displaystyle begin aligned B amp left alpha in R p 1 alpha cdots p k alpha in mathbf F q right amp u in R u q u end aligned nbsp A subset S of B is said a separating set if for every 1 i lt j k there exists s S such that p i s p j s displaystyle p i s neq p j s nbsp 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 s Y x Y x q Y x q d 1 s 0 s d 1 Y d 1 Y d displaystyle begin aligned s amp Y x left Y x q right cdots left Y x q d 1 right amp s 0 cdots s d 1 Y d 1 Y d end aligned nbsp Then s 0 s d 1 displaystyle s 0 dots s d 1 nbsp is a separating set because p i s g i displaystyle p i s g i nbsp 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 p j s h displaystyle p i s h neq p j s h nbsp 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 v q v mod f displaystyle v to v q v pmod f nbsp by choose h i with h in S and i in 1 k 1 Time complexity editAs described in previous sections for the factorization over finite fields there are randomized algorithms of polynomial time complexity 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 editLike distinct degree factorization algorithm Rabin s algorithm 5 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 p1 pk be all the prime divisors of n and denote n p i n i displaystyle n p i n i nbsp for 1 i k polynomial f in Fq x of degree n is irreducible in Fq x if and only if gcd f x q n i x 1 displaystyle gcd left f x q n i x right 1 nbsp for 1 i k and f divides x q n x displaystyle x q n x nbsp In fact if f has a factor of degree not dividing n then f does not divide x q n x displaystyle x q n x nbsp if f has a factor of degree dividing n then this factor divides at least one of the x q n i x displaystyle x q n i x nbsp Algorithm Rabin Irreducibility Test Input A monic polynomial f in Fq x of degree n p1 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 displaystyle n j n p j nbsp for i 1 to k do h x q n i x mod f displaystyle h x q n i x bmod f nbsp g gcd f h if g 1 then return f is reducible and STOP end for g x q n x mod f displaystyle g x q n x bmod f nbsp if g 0 then return f is irreducible else return f is reducible The basic idea of this algorithm is to compute x q n i mod f displaystyle x q n i bmod f nbsp starting from the smallest n 1 n k displaystyle n 1 ldots n k nbsp by repeated squaring or using the Frobenius automorphism 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 displaystyle O n 2 n log q nbsp operations in Fq the computation of x q n i x mod f displaystyle x q n i x pmod f nbsp needs O n3 further operations and the algorithm itself needs O kn2 operations giving a total of O n 2 n log q displaystyle O n 2 n log q nbsp operations in Fq Using fast arithmetic complexity O n log n displaystyle O n log n nbsp for multiplication and division and O n log n 2 displaystyle O n log n 2 nbsp for GCD computation the computation of the x q n i x mod f displaystyle x q n i x bmod f nbsp by repeated squaring is O n 2 log n log q displaystyle O n 2 log n log q nbsp and the algorithm itself is O k n log n 2 displaystyle O kn log n 2 nbsp giving a total of O n 2 log n log q displaystyle O n 2 log n log q nbsp operations in Fq See also editBerlekamp s algorithm Cantor Zassenhaus algorithm Polynomial factorizationReferences editKEMPFERT 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 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 ISBN 0 7923 9259 0 Notes edit Reducibility over mathbb Z 2 Mathematics Stack Exchange Retrieved 2023 09 10 Christophe Reutenauer Mots circulaires et polynomes irreductibles Ann Sci math Quebec vol 12 no 2 pp 275 285 Flajolet Philippe Steayaert Jean Marc 1982 Automata languages and programming Lecture Notes in Comput Sci vol 140 Aarhus Springer pp 239 251 doi 10 1007 BFb0012773 ISBN 978 3 540 11576 2 Victor Shoup On the deterministic complexity of factoring polynomials over finite fields Information Processing Letters 33 261 267 1990 Rabin Michael 1980 Probabilistic algorithms in finite fields SIAM Journal on Computing 9 2 273 280 CiteSeerX 10 1 1 17 5653 doi 10 1137 0209024 External links editSome 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 Retrieved from https en wikipedia org w index php title Factorization of polynomials over finite fields amp oldid 1175029231, wikipedia, wiki, book, books, library,

article

, read, download, free, free download, mp3, video, mp4, 3gp, jpg, jpeg, gif, png, picture, music, song, movie, book, game, games.