Introduction To Integer Programming
Introduction To Integer Programming
Integer Programming
Recall that we defined integer programming problems in our discussion of the Divisibility As-
sumption in Section 3.1. Simply stated, an integer programming problem (IP) is an LP in which
some or all of the variables are required to be non-negative integers.†
In this chapter (as for LPs in Chapter 3), we find that many real-life situations may be formu-
lated as IPs. Unfortunately, we will also see that IPs are usually much harder to solve than LPs.
In Section 9.1, we begin with necessary definitions and some introductory comments about
IPs. In Section 9.2, we explain how to formulate integer programming models. We also dis-
cuss how to solve IPs on the computer with LINDO, LINGO, and Excel Solver. In Sections
9.3–9.8, we discuss other methods used to solve IPs.
1
The concept of LP relaxation of an integer programming problem plays a key role in
the solution of IPs.
DEFINITION ■ The LP obtained by omitting all integer or 0–1 constraints on variables is called
the LP relaxation of the IP. ■
This result plays a key role when we discuss the solution of IPs.
To shed more light on the properties of integer programming problems, we consider
the following simple IP:
max z 21x1 11x2
s.t. 7x1 4x2 13 (4)
x1, x2 0; x1, x2 integer
From Figure 1, we see that the feasible region for this problem consists of the following
set of points: S {(0, 0), (0, 1), (0, 2), (0, 3), (1, 0), (1, 1)}. Unlike the feasible region
for any LP, the one for (4) is not a convex set. By simply computing and comparing the
z-values for each of the six points in the feasible region, we find the optimal solution to
(4) is z 33, x1 0, x2 3.
If the feasible region for a pure IP’s LP relaxation is bounded, as in (4), then the feasi-
ble region for the IP will consist of a finite number of points. In theory, such an IP could
be solved (as described in the previous paragraph) by enumerating the z-values for each
feasible point and determining the feasible point having the largest z-value. The problem
with this approach is that most actual IPs have feasible regions consisting of billions of
feasible points. In such cases, a complete enumeration of all feasible points would require
a large amount of computer time. As we explain in Section 9.3, IPs often are solved by
cleverly enumerating all the points in the IP’s feasible region.
Further study of (4) sheds light on other interesting properties of IPs. Suppose that a
naive analyst suggests the following approach for solving an IP: First solve the LP relax-
ation; then round off (to the nearest integer) each variable that is required to be an inte-
ger and that assumes a fractional value in the optimal solution to the LP relaxation.
Applying this approach to (4), we first find the optimal solution to the LP relaxation:
x1 173, x2 0. Rounding this solution yields the solution x1 2, x2 0 as a possible
2
x2
3.5
2.5
2.0
1.0
0.5
FIGURE 1
Feasible Region for x1
Simple IP (4) 0.5 1.0 1.5 2.0 2.5 3.0
3
EXAMPLE 1 Capital Budgeting IP
Stockco is considering four investments. Investment 1 will yield a net present value (NPV)
of $16,000; investment 2, an NPV of $22,000; investment 3, an NPV of $12,000; and in-
vestment 4, an NPV of $8,000. Each investment requires a certain cash outflow at the pres-
ent time: investment 1, $5,000; investment 2, $7,000; investment 3, $4,000; and investment
4, $3,000. Currently, $14,000 is available for investment. Formulate an IP whose solution
will tell Stockco how to maximize the NPV obtained from investments 1–4.
Solution As in LP formulations, we begin by defining a variable for each decision that Stockco
must make. This leads us to define a 0–1 variable:
0
1 if investment j is made
xj ( j 1, 2, 3, 4)
otherwise
For example, x2 1 if investment 2 is made, and x2 0 if investment 2 is not made.
The NPV obtained by Stockco (in thousands of dollars) is
Total NPV obtained by Stockco 16x1 22x2 12x3 8x4 (5)
To see this, note that if xj 1, then (5) includes the NPV of investment j, and if xj 0,
(5) does not include the NPV of investment j. This means that whatever combination of
investments is undertaken, (5) gives the NPV of that combination of projects. For exam-
ple, if Stockco invests in investments 1 and 4, then an NPV of 16,000 8,000 $24,000
is obtained. This combination of investments corresponds to x1 x4 1, x2 x3 0,
so (5) indicates that the NPV for this investment combination is 16(1) 22(0)
12(0) 8(1) $24 (thousand). This reasoning implies that Stockco’s objective function is
max z 16x1 22x2 12x3 8x4 (6)
Stockco faces the constraint that at most $14,000 can be invested. By the same reasoning
used to develop (5), we can show that
Total amount invested (in thousands of dollars) 5x1 7x2 4x3 3x4 (7)