Go to the first, previous, next, last section, table of contents.

Setting term orderings

A term is internally represented as an integer vector whose components are exponents with respect to variables. A variable list specifies the correspondences between variables and components. A type of term ordering specifies a total order for integer vectors. A type of term ordering is represented by an integer, a list of integer or matrices.

There are following three fundamental types.

0 (DegRevLex; total degree reverse lexicographic ordering)
In general, computation by this ordering shows the fastest speed in most Groebner basis computations. However, for the purpose to solve polynomial equations, this type of ordering is, in general, not so suitable. The Groebner bases obtained by this ordering is used for computing the number of solutions, solving ideal membership problem and seeds for conversion to other Groebner bases under different ordering.
1 (DegLex; total degree lexicographic ordering)
By this type term ordering, Groebner bases are obtained fairly faster than Lex (lexicographic) ordering, too. Alike the DegRevLex ordering, the result, in general, cannot directly be used for solving polynomial equations. It is used, however, in such a way that a Groebner basis is computed in this ordering after homogenization to obtain the final lexicographic Groebner basis.
2 (Lex; lexicographic ordering)
Groebner bases computed by this ordering give the most convenient Groebner bases for solving the polynomial equations. The only and serious shortcoming is the enormously long computation time. It is often observed that the number coefficients of the result becomes very very long integers, especially if the ideal is 0-dimensional. For such a case, it is empirically true for many cases that i.e., computation by gr() and/or hgr() may be quite effective.

By combining these fundamental orderingl into a list, one can make various term ordering called elimination orderings.


In this example Oi indicates 0, 1 or 2 and Li indicates the number of variables subject to the correspoinding orderings. This specification means the following. The variable list is separated into sub lists from left to right where the i-th list contains Li members and it corresponds to the ordering of type Oi. The result of a comparison is equal to that for the leftmost different sub components. This type of ordering is called an elimination ordering.

Furthermore one can specify a term ordering by a matix. Suppose that a real n, m matrix M has the following properties.

  1. For all integer verctors v of length m Mv=0 is equivalent to v=0.
  2. For all non-negative integer vectors v the first non-zero component of Mv is non-negative.

Then we can define a term ordering such that, for two vectors t, s, t>s means that the first non-zero component of M(t-s) is non-negative.

Types of term orderings are used as arguments of functions such as gr(). It is also set internally by dp_ord() and is used during executions of various functions.

For concrete definitions of term ordering and more information about Groebner basis, refer to, for example, the book [Becker,Weispfenning].

Note that the variable ordering have strong effects on the computation time as well as the choice of types of term orderings.

[90] B=[x^10-t,x^8-z,x^31-x^6-x-y]$
[91] gr(B,[x,y,z,t],2);
[93] gr(B,[t,z,y,x],2);

As you see in the above example, the Groebner base under variable ordering [x,y,z,t] has a lot of bases and each base itself is large. Under variable ordering [t,z,y,x], however, B itself is already the Groebner basis. Roughly speaking, to obtain a Groebner base under the lexicographic ordering is to express the variables on the left (having higher order) in terms of variables on the right (having lower order). In the example, variables t, z, and y are already expressed by variable x, and the above explanation justifies such a drastic experimental results. In practice, however, optimum ordering for variables may not known beforehand, and some heuristic trial may be inevitable.

Go to the first, previous, next, last section, table of contents.