An Efficient Implementation for Computing Gr¨ obner bases over algebraic number fields Masayuki Noro Kobe University An Efficient Implementation for Computing Gr¨ obner bases over algebraic number fields – p. 1
Multiple algebraic extension An algebraic number field can be represented as K = Q ( α 1 , . . . , α l ) = R/J R = Q [ t 1 , . . . , t l ] , J = � D � D = { m 1 ( t 1 ) , m 2 ( t 1 , t 2 ) , . . . , m l ( t 1 , . . . , t l ) } J : the defining ideal of K – zero-dimensional maximal ideal m i ( α 1 , . . . , α i − 1 , t i ) : irreducible over K i − 1 = Q ( α 1 , . . . , α i − 1 ) An Efficient Implementation for Computing Gr¨ obner bases over algebraic number fields – p. 2
Gröbner basis computation over K Direct computation over K Field operations are hard Remainder computation by D is necessary for each field operations. Coefficient growth It is more serious than over Q . over Q Removal of integer contents Shortcut by modular computation over K How can we avoid the coefficient growth? An Efficient Implementation for Computing Gr¨ obner bases over algebraic number fields – p. 3
An alternative method over Q S = K [ x 1 , . . . , x n ] , T = Q [ x 1 , . . . , x n , t 1 , . . . , t l ] ˜ B = { g 1 ( x, t ) , . . . , g d ( x, t ) } ⊂ T B = { g 1 ( x, α ) , . . . , g d ( x, α ) } ⊂ S ≺ : a term order in S ≺ K a product order of ≺ and the lex order in R : Theorem Let ˜ G be the reduced Gröbner basis of ˜ I = � ˜ B ∪ D � with respect to ≺ K . Then ( ˜ G \ D ) | t = α is the reduced Gröbner basis of I = � B � with respect to ≺ . An Efficient Implementation for Computing Gr¨ obner bases over algebraic number fields – p. 4
An observation Computation under ≺ K Many bases of the form t b x a + lower are produced before a monic element x a + lower is produced. ⇒ t b x a + lower are all redundant Reason Let HC R ( f ) be the head coefficient of f w.r.t. ≺ ⇒ The sequence { r a } ( r a = t b x a + lower ) corresponds to the computation of HC R ( r ) − 1 by Euclid algorithm for some normal form r . An Efficient Implementation for Computing Gr¨ obner bases over algebraic number fields – p. 5
Possible difficulties If the extension degree is high.. Increase of the number of S-pairs It simply increases the total cost. It may introduce some bad effect in the selection strategy. Inefficiency of the computation of HC R ( h ) − 1 Inverse computation of an algebraic number by non-modular Euclid algorithm ⇒ usually slower than modular computation An Efficient Implementation for Computing Gr¨ obner bases over algebraic number fields – p. 6
A simple idea 1. Apply the alternative method over Q for each normal form computation Removal of integer contents is applicable. Modular methods (trace algorithm etc.) are applicable. 2. The normal form is made monic before added to the basis set t b x a + lower ∈ I ⇒ x a + lower ∈ I Intermediate elements are not produced. ⇒ It simulates the computation over K . An Efficient Implementation for Computing Gr¨ obner bases over algebraic number fields – p. 7
Outline of the algorithm L ← {{ f, g } | f, g ∈ ˜ B, f � = g } ; G ← ˜ B while L � = ∅ do { f, g } ← an element of L ; L ← L \ {{ f, g }} r ( x, t ) ← NF D ∪ G (S( f, g )) ˜ r � = 0 then if ˜ u ( t ) ← the inverse of HC R (˜ r ) mod J r ← NF D ( u ˜ r ) L ← L ∪ {{ f, r } | f ∈ G } ; G ← G ∪ { r } end if end while return G An Efficient Implementation for Computing Gr¨ obner bases over algebraic number fields – p. 8
Operations to be considered 1. Simplification of algebraic numbers If K is a multiple extension, the simplification is not trivial. 2. Computation of an inverse in K Modular computations should be applied. 3. Configuration of Buchberger algorithm We have to be careful for avoiding coefficient growth. ⇒ homogenized trace algorithm An Efficient Implementation for Computing Gr¨ obner bases over algebraic number fields – p. 9
1. Simplification of algebraic numbers Efficiency depends on the order (priority) of defining polynomials to be used for simplification. An example m 1 ( t 1 ) = t 20 1 + t 19 1 + 2 , m 1 ( α 1 ) = 0 m 2 ( t 1 , t 2 ) = t 30 2 + ( t 19 1 + t 18 1 + 1) t 29 2 + 1 , m 2 ( α 1 , α 2 ) = 0 Simplification of α 58 2 Use m k with the smallest possible k : 0.02sec Use m k with the largest possible k : 2sec An Efficient Implementation for Computing Gr¨ obner bases over algebraic number fields – p. 10
A simplification algorithm r ← 0 while f � = 0 do if HT( f ) is reduced with respect to D then r ← r + HT( f ) f ← f − HT( f ) else k ← the smallest k such that HT( m k ) | HT( f ) HT( f ) ( ∗ ) f ← f − HC( f ) · HT( m k ) m k endif end while return r An Efficient Implementation for Computing Gr¨ obner bases over algebraic number fields – p. 11
A proposition on a degree bound Proposition Let f 1 be the right hand side of ( ∗ ) in the simplification algorithm. Then we have MAX(2( d i − 1) , deg t i ( f )) ( i ≤ k − 1) deg t i ( f 1 ) ≤ ( i ≥ k ) deg t i ( f ) ( d i = deg t i ( m i ) ) If an input f ( t ) is reduced w.r.t. D ⇒ deg t i ( f ) ≤ 2( d i − 1) holds during the execution of the algorithm. An Efficient Implementation for Computing Gr¨ obner bases over algebraic number fields – p. 12
2. Computation of an inverse in K Let M = { s 1 , . . . , s d } be the set of monomials which spans R/ � D � over Q , where d = dim Q R/ � D � . Algorithm for computing f ( α ) − 1 Convert � i c i NF G ( fs i ) = 1 ( ⇔ f ( � i c i s i ) = 1 ) into a system of linear equations Ac = b with respect to c = ( c 1 , . . . , c d ) T . a = ( a 1 , . . . , a d ) T ← the solution of Ac = b ( Apply a modular method such as Hensel lifting or CRT. ) return � i a i s i An Efficient Implementation for Computing Gr¨ obner bases over algebraic number fields – p. 13
3. Homogenized trace algorithm B h ← the homogenization of B loop p ← a new prime G h ← Candidate ( B h , p ) s.t. G h ⊂ � B h � if G h � = failure then G ← the dehomogenization of G h G ← { g ∈ G | HT( h ) � | HT( g ) for all h ∈ G \ { g }} if G is a Gröbner basis of � G � and NF G ( f ) = 0 for all f ∈ B then return G endif end loop An Efficient Implementation for Computing Gr¨ obner bases over algebraic number fields – p. 14
Realization of Candidate Buchberger algorithm+modular trace L ← {{ f, g } | f, g ∈ B, f � = g } ; G ← B ; G p ← B mod p while L � = ∅ do { f, g } ← an element of L ; L ← L \ {{ f, g }} if NF G p (S( f mod p, g mod p )) � = 0 then r ← NF G (S( f, g )) u ( t ) ← the inverse of HC R ( r ) mod J ; r ← NF D ( ur ) if HC( r ) mod p = 0 then return failure L ← L ∪ {{ f, r } | f ∈ G } G ← G ∪ { r } ; G p ← G p ∪ { r mod p } end if end while return G An Efficient Implementation for Computing Gr¨ obner bases over algebraic number fields – p. 15
An improvement : frequent inter-reduction Inter-reduction : a natural operation for a homogeneous input Useful to reduce the coefficient sizes over Q ⇒ also useful over an algebraic number field Old implementation in Risa/Asir Inter-reduction is done only after processing all the S-polys of the same total degree. Current implementation Inter-reduction is executed every after k new basis elements are generated ( k = 6 by default.) An Efficient Implementation for Computing Gr¨ obner bases over algebraic number fields – p. 16
Related functions newalg( DefPoly ) It generates a root of DefPoly af( Poly , AlgList ) It factors Poly a root of Poly over Q ( AlgList ) . nd gr trace( PL , V L , Homo , Trace , Ord ) A general function to compute Gröbner bases. If Homo = Trace = 1 , it executes the homogenized trace algorithm with Candidate =Buchberger+trace. An Efficient Implementation for Computing Gr¨ obner bases over algebraic number fields – p. 17
Experiments in Risa/Asir Purposes Compare the well-known algorithm over Q and the new one. Compare the non-trace and the trace algorithm Non-trace one computes the GB of the homogenized inputs. Examine the effect of inter-reduction Machine : Linux/Xeon 3.4GHz, 6GB of memory An Efficient Implementation for Computing Gr¨ obner bases over algebraic number fields – p. 18
Example 1 : C 7 | c 7 = ω C 7 | c 7 = ω ; ω is a root of m ( c 7 ) , where m ( c 7 ) is an irreducible factor of the minimal polynomial of c 7 in Q [ c 1 , . . . , c 7 ] / � C 7 � . 1. m ( c 7 ) = c 2 7 + 5 c 7 + 1 2. m ( c 7 ) = c 6 7 + c 5 7 + c 4 7 + c 3 7 + c 2 7 + c 7 + 1 3. m ( c 7 ) = c 12 7 − 5 c 11 7 +24 c 10 7 − 115 c 9 7 +551 c 8 7 − 2640 c 7 7 + 12649 c 6 7 − 2640 c 5 7 + 551 c 4 7 − 115 c 3 7 + 24 c 2 7 − 5 c 7 + 1 An Efficient Implementation for Computing Gr¨ obner bases over algebraic number fields – p. 19
Timings for example 1 non-trace trace #basis check monic old trace 1/ Q ( ω ) 462 198 306 0 83 1480 1/ Q 876 119 675 0 – – 2/ Q ( ω ) 22 9 . 3 268 0 . 2 1 . 4 13 2/ Q 262 74 588 0 . 2 – – 3/ Q ( ω ) 544 256 306 0 128 1810 > 1 h 840 857 0 3/ Q – – #basis : number of intermediate basis elements check : time for checking the Gröbner basis candidate in the trace algorithm monic : time for making the normal forms monic old trace : trace algorithm (old implementation) An Efficient Implementation for Computing Gr¨ obner bases over algebraic number fields – p. 20
Recommend
More recommend