Simone Flory and Eberhard Michel
Integer Programming
with Gröbner Bases
May 11, 1998
Notes for a Project in
Discrete Optimization, Spring ’98
ii
Contents
1 Preliminaries
3
1.1
Some Algebraic Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3
1.2
The Division Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5
2 Introduction to Gröbner Bases
7
2.1
Why Gröbner Bases? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7
2.2
What are Gröbner Bases? . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8
2.3
Computing Gröbner Bases . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10
2.4
Buchberger’s Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
11
3 Application to Integer Programming
13
3.1
Translation into a polynomial problem . . . . . . . . . . . . . . . . . . . . .
13
3.2
The Algorithm of Conti and Traverso
17
4 Example
. . . . . . . . . . . . . . . . . . . . .
19
iv
Contents
Introduction
The theory of Gröbner basis is an illustrative example to demonstrate how abstract mathematics like commutative algebra can be used to solve problems arising from applied mathematics.
We consider a problem of the form
minimize
ct x
subject to Ax = b, x ∈ INn
where b ∈ ZZm , c ∈ ZZn , and A ∈ ZZm×n .
In contrast to the problems we have discussed so far in class, the entries of a feasible x
are required to be integers. Using the simplex method, we could only guarantee rational
solutions x which might have non-integral entries. Therefore, we need to find an algorithm
that returns the optimal integral solution.
These notes aim at introducing the notion of Gröbner basis, and providing the reader with
a rough idea how to use it as a tool for integer programming. In order not to go beyond a reasonable size, we will omit all proofs; however, they can be found in Adams and Loustaunau (1994)
or Cox and Sturmfels (1997).
Notation.
By IR+ we denote the non-negative reals; INn is the set of ordered pairs a = (a1 , . . . , an ),
where ak ∈ IN; ZZm×n is the set of m by n matrices with integral entries.
2
Contents
1
Preliminaries
1.1 Some Algebraic Structures
Definition 1.1.
A (commutative) Ring R is a set R with an addition + and a multiplication · such that:
1. For a, b, c ∈ R
• a + b = b + a ∈ R.
• (a + b) + c = a + (b + c).
• There is a neutral element 0 such that a + 0 = a.
• There is an additive inverse −a such that a + (−a) = 0.
2. For a, b, c ∈ R
• a · b = b · a ∈ R.
• (a · b) · c = a · (b · c).
3. For a, b, c ∈ R, (a + b) · c = a · c + b · c.
Example.
The set ZZ of integers is a commutative ring.
Definition 1.2.
An Ideal I of a ring R is a subring of R such that RI ⊆ I.
Example.
The even numbers, 2ZZ, are an ideal of ZZ.
4
1. PRELIMINARIES
Definition 1.3.
The ideal < fj >j∈J generated by {fj |j ∈ J} is the smallest ideal of R that contains all
fj , j ∈ J.
A set {fj |j ∈ J} ⊆ R is said to generate the ideal I if < fj >j∈J = I.
If a finite set J is sufficient to generate I, then I is called finitely generated.
Example.
The even numbers, 2ZZ, are the ideal of ZZ, generated by 2: 2ZZ =< 2 >.
Lemma 1.4.
Let {fj |j ∈ J} ⊆ R. Then < fj >j∈J =
o
j∈J aj fj aj ∈ R only finitely many aj 6= 0
nP
Definition 1.5.
A Field K is a commutative ring with multiplicative identity 1 such that each element
different from 0 has a multiplicative inverse.
Definition 1.6.
The Ring of Polynomials of a field K is denoted by
K[X1 , . . . , Xn ] :=
X
|α|≤k
aα Xα aα ∈ K, α ∈ INn ,
where Xα := X1α1 · . . . · Xnαn . We will often write K[X] instead of K[X1 , . . . , Xn ].
Theorem 1.7. (Hilbert Basis Theorem)
Let K be a field, then every ideal I ⊆ K[X1 , . . . , Xn ] is finitely generated.
Definition 1.8.
A Monomial Order is a total order > on monomials of K[X] with the following two
properties:
1. (Well-Ordering) > is a well-ordering on the set of monomials, i.e. any nonempty subset
of monomials has a least element under >.
2. (Compatibility) If Xα > Xβ , then Xα Xγ > Xβ Xγ for any monomial Xγ .
Example.
One of the simplest monomial orders is lexographic (abbreviation: lex), which is defined by
X1α1 . . . Xnαn >lex X1β1 . . . Xnβn :⇐⇒ α1 > β1 , or α1 = β1 and α2 > β2 , etc. . .
1.2. THE DIVISION ALGORITHM
5
Definition 1.9.
P
If P = α aα Xα is a polynomial in K[X], then a term of P is a aα X α , where aα 6= 0. The
Leading Term of P is
LT(P ) = max> {aα Xα |aα 6= 0}
where max> is the maximum with respect to >.
1.2 The Division Algorithm
Let > be the given monomial order on K[X]. We would like to divide P ∈ K[X] by
P1 , . . . , Ps ∈ K[X],i.e. we would like to produce an expression of the form
P = Q1 P1 + · · · + Qs Ps + R
(SE)
where no term of R is divisible by LT(P1 ), . . . , LT(Ps ). Furthermore, we will require LT(P ) ≥
LT(Qi Pi ), for 1 ≤ i ≤ s. (SE) is called standard expression.
The Algorithm.
Initialize a remainder variable R by zero.
Then, pick the smallest i such that LT(P ) is divisible by LT (Pi ), and write P =
P 1 . The variable R remains unchanged.
LT(P )
LT(Pi ) Pi +
In case there is no such i add LT(P ) to R, and write P = P 1 + LT(P ).
Repeat this process by using P 1 now and the current value of R.
This process stops after finitely many of steps since > is a well-ordering. Furthermore, the
algorithm will produce a standard expression for P .
Unfortunately, the remainder may not be the same when dividing by the Pi ’s in a different
order. However, this shortcoming of the division algorithm will disappear if the divisors are
elements of a Gröbner Basis.
6
1. PRELIMINARIES
2
Introduction to Gröbner Bases
2.1 Why Gröbner Bases?
In general, mathematical theories are considered to be more valuable if they turn out to be
useful in a broader variety of fields. In order to get an idea of the value of Gröbner basis,
we will list some applications.
Toolbox for commutative algebra:
Let K be a field, I and J be two ideals and P an element of the polynomial ring K[X1 , . . . , Xm ].
Using Gröbner bases, the following problems could be solved:
1. Is P an element of the ideal I?
2. Do the ideals I and J coincide?
3. Find a basis/complete set of representatives of the K-vectorspace
K[X1 ,...,Xm ]
.
I
.
Solving of Systems of Equations:
1. Linear Equations: Let A ∈ ZZm×n and b ∈ ZZm . Find the solutions of Ax = b, where
x ∈ INn or x ∈ IRn+ .
2. Nonlinear Equations: Let {Pi } ⊆ Q[X1 , . . . , Xn ] be a family of polynomials. Find all
x ∈ INn , x ∈ IRn , or x ∈ IRn+ , such that all Pi vanish simultaniously. These are systems
like:
x2 + 2xy − y 3 + z 2 = 10
x2 + y 2 + z 2 = 1
8
2. INTRODUCTION TO GRÖBNER BASES
Optimization Problems:
1. Linear or Integer Programming: Let A ∈ ZZm×n , b ∈ ZZm , and c ∈ ZZn . Find an optimal
solution of
minimize
ct x
subject to Ax = b
where x ∈ INm , x ∈ ZZn , x ∈ Qn+ , or x ∈ Qn .
2. Nonlinear Optimization: Let {Pi } ⊆ Q[X1 , . . . , Xn ] be a family of polynomials and
C ∈ Q[X1 , . . . , Xn ] be the objective polynomial. Find an optimal solution of
minimize
C(x)
subject to Pi (x) = 0 for all i.
where x ∈ INn , x ∈ ZZn , x ∈ Qn+ , or x ∈ Qn .
For our purposes, it is sufficient to examine the application of Gröbner bases to integer
programming problems (IP’s). However, we would like illustrate that this is only a minor byproduct of a rather helpful theory. Thus, we aim at more than just presenting the minimal
framework needed to solve IP’s; namely, revealing the structures and techniques of the
translations between ‘theory’ and ‘application’.
2.2 What are Gröbner Bases?
Dealing with LP’s, the set of possible solutions is usually given in the form
n
o
P = x ∈ IRn+ Ax = b .
Equivalently, we could describe the set P as
n
o
x ∈ IRn+ Ax − b = 0 or
n
o
n
P = x ∈ IR+ Pi (x) = 0 for all i = 1, . . . , m ,
where Pi (x) = ai1 x1 + · · · + ain xn − bi defines polynomials Pi = ai1 X1 + · · · + ain Xn − bi
of IR[X1 , . . . , Xn ]. The general idea is to describe subsets V of IRn by polynomials which
vanish simultaniously on V. Such sets are called varieties.
Definition 2.1.
For a family {Pj }j∈J of polynomials in IR[X1 , . . . , Xn ], let
n
o
n
V({Pj }j∈J ) := x ∈ IR Pi (x) = 0 for all j
denote the (affine) variety given by the polynomials P1 , . . . , Pm .
2.2. WHAT ARE GRÖBNER BASES?
9
Example.
Every sphere is a variety. For example in three dimensions we have
˛
n
o
˛
S2 = x = (x1 , x2 , x3 ) ∈ IR3 ˛x21 + x22 + x23 = 1 = V(x21 + x22 + x23 − 1).
Conversely to the notion of a variety, we will study the properties of the polynomials which
vanish on a given subset of IRn . To be able to translate back and forth, we need the following
Definition 2.2.
Let V ⊆ IRn . Then the set of poynomials vanishing simultaniously on V is denoted by
n
o
I(V ) := P ∈ IR[X1 , . . . , Xn ]P (x) = 0 for all x ∈ V
Lemma 2.3.
For a given variety V ⊆ IRn , I(V ) is an ideal, the so called ideal of V . Furthermore,
V(I(V )) = V .
Hence, two varieties V and W are equal if and only if their ideals I(V ) and I(W ) are equal.
Due to the Hilbert Basis Theorem 1.1, every Ideal I in a polynomial ring K[X1 , . . . , Xn ]
over a field K is finitely generated, i.e. it is of the form < P1 , . . . , Pk >. Also because of 1.1,
our definitions of a variety of an possibly infinite set makes sense.
Example.
Let {P1 , . . . , Ps } be a family of polynomials, then
V (P1 , . . . , Pk ) = V (hP1 , . . . , Ps i)
A Gröbner Basis of an ideal is a particular generating set {P1 , . . . , Pk }, which facilitates
polynomial divisons.
Remark.
Notice, in general I = I(V(I)) is not true!
Definition 2.4.
Let I ⊆ K[X1 , . . . , Xm ] be an ideal and < be an monomial order. Then a set G< of polynomials {G1 , . . . , Gk } in K[X1 , . . . , Xm ] is a Gröbner Basis of I, if
D
E
hLT(G1 ), . . . , LT(Gk )i = LT(P )P ∈ I .
(GB)
Remarks.
1. A set G< of polynomials {G1 , . . . , Gk } is a Gröbner Basis of I if for any non-trivial
P ∈ I there exists a G ∈ G such that LT(G) divides LT(P ).
10
2. INTRODUCTION TO GRÖBNER BASES
2. If there is only one monomial order, we will omit the subscript ’<’.
3. A Gröbner basis is not uniquely determined by (GB). In fact, an ideal may have
several different Gröbner bases.
Theorem 2.5. (Existence of Gröbner Bases)
Let {0} =
6 I ⊆ K[X1 , . . . , Xm ] be an ideal, < be a monomial order.
1. There exists a Gröbnerbasis G< of I.
2. Any Gröbner basis of I generates I, i.e. I =< G >.
Theorem 2.6. (Membership Problem)
Let I ⊆ K[X1 , . . . , Xm ] be a nontrivial ideal.
1. There exists a unique R ∈ K[X1 , . . . , Xm ] such that for any Gröbner basis G =
{G1 , . . . , Gk } no term of R is divisible by any of LT(G1 ), . . . , LT(Gk ), and there exists
a P 1 ∈ I such that P = P 1 + R. Such an R is called remainder of P .
2. Let P ∈ K[X1 , . . . , Xm ] and G be any Gröbnerbasis. Then P ∈ I if and only if the
remainder on division of P by G is 0.
P ∈I
⇐⇒
G
P −→ 0
2.3 Computing Gröbner Bases
All lemmas and theorems of the last section assume that we are given a Gröbner basis of
an ideal. Hence, our next step must be to find such a basis. In this section we will lay
the theoretical foundations for computing a Gröbner basis, and present the algorithm of
Buchberger. In some sense, what we do is reinventing polynomial division. In every step
of a division of polynomials in one variable, we need to find a factor to cancel the leading
terms and calculate the remainder.
Example.
−
(
(
X5
X5
−1
−X 3
)
)
:
(X 2 − 1)
= X3
X3 − 1
After one step of polynomial division we have
(X 5 − 1) = X 3 · (X 2 − 1) + (X 3 − 1) ,
where the leading term of X 3 − 1 is still divisible by the leading term of X − 1. If the remainder, here X 3 − 1, was
0, one term would be divisible by the other. If the remainder was not divisible anymore and different from zero, it
would be the actual remainder on division.
2.4. BUCHBERGER’S ALGORITHM
11
Definition 2.7.
We assume a given monomial order. For two polynomials P1 and P2 of K[X1 , . . . , Xm ] define
the S-polynomial of P1 and P2 by
S(P1 , P2 ) :=
LCM(LT(P1 ), LT(P2 ))
LCM(LT(P1 ), LT(P2 ))
P1 −
P2 ,
LT(P1 )
LT(P2 )
where LCM(LT(P1 ), LT(P2 )) denotes the least common multiple of the leading terms of
P1 and P2 .
Theorem 2.8. (Buchberger)
Let G = {G1 , . . . , Gk } be a set of non-trivial polynomials in K[X1 , . . . , Xm ], I := hG1 , . . . , Gk i
be the generated ideal. Then the following are equivalent:
1. G is a Gröbnerbasis of I.
2. For any 1 ≤ i 6= j ≤ k, the remainder of S(Gi , Gj ) on division by G is zero
Notice, that this theorem yields an algorithm to construct a Gröbner basis out of a generating set F of an ideal I: We calculate the S-polynomials of all pairs in F, reduce them,
and if the remainder is not zero, add it to F. To be more precise. . .
2.4 Buchberger’s Algorithm
The Algorithm.
Let F = {P1 , . . . , Ps } be a family of polynomials in K[X1 , . . . , Xm ] such that Pk 6= 0 for all
k. Let I = hP1 , . . . , Ps i be the ideal generated by F.
o
n
Let G := F, R := {Pk , Pl } Pk 6= Pl .
While R 6= {} do the following steps:
1. Choose any {Q1 , Q2 } ∈ R
2. Let R := R \ {Q1 , Q2 }.
3. Reduce S(Q1 , Q2 ) with respect to G. This yields an remainder S.
4. If S 6= 0, then
n
o
• R := R ∪ {Q, S} Q ∈ G .
• G := G ∪ {S}.
G is a Gröbner basis for I.
Theorem 2.9.
Buchberger’s algorithm terminates and produces a Gröbner basis
12
2. INTRODUCTION TO GRÖBNER BASES
Since this algorithm produces a larger generating set than needed, we need to reduce this
set again.
Definition 2.10.
A Gröbner basis G = {G1 , . . . , Gk } is called a reduced Gröbner basis, if the leading
coefficient of every polynomial Gi is 1, and every Gi is reduced with respect to G \ {Gi }.
Remark.
To obtain a reduced Gröbner basis from a Gröbner basis, we reduce every polynomial Gi
with respect to G \ {Gi }, and replace, if the remainder is non-zero, Gi in G by its remainder.
Theorem 2.11.
For a given monomial order, the reduced Gröbner basis of a non-trivial ideal is unique.
3
Application to Integer Programming
Idea.
In order to solve an integer programming problem (IP), we will take the following three
steps:
1. Translate the IP into a problem concerning polynomials.
2. Solve this problem by means of Gröbner Bases.
3. Translate the solution back to obtain a solution of the original problem.
Setup.
In this chapter, we will always consider a problem of the form
minimize
ct x
subject to Ax = b, x ∈ INn
where b ∈ ZZm , c ∈ ZZn , and A ∈ ZZm×n .
This means we look for an optimal x ∈ P, such that
ct x = min ct x
x∈P
(IP)
where P := {x ∈ INn |Ax = b}.
3.1 Translation into a polynomial problem
3.1.1
Only non-negative entries in A and b
For a = (a1 , . . . , aν ) ∈ INν , we define
Xa := X1a1 · . . . · Xνaν ,
a monomial of a polynomial ring containing the variables X1 , . . . , Xν where X denotes
the vector (X1 , . . . , Xν ).
14
3. APPLICATION TO INTEGER PROGRAMMING
Let A ∈ INm×n , b ∈ INm . For each linear equation ak1 x1 + . . . + akn xn = bk of P we
intruduce a variable Xk to represent this equation as
Xkak1 x1 +...+akn xn = Xkbk .
We will write the whole system as
bm
am1 x1 +···+amn xn
X1a11 x1 +···+a1n xn · . . . · Xm
= X1b1 · . . . · Xm
which is equivalent to
am1 x1
amn xn
) · . . . · (X1a1n · . . . · Xm
(X1a11 · . . . · Xm
) = Xb
|
|
{z
}
{z
}
XA1
XAn
Now, we will identify XAk with some variable Yk for each k = 1, . . . , n. The first step in
solving our problem is to figure out whether there exists a solution at all. Fortunately, the
theory of Gröbner basis yields the following
Lemma 3.1. (Characterization of Feasibility, A ≥ 0,b ≥ 0)
Let A ∈ INm×n , b ∈ INm . Let Φ be the unique polynomial ring homomorphism between
K[Y1 , . . . , Yn ] and K[X1 , . . . , Xm ](more precisely K-Algebra homomorphism), such that Φ(Yk ) =
XAk . Then the following are equivalent:
1. P is nonempty, i.e. there exists a x = (x1 , . . . , xn ) ∈ INn such that Ax = b
2. Xb is in the image of Φ, i.e. there exists an
X
P =
aα Yα ∈ K[Y1 , . . . , Yn ]
α∈INn ,|α|≤N
such that Φ(P ) = Xb .
Furthermore, if Φ(P ) = Xb , then P = Yx , for some x ∈ INn , and x ∈ P.
The next step is to characterize the pre-image of Xb under Φ, and, what is more important,
to answer the question: How can we find the pre-image of Xb .
Theorem 3.2. (Characterization of Optimal Solutions, A ≥ 0,b ≥ 0)
With the above notation, let I be the ideal Y1 − XA1 , . . . , Yn − XAn of the polynomial ring
K[X1 , . . . , Xm , Y1 , . . . , Yn ]. Let G be a reduced Gröbner basis with respect to a monomial
order where the Xk ’s are larger than the Yl ’s. of I.
Let P ∈ K[X1 , . . . , Xm ] and R ∈ K[X1 , . . . , Xm , Y1 , . . . , Yn ] be the remainder of P with
respect to G. Then the following are equivalent
1. P is in the image of Φ.
2. R ∈ K[Y1 , . . . , Yn ]
In this case, R is the minimal pre-image of P .
3.1. TRANSLATION INTO A POLYNOMIAL PROBLEM
15
Due to this theorem, it is quite easy to check whether there exists a solution. Moreover,
0
we have to find a monomial order such that for Φ(Yx ) = Φ(Yx ) and ct x < ct x0 we
0
get Yx < Yx . Such an order is said to respect the costs. Then, by reducing Xb with
respect to an appropriate Gröbner basis G we obtain a polynomial Xτ Yσ . If this monomial
is already contained in K[Y1 , . . . , Yn ], i.e. τ = 0, then our minimal solution exists and is σ.
3.1.2
The general case
The Problem.
Let now be A ∈ ZZm×n and b ∈ ZZm . If we translate the (IP) as we did before, we might
end up with an equation
X1−x1 = X2
which doesn’t make sense in the ring of polynomials K[X1 , . . . , Xm ]. Hence, we are not able
to translate our problem the way we did so far.
The Solution.
The idea is to indroduce a new variable W , and identify X1 ·. . .·Xm ·W with 1. Equivalently,
this relation could be expressed by X1 · . . . · Xm · W − 1 = 0. Therefore, we actually translate
the (IP) into a problem in the ring
.
K[X1 ,...,Xm ,W ]
(PR)
hX1 ·...·Xm ·W −1i
Notice, that we do not use a coset notation like [X1 ] or X1 + hX1 · . . . · Xm W − 1i, nor do
we indicate the equivalence of two monomials or polynomial by a different equality sign!
Moreover, since for any k = 1, . . . , m
Xk · (X1 · . . . · Xk−1 Xk+1 · . . . · Xm W ) = 1,
we will denote the equivalence class of X1 ·. . .·Xk−1 Xk+1 ·. . .·Xm W by Xk−1 . Both notations
may seem awkward in the beginning, but make it easier to perform calculations.
Example.
In order to get used to this coset notation, consider the following. We identify each multiple of 3 with 0, i.e. we work
with
.
ZZ3 := ZZ
.
<3>
Hence, we write, 7 = 1 + 6 = 1 + 0 = 1, since 6 = 3 + 3 = 0 + 0 = 0, instead of something like [7] = [1] or
7+ < 3 >= 1+ < 3 >.
Example.
Suppose we have two variables, X1 and X2 , and we have to rewrite an expression like X1−1 X22 . We would change the
polynomial ring from K[X1 , X2 ] to K[X1 , X2 , W ] and identify X1 X2 W with 1. Therefore we get
“
”
“
”
X1−1 X22 = X1−1 X22 (X1 X2 ) X1−1 X2−1 = X23 W .
a0
a0
Every equation involving negative entries can now be rewritten as X1 1k · . . . · Xmmk W αk ,
where a0jk − αk = ajk , and ajk , a0jk , αk ∈ IN. We apply the same idea to Xb and get ’new’
16
3. APPLICATION TO INTEGER PROGRAMMING
non negative row vectors and a ’new’ non negative b
0
a1k
a1k
1
1
0
0
Ak := . . . = . . . + αk . . . ≥ 0 for all k and b = b + β . . . ≥ 0.
a0mk
amk
1
1
0
0
Hence, we get XAk W αk = XAk and Xb W β = Xb in the coset ring defined by (PR).
The equivalent formulation of our (IP) is:
xn
0
0
x1
0
a
a
a0
a0mn
X1 11 · . . . · Xmm1 W α1
W αn
· . . . · X1 1n · . . . · Xm
= Xb W β
|
{z
}
{z
}
|
=:Y1
=:Yn
Furthermore, we get the same characterization of feasibility and optimal solutions as in the
first case.
Lemma 3.3. (Characterization of Feasibility)
With the above notation, let Φ be the unique polynomial ring homomorphism
.
0
such that Φ(Yk ) = XAk Wαk
Φ : K[Y1 , . . . , Yn ] −→ K[X1 ,...,Xm ,W ]
hX1 ·...·Xm ·W −1i
Then the following are equivalent:
1. P is nonempty, i.e. there exists an x = (x1 , . . . , xn ) ∈ INn such that Ax = b
2. Xb is in the image of Φ, i.e. there exists a
X
P =
aα Yα ∈ K[Y1 , . . . , Yn ]
α∈INn ,|α|≤N
0
such that Φ(P ) = Xb W β .
0
Furthermore, if Φ(P ) = Xb W β , then P must be of the form Yx , for some feasible x ∈ INn .
Theorem 3.4. (Characterization of Optimal Solutions)
D
E
0
0
With the above notation, let I be the ideal Y1 − XA1 W α1 , . . . , Yn − XAn W αn , X1 · . . . · Xm W − 1
of the polynomial ring K[X1 , . . . , Xm , W, Y1 , . . . , Yn ]. Let G be a reduced Gröbner basis of I
with respect to a monomial order where the Xk ’s and W are larger than the Yl ’s.
Let P ∈ K[X1 , . . . , Xm , W ], and R ∈ K[X1 , . . . , Xm , W, Y1 , . . . , Yn ] be the remainder of P
with respect to G. Then the following are equivalent
1. P is in the image of Φ.
2. R ∈ K[Y1 , . . . , Yn ]
In this case, R is the minimal pre-image of P with respect to the given monomial order.
3.2. THE ALGORITHM OF CONTI AND TRAVERSO
3.1.3
17
Construction of Monomial Orders
Since the calculation of a Gröbner basis and the reduction of a polynomial with respect to
a Gröbner basis depends on the given monomial order, we can implement the minimization
problem using the monomial order.
For a given costvector c we would like to obtain in theorem 3.4 an R of the form Yσ , since
this would yield a feasible solution σ according to lemma 3.3. Therefore, we need a monomial
order, such that the Xk ’s and W are greater than the Yl ’s. Furthermore, to minimize R, we
0
0
need that if R = Yσ and R0 = Yσ are pre-images of Xb , but ct x < ct x0 , then R < R0 . A
monomial order which has these properties is said to respect the costs. We will denote it
by <c .
Example.
One way is, to order the Xk ’s and W lexicographic, define Xk ’s and W to be greater than
according to c and break ties by lexographic order.
8
>
τ <lex τ 0
>
>
>
<
0
0
0
τ = τ 0 and ν < ν 0
Xτ W ν Y σ <c Xτ W ν Y σ :⇐⇒
>τ = τ 0 , ν = ν 0 , and ct σ < ct σ 0
>
>
>
:τ = τ 0 , ct σ = ct σ 0 , and σ <
0
lex σ .
the Yl ’s, order the Y σ ’s
or
or
or
3.2 The Algorithm of Conti and Traverso
Given the problem
1. Find the set
minimize
ct x
subject to
Ax = b, x ∈ INn
o
n
0
0
Y1 − XA1 W α1 , . . . , Yn − XAn W αn , X1 · . . . · Xm W − 1 , where XAk =
akn , A0 = A + α (1, . . . , 1)t , and use the monomial order < .
X1ak1 · . . . · Xm
c
k
k
k
D
E
0
0
2. Compute a Gröbner basis G for the ideal I := Y1 − XA1 W α1 , . . . , Yn − XAn W αn of
the polynomial ring K[X1 , . . . , Xm , W, Y1 , . . . , Yn ].
0
3. Reduce Xb W β with respect to G.
0
G
Xb W β −−−−→ Xτ Wυ Yσ
Then the following cases are possible:
τ 6= 0 or υ 6= 0: There is no solution to the integer program.
τ = 0 and υ = 0: The solution is σ = (σ1 , . . . , σn ).
18
3. APPLICATION TO INTEGER PROGRAMMING
4
Example
We will consider the following IP:
minimize
1000x1 + x2 + x3 + 100x4
3x1 − 2x2 + x3 − x4 = −1
4x1 + x2 − x3
= 5
subject to
We use the two variables X1 , X2 for the two equations, and the four variables Y1 , Y2 , Y3 , Y4 for
the four unknowns. Furthermore, we need a variable W since there occur negative numbers
in our system. For X = (X1 , X2 ), W , and Y = (Y1 , Y2 , Y3 , Y4 ), we use the monomial order
<c .
Hence, we have to find the Gröbner basis for the ideal
I =< P1 , P2 , P3 , P4 , P5 >
=< −X13 X24 + Y1 , −X23 W 2 + Y2 , −X12 W + Y3 , −X2 W + Y4 , X1 X2 W − 1 > .
First, we have to compute S(Pi , Pj ) for all i = 1 . . . 5, j ≥ i.
For example,
S(P1 , P2 ) =
=
=
X13 X24 W 2
(−X13 X24 +
−X13 X24
W 2 Y1 − X13 X2 Y2
−X13 X2 Y2 + W 2 Y1
Y1 ) −
X13 X24 W 2
(−X23 W 2
−X23 W 2
+ Y2 )
Checking whether S(P1 , P2 ) is reduced with respect to I, we see that none of the leading
terms of P1 . . . P5 divides any terms of S(P1 , P2 ), which means that it is already reduced
with respect to I. Since it is not zero, we add it to I.
Continuing this process, we get a Gröbner basis for I but we will omit the rest since this
would take several pages. After simplifying we obtain the reduced Gröbner basis of I with
respect to <c
G = {G1 .G2 , G3 , G4 , G5 }
= {W − Y22 Y43 , Y4 − Y3 , X1 − Y1 Y26 Y310 , X2 − Y1 Y26 Y39 , Y1 Y27 Y311 − 1}.
20
4. EXAMPLE
Now, we have to reduce X26 W with respect to G.
X26 W
− (X26 W
− X26 Y22 Y43 )
X26 Y22 Y43
− (X26 Y22 Y43
− X26 Y22 Y3 Y42 )
X26 Y22 Y3 Y42
− (X26 Y22 Y3 Y42
− X26 Y22 Y32 Y4 )
divide by G1
divide by G2
divide by G2
X26 Y22 Y32 Y4
− (X26 Y22 Y32 Y4
−
X26 Y22 Y33
− (X26 Y22 Y33
− X25 Y1 Y28 Y312 )
X25 Y1 Y28 Y312
− (X25 Y1 Y28 Y312
− X24 Y12 Y214 Y321 )
divide by G2
X26 Y22 Y33 )
divide by G4
divide by G4
X24 Y12 Y214 Y321
divide by G4
4
2
14
21
3
3
20
30
− (X2 Y1 Y2 Y3
− X2 Y1 Y2 Y3 )
X23 Y13 Y220 Y330
divide by G4
3
3
20
30
2
4
26
39
− (X2 Y1 Y2 Y3
− X2 Y1 Y2 Y3 )
X22 Y14 Y226 Y339
divide by G4
− (X22 Y14 Y226 Y339 − X2 Y15 Y232 Y348 )
X2 Y15 Y232 Y348
− (X2 Y15 Y232 Y348
Y16 Y238 Y357
− (Y16 Y238 Y357
divide by G4
− Y16 Y238 Y357 )
divide by G5
−
Y15 Y231 Y346 )
Y15 Y231 Y346
− (Y15 Y231 Y346
−
Y14 Y224 Y335 )
Y14 Y224 Y335
− (Y14 Y224 Y335
− Y13 Y217 Y324 )
Y13 Y217 Y324
− (Y13 Y217 Y324
− Y12 Y210 Y313 )
Y12 Y210 Y313
− (Y12 Y210 Y313
divide by G5
divide by G5
divide by G5
divide by G5
−
Y1 Y23 Y32 )
Y1 Y23 Y32
This is reduced with respect to G. Hence, the optimal integral solution (1, 3, 2, 0).
Bibliography
[Adams and Loustaunau (1994)]
Adams, William W. and Philippe Loustaunau
An Introduction to Gröbner Bases
American Mathematical Society, Providence, RI, (1994).
[Bourbaki (1971)]
Bourbaki, Nicolas
Algébre, Chapitre 3
Hermann, Paris, (1971).
[Cox, Little, and O’Shea (1997)]
Cox, David, John Little and Donal O’Shea
Ideals, Varieties, and Algorithms
Springer Verlag, New York, (1997).
[Cox and Sturmfels (1997)]
Cox, David and Bernd Sturmfels
Applications of Computational Algebraic Geometry
American Mathematical Society, Providence, RI, (1997).
[Scheja and Storch (1988/94)]
Scheja, Günter and Uwe Storch
Lehrbuch der Algebra
Teubner, Stuttgart, Vol. I (1994) and Vol. II (1988).
© Copyright 2026 Paperzz