A Tutorial On Integer Programming: G Erard Cornu Ejols Michael A. Trick Matthew J. Saltzman 1995
A Tutorial On Integer Programming: G Erard Cornu Ejols Michael A. Trick Matthew J. Saltzman 1995
A Tutorial On Integer Programming: G Erard Cornu Ejols Michael A. Trick Matthew J. Saltzman 1995
1995
These notes are meant as an adjunct to Chapter 9 and 10 in Murty. You
are responsible for what appears in these notes as well as Sections 9.1–9.7,
10.1–10.3, 10.5, 10.6, 10.8 in the text.
Contents
1 Introduction 2
1
1 Introduction
Consider the manufacture of television sets. A linear programming model
might give a production plan of 205.7 sets per week. In such a model, most
people would have no trouble stating that production should be 205 sets per
week (or even “roughly 200 sets per week”). On the other hand, suppose we
were buying warehouses to store finished goods, where a warehouse comes in
a set size. Then a model that suggests we purchase 0.7 warehouse at some
location and 0.6 somewhere else would be of little value. Warehouses come
in integer quantities, and we would like our model to reflect that fact.
This integrality restriction may seem rather innocuous, but in reality it
has far reaching effects. On one hand, modeling with integer variables has
turned out to be useful far beyond restrictions to integral production quanti-
ties. With integer variables, one can model logical requirements, fixed costs,
sequencing and scheduling requirements, and many other problem aspects. In
AMPL, one can easily change a linear programming problem into an integer
program.
The downside of all this power, however, is that problems with as few
as 40 variables can be beyond the abilities of even the most sophisticated
computers. While these small problems are somewhat artificial, most real
problems with more than 100 or so variables are not possible to solve unless
they show specific exploitable structure. Despite the possibility (or even
likelihood) of enormous computing times, there are methods that can be
applied to solving integer programs. The CPLEX solver in AMPL is built on
a combination of methods, but based on a method called branch and bound.
The purpose of this chapter is to show some interesting integer programming
applications and to describe some of these solution techniques as well as
possible pitfalls.
First we introduce some terminology. An integer programming problem
in which all variables are required to be integer is called a pure integer pro-
gramming problem. If some variables are restricted to be integer and some
are not then the problem is a mixed integer programming problem. The case
where the integer variables are restricted to be 0 or 1 comes up surprising
often. Such problems are called pure (mixed) 0-1 programming problems or
pure (mixed) binary integer programming problems.
2
2 Modeling with Integer Variables
The use of integer variables in production when only integral quantities can
be produced is the most obvious use of integer programs. In this section, we
will look at some less obvious ones. The text also goes through a number of
them (some are repeated here).
3
3. If investment 1 is made, investment 3 cannot be made.
All of these, and many more logical restrictions, can be enforced using
0-1 variables. In these cases, the constraints are:
1. x1 + x2 + x3 + x4 ≤ 2
2. x2 − x4 ≤ 0
3. x1 + x3 ≤ 1.
(ii) Exploring sites s1 and s7 will prevent you from exploring site s8 .
the objective is still to maximize the sum of the returns on the projects
selected, and there is now a budget constraint for each period. For example,
suppose we wish to invest $14,000, $12,000, and $15,000 in each month of the
next quarter. We have identified four investment opportunities. Investment 1
4
requires an investment of $5,000, $8,000, and $2,000 in month 1, 2, and 3,
respectivey, and has a present value (a time-discounted value) of $8,000;
investment 2 requires $7,000 in month 1 and $10,000 in period 3, and has
a value of $11,000; investment 3 requires $4,000 in period 2 and $6,000 in
period 3, and has a value of $6,000; and investment 4 requires $3,000, $ 4,000,
and $5,000 and has a value of $4,000. The corresponding integer program is
Maximize 8x1 + 11x2 + 6x3 + 4x4
subject to 5x1 + 7x2 + 3x4 ≤ 14
8x1 + 4x3 + 4x4 ≤ 12
2x1 + 10x2 + 6x3 + 4x4 ≤ 15
xj ∈ {0, 1}.
2.2 Knapsack
The knapsack problem is a particularly simple integer program: it has only
one constraint. Furthermore, the coefficients of this constraint and the objec-
tive are all non-negative. For example, the following is a knapsack problem:
Maximize 8x1 + 11x2 + 6x3 + 4x4
subject to 5x1 + 7x2 + 4x3 + 3x4 ≤ 14
xj ∈ {0, 1}.
The traditional story is that there is a knapsack (here of capacity 14). There
are a number of items (here there are four items), each with a size and a
value (here item 2 has size 7 and value 11). The objective is to maximize the
total value of the items in the knapsack. Knapsack problems are nice because
they are (usually) easy to solve, as we will see in the dynamic programming
section of this course.
To solve the associated linear program, it is simply a matter of determin-
ing which variable gives the most “bang for the buck”. If you take cj /aj (the
objective coefficient/constraint coefficient) for each variable, the one with
the highest ratio is the best item to place in the knapsack. Then the item
with the second highest ratio is put in and so on until we reach an item
that cannot fit. At this point, a fractional amount of that item is placed in
the knapsack to completely fill it. In our example, the variables are already
ordered by the ratio. We would first place item 1 in, then item 2, but item
3 doesn’t fit: there are only 2 units left, but item 3 has size 4. Therefore,
we take half of item 3. The solution x1 = 1, x2 = 1, x3 = 0.5, x4 = 0 is the
optimal solution to the linear program.
5
As already observed in Section 2.1, this solution is quite different from
the optimal solution to the knapsack problem. Nevertheless, it will play an
important role in the solution of the problem by branch and bound as we
will see shortly.
6
Defining y3 = 1 − x3 and substituting x3 = 1 − y3 gives
or equivalently,
Maximize cx
subject to Ax ≤ b
xj ∈ {0, 1},
7
For example, suppose we receive payments from four regions (West, Mid-
west, East, and South). The average daily value from each region is as follows:
$70,000 from the West, $50,000 from the Midwest, $60,000 from the East,
and $40,000 from the South. We are considering opening lockboxes in L.A.,
Chicago, New York, and/or Atlanta. Operating a lockbox costs $50,000 per
year. The average days from mailing to clearing is given in the table. Which
lockboxes should we open?
First we must calculate the losses due to lost interest for each possible
assignment. For example, if the West sends to New York, then on average
there will be $560,000 (= 8×$70, 000) in process on any given day. Assuming
an investment rate of 20%, this corresponds to a yearly loss of $112,000. We
can calculate the losses for the other possibilities in a similar fashion to get
table 2.
8
One set of constraints is as follows:
X
xij = 1 for all i
j
(There is nothing special about 100; any number at least 4 would do.) Sup-
pose we do not open L.A. Then y1 is 0, so all of x11 , x21 , x31 , and x41 must
also be. If y1 is 1 then there is no restriction on the x values.
We can create constraints for the other lockboxes to finish off the integer
program. For this problem, we would have twenty variables (four y variables,
sixteen x variables) and eight constraints. This gives the following 0-1 linear
program:
9
var open{Box} binary;
var assign{Region, Box} binary;
---------------------------
xij ≤ yj
These constraints also force a region to only use open lockboxes (check this!).
It might seem that a larger formulation is less efficient and therefore should
be avoided. This is not the case! If we solve the linear program with the
above constraints, we get the solution x11 = x24 = x34 = x44 = y1 = y4 = 1
with the rest equal to zero. In fact, we have an integer solution, which
must therefore be optimal! Different formulations can have very different
10
properties with respect to their associated linear program. One very active
research area is to take common problems and find good reformulations.
The above is an example of a fixed charge problem. There is a fixed charge
for opening a lockbox, but then it can be used as much as desired. There
are many other types of fixed charge problems, including the plant location
problems described in Murty. Similar techniques also apply (as described in
Murty) for a variety of constraints, such as batch size constraints (where if
an activity is engaged in at all, it must have a minimum level, i.e., xj = 0 or
xj ≥ lj ) and other types of “either-or” or disjunctive constraints.
9
8
7
5
4
2
1
11
fires for both its neighborhood and any adjacent neighborhood (any neigh-
borhood with a non-zero border with its home neighborhood). The objective
is to minimize the number of fire stations used.
We can create one variable xj for each neighborhood j. This variable will
be 1 if we place a station in the neighborhood, and will be 0 otherwise. This
leads to the following formulation
The first constraint states that there must be a station either in neighborhood
1 or in some adjacent neighborhood. The next constraint is for neighborhood
2 and so on. Notice that the constraint coefficient aij is 1 if neighborhood i is
adjacent to neighborhood j or if i = j and 0 otherwise. The jth column of the
constraint matrix represents the set of neighborhoods that can be served by
a fire station in neighborhood j. We are asked to find a set of such subsets j
that covers the set of all neighborhoods in the sense that every neighborhood
appears in the service subset associated with at least one fire station.
One optimal solution to this is x3 = x8 = x9 = 1 and the rest equal to 0.
This is an example of the set covering problem. The set covering problem
is characterized by having binary variables, ≥ constraints each with a right
hand side of 1, and having simply sums of variables as constraints. In gen-
eral, the objective function can have any coefficients, though here it is of a
particularly simple form.
12
2.4.1 Set Packing and Partitioning
Other problems involving relationships between a set and some of its subsets
are related to set covering. The set packing problem arises when each set
element must appear in at most one subset. In this case, the constraints are
of the less-than-or-equal form. The set partitioning problem arises when each
set element must appear in exactly one subset, and the constraints in this
problem are equality constraints.
The airline crew scheduling problem discussed in Murty is usually solved
in practice as a set partitioning problem, with exactly one crew assigned to
each flight leg. After all, there is only one crew actually flying the plane on
each leg. A crew that must ride a plane to another destination is said to
be deadheading. Since the costs associated with deadheading are different
from those associated with active duty, deadhead legs should not appear as
a consequence of the solution, but instead need to be factored into the duty
periods by the software that generates the pairings.
These constraints say that every city must be visited. These constraints are
not enough, however, since it is possible to have multiple cycles (subtours),
13
rather than one big cycle (tour ) through all the points. To handle this
condition, we can use the following set of subtour elimination constraints:
XX
xij ≥ 2 for all S ⊂ N.
i∈S j ∈S
/
This set states that, for any subset of cities S, the tour must enter and exit
that set. These, together with xij ∈ {0, 1} is sufficient to formulate the
traveling salesperson problem (TSP) as an integer program.
Note however, that there are a tremendous number of constraints: for our
20-city problem, that number is roughly 524,288. For a 300-city problem, this
would amount to 101851798816724304313422284420468908052573419683296
8125318070224677190649881668353091698688 constraints. Try putting that
into AMPL!
Despite the apparent complexity of this formulation, it lies at the heart
of the most promising current approach to solving medium (100–1000 city)
TSPs. We will see this again in the cutting plane section. Other forms of
subtour elimination constraints are possible, but they suffer from the same
explosive rate of growth in number. Subtour elimination constraints for the
assymetric problem are equally difficult. In fact, Murty does not explicitly
write them down at all!
14
Exercise 3 (Optional) Consider a job-shop scheduling problem involving
eight operations on a single machine with a total of two end products. Let
pj be the processing time for the jth operation. Since each operation re-
quires a machine setup, it is assumed that any operation once started must
be completed before a new operation can be undertaken on the machine. The
sequencing of the operations must satisfy the following precedence relation-
ships: Operations 1 and 2 must precede Operation 4 (i.e. both Operations 1
and 2 must be completed before Operation 4 can be started), Operations 4 and
5 precede 7, Operation 3 precedes 6 and, finally, Operations 5 and 6 precede
8. Once Operation 7 is completed, Product 1 is available. Similarly, once
Operation 8 is completed, Product 2 is available. The due date for Product
1 is d1 . The objective is to minimize the delivery date of Product 2 while
meeting the due date on Product 1.
15
there is an associated linear program called the linear relaxation formed by
dropping the integrality restrictions:
Since (LR) is less constrained than (IP), the following are immediate:
• If (IP) is a minimization, the optimal objective value for (LR) is less
than or equal to the optimal objective for (IP).
16
3.2 Branch and Bound
We will explain branch and bound by using the capital budgeting example
from the previous section. In that problem, the model is
Maximize 8x1 + 11x2 + 6x3 + 4x4
subject to 5x1 + 7x2 + 4x3 + 3x4 ≤ 14
xj ∈ {0, 1} j = 1, . . . 4.
The linear relaxation solution is x1 = 1, x2 = 1, x3 = 0.5, x4 = 0 with a
value of 22. We know that no integer solution will have value more than 22.
Unfortunately, since x3 is not integer, we do not have an integer solution yet.
We want to force x3 to be integer. To do so, we branch on x3 , creating
two new problems. In one, we will add the constraint x3 = 0. In the other,
we add the constraint x3 = 1. This is illustrated in Figure 2.
Fractional
z = 22
x3 = 0 x3 = 1
Fractional Fractional
z = 21.65 z = 21.85
Note that any optimal solution to the overall problem must be feasible to
one of the subproblems. If we solve the linear relaxations of the subproblems,
we get the following solutions:
• x3 = 0: objective 21.65, x1 = 1, x2 = 1, x3 = 0, x4 = 0.667;
17
• x3 = 1: objective 21.85, x1 = 1, x2 = 0.714, x3 = 1, x4 = 0.
At this point we know that the optimal integer solution is no more than
21.85 (we actually know it is less than or equal to 21 (Why?)), but we still
do not have any feasible integer solution. So, we will take a subproblem and
branch on one of its variables. In general, we will choose the subproblem as
follows:
• We will choose an active subproblem, which so far only means one we
have not chosen before, and
• We will choose the subproblem with the highest solution value (for
maximization) (lowest for minimization).
In this case, we will choose the subproblem with x3 = 1, and branch on
x2 . After solving the resulting subproblems, we have the branch and bound
tree in Figure 3.
The solutions are:
• x3 = 1, x2 = 0: objective 18, x1 = 1, x2 = 0, x3 = 1, x4 = 1;
• x3 = 1, x2 = 1: objective 21.8, x1 = 0.6, x2 = 1, x3 = 1, x4 = 0.
We now have a feasible integer solution with value 18. Furthermore, since
the x3 = 1, x2 = 0 problem gave an integer solution, no further branching
on that problem is necessary. It is not active due to integrality of solution.
There are still active subproblems that might give values more than 18. Using
our rules, we will branch on problem x3 = 1, x2 = 1 by branching on x1 to
get Figure 4.
The solutions are:
• x3 = 1, x2 = 1, x1 = 0: objective 21, x1 = 0, x2 = 1, x3 = 1, x4 = 1;
• x3 = 1, x2 = 1, x1 = 1: infeasible.
Our best integer solution now has value 21. The subproblem that gener-
ates that is not active due to integrality of solution. The other subproblem
generated is not active due to infeasibility. There is still a subproblem that
is active. It is the subproblem with solution value 21.65. By our “round-
down” result, there is no better solution for this subproblem than 21. But
we already have a solution with value 21. It is not useful to search for an-
other such solution. We can fathom this subproblem based on the above
18
Fractional
z = 22
x3 = 0 x3 = 1
Fractional Fractional
z = 21.65 z = 21.85
x3 = 1, x2 = 0 x3 = 1, x2 = 1
Integer Fractional
z = 18 z = 21.8
INTEGER
19
Fractional
z = 22
x3 = 0 x3 = 1
Fractional Fractional
z = 21.65 z = 21.85
x3 = 1, x2 = 0 x3 = 1, x2 = 1
Integer Fractional
z = 18 z = 21.8
INTEGER
x3 = 1, x2 = 1, x1 = 0 x3 = 1, x2 = 1, x1 = 1
Integer Infeasible
z = 21
INTEGER INFEASIBLE
20
bounding argument and mark it not active. There are no longer any active
subproblems, so the optimal solution value is 21.
We have seen all parts of the branch and bound algorithm. The essence
of the algorithm is as follows:
That’s all there is to branch and bound! Depending on the type of prob-
lem, the branching rule may change somewhat. For instance, if x is restricted
to be integer (but not necessarily 0 or 1), then if x = 4.27 your would branch
with the constraints x ≤ 4 and x ≥ 5 (not on x = 4 and x = 5).
In the worst case, the number of subproblems can get huge. For many
problems in practice, however, the number of subproblems is quite reason-
able.
For an example of a huge number of subproblems, try the following in
AMPL:
var x0 binary;
var x{1..17} binary;
Note that this problem has only 18 variables and only a single constraint.
CPLEX looks at 48,619 subproblems, taking about 90 seconds on a Sun Sparc
10 workstation, before deciding the optimal objective is 16. LINGO (another
math programming package) on a 16MHz 386 PC (with math coprocessor)
21
looks at 48,000+ subproblems and takes about five hours. The 100-variable
version of this problem would take about 1029 subproblems or about 3 × 1018
years (at 1000 subproblems per second). Luckily, most problems take far less
time.
Exercise 5 (Optional) Solve the following problem by the branch and bound
algorithm. For convenience, always select x1 as the branching variable when
both x1 and x2 are fractional.
Maximize x1 + x2
subject to 2x1 + 5x2 ≤ 16
6x1 + 5x2 ≤ 30
x1 , x2 ≥ 0 and integer.
The maximum cargo weight and volume are given by W = 112 and V =
109, respectively. It is required to determine the most valuable cargo load in
discrete units of each item. Formulate the problem as an integer program and
solve by AMPL.
22
basic feasible solution takes on integer values. Of course, we have to be
careful which constraints we add: we would not want to change the problem
by adding the constraints. We will add a special type of constraint called
a cut. A cut relative to a current fractional solution satisfies the following
criteria:
2nd Constraint
This is illustrated in Figure 5.
Fractional solution
A Cut
1st Constraint
Figure 5: A cut
There are two ways to generate cuts. The first, called Gomory cuts,
generates cuts from any linear programming tableau. This has the advantage
of “solving” any problem but has the disadvantage that the method can be
very slow. The second approach is to use the structure of the problem to
generate very good cuts. The approach needs a problem-by-problem analysis,
but can provide very efficient solution techniques.
23
3.3.1 General Cutting Planes
Consider the following integer program:
Variable x1 x2 s1 s2 −z RHS
x2 0 1 7/22 1/22 0 7/2
x1 1 0 -1/22 3/22 0 9/2
−z 0 0 28/11 15/11 1 63
We can manipulate this to put all of the integer parts on the left side, and
all the fractional parts on the right to get:
Now, note that the left hand side consists only of integers, so the right hand
side must add up to an integer. Which integer can it be? Well, it consists of
some positive fraction minus a series of positive values. Therefore, the right
hand side can only be 0, −1, −2, . . . ; it cannot be a positive value. Therefore,
we have derived the following constraint:
24
We can also generate a cut from the other constraint. Here we have to
be careful to get the signs right:
x1 − 1/22s1 + 3/22s2 = 9/2
x1 + (−1 + 21/22)s1 + 3/22s2 = 4 + 1/2
x1 − s1 − 4 = 1/2 − 21/22s1 − 3/22s2
gives the constraint
1/2 − 21/22s1 − 3/22s2 ≤ 0.
In general, let bac be defined as the largest integer less than or equal to
a. For example, b3.9c = 3, b5c = 5, and b−1.3c = −2.
If we have a constraint
X
xk + ai xi = b
with b not an integer, we can write each ai = bai c + a0i , for some 0 ≤ a0i < 1,
and b = bbc + b0 for some 0 < b0 < 1. Using the same steps we get:
X X
xk + bai cxi − bbc = b0 − a0i xi
to get the cut
X
b0 − a0i xi ≤ 0.
This cut can then be added to the linear program and the problem resolved.
The problem is guaranteed not to get the same solution.
This method can be shown to guarantee finding the optimal integer solu-
tion. There are a couple of disadvantages:
1. Round-off error can cause great difficulties: Is that 3.000000001 really
a 3, or should I generate a cut? If I make the wrong decision I could
either cut off a feasible solution (if it is really a 3 but I generate a cut)
or I could end up with an infeasible solution (if it is not a 3 but I treat
it as one).
2. The number of constraints that are generated can be enormous. Just
like branch and bound can generate a huge number of subproblems,
this technique can generate a huge number of constraints.
The combination of these makes this cutting plane technique impractical
by itself. Recently however, more powerful techniques have been discovered
for special problem structure. This is the subject of the next section.
25
3.3.2 Cuts for Special Structure
Gomory cuts have the property that they can be generated for any integer
program. Their weakness is their downfall: they do not seem to cut off
much more than the linear programming solution in practice. An alternative
approach is to generate cuts that are specially designed for the particular
application. We saw that in a simple form in the lockbox problem,
P where we
used the constraints xij ≤ yj because they were stronger than i xij ≤ 100yj .
In this section, we examine the symmetric traveling salesperson problem.
Recall that there is no good, compact formulation for the TSP. Earlier,
we generated a formulation as follows:
X
Minimize cij xij
Xij
subject to xij = 2 for all i
j6=i X
X
xij ≥ 2 for all S ⊂ N
i∈S j ∈S
/
xij ∈ {0, 1} for all i, j.
Recall that in the second set of constraints (called subtour elimination con-
straints) there are many, many constraints. One approach is to initially
ignore these constraints and simply solve the problem over the first set of
constraints. Suppose we have a six node problem as shown in Figure 6.
This problem can be formulated as follows (ignoring subtour constraints):
26
4
4
6
4
4
5
2
3
3
2
4
4
1
3
4
param cost{ARCS};
--------------------------
set NODES := 1 2 3 4 5 6;
param: ARCS: cost := 1 2 4, 1 3 4, 1 4 3, 2 3 4, 2 5 2, 3 6 3,
4 5 4, 4 6 4, 5 6 4;
--------------------------
ampl: solve;
[...CPLEX messages deleted...]
ampl: display z, x;
z = 20
x :=
27
1 2 0.5
1 3 0.5
1 4 1
2 3 0.5
2 5 1
3 6 1
4 5 0.5
4 6 0.5
5 6 0.5
;
This solution, while obviously not a tour, actually satisfies all of the subtour
elimination constraints. At this point we have three choices:
1. We can do branch and bound on our current linear program, or
In fact, for the traveling salesperson problem, there are a number of other
classes of cuts to use. These cuts look at different sets of arcs and try to say
something about how a tour can use them. For instance, look at the set of
arcs in Figure 7.
It is fairly easy to convince yourself that no tour can use more than 4 of
these arcs. This is an example of a broad class of inequalities called comb
inequalities. This means that the inequality stating that the sum of the x
values on these arcs is less than or equal to 4 is a valid inequality (it does not
remove any feasible solution to the integer program). Our solution, however,
has 4.5 units on those arcs. Therefore, we can add a constraint to get the
following formulation and result:
set NODES;
set ARCS within {NODES, NODES};
param cost{ARCS};
28
4
6
5
2
1
3
Figure 7: Arc Set for Comb Inequality
--------------------
ampl: solve;
[...CPLEX messages deleted...]
ampl: display z, x;
z = 21
x :=
1 2 1
1 3 1
1 4 0
2 3 0
2 5 1
3 6 1
4 5 1
4 6 1
5 6 0
;
29
So, we have the optimal solution.
This method, perhaps combined with branch and bound if the solution
is still fractional after all known inequalities are examined, has proven to be
a very practical and robust method for solving medium-sized TSPs. Futher-
more, many classes of inequalities are known for other combinatorial opti-
mization problems. This approach, seriously studied only for the last ten
years or so, has greatly increased the size and type of instances that can be
effectively solved to optimality.
show that the following inequalities do not remove any feasible solutions:
x1 + x2 + x3 ≤ 2,
x1 + x2 + x4 ≤ 2.
30
4 Solutions to Some Optional Problems
Exercise 1: The formulation is:
X
10
Maximize pj xj
j=1
X
10
subject to xj = 5
j=1
x2 − x3 ≤ 0
x1 + x7 + x8 ≤ 2
x3 + x5 ≤ 1
x4 + x5 ≤ 1
xj ∈ {0, 1} j = 1, . . . , 10.
31
Then the formulation is:
Minimize x8
subject to xi + pi ≤ xj for (i, j) = (1, 4), (2, 4), (3, 6),
(4, 7), (5, 7), (5, 8), (6, 8)
x7 + p7 ≤ d1
Myij + xi − xj ≥ pj
for (i, j) = (1, 2), (1, 3), (1, 5),
M(1 − yij ) + xj − xi ≥ pi
(1, 6), (1, 8), (2, 3), (2, 5), (2, 6),
(2, 8), (3, 4), (3, 5), (3, 7), (4, 5),
(4, 6), (4, 8), (5, 6), (6, 7), (7, 8)
xj = 0 or 1 for j = 1, . . . , 8.
The first set of constraints are the precedence constraints and the last two
sets are the noninterference constraints.
x1 = 2, x2 = 0, x3 = 2,
32
Exercise 5: The enumeration tree is given in Figure 8.
Three optimum integer solutions were found, namely
x1 = 3 x1 = 4 x1 = 5
x2 = 2 x2 = 1 x2 = 0
Exercise 6
From the enumeration tree of Exercise 5, we see that only one branch-
ing is necessary since both subproblems z2 and z3 are inactive by reason of
integrality. The better solution is x1 = 4, x2 = 1.2 with value z3 = 5.2.
Exercise 7
Nodes Cuts/
Node Left Objective IInf Best Integer Best Node ItCnt
0 0 153.6087 2 153.6087 4
* 1 1 151.0000 0 151.0000 153.3333 5
33
Fractional
z1 = 5.3, x1 = 3.5, x2 = 1.8
x1 ≤ 3 x1 ≥ 4
Integer Fractional
z2 = 5, x1 = 3, x2 = 2 z3 = 5.2 x1 = 4, x2 = 1.2
x1 ≥ 4, x2 ≤ 1 x1 ≥ 4, x2 ≥ 2
Fractional Infeasible
z4 = 5.16 x1 = 4.16, x2 = 1
x1 ≥ 4, x2 ≤ 1, x1 ≤ 4 x1 ≥ 4, x2 ≤ 1, x1 ≥ 5
Integer Integer
z5 = 5 x1 = 4, x2 = 1
INTEGER INTEGER
34
Integer optimal solution: Objective = 1.5100000000e+02
Solution time = 0.00 sec. Iterations = 10 Nodes = 6
35
Exercise 8
Since x1 = x2 = x3 = 1 does not satisfy the knapsack constraint 5x1 +
7x2 +4x3 +x4 ≤ 14, it follows that x1 +x2 +x3 ≤ 2 must hold for all solutions
of the knapsack problem.
Similarly for x1 + x2 + x4 ≤ 2.
Iteration Log . . .
Iteration: 1 Objective = 11.000000
36