An Efficient Algorithm for Factoring Polynomials over Algebraic Extension Field
aa r X i v : . [ c s . S C ] O c t An Efficient Algorithm for Factoring Polynomials over AlgebraicExtension Field
Yao Sun and Dingkang Wang Key Laboratory of Mathematics Mechanization, Academy of Mathematics and Systems Science, CAS,Beijing 100190, China
Abstract
A new efficient algorithm is proposed for factoring polynomials over an algebraic extensionfield. The extension field is defined by a polynomial ring modulo a maximal ideal. If themaximal ideal is given by its Gr¨obner basis, no extra Gr¨obner basis computation is neededfor factoring a polynomial over this extension field. Nothing more than linear algebraictechnique is used to get a polynomial over the ground field by a generic linear map. Thenthis polynomial is factorized over the ground field. From these factors, the factorization of thepolynomial over the extension field is obtained. The new algorithm has been implementedand computer experiments indicate that the new algorithm is very efficient, particularly incomplicated examples.
Keywords: algorithm, factorization, algebraic extension field.
1. Introduction
Factorization of polynomials over algebraic extension fields has been widely investigatedand there are polynomial-time algorithms for factoring multivariate polynomial over alge-braic number field (Abbott et al., 1985; Abbott and Davenport, 1998; Encarnacion, 1997;Landau, 1985; Lenstra, 1987; Trager, 1976). However, all the existing algorithms for factor-ing polynomials over algebraic extension field are not so efficient.Factorization over algebraic extension fields is needed for irreducible decomposition ofalgebraic variety by using characteristic set method (Wu, 1984, 1986). In (Wang, 1992;Wang and Lin, 2000), Wang and Lin proposed a very good algorithm for factoring multi-variate polynomials over algebraic fields obtained from successive extensions of the filed ofrational numbers. This problem has been further investigated by Li and Yuan in (Li, 2005;Yuan, 2006). Li’s algorithm decomposes ascending chain into irreducible ones directly andYuan’s algorithm follows Trager’s method (Trager, 1976). Their methods involve the com-putation of characteristic set, Gr¨obner basis or resultant of multivariate polynomial system
Email address: [email protected], [email protected] (Yao Sun and Dingkang Wang) The authors are supported by NSFC 10971217, 10771206 60821002/F02.
Preprint submitted to Journal of Symbolic Computation September 16, 2018 nd all these computations are quite expensive. Rouillier’s approach can also deduce analgorithm for the same aim (Rouillier, 1998). All the above algorithms are probabilistic,and if the characteristic of the ground field is 0, the algorithms terminate in a finite stepswith probability 1 (Gao and Chou, 1999; Wang and Lin, 2000). Besides, A. Steel gave hisfactorization method in another way when the characteristic of the field is positive and heconcentrated on how to conquer the inseparability (Steel, 2005).At present, popular methods for factoring polynomials over extension field are to cal-culate the primitive element of the extension field first and factor the polynomials overalgebraic number field afterwards. However, we propose a new factorization algorithm in adifferent way. The main purpose of the current paper is to present a new algorithm to solvethe following factorization problem:Let k be a perfect computable field and k [ x , · · · , x n ] the polynomial ring in indeterminate { x , · · · , x n } with coefficients in k . Let I ⊂ k [ x , · · · , x n ] be a maximal ideal such thatK = k [ x , · · · , x n ] /I is indeed an algebraic extension field of k . For a polynomial f ∈ K[ y ],we will derive a new efficient algorithm for factoring f over the field K.The above problem can be converted to univariate polynomial factorization over theground field k by using a generic linear map. If the maximal ideal I is represented by itsGr¨obner basis for any admissible order, no extra Gr¨obner basis computation is needed inthe new algorithm.In (Monico, 2002), Monico proposed a new approach for computing a primary decompo-sition of a zero dimensional ideal. This idea also plays an important role in the new proposedalgorithm. However, Monico’s algorithm is not complete, i.e. the components in the outputof Monico’s algorithm can not be assured to be primary. The new algorithm overcomes thisflaw when applying Monico’s idea to the above factorization problem, i.e. the irreduciblefactors can be verified without extra computations.This paper is organized as follow. Some necessary preliminaries is given in section 2.In section 3, we show how the problem of polynomial factorization over algebraic extensionfield, which is proposed in (Wang, 1992; Wang and Lin, 2000; Wu, 1984, 1986), can be trans-formed to a univariate factorization problem. A new algorithm for factoring polynomialsover algebraic extension field is presented in section 4. Examples and comparisons appearin section 5 and section 6 respectively. Finally, we conclude this paper in section 7.
2. Preliminaries
Let k be a perfect field which admits efficient operations and factorization of univariatepolynomials. Let R be a multivariate polynomial ring over the field k and Q an ideal of R .Let A k ( Q ) = R/Q denote the quotient ring.Since we can add elements of A k ( Q ) and multiply elements with scalars in k , A k ( Q ) hasthe structure of a vector space over the field k . Furthermore, if Q is zero dimensional, then A k ( Q ) is a finite dimensional vector space.Given a polynomial r ∈ R , we define a map m r from A k ( Q ) to itself by multiplication: m r : A k ( Q ) −→ A k ( Q )2 g ] [ rg ] , where [ p ] denotes the class in A k ( Q ) of any polynomial p ∈ R .Here are the main properties of the map m r . Proposition 2.1.
Let r ∈ R . Then (1) m r is a linear map from A k ( Q ) to A k ( Q ) . (2) m r = m g exactly when r − g ∈ Q . In particular, m r is the zero map exactly when r ∈ Q . (3) Let q be a univariate polynomial over k . Then m q ( r ) = q ( m r ) . (4) If p r is the characteristic polynomial of m r , then p r ( r ) ∈ Q .Proof: For the proofs of part (1), (2) and (3), please see (Cox et al., 2004). For the part(4), since p r is the characteristic polynomial of the linear map m r , p r ( m r ) = 0 by Cayley-Hamilton Theorem. According to part (3), it follows that m p r ( r ) = p r ( m r ) = 0. Thus, p r ( r )belongs to the ideal Q by part (2). (cid:3) Proposition 2.2. If Q is a maximal ideal of R , then the minimal polynomial of m r isirreducible over k .Proof: Assume R is the polynomial ring k [ x , · · · , x n ]. Let h Q, z − r i be the ideal generatedby Q and z − r over the polynomial ring k [ x , · · · , x n , z ], where z is a new indeterminate.Since Q is a maximal ideal in k [ x , · · · , x n ], it follows that h Q, z − r i is also a maximal idealin k [ x , · · · , x n , z ] and so is the ideal h Q, z − r i ∩ k [ z ].To study the ideal h Q, z − r i ∩ k [ z ], let g be the monic generator of the principal ideal h Q, z − r i ∩ k [ z ]. Substitute the indeterminate z by r in g , then g ( r ) ∈ h Q, z − r i ∩ k [ x , · · · , x n ] = Q , which means g ( m r ) = m g ( r ) = 0 by proposition 2.1. Since h Q, z − r i ∩ k [ z ]is maximal in k [ z ], g is irreducible over k , and hence g is the minimal polynomial of m r . (cid:3) The following proposition, which is a basic conclusion from standard linear algebra,illustrates the relationship between minimal polynomial and characteristic polynomial.
Proposition 2.3.
The minimal polynomial of m r and its characteristic polynomial sharethe same irreducible factors. Thus we have an instant corollary of Proposition 2.2.
Corollary 2.4. If Q is a maximal ideal of R , then the characteristic polynomial of m r is apower of a polynomial which is irreducible over k . With the above propositions, next we study more properties about the characteristicpolynomial of m r .Let now suppose that Q is a zero dimensional radical ideal of R and Q has a minimalprime decomposition: Q = Q ∩ · · · ∩ Q t , Q i is a prime ideal of R .We define the linear map m r,i in the same fashion as m r . Denote A k ( Q i ) = R/Q i for i = 1 , · · · , t , and consider the linear maps: m r,i : A k ( Q i ) −→ A k ( Q i )[ g ] [ rg ] , where [ p ] denotes the class in A k ( Q i ) of any polynomial p ∈ R .The following proposition proposed by Monico (Monico, 2002) describes the relationshipbetween the characteristic polynomials of m r and m r,i ’s. Proposition 2.5.
Let p r , p r,i be the characteristic polynomial of m r , m r,i respectively. Then p r = p r, · · · p r,t .
3. Factorization of Polynomials over Algebraic Extension Field
In this section, we will discuss the main ideas about the new factorization method. Firstof all, we need some new notations. Throughout this section, let R = k [ x , · · · , x n ] and R y = k [ x , · · · , x n , y ]. I is a maximal ideal in R and I y is the ideal generated by I over thepolynomial ring R y . Since I is a maximal ideal, the quotient ring R/I is indeed a field. Forconvenience, we denote K =
R/I , which is a finite extension field of k . Remark that thequotient ring R y /I y is not a field, as I y is not a maximal ideal in R y any more.The ring K[ y ], which is a polynomial ring over K with the indeterminate y , is a principalideal domain, so each polynomial f in K[ y ] has a unique factorization over K. What we willdo next is to give an efficient algorithm to calculate the factorization of f in K[ y ].In order to exploit the properties of I , we should connect the ring R y and K[ y ]. Considerthe canonical map: σ : R −→ K =
R/Ic [ c ] , which sends a polynomial c ∈ R to [ c ] ∈ K. And σ extends canonically onto R y by applying σ coefficient-wise. By definition, σ ( g ) = 0 if and only if g ∈ I y for any g ∈ R y .Conversely, given an element c ∈ K, we say a polynomial d ∈ R is a lift of c if σ ( d ) = c .Similarly, we say h ∈ R y is a lift of g ∈ K[ y ] if σ ( h ) = g holds. Clearly, an element c ∈ K(or g ∈ K[ y ]) may have infinite distinct lifts, as the map σ is not injective. Pay attentionthat, the lifts of g ∈ K[ y ] may have different degrees in y .Since K = k ( α , · · · , α n ) = k [ α , · · · , α n ], the elements in K have polynomial forms inthe letters α , α , · · · , α n , i.e. for g ∈ K[ y ], g has the following form: g = d X i =0 c i ( α ) y i , c i ( α ) ∈ k[ α , · · · , α n ] for i = 0 , · · · , d . Let h = d P i =0 c i ( x ) y i , where c i ( x ) ∈ k [ x , · · · , x n ]such that σ ( c i ( x )) = c i ( α ). It is easy to check σ ( h ) = g , and we call h a natural lift of g .Let F be a set of polynomials in R y , the ideal generated by F over R y is denoted by h F i R y as usual.In the rest of this paper, we always make the following assumptions: • f is a squarefree polynomial in K[ y ] and h ∈ R y is a lift of f . • Q = h I, h i R y ⊂ R y and A k ( Q ) = R y /Q . • For r ∈ R y , the linear map m r is defined from A k ( Q ) to A k ( Q ) as in the last section. • f = f · · · f t is an irreducible factorization of f over K and h i is a lift of f i . • m r,i is the linear map defined from A k ( Q i ) to A k ( Q i ), where A k ( Q i ) = R y /Q i and Q i = h I, h i i R y for i = 1 , · · · , t . • p r and p r,i ∈ k [ λ ] are the characteristic polynomials of m r and m r,i respectively.Now it is time to describe the main ideas of the new algorithm for factoring f over K[ y ].The following lemma builds a relation between the factorization of a squarefree polynomialand the minimal decomposition of a radical ideal. Lemma 3.1. Q = h I, h i R y ⊂ R y is a radical ideal and Q = Q ∩ · · · ∩ Q t is a minimal prime decomposition of Q , where Q i = h I, h i i R y for i = 1 , · · · , t .Proof: First, we begin by showing the definition of Q = h I, h i R y is well defined. Suppose h ′ is another lift of f in R y . Then it suffices to show the two ideals Q = h I, h i R y and Q ′ = h I, h ′ i R y are identical. By the definition of lift, we have σ ( h ) = f = σ ( h ′ ). Since σ isa homomorphism map, it follows that σ ( h − h ′ ) = 0, which means h − h ′ ∈ I y and hence Q = Q ′ . Similarly, Q i ’s are also well defined for the same reasons.Next, we prove Q = h I, h i R y is a radical ideal of R y . If g m ∈ Q for some positiveinteger m , then g m has an expression g m = t + sh , where t ∈ I y and s ∈ R y . Since σ is ahomomorphism map, then σ ( g ) m = σ ( g m ) = σ ( t ) + σ ( s ) σ ( h ) = σ ( s ) f, which means f | σ ( g ) m . Since f is a squarefree polynomial as assumed, f | σ ( g ) m implies f | σ ( g ). Let σ ( g ) = bf , b ∈ K[ y ] and a ∈ R y a lift of b . Since h is a lift of f , it follows that σ ( g ) = σ ( a ) σ ( h ), which means σ ( g − ah ) = 0 and hence g − ah ∈ I y . So g ∈ Q , which shows Q is a radical ideal.Similarly, it is easy to show Q i is a prime ideal by using the property that f i is irreducibleover K (hence squarefree), and the proof is omitted here.Finally, we finish this proof by showing the Q i ’s constitute a minimal prime decomposi-tion of Q . 5n one hand, we have f | σ ( g ) for any g ∈ Q . It follows that f i | σ ( g ) for i = 1 , · · · , t .Then g belongs to each Q i as discussed above and hence lies in the intersection of these Q i ’s.On the other hand, given g ∈ Q ∩ · · · ∩ Q t , it is easy to see that f i | σ ( g ) for all i = 1 , , · · · , t . Since f i ’s are irreducible factors of f and coprime with each other, it followsthat f = f f · · · f t | σ ( g ), which means there exists a ∈ R y such that σ ( g ) = σ ( a ) f andhence g − ah ∈ I y . Thus, g ∈ Q .We have now proved that Q = Q ∩ · · · ∩ Q t . As f i and f j are distinct irreducible factors of f whenever i = j , then h i / ∈ Q j and h j / ∈ Q i ,which indicates the above decomposition is minimal. (cid:3) The following theorem is the main theorem of this paper which provides a new methodfor factoring polynomials over algebraic extension fields.
Theorem 3.2 (Main Theorem).
With the notations defined as earlier. If the character-istic polynomial p r of m r has an irreducible factorization: p r = q m · · · q m s s , where q i is irreducible over k and q i = q j whenever i = j , then gcd( f, σ ( q i ( r ))) = 1 and f = c s Y i =1 gcd( f, σ ( q i ( r ))) , where c is constant in K and gcd( g , g ) is the monic greatest common divisor of g and g for any g , g ∈ K[ y ] . Furthermore, if m i = 1 , then gcd( f, σ ( q i ( r ))) is irreducible over K .Proof: For convenience, suppose f is monic. In this case, c = 1.Since f is squarefree and f = f · · · f t is an irreducible factorization of f as assumed, Q = h I, h i R y is a radical ideal and Q i = h I, h i i R y ’s are prime ideals by lemma 3.1. Furthermore, Q has a minimal prime decomposition Q = Q ∩ · · · ∩ Q t . We also have p r = p r, · · · p r,t byproposition 2.5.Since p r,i ∈ k [ λ ] is the characteristic polynomial of m r,i , substituting λ in p r,i by theexpression of r ∈ R y , it follows that p r,i ( r ) ∈ Q i = h I, h i i R y by proposition 2.1. That is,there exist a ∈ I y and b ∈ R y such that p r,i ( r ) = a + bh i . Applying σ to both sides ofequation, we get σ ( p r,i ( r )) = σ ( a ) + σ ( b ) σ ( h i ) = σ ( b ) f i , which means f i | σ ( p r,i ( r )). Thisshows that f i is a nontrivial common divisor of f and σ ( p r,i ( r )) for 1 ≤ i ≤ t .By corollary 2.4, each p r,i must be a power of an irreducible polynomial in k [ λ ]. Noticethat p r = p r, · · · p r,t = q m · · · q m s s , which implies that for each j there exists at least one p r,i such that p r,i | q j . So gcd( f, σ ( q j ( r ))) = 1 for 1 ≤ j ≤ s .We have already shown that f i | σ ( p r, ( r )) · · · σ ( p r,t ( r )) = σ ( q ( r )) m · · · σ ( q s ( r )) m s . Since f i is irreducible over K , then there exists a j where 1 ≤ j ≤ s , such that f i | σ ( q j ( r )). Asassumed, f , · · · , f t are distinct factors of the squarefree polynomial f . It follows that f = f · · · f t | s Y i =1 gcd( f, σ ( q i ( r ))) . (1)6or each i , gcd( f, σ ( q i ( r ))) is squarefree since f itself is squarefree.Since q i and q j are co-prime in k [ λ ] whenever i = j , then there exist a, b ∈ k [ λ ] suchthat aq i + bq j = 1. Substituting λ by the expression of r , the equality still holds for a ( r ) q i ( r ) + b ( r ) q j ( r ) = 1. Applying σ to both sides of equation, we have σ ( a ( r )) σ ( q i ( r )) + σ ( b ( r )) σ ( q j ( r )) = 1, which implies σ ( q i ( r )) and σ ( q j ( r )) are co-prime in K[ y ] and hencegcd( f, σ ( q i ( r ))) and gcd( f, σ ( q j ( r ))) are co-prime as well. Therefore, Q si =1 gcd( f, σ ( q i ( r )))is squarefree, which indicates s Y i =1 gcd( f, σ ( q i ( r ))) | f, (2)since gcd( f, σ ( q i ( r ))) | f for 1 ≤ i ≤ s .From (1) and (2), we have f = Q si =1 gcd( f, σ ( q i ( r ))). The first part of theorem is proved.Particularly, if m k = 1 for some k , the equation q m · · · q m s s = p r, · · · p r,t shows q k dividesonly one p r,i . Then we have p r,i = q k and p r,i is co-prime with other p r,j whenever i = j .With a similar discussion, it is easy to show σ ( p r,i ( r )) and σ ( p r,j ( r )) are co-prime in K[ y ]whenever i = j . Clearly, gcd( f, σ ( p r,i ( r ))) = gcd( f, σ ( q k ( r ))) is a factor of f and we alsoknow f i | gcd( f, σ ( p r,i ( r ))) as discussed earlier. Therefore, if there exists f j such that f i = f j and f j | gcd( f, σ ( p r,i ( r ))), then σ ( p r,i ) and σ ( p r,j ) will have a nontrivial common divisor f j .This contradiction implies gcd( f, σ ( q k ( r ))) = f i and hence irreducible over K. (cid:3) Then we have two immediate corollaries of the main theorem.
Corollary 3.3.
If the characteristic polynomial p r of m r is squarefree, suppose p r = q · · · q s is an irreducible factorization of p r over k , then f = c s Y i =1 gcd( f, σ ( q i ( r ))) is an irreducible factorization of f over K , where c is constant in K . Corollary 3.4.
If the characteristic polynomial of m r is irreducible over k , then f is irre-ducible over K . Corollary 3.3 indicates that if we are lucky enough to get a squarefree characteristicpolynomial p r , then we can obtain the complete factorization of f directly; otherwise, bythe main theorem 3.2, we will get some factors of f , which can be factored in a further step.The most important contribution of the main theorem is that we are able to check whichfactor of f is irreducible by simply investigating whether m i is 1, which ensures the methodprovided in this paper is a complete method for factoring polynomials in K[ y ].
4. Algorithm for Factorization
In this section, we will present the algorithm for factorization over algebraic extensionfield based on the main theorem 3.2. Before doing that, we discuss some algorithmic detailsfirst. 7iven a polynomial f ∈ K[ y ], it is usually not squarefree. So in order to apply themain theorem, we can factor the squarefree part of f first and deduce a factorizationof f afterwards, which is not very difficult no matter the field K is characteristic 0 ornot. In the new algorithm, the gcd computation over algebraic extension field is neces-sary, and many algorithms have been proposed for this purpose (Hoeij and Monagan, 2004;Langemyr and McCallum, 1989; Maza and Rioboo, 1995).In case the characteristic polynomial of m r is difficult to compute, we can calculate the minimal polynomial of m r instead with the following observation. Proposition 4.1.
If the characteristic polynomial of m r is squarefree, then the minimal polynomial and the characteristic polynomial of m r are identical.Proof: It is an easy corollary of proposition 2.3. (cid:3)
Conversely, if the minimal polynomial has lower degree than its characteristic polynomial,then the characteristic polynomial is not squarefree. Many methods can be exploited forcomputing the minimal polynomial, such as the famous
FGLM method (Faug`ere et al.,1993).Now, it is time to present the algorithm for factorization over algebraic extension field.
Algorithm 1 — FactorizationInput: f , a squarefree monic polynomial in K[ y ]. Output: the factorization of f in K[ y ]. begin r ← a random polynomial in k [ x , · · · , x n , y ] p r ← the characteristic polynomial of the linear map m r factor p r over k and obtain p r = q m · · · q m s s for i from to s do f i ← gcd( f, σ ( q i ( r ))) if m i = 1 f i is irreducible then g i ← f i else g i ← F actorization ( f i ) end ifend forreturn g g · · · g s endRemark 4.2. The computation of characteristic polynomial p r of m r is an important stepof the above algorithm. According to the method provided in (Cox et al., 2004), p r is easyto compute if the Gr¨obner basis of Q = h I, h i R y is known, where h is a nature lift of f .Fortunately, if f is monic in K[ y ] , the Gr¨obner basis of Q can be constructed directly, since { G, h } is a Gr¨obner basis of h I, h i R y with the elimination monomial order y ≻ x , where G is a Gr¨obner basis of I . p r of m r is squarefree with a fairly highprobability for a random chosen r ∈ R y . Clearly, if p r is squarefree, then the algorithmterminates immediately by corollary 3.3. Proposition 4.3.
If the characteristic of k is , then the probability that the characteristicpolynomial p r of m r is squarefree for a random r ∈ R y is .Proof: The technique of the proof draws lessons from (Monico, 2002).Since Q = h I, h i R y is a zero dimensional radical ideal, the quotient ring A k ( Q ) = R y /Q has finite dimension as a vector space. Let d = dim k ( A k ( Q )). According to the basicalgebraic geometry, we know the variety V ( Q ) has d distinct points, say z , · · · , z d , in anextension field of k .Notice that p r ∈ k [ λ ] is squarefree if and only if r ( z i ) = r ( z j ) whenever i = j , which is adirect consequence of theorem 4.5 in (Cox et al., 2004). Therefore, consider the set: C = { r | p r is not squarefree } = { r | ∃ z i , z j ∈ V ( Q ) with z i = z j such that r ( z i ) = r ( z j ) } . Since V ( Q ) has finite points, then it only suffices to show the set C ij = { r | r ( z i ) = r ( z j ) and z i = z j } is an algebraic set.Let { e , · · · , e d } be the standard monomial basis of A k ( Q ). Thus, [ r ] = a e + · · · + a d e d ,where a i ∈ k for i = 1 · · · d . So C ij also has an isomorphic form:˜ C ij = { ( a , · · · , a d ) ∈ k d | a e ( z i ) + · · · + a d e d ( z i ) = a e ( z j ) + · · · + a d e d ( z j ) and z i = z j } . According to the section 2.4 of (Cox et al., 2004), z i is uniquely determined by the vector( e ( z i ) , · · · , e d ( z i )). Therefore, z i = z j implies( e ( z i ) , · · · , e d ( z i )) = ( e ( z j ) , · · · , e d ( z j ))and hence ( e ( z i ) − e ( z j ) , · · · , e d ( z i ) − e d ( z j )) is a nonzero vector.Thus ˜ C ij is a proper algebraic set in k d . Consequently, C is isomorphic to a properalgebraic set of k d . Since the characteristic of k is 0, the probability that a random r ∈ R y belongs to the set C is 0, which completes the proof. (cid:3) In order to simplify the computation, we usually prefer r in a linear form. The follow-ing corollary shows the characteristic polynomial p r of m r is also squarefree with a highprobability for a randomly chosen linear r . Corollary 4.4.
If the characteristic of k is , then the probability that the characteristicpolynomial p r of m r is squarefree for a random linear r ∈ R y is also . roof: The proof is in the same fashion as proposition 4.3. The mere difference is that r has a linear expression r = by + a x + · · · + a n x n . Then the set C ij = { r | r ( z i ) = r ( z j ) and z i = z j } is isomorphic to a proper algebraic set of k n +1 , which completes the proof. (cid:3) There are some tricks for choosing a linear r so as to speed up the algorithm. For example,the variable y needs to appear in the expression of r and we usually set the coefficient of y as1; also, if the variable x i happens to be a leading power product of some polynomial in theGr¨obner basis of I , then this variable x i is not needed in r , as it can be reduced afterwards.Although the probability that the characteristic polynomial p r of m r is squarefree for arandom (linear) r ∈ R y is 1, it is not sufficient to show the algorithm terminates all thetime. However, the following proposition indicates that if we select r in a special fashion,the algorithm terminates in finite steps. Proposition 4.5.
If the characteristic of k is , then we can find an r ∈ R y such that p r is squarefree in finite steps.Proof: In fact, according to the proof of proposition 4.3, the set C is the union of all C ij for i = j , where C ij is isomorphic to the set { ( a , · · · , a d ) ∈ k d | a ( e ( z i ) − e ( z j )) + · · · + a d ( e d ( z i ) − e d ( z j )) = 0 and z i = z j } . Thus, C is isomorphic to the solution set of apolynomial equation F ( a , · · · , a d ) = 0, while the total degree of F is at most d ( d − /
2. Let d i = deg a i F ( a , · · · , a d ) for i = 1 , · · · , d and D = { ( a , · · · , a d ) | a i = 0 , · · · , d i for 1 ≤ i ≤ d } .Since F = 0, F cannot vanish on all the points of D . So there exist ( a ′ , · · · , a ′ d ) ∈ D suchthat F ( a ′ , · · · , a ′ d ) = 0. Then r = a ′ e + · · · + a ′ d e d is the r such that p r is squarefree. Asthe cardinality of D is finite, this r can be constructed within finite steps. (cid:3) Therefore, in each recursive call of
Factorization ( f i ), if we choose a different r in theabove fashion, the algorithm must terminate in finite steps.At last, let say something about the complexity of the new algorithm. Given a Gr¨obnerbasis G of I and the set { G, h } is a Gr¨obner basis of Q = h I, h i R y as discussed earlier, socomputing a basis for A k ( Q ) has complexity O ( n ). Computing the matrix of m r requires O ( n ) field operations in the worst case. Computing the characteristic polynomial p r requires O ( n ) field operations. Factoring the univariate polynomial p r has been studied by manyresearchers, and more details can be found in (Cohen, 1993; Lenstra et al., 1982). As aresult, by using this new algorithm, the problem of factoring polynomials over algebraicextension field can be transformed to the factorization of univariate polynomials over theground field in polynomial time.
5. A Complete Example
In this section, we illustrate the new algorithm through a complete example.
Example 5.1.
Given a maximal ideal I = h x + 1 , x + x i ⊂ Q [ x , x ] , where Q is therational field. Then the extension field is K = Q [ x , x ] /I . Notice that { x + 1 , x + x } isalready a Gr¨obner basis of I for the lexicographic order with x ≻ x .We are going to factor the polynomial f = y + ( α α − α − α ) y + ( α α + 2 α − y + α − α α ∈ K[ y ] , here α i = [ x i ] ∈ K . Since f is squarefree and monic in K[ y ], h = y + ( x x − x − x ) y + ( x x + 2 x − y + x − x x ∈ R y is a natural lift of f . Thus, { x +1 , x + x , h } is a Gr¨obner basis of the ideal Q = h I, h i Q [ x ,x ,y ] for the lexicographic order with y ≻ x ≻ x .According to the new algorithm, we need to choose a random polynomial r ∈ R y = Q [ x , x , y ] first. Here r = x + 2 x + y is selected. Let A k ( Q ) = Q [ x , x , y ] /Q , which isobviously a vector space over Q with a monomial basis B = [1 , x , x , x x , y, x y, x y, x x y, y , x y , x y , x x y ] T . Next, compute the matrix M of the linear map m r w.r.t. B . Then m r ( B ) = M B, where M is a 12 ×
12 matrix M = − − − − − − − − − −
11 0 0 − − − − − − − − − − − The characteristic polynomial of this matrix is p r = λ + 26 λ − λ + 371 λ − λ + 6802 λ − λ + 49922 λ − λ + 155984 λ − λ + 55872= ( λ + 10 λ − λ + 18)( λ + 8 λ − λ + 97)( λ + 8 λ − λ + 32) . The next step is to substitute λ by the expression of r in each factor of p r . For instance, q = λ + 10 λ − λ + 18 becomes q ( r ) = ( x + 2 x + y ) + 10( x + 2 x + y ) − x + 2 x + y ) + 18 . And σ ( q ( r )) = ( α + 2 α + y ) + 10( α + 2 α + y ) − α + 2 α + y ) + 18 ∈ K[ y ] .
11n the following, we compute the gcd of f and σ ( q ( r )). Finally obtaingcd( f, σ ( p r, ( r ))) = y + α α . Since m = 1, y + α α is an irreducible factor of f by theorem 3.2. Similarly, since m = m = 1, the other irreducible factors of f can be obtain from q = λ + 8 λ − λ + 97and q = λ + 8 λ − λ + 32:gcd( f, σ ( q ( r ))) = y − α − α , and gcd( f, σ ( q ( r ))) = y − α . As a result, we get a complete factorization of f ∈ K[ y ]: f = ( y + α α )( y − α − α )( y − α ) . In the above procedure, p r is squarefree, so we obtain a complete factorization of f directly. However, what if p r is not squarefree?For example, if r = − x − x + y is selected at the beginning, then we repeat the abovesteps.The monomial basis B does not change, but the matrix varies and the characteristicpolynomial becomes p r = λ + 72 λ − λ + 1138 λ − λ + 334 λ + 414 λ + 27364 λ + 6716 λ + 467128 λ + 169128 λ + 89512= ( λ + 52 λ − λ + 898 )( λ + 12 λ + 12 λ + 18 ) . Let q = λ + λ − λ + and q = λ + λ + λ + . Since m = 1, we can get anirreducible factor of f by theorem 3.2:gcd( f, σ ( q ( r ))) = y + α α . While the other factor q only leads to a reducible factor of f :gcd( f, σ ( p r, ( r ))) = y − (2 α + α ) y + α α − , which needs to be factored further.Let f ′ = y − (2 α + α ) y + α α − h ′ = y − (2 x + x ) y + x x − ∈ R y is a natural lift of f ′ . Next r ′ = − x − x + y is chosen. And the monomial basis of Q [ x , x , y ] / h I, h ′ i Q [ x ,x ,y ] is B ′ = [1 , x , x , x x , y, yx , yx , yx x ] T . Notice the length of B ′ is 8, which is smaller than the previous one. Thus an 8 × p r ′ = λ + 4 λ + 20 λ + 23 λ + 40 λ + 102 λ + 100 λ + 3412 ( λ + 2 λ + 16 λ + 17)( λ + 2 λ + 4 λ + 2) = q ′ q ′ . Since m ′ = m ′ = 1, then we obtain two irreducible factors of f ′ :gcd( f ′ , σ ( q ′ ( r ′ ))) = y − α , and gcd( f ′ , σ ( q ′ ( r ′ ))) = y − α − α . Combined with the factor we got earlier, f has a complete factorization in K[ y ]: f = ( y + α α )( y − α )( y − α − α ) . The new algorithm can also perform very well when the ground field k is a finite field.However, if we consider the factorization when the ground field is a finite field, accordingthe proof of proposition 4.3, we will have a lower probability to find an r such that p r issquarefree, especially when the cardinality of k is small.
6. Timings
We have implemented the new algorithm both for the case k = Q and for finite fields in Magma . Since Wang’s algorithm can only work for fields of characteristic 0. In order to befair, the examples are randomly generated over the ground field k = Q .We tested the examples in appendix both for cfactor which is an implementation ofWang’s algorithm and for efactor which is an implementation of the new algorithm. Thetimings in the following table are obtained from a computer (Windows XP, CPU Core2 Duo2.66GHz, Memory 2GB).We should mention that cfactor is implemented in Maple 7 , since cfactor only can workcorrectly for
Maple 7 , while efactor is implemented in
Magma . For the input of the newalgorithm, the maximal ideal can be expressed by its Gr¨obner basis for any admissible order,generally for a total degree order. And for the input of Wang’s algorithm, the maximal idealhas to be its irreducible ascending set, which is equivalent to a lexicographic Gr¨obner basis.Notice that a Gr¨obner basis with lexicographic order usually has larger coefficients than thatwith a total degree order.In the third column of the above table, h ( i ) is a lift of f ( i ) . From this table, we cansee that the new algorithm is much more efficient than Wang’s, especially for complicatedexamples.By analyzing Wang’s algorithm and the new algorithm, we think there are three mainreasons that make the new algorithm more efficient than Wang’s. First, in Wang’s algorithm,the variable y in f , which is to be factored, needs to be replaced by a linear combinationof a new variable y ′ and the x i ’s. This leads to the expansions of the coefficients as well asthe terms of f when the degree of f in y is big. Second, the modulo map by a Gr¨obnerbasis, which sends a polynomial into its remainder, is a ring homomorphism, which speedsup the new algorithm. But in Wang’s algorithm, the psudo-remainder map does not holdthis property. Last and the most important, the complexity of computing the characteristicpolynomial of m r is polynomial time for any given r . However, the complexity of computingthe characteristic set in Wang’s algorithm is exponential. Besides, any new technique forcalculating the characteristic polynomial will speed up the new algorithm as well.13 y dim k R y / h I ( i ) , h ( i ) i R y cfactor(sec.) efactor(sec.) f (1) Q [ x , x , y ] 16 0.032 0.000 f (2) Q [ x , x , x , y ] 28 0.110 0.031 f (3) Q [ x , x , x , x , y ] 48 12.171 0.734 f (4) Q [ x , x , x , x , y ] 32 9.109 0.328 f (5) Q [ x , x , x , x , y ] 64 245.531 4.313 f (6) Q [ x , x , x , x , x , y ] 32 44.359 1.297 f (7) Q [ x , x , x , x , x , y ] 48 91.500 9.719 f (8) Q [ x , x , x , x , x , y ] 48 377.327 11.469 f (9) Q [ x , x , x , x , x , y ] 80 2011.375 63.578 f (10) Q [ x , x , x , x , x , x , y ] 64 > h Table 1: Compared with Wang’s Algorithm.
7. Conclusions and Future Works
In this paper, we present a new method for factoring polynomials over an algebraicextension field and this algorithm performs pretty good for characteristic 0 systems as wellas finite field systems. Compared with Monico’s primary decomposition method, the newalgorithm is complete and the irreducible factors can be verified without extra computations.The new algorithm surely terminates within finite steps if the linear map in each recursivecall of the algorithm is selected in a special fashion. And in most cases, the proposedalgorithm terminates in few loops, as the characteristic polynomial of a generic linear mapis squarefree with probability 1. Moreover, the total complexity of this new algorithm canbe controlled in a reasonable degree.However, when the characteristic of ground field is 0, the expansion of coefficients isunavoidable. The situation is better in finite field. Therefore, a natural idea emerges. Thatis we can factor the polynomials in finite field first, and lift the factorization to characteristic0 afterwards. We also notice that Gao gives an efficient algorithm for computing the primarydecomposition over finite fields (Gao et al., 2009), which may help to improve the newalgorithm in finite field and hence benefits for our future work.
8. Acknowledgements
We would like to thank Professor D. Lazard and Professor V.P. Gerdt for their valuablesuggestions during their visits in KLMM.
References
Abbott, J.A., Bradford, R.J., Davenport, J.H., 1985. A Remark on Factoriztation. ACM SIGSAM Bulletin19, 31-33 & 37.Abbott, J.A., Davenport, J.H., 1998. Polynomial Factorization: an Exploration of Lenstra’s Algorithm.Proc. EUROCAL’98, 391-402.Cohen, H., 1993. A Course in Computational Algebraic Number Theory. New York, Springer. ox, D., Little, J., O’Shea, D., 2004. Using Algebraic Geometry. New York, Springer, 2nd edition, ISBN0-387-20706-6.Encarnacion, M.J., 1995. Computing gcds of polynomials over algebraic number fields. J. Symbolic Compu-tation, 20, 299-313.Encarnacion, M.J., 1997. Factoring Polynomials over Algebraic Number Fields via Norms. Proc. of ISSAC97. 265-270.Faug`ere, J., Gianni, P., Lazard, D., Mora, T., 1993. Efficient Computation of Zero- Dimensional Gr¨obnerBases by Change of Ordering. J. Symb. Comp. 16(4), 329-344.Gao, X.S., Chou, S.C., 1999. On the Theory of Resolvents and Its Applications. Syst Sci & Math (Suppl),12, 17-30.Gao, S.H., Wan, D.Q., Wang, M.S., 2009. Primary decomposition of zero-dimensional ideals over finite fields.Mathematics of Computation, 78, No. 265, 509-521.Hoeij, M.V., Monagan, M., 2004. Algorithms for polynomial GCD computation over algebraic functionfields. Proc. of ISSAC 2004. 297-304.Kaltofen, E., 1982. Factorization of Polynomials, Computer Algebra: Symbolic and Algebraic Computation.(B. Buchberger, G.E. Collins and R. Loos, eds.), Spring-Verlag, Wien-New York, 95-113.Kaltofen, E., 1990. Polynomial Factorization 1982-1986. Computers in Mathematcis (D. V. Chudnovsky andR. D. Jenks, eds.), Marcel Dekker, Inc., New York-Basel, 285-209.Landau, S., 1985. Factoring Polynomial over Algebraic Number fields. SIAM J. Comput. 184-195.Langemyr, L., McCallum S., 1989. The computation of polynomial greatest common divisors over an alge-braic number field. J. Symbolic Computation, 8(5), 429-448.Lenstra, H.W., Lenstra, A.K., Lovasz, L., 1982. Factoring polynomials with rational coefficients. Math.Ann., 261, 515-534.Lenstra, A.K., 1987. Facotring Multivariate Polynomials over Algebraic Number Fields. SIAM J comp,16:591-598.Li, B.H., 2005. An Algorithm to Decompose a Polynomial Ascending Set into Irreducible Ones. Acta AnalysisFunctionalis Applicata Vol. 7, No. 2, 97-105.Maza, M. M., Rioboo R., 1995. Polynomial Gcd Computations over Towers of Algebraic Extensions. Lec-ture Notes In Computer Science; Vol. 948 Proc. of 11th International Symposium on Applied Algebra,Algebraic Algorithms and Error-Correcting Codes, 365 - 382.Monico, C., 2002. Computing the Primary Decomposition of Zero-dimensional Ideals. J. Symbolic Compu-tation 34, 451-459.Rouillier, F. 1998. Solving zero-dimensional polynomail systems through the Rational Univariate Represen-tation. Rapport de recherche INRIA 3426.Steel, A., 2005. Conquering Inseparability: Primary Decomposition and Multivariate Factorization overAlgebraic Function Fields of Positive Characteristic. J. Symbolic Comp., 40(3), 1053-1075.Trager, B.M., 1976. Algebraic Factoring and Rational Function Integration. Proc 1976 ACM SYMSAC, NewYork, 219-226.Wang, D.M., 1992. A Method for Factoring Multivariate Polynomials over Successive Algebraic ExtensionFields. Preprint RISC-Linz. Austria: Johannes Kepler University.Wang, D.M., Lin, D.D., 2000. A Method for Factoring Multivariate Polynomials over Successive AlgebraicExtension Fields. Mathematics and Mathematics-Mechanization, Shandong Education Press, 138-172.Wang, P.S., 1978. Factoring Multivariate Polynomial over Algebraic Number Fields. Math Comp, 32, 1215-1231.Wu, W.T., 1984. Basic Principles of Mechanical Theorem Proving in Geometries (Part on ElementaryGeometries, in Chinese). Beijing, Science Press.Wu, W.T., 1986. Basic Principles of Mechanical Theorem Proving in Elementary Geometries. J Sys Sci &Math Scis, 4, 207-235; J Automated reasoning, 2, 221-252.Yuan, C.M., 2006. Generalized Trager’s Factorization Algorithm over Successive Extension Fields. J Sys Sci& Math Sci. 26(5), 533-540. ppendix A. Examples in Timings f (1) = ( y + α )( y − α )( y + α + α ), I (1) = ( x + x , x − x x ) ⊂ Q [ x , x ].2. f (2) = ( y + α α + α + α )( y − α + α + 1)( y + α α + α ), I (2) = ( x − x x + x x − x − x , x − x x + x − x − x x − x + x , − x + x x + x − x − x + x − x ) ⊂ Q [ x , x , x ].3. f (3) = ( y + α )( y − α )( y + α + α ), I (3) = ( x + x x − x x + x − x + x x − x − x , x + x x − x x + x + x x + x + x − x , x x − x x + x x + x + x − x x + x x − x + x + x x − x , x + x x + x x + x x − x + x x − x + x − x x − x + x ) ⊂ Q [ x , x , x , x ].4. f (4) = ( y − α + α α + α + 1)( y + α + α α + α α + 2), I (4) = ( − − x + x x + x − x x + x − x x + x + x , x x + x x + x − x x − x x + x − x − x x − x , x x + x x + x + x + x x − x − x − x , x + x x + x x + x x − x − x x − x + x x − x + x + x ) ⊂ Q [ x , x , x , x ].5. f (5) = ( y + ( α + α α ) y + α α + α )( y + ( α α − α ) y + α + α α α ), I (5) = ( − x − x x + 2 x x − x x + x + x x + 2 x x − x + 2 x x − x − x , x − x x − x + 2 x + x x + 2 x x − x − x x + x − x + 2 x , − x + 2 x x + x x +2 x + 2 x x + x x − x − x − x , x − x x − x x − x x − x + x x − x x − x + 2 x − x x + x + x + 2 x ) ⊂ Q [ x , x , x , x ].6. f (6) = ( y + α + α α + α α )( y + α α + 2 − α + α ), I (6) = (2 − x + x x − x x +2 x x − x +2 x + x x +2 x x +2 x + x x − x − x x − x +2 x , − x − x x − x x − x x + x − x − x x +2 x x − x x + x + x +2 x x − x − x − x x + x + 2 x , − x − x x − x x − x x − x x + x + 2 x x − x x + x x − x − x − x x + 2 x x − x − x + x x + 2 x + x , x − x x − x x − x x +2 x +2 x + x x +2 x +2 x x + x − x +2 x − x , x − x + x − ⊂ Q [ x , x , x , x , x ].7. f (7) = ( y + α + α α )( y − α α )( y − α + α ), I (7) = (1 − x x + x x + 2 x x + x − x − x x + 2 x x + 2 x x − x − x − x x +2 x x + x + x +2 x x + x − x − x , − x +2 x x − x x − x x +2 x x − x + x +2 x x + x x +2 x x − x +2 x − x x +2 x x +2 x +2 x − x x − x + x , − x − x x − x x + x x − x x + 2 x − x + 2 x x − x x + 2 x x + 2 x − x + 2 x x − x x − x − x + 2 x x + 2 x − x + 2 x , − − x + 2 x x − x x − x x + x x + x + 2 x x + x x + x x + 2 x + x x + x − x − x + x − x , x − x + x − x + 1) ⊂ Q [ x , x , x , x , x ].8. f (8) = ( y + ( α − α α ) y + α α + α + α )( y + α α + α α α ), I (8) = (2 + x + 2 x x + x x + 2 x x − x x + 2 x − x + 2 x x + 2 x x + 2 x x − x − x x + x x + x − x − x x − x + x − x , − x + 2 x x − x x + 2 x x + 2 x x − x + 2 x − x x − x x − x x + 2 x + 2 x − x x + 2 x x − x + 2 x x − x − x + x , x x + x x + x x + 2 x x + x + x x − x x − x + x x − x x − x + x x − + x − x , x + 2 x x + 2 x x + 2 x x + x x − x + 2 x + x x + 2 x x − x − x +2 x x − x − x − x x + x , x − x − x + 2 x + x − ⊂ Q [ x , x , x , x , x ].9. f (9) = ( y + ( α − α α ) y + α α + α + α )( y + y (1 + α − α + α α ) + α + α − α α )( y + α α + α α α ), I (9) = I (8) ⊂ Q [ x , x , x , x , x ].10. f (10) = ( y + α + α + α + α α + α α α )( y + α α − α α + 2 − α + α ), I (10) = ( − x + x x + 2 x x − x x + x x − x x + 2 x − x + x x + 2 x x − x + x − x x + 2 x x − x − x x + 2 x x + x − x x − x + x + 2 x , − x − x x − x − x + x x − x x − x x − x + 2 x x + 2 x x − x + 2 x − x − x − x x + x +2 x , − x − x + x + x x − x x + 2 x x − x x + x x + x x − x x + 2 x x + x x − x x − x x − x x − x x − x x + 2 x − x + x + 2 x − x + x + x , − x − x x − x x − x x + x x + x − x x + 2 x x − x x − x + 2 x − x x + 2 x x + x x + x + x + x x − x − x + 2 x x + x − x , x x − x x − x x − x x − x − x x − x x − x x − x x − x − x x − x x − x x − x − x x − x x − x − x + 2 x x − x + 2 x + x , − x + x + x − x + 2 x + x − ⊂ Q [ x , x , x , x , x , x6