Buchberger's algorithm constructs a Gröbner basis from a finite generating set of an ideal in a polynomial ring over a field, for a fixed monomial order. It uses S-polynomial formation and polynomial reduction.
A finite set of nonzero polynomials is a
Gröbner basis iff
every S-polynomial of two distinct members reduces
to zero by
(Buchberger 2001b, pp. 238-239). Start with the nonzero generators and reduce
an S-polynomial by the current set.
Adjoin its remainder whenever that remainder is nonzero, and include all new pairs
involving the added polynomial. Continue until every
pair has been processed.
Adding a remainder preserves the generated ideal. Its leading monomial is not divisible by any previous leading monomial, so each addition strictly enlarges the monomial ideal generated by these leading monomials. The ascending chain condition in the polynomial ring, which is a Noetherian ring, ensures termination. Reducing the final result gives the reduced Gröbner basis.
For example, in
with lexicographic order
, the generators
and
have S-polynomial
It admits no further reduction by , so it must be added. The resulting reduced
Gröbner basis is
.