Algorithms used by Groebner[Basis]
Calling Sequence
Parameters
Description
Examples
References
Basis(J, tord, method=meth)
J
-
a list or set of polynomials or a PolynomialIdeal
tord
a MonomialOrder, a ShortMonomialOrder, or a name
meth
one of the methods described below
The Groebner[Basis] command currently relies on a combination of five different algorithms to compute Groebner bases for various monomial orders and domains. This help page documents these algorithms and their relative performance characteristics to help you decide what algorithm to use should the default choice prove unsatisfactory. The algorithm is specified using an optional argument method=meth.
method=fgb runs a compiled C implementation of the F4 algorithm. It supports rational number and integer mod p coefficients, where p < 2^31. It supports tdeg orders and lexdeg orders with two blocks of variables. It does not support parameters (that is, coefficients in a rational function field) or the output=extended option. The algorithm is Monte-Carlo probabilistic and the probability of error is expected to be less than 10^(-18).
method=maplef4 runs a Maple implementation of the F4 algorithm. This implementation supports all monomial orders and coefficient fields as well as computations in non-commutative Ore algebras. This is an exact implementation which does not use modular methods. The output=extended option is currently not supported.
method=buchberger runs the traditional Maple implementation of the Buchberger algorithm. This algorithm supports all domains, monomial orders and options such as output=extended. It is generally outperformed by F4 in most situations, but one notable exception is when a polynomial has been added to a Groebner basis and the basis is being recomputed. The implementation is based on Gebauer and Moller and uses the normal selection strategy.
method=fglm runs the Groebner basis conversion algorithm of Faugere, Gianni, Lazard, and Mora. This algorithm supports all commutative domains, but requires the ideal to be zero-dimensional. See the Groebner[FGLM] help page for more details. When this method is specified, Groebner[Basis] will choose one of the known Groebner bases (or compute one if none are known) and run Groebner[FGLM].
method=walk runs the Groebner Walk conversion algorithm of Collart, Kalkbrener, and Mall, which supports all commutative domains and monomial orders. See the Groebner[Walk] help page for more details. When this method is specified, Groebner[Basis] will choose one of the known Groebner bases (or compute one if none are known) and run Groebner[Walk]. The Groebner walk is typically slower than FGLM for zero-dimensional ideals.
In addition to the algorithms above, you can specify an overall strategy using the method=... option and Groebner[Basis] will choose whatever algorithms are appropriate. The strategies are as follows:
method=direct runs the fastest general purpose direct method. This is currently the compiled F4 or Maple's F4 as a fallback. As better algorithms are implemented, this strategy will be updated to reflect the state-of-the-art method. Thus, calling Groebner[Basis] with method=direct is a way to ensure that your code always uses the fastest direct algorithm; even on future Maple releases.
method=convert runs the fastest applicable conversion method, which is either FGLM or the Groebner Walk, depending on the monomial order and whether the ideal is zero-dimensional. This strategy is recommended for monomial orders that eliminate variables. For 'plex', 'lexdeg' and 'prod' orders, the strategy is to run FGLM if possible. For all other orders and for non-zero-dimensional ideals, the Groebner Walk is used.
method=default runs the default strategy, which is subject to change in the future. Currently this is method=direct for 'tdeg', 'wdeg', 'grlex' and 'matrix' orders and non-commutative problems, and method=convert for 'plex', 'lexdeg' and 'prod' orders in the commutative case.
Setting infolevel[GroebnerBasis] to a value between 1 and 5 directs all of the algorithms to print information about their progress and performance.
with⁡Groebner:
infolevelGroebnerBasis≔2:
F≔x2−2⁢x⁢z+5,x⁢y2+y⁢z3,3⁢y2−8⁢z3
F≔x2−2⁢x⁢z+5,y⁢z3+x⁢y2,−8⁢z3+3⁢y2
Basis⁡F,tdeg⁡x,y,z
-> MGb F4 algorithm 1: prime=238318543 0% use 4 of 4, 0.000 sec 2: prime=1415564323 0% 0 out of 4, 0.001 sec 3: prime=1098198263 4: prime=1926818393 5: prime=1663778573 6: prime=786356443 7: prime=186918653 8: prime=1786233487 9: prime=923799343 10: prime=431068621 11: prime=2097316327 12: prime=1156076123 13: prime=1298611507 14: prime=1719436909 15: prime=222967273 16: prime=1106855977 17: prime=308518517 18: prime=1970340923 19: prime=703809263 20: prime=868707661 21: prime=894261703 22: prime=967518031 23: prime=225086261 24: prime=219377089 100% 4 out of 4, 0.001 sec 24 primes basis: 0.001 chrem: 0.001 iratr: 0.001 other: 0.001 total: 0.004 total time: 0.006 sec
x2−2⁢x⁢z+5,8⁢z3−3⁢y2,8⁢x⁢y2+3⁢y3,9⁢y4+48⁢y3⁢z+320⁢y2
Basis⁡F,grlex⁡x,y,z
-> F4 algorithm total time: 0.004 sec
Basis⁡F,plex⁡x,y,z
-> FGLM algorithm FGLM algorithm 1: prime=1296078733 0% 5 elements, 0.000 sec 2: prime=1174186799 0% 0 out of 5, 0.001 sec 3: prime=1507961291 100% 5 out of 5, 0.000 sec 3 primes basis: 0.001 chrem: 0.000 iratr: 0.000 other: 0.000 total: 0.001
9⁢z9−96⁢z8+240⁢z6+1600⁢z3,−3⁢z8+32⁢z7−40⁢z5+80⁢y⁢z3,−8⁢z3+3⁢y2,9⁢z8−96⁢z7+120⁢z5+640⁢x⁢z3,x2−2⁢x⁢z+5
IsZeroDimensional⁡F
true
Basis⁡F,lexdeg⁡x,y,z,method=walk
-> Groebner Walk total time: 0.001 sec
8⁢z3−3⁢y2,9⁢y4+48⁢y3⁢z+320⁢y2,8⁢x⁢y2+3⁢y3,x2−2⁢x⁢z+5
Basis⁡F,lexdeg⁡x,y,z,method=direct
-> MGb F4 algorithm 1: prime=699128341 0% use 0 of 5, 0.000 sec 2: prime=1258666183 0% 0 out of 5, 0.000 sec 3: prime=1316887973 100% 5 out of 5, 0.001 sec 3 primes basis: 0.000 chrem: 0.001 iratr: 0.000 other: 0.000 total: 0.001 total time: 0.001 sec
9⁢z9−96⁢z8+240⁢z6+1600⁢z3,−3⁢z8+32⁢z7−40⁢z5+80⁢y⁢z3,9⁢z8−96⁢z7+120⁢z5+640⁢x⁢z3,−8⁢z3+3⁢y2,x2−2⁢x⁢z+5
Basis⁡F,plex⁡z,y,x,method=direct
-> F4 algorithm total time: 0.100 sec
3⁢x12−64⁢x11+90⁢x10−960⁢x9+1125⁢x8−4800⁢x7+7500⁢x6−8000⁢x5+28125⁢x4+56250⁢x2+46875,8⁢x7+3⁢x6⁢y+120⁢x5+45⁢x4⁢y+600⁢x3+225⁢x2⁢y+1000⁢x+375⁢y,−9⁢x11+192⁢x10−255⁢x9+2560⁢x8−2925⁢x7+9600⁢x6−16875⁢x5−48750⁢x3−40000⁢x2+5625⁢y2−56250⁢x,3⁢x11−64⁢x10+90⁢x9−960⁢x8+1125⁢x7−4800⁢x6+7500⁢x5−8000⁢x4+28125⁢x3+46875⁢x+18750⁢z
Basis⁡F,wdeg⁡1,2,3,x,y,z,method=convert
-> Groebner Walk total time: 0.029 sec
−x2+2⁢x⁢z−5,x4−3⁢x⁢y2+10⁢x2+20⁢z2+25,8⁢x⁢y2+3⁢y3,−x5+3⁢x2⁢y2−15⁢x3−50⁢x−50⁢z,8⁢x6+3⁢x5⁢y+120⁢x4+45⁢x3⁢y+600⁢x2+150⁢x⁢y+150⁢y⁢z+1000,3⁢x8−64⁢x7+90⁢x6−960⁢x5+900⁢x4−4800⁢x3+450⁢x⁢y2+450⁢y2⁢z+3750⁢x2−8000⁢x+5625
Non-commutative examples (see Basis_details for more information)
with⁡Ore_algebra:
infolevelGroebnerBasis≔4:
N≔3:
A≔diff_algebra⁡seq⁡Di,xi,i=1..N,comm=a,b,seq⁡ci,i=1..N,polynom=seq⁡xi,i=1..N:
S≔`+`⁡seq⁡xi⁢Di,i=1..N:
P≔skew_product⁡S+a,S+b,A:
F≔seq⁡skew_product⁡Di,xi⁢Di+ci−1,A−P,i=1..N
F≔D12⁢x1+D1⁢c1−D12⁢x12−2⁢D1⁢D2⁢x1⁢x2−2⁢D1⁢D3⁢x1⁢x3−a+b+1⁢x1⁢D1−D22⁢x22−2⁢D2⁢D3⁢x2⁢x3−a+b+1⁢x2⁢D2−D32⁢x32−a+b+1⁢x3⁢D3−a⁢b,D22⁢x2+D2⁢c2−D12⁢x12−2⁢D1⁢D2⁢x1⁢x2−2⁢D1⁢D3⁢x1⁢x3−a+b+1⁢x1⁢D1−D22⁢x22−2⁢D2⁢D3⁢x2⁢x3−a+b+1⁢x2⁢D2−D32⁢x32−a+b+1⁢x3⁢D3−a⁢b,D32⁢x3+D3⁢c3−D12⁢x12−2⁢D1⁢D2⁢x1⁢x2−2⁢D1⁢D3⁢x1⁢x3−a+b+1⁢x1⁢D1−D22⁢x22−2⁢D2⁢D3⁢x2⁢x3−a+b+1⁢x2⁢D2−D32⁢x32−a+b+1⁢x3⁢D3−a⁢b
tord≔tdeg⁡seq⁡Di,i=1..N,seq⁡xi,i=1..N
tord≔tdeg⁡D1,D2,D3,x1,x2,x3
T≔MonomialOrder⁡A,tord:
G≔Basis⁡F,T:
-> F4 algorithm domain: SkewAlgebra coeffs: rat_fcn basis: 1 of 3, syzygies: 3 of 3, degree: 4 0 x 0 with 3 rhs basis: 2 of 5, syzygies: 1 of 3, degree: 4 2 x 2 with 1 rhs basis: 3 of 6, syzygies: 2 of 2, degree: 5 4 x 4 with 2 rhs basis: 5 of 8, syzygies: 4 of 4, degree: 6 12 x 12 with 4 rhs basis: 8 of 11, syzygies: 11 of 12, degree: 7 39 x 39 with 11 rhs basis: 10 of 13, syzygies: 10 of 10, degree: 8 75 x 75 with 10 rhs basis: 12 of 15, syzygies: 7 of 7, degree: 9 94 x 94 with 7 rhs symbolic prc 0.220 sec inter reduce 0.001 sec update pairs 0.008 sec reduce basis 0.010 sec total time: 0.240 sec -----------------------------
Groebner:-LeadingMonomial⁡G,T
D22⁢x2,D12⁢x1,D1⁢D2⁢x1⁢x2,D1⁢D32⁢x1⁢x3,D1⁢D2⁢D3⁢x1⁢x3,x2⁢D2⁢D32⁢x1⁢x3,D12⁢D2⁢D3⁢x2⁢x3,D2⁢D33⁢x1⁢x3,D1⁢D2⁢D32⁢x22⁢x3,D12⁢D33⁢x2⁢x3,D34⁢x12⁢x32,D12⁢D22⁢D32⁢x32
Buchberger, B. "Grobner Bases: An algorithmic method in polynomial ideal theory." In Multidimensional systems theory, pp. 184-232, Reidel, 1985.
Collart, S.; Kalkbrener, M.; and Mall, D. "Converting Bases with the Grobner Walk." J. Symbolic Comput., Vol. 3, No. 4, (1997): 465-469.
Faugere, J. "A New Efficient Algorithm for Computing Grobner Bases (F4)." Journal of Pure and Applied Algebra, Vol. 139, No. 1-3, (1999): 61-88.
Faugere, J.; Gianni, P.; Lazard, D.; and Mora, T. "Efficient computation of zero-dimensional Grobner bases by change of ordering." J. Symbolic Comput., Vol. 16, (1993): 329-344.
Gebauer, R., and Moller, H. "On an installation of Buchberger's algorithm." J. Symbolic Comput., Vol. 6, (1988): 275-286.
Pearce, R., and Monagan, M. "A Sparse Algorithm for Polynomial Division with Application to F4." in preparation, 2006.
See Also
Basis
Basis_details
LeadingMonomial
MonomialOrder
Download Help Document