An Efficient Implementation for Computing Gr obner bases over - - PowerPoint PPT Presentation

an efficient implementation for computing gr obner bases
SMART_READER_LITE
LIVE PREVIEW

An Efficient Implementation for Computing Gr obner bases over - - PowerPoint PPT Presentation

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


slide-1
SLIDE 1

An Efficient Implementation for Computing Gr¨

  • bner bases over

algebraic number fields

Masayuki Noro Kobe University

An Efficient Implementation for Computing Gr¨

  • bner bases over algebraic number fields – p. 1
slide-2
SLIDE 2

Multiple algebraic extension

An algebraic number field can be represented as K = Q(α1, . . . , αl) = R/J R = Q[t1, . . . , tl], J = D D = {m1(t1), m2(t1, t2), . . . , ml(t1, . . . , tl)} J : the defining ideal of K – zero-dimensional maximal ideal mi(α1, . . . , αi−1, ti) : irreducible over Ki−1 = Q(α1, . . . , αi−1)

An Efficient Implementation for Computing Gr¨

  • bner bases over algebraic number fields – p. 2
slide-3
SLIDE 3

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.

  • ver Q

Removal of integer contents Shortcut by modular computation

  • ver K

How can we avoid the coefficient growth?

An Efficient Implementation for Computing Gr¨

  • bner bases over algebraic number fields – p. 3
slide-4
SLIDE 4

An alternative method over Q

S = K[x1, . . . , xn], T = Q[x1, . . . , xn, t1, . . . , tl] ˜ B = {g1(x, t), . . . , gd(x, t)} ⊂ T B = {g1(x, α), . . . , gd(x, α)} ⊂ S ≺ : a term order inS ≺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¨

  • bner bases over algebraic number fields – p. 4
slide-5
SLIDE 5

An observation

Computation under ≺K Many bases of the form tbxa + lower are produced before a monic element xa + lower is produced. ⇒ tbxa + lower are all redundant Reason Let HCR(f) be the head coefficient of f w.r.t. ≺ ⇒ The sequence {ra} (ra = tbxa + lower) corresponds to the computation of HCR(r)−1 by Euclid algorithm for some normal form r.

An Efficient Implementation for Computing Gr¨

  • bner bases over algebraic number fields – p. 5
slide-6
SLIDE 6

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 HCR(h)−1 Inverse computation of an algebraic number by non-modular Euclid algorithm ⇒ usually slower than modular computation

An Efficient Implementation for Computing Gr¨

  • bner bases over algebraic number fields – p. 6
slide-7
SLIDE 7

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 tbxa + lower ∈ I ⇒ xa + lower ∈ I Intermediate elements are not produced. ⇒ It simulates the computation over K.

An Efficient Implementation for Computing Gr¨

  • bner bases over algebraic number fields – p. 7
slide-8
SLIDE 8

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) ← NFD∪G(S(f, g)) if ˜ r = 0 then u(t) ← the inverse of HCR(˜ r) mod J r ← NFD(u˜ r) L ← L ∪ {{f, r} | f ∈ G};G ← G ∪ {r} end if end while return G

An Efficient Implementation for Computing Gr¨

  • bner bases over algebraic number fields – p. 8
slide-9
SLIDE 9

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¨

  • bner bases over algebraic number fields – p. 9
slide-10
SLIDE 10
  • 1. Simplification of algebraic numbers

Efficiency depends on the order (priority) of defining polynomials to be used for simplification. An example m1(t1) = t20

1 + t19 1 + 2, m1(α1) = 0

m2(t1, t2) = t30

2 + (t19 1 + t18 1 + 1)t29 2 + 1, m2(α1, α2) = 0

Simplification of α58

2

Use mk with the smallest possible k : 0.02sec Use mk with the largest possible k : 2sec

An Efficient Implementation for Computing Gr¨

  • bner bases over algebraic number fields – p. 10
slide-11
SLIDE 11

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(mk)|HT(f) (∗) f ← f − HC(f) ·

HT(f) HT(mk)mk

endif end while return r

An Efficient Implementation for Computing Gr¨

  • bner bases over algebraic number fields – p. 11
slide-12
SLIDE 12

A proposition on a degree bound

Proposition Let f1 be the right hand side of (∗) in the simplification algorithm. Then we have degti(f1) ≤    MAX(2(di − 1), degti(f)) (i ≤ k − 1) degti(f) (i ≥ k) (di = degti(mi)) If an input f(t) is reduced w.r.t. D ⇒ degti(f) ≤ 2(di − 1) holds during the execution of the algorithm.

An Efficient Implementation for Computing Gr¨

  • bner bases over algebraic number fields – p. 12
slide-13
SLIDE 13
  • 2. Computation of an inverse in K

Let M = {s1, . . . , sd} be the set of monomials which spans R/D over Q, where d = dimQ R/D. Algorithm for computing f(α)−1 Convert

i ciNFG(fsi) = 1 (⇔ f( i cisi) = 1)

into a system of linear equations Ac = b with respect to c = (c1, . . . , cd)T. a = (a1, . . . , ad)T ← the solution of Ac = b (Apply a modular method such as Hensel lifting or CRT.) return

i aisi

An Efficient Implementation for Computing Gr¨

  • bner bases over algebraic number fields – p. 13
slide-14
SLIDE 14
  • 3. Homogenized trace algorithm

Bh ← the homogenization of B loop p ← a new prime Gh ← Candidate(Bh, p) s.t. Gh ⊂ Bh if Gh = failure then G ← the dehomogenization of Gh G ← {g ∈ G | HT(h) |HT(g) for all h ∈ G \ {g}} if G is a Gröbner basis of G and NFG(f) = 0 for all f ∈ B then return G endif end loop

An Efficient Implementation for Computing Gr¨

  • bner bases over algebraic number fields – p. 14
slide-15
SLIDE 15

Realization of Candidate

Buchberger algorithm+modular trace

L ← {{f, g} | f, g ∈ B, f = g}; G ← B; Gp ← B mod p while L = ∅ do {f, g} ← an element of L; L ← L \ {{f, g}} if NFGp(S(f mod p, g mod p)) = 0 then r ← NFG(S(f, g)) u(t) ← the inverse of HCR(r) mod J; r ← NFD(ur) if HC(r) mod p = 0 then return failure L ← L ∪ {{f, r} | f ∈ G} G ← G ∪ {r}; Gp ← Gp ∪ {r mod p} end if end while return G

An Efficient Implementation for Computing Gr¨

  • bner bases over algebraic number fields – p. 15
slide-16
SLIDE 16

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¨

  • bner bases over algebraic number fields – p. 16
slide-17
SLIDE 17

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¨

  • bner bases over algebraic number fields – p. 17
slide-18
SLIDE 18

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¨

  • bner bases over algebraic number fields – p. 18
slide-19
SLIDE 19

Example 1 : C7|c7=ω

C7|c7=ω; ω is a root of m(c7), where m(c7) is an irreducible factor of the minimal polynomial of c7 in Q[c1, . . . , c7]/C7.

  • 1. m(c7) = c2

7 + 5c7 + 1

  • 2. m(c7) = c6

7 + c5 7 + c4 7 + c3 7 + c2 7 + c7 + 1

  • 3. m(c7) = c12

7 −5c11 7 +24c10 7 −115c9 7+551c8 7−2640c7 7+

12649c6

7 − 2640c5 7 + 551c4 7 − 115c3 7 + 24c2 7 − 5c7 + 1

An Efficient Implementation for Computing Gr¨

  • bner bases over algebraic number fields – p. 19
slide-20
SLIDE 20

Timings for example 1

non-trace trace #basis check monic

  • ld trace

1/Q(ω) 462 198 306 83 1480 1/Q 876 119 675 – – 2/Q(ω) 22 9.3 268 0.2 1.4 13 2/Q 262 74 588 0.2 – – 3/Q(ω) 544 256 306 128 1810 3/Q > 1h 840 857 – – #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

  • ld trace : trace algorithm (old implementation)

An Efficient Implementation for Computing Gr¨

  • bner bases over algebraic number fields – p. 20
slide-21
SLIDE 21

Example 2 : Cap

A multiple extension field Q(α1, α2) is defined by m1(t1) = t7

1 − 7t1 + 3,

m2(t1, t2) = t6

2 + t1t5 2 + t2 1t4 2 + t3 1t3 2 + t4 1t2 2 + t5 1t2 + t6 1 − 7,

m1(α1) = 0, m2(α1, α2) = 0. Cap = modified Caprasse, which contains α1, α2 non-trace trace #basis check monic

  • ver Q(α1, α2)

294 306 45 242 20

  • ver Q

— > 1h — – –

An Efficient Implementation for Computing Gr¨

  • bner bases over algebraic number fields – p. 21
slide-22
SLIDE 22

Example 3 : Cohn3|t=ω

ω is a root of md(t) = 3td + 2t + 2.

(CAUTION: This example causes an infinte loop in Asir in the

  • DVD. It only accepts monic defining polynomials.)

d trace #basis check monic 2 over Q(ω) 1.6 32 1.4 2 over Q 0.5 85 – 5 over Q(ω) 12 32 9 5 over Q 21 253 – 10 over Q(ω) 70 32 44 10 over Q 304 447 –

An Efficient Implementation for Computing Gr¨

  • bner bases over algebraic number fields – p. 22
slide-23
SLIDE 23

Discussion

The new method is faster if the extension degree is high. The extension degree = 2 ⇒ the computation

  • ver Q is faster than the new one (Example1,3).

Possible reasons : selection strategy, overhead by making monic Trace algorithm is efficient if the check is not hard. Example2 : the check is very hard because the result contains very large integer coefficients. Frequent inter-reduction is effective for reducing the total cost.

An Efficient Implementation for Computing Gr¨

  • bner bases over algebraic number fields – p. 23
slide-24
SLIDE 24

Possible improvements

Optimization of the interval of inter-reduction The default value (= 6) may not be optimized. F4 algorithm over algebraic number fields Current F4 implementation in Risa/Asir is not fully optimized for computation over algebraic number fields. ⇒ CRT for algebraic number fields should be implemented for solving system of linear equations.

An Efficient Implementation for Computing Gr¨

  • bner bases over algebraic number fields – p. 24
slide-25
SLIDE 25

Future work : Combination with dynamic evaluation It is often hard to make the defining ideal J maximal. A relaxation If J is a zero-dimensional radical ideal ⇒ h = HCR(r) may not be invertible ⇒ J = (J : h) ∩ (J + h) by dynamic evaluation ⇒ the Gröbner basis computation is also split. (Bases obtained before the splitting are valid because they are monic.)

An Efficient Implementation for Computing Gr¨

  • bner bases over algebraic number fields – p. 25