Groebner
SuggestVariableOrder
choose a good variable order
Calling Sequence
Parameters
Description
Examples
SuggestVariableOrder(J, X)
J
-
a list or set of polynomials or a PolynomialIdeal
X
(optional) a list or set of variables
SuggestVariableOrder attempts to choose heuristically good variable orderings that should result in faster Groebner basis computations for both plex and tdeg orders. In practice, this is one of the most important considerations for performance, since a bad variable ordering can make an otherwise simple problem infeasible. The set of variables can be explicitly specified by an optional second argument.
The heuristics used are based on the degree of the polynomials in each respective variable and on the size of the coefficients. They do not always produce an optimal order, but they should rarely select a bad order.
SuggestVariableOrder is called by Groebner[Basis] when the second argument is a name and no appropriate basis is known.
Our first example is a problem of Trinks'. We compute a total degree Groebner basis without specifying an order. Groebner[Basis] calls SuggestVariableOrder automatically.
with⁡Groebner:
trinks≔−9⁢w+15⁢p⁢t+20⁢z⁢s,99⁢w−11⁢s⁢b+3⁢b2,w⁢p+2⁢z⁢t−11⁢b3,45⁢p+35⁢s−165⁢b−36,35⁢p+40⁢z+25⁢t−27⁢s,15⁢w+25⁢p⁢s+30⁢z−18⁢t−165⁢b2:
G≔GroebnerBasis⁡trinks,tord,order=tdeg:
tord
tdeg⁡w,z,t,p,s,b
Next we compare lexicographic bases for the order suggested, its reverse, and a random permutation of b,p,s,t,w,z.
V≔SuggestVariableOrder⁡trinks
V≔w,z,t,p,s,b
G≔GroebnerBasis⁡trinks,plex⁡V:
length⁡G
4208
map⁡length@maxnorm,G
21,66,68,67,67,65
V2≔seq⁡V−i,i=1..6
V2≔b,s,p,t,z,w
G2≔GroebnerBasis⁡trinks,plex⁡V2:
length⁡G2
9262
map⁡length@maxnorm,G2
40,158,161,161,159,158
V3≔op⁡combinatrandperm⁡V
V3≔t,p,s,b,w,z
G3≔GroebnerBasis⁡trinks,plex⁡V3:
length⁡G3
9125
map⁡length@maxnorm,G3
33,151,152,154,154,155
See Also
Groebner[Basis]
length
maxnorm
Download Help Document