36 4 Groebner basis
basis algorithm is applied to reduce the set of polynomials into another set (e.g.,
from a system F (x, y, z) to another system G(x, y, Z)) of polynomials with suit-
able properties that allow solution. If F (x, y, z) is a set of nonlinear system of
polynomial equations, Groebner basis eliminates variables in a manner similar to
Gauss elimination technique for linear cases to reduce it to G(x, y, z). With Lex-
icographic ordering of the monomials (see Definition A.2 in Appendix A-1 on p.
339), one expression in G(x, y, z) always turns out to be a univariate polynomial.
Its roots are easily obtained using algebraic software of Matlab, Mathematica or
Maple, and can be substituted in the other elements of the set G(x, y, z) to obtain
a complete solution which also satisfy the original set F (x, y, z). Examples 4.3 and
4.4 elaborate on the application of Groebner basis.
Example 4.3 (Groebner basis computation). Let us consider a simple example
from [98]. Consider a set F (x, y) = {f
1
, f
2
} to have as its elements
f
1
= xy − 2y
f
2
= 2y
2
− x
2
,
(4.9)
where {f
1
, f
2
} ∈ I are the generators of the Ideal I (see definition of Ideal on
p. 37). We now seek a simplified set of generators of this Ideal using Buchberger
algorithm. By employing operations “addition” and “multiplication”, the Groebner
basis algorithm (also called Buchberger algorithm) reduces the system of nonlinear
equations (4.9) into another set G of F as
G := {−2x
2
+ x
3
, −2y + xy, −x
2
+ 2y
2
}. (4.10)
In Mathematica software, using the lexicographic order x > y, i.e., x comes before
y, the Groebner basis could simply be computed by entering the command
GroebnerBasis[F, {x, y}]. (4.11)
The set G in (4.10) contains one univariate polynomial −2x
2
+x
3
, which can easily
be solved using roots command in Matlab for solutions {x = 0, x = 0, x = 2}
and substituted in any of the remaining elements of the set G to solve for y.
The solutions of G, i.e., the roots {x = 0, x = 0, x = 2}) and those of y satisfy
polynomials in F . This can be easily tested by substituting these solutions into
(4.9) to give 0.
Let us consider as a second example an optimization problem.
Example 4.4 (Minimum and maximization problem). Find the minimum and max-
imum of f(x, y, z) = x
3
+ 2xyz −z
2
, such that g(x, y, z) = x
2
+ y
2
+ z
2
−1. First,
we obtain the partial derivatives of f −L g = 0 with respect to {x, y, z, L}, where
L is the lagrangean multiplier as
∂f
∂{x, y, z, L}
:= F =
3x
2
+ 2yz − 2xL = 0
2xz − 2yL = 0
2xy − 2z − 2zL = 0
x
2
+ y
2
+ z
2
− 1 = 0.
(4.12)