Integer Programming
Integer Programming
1.1 Introduction
Recall that a linear programming (LP) problem is written in standard form as:
max cT x
(LP) s.t. Ax b (1)
x0
which corresponds to a basic feasible solution of the problem. We can use Simplex Method to
find an optimal solution of the LP. The optimal solution obtained by the Simplex Method can be
fractional numbers. In many situations, however, it may not make sense for decision variables to
take fractional values, say for instance, if xj represents the number of workers, number of
indivisible items, etc.
An Integer Programming (IP) is a linear program with additional condition that the decision
variables must have only integer values. Thus, the general form an IP is:
max/ min cT x
(IP) s.t. Ax b (2)
x 0 and Integer
where c, A and b are as in (1) above. The condition ‘x0 and Integer’ means each component of
x must be a non-negative integer. We will give some examples of IP in the next section.
1
1. Integer Programming
Period 1 2 3 4 5 6
Time (24 hrs clock) 04 48 812 1216 1620 2024
Minimum Number of Employees 5 7 20 14 20 10
An employee works 8 consecutive hours, starting at the beginning of one of the six periods each
day from Monday to Friday. The management wants to determine the minimum number of
employees required in the center. Formulate the problem as integer program.
Solution:
Decision Variables: Let xj = The number of employees starting work at period j, where j=1,2,
…,6. Obviously we must have xj 0 and integer, for each j=1,2,…,6.
Objective function: The objective is to find the minimum number of employees required in the
center. The total number of employees is given by the sum of employees that begin their work at
each period. Thus, the objective function is x1 x2 x3 x4 x5 x6 which is to be minimized.
Constraints: The minimum number of employees required at each period must be satisfied.
Hence, there are six constraints corresponding to the requirements for the six periods. Since each
period is 4 hours and each employee has to work for 8 consecutive hours, the employees who
start their duty on i-th period shall be on duty also during the next period. For instance, during
the second period there are x1+x2 workers on duty (those who start duty at period 1 and period 2).
But since the number of employees required during the second period is at least 7, we must have
x1 x2 7 . Likewise, for period 3, 4, 5 and 6, respectively, we must have x2 x3 20 ,
x3 x4 14 , x4 x5 20 and x5 x6 10 .
Moreover, since first period follows immediately after sixth period, the number of employees
2
1. Integer Programming
who are on duty during first period is x6+x1 so that x1 x6 5 . Thus, the IP formulation of the
problem is
min x1 x2 x3 x4 x5 x6
s.t. x1 x2 7
x2 x3 20
x3 x4 14
x4 x5 20
x5 x6 10
x1 x6 5
x1 , x2 ,...., x6 0 and Integer
Some IP problems involve ‘do’ or ‘not do’ type decisions. In this case, the value of the decision
variables can be either 1 or 0 only. Such problem is called a binary integer programming
(BIP) and can be written as follows.
max/ min cT x
(BIP) s.t. Ax b (3)
x j {0,1}, for each j 1, 2,.., n
3
1. Integer Programming
Note that the contribution of Ij to the value is cj xj. Indeed, cj xj =cj when Ij is taken (xj =1) and
cj xj =0 when Ij is not taken (xj =0). Hence, the total value is c1 x1 c2 x2 cn xn .
Constraints: The constraints are due to the limitation on the total weight that the airplane can
carry and available space. Notice that the contribution of item I j to the total weight (and volume)
is wj xj =wj (and vj xj =vj ) only when the item is taken. Since the total weight of the cargo must be
at most W and its available space (volume) is at most V, we must have
w1 x1 w2 x2 wn xn W , and
v1 x1 v2 x2 vn xn V .
Therefore, the BIP formulation of the problem is:
max c1 x1 c2 x2 cn xn
s.t w1 x1 w2 x2 wn xn W
v1 x1 v2 x2 vn xn V
x j {0,1}, for each j 1, 2,..., n.
if we ignore the requirement that x be integer, then it becomes just a linear program. The linear
program that results by ignoring the integrality requirement is called the LP relaxation (LPR) of
the given IP. That is, the LP relaxation of the above IP is:
max cT x
(LPR) s.t. Ax b
x 0.
The feasible solutions of an IP are integer points in a polyhedral set of its LPR. For instance, if
the polyhedral set S in Fig. 1.1 is the feasible solution set of the LPR, then the integer points in
the polyhedral, shown by the dots in Fig. 1.2, form the feasible solutions of the IP.
4
1. Integer Programming
Given an IP, if we solve its LPR using graphical method or simplex method, an optimal solution
of the LPR can be found at a corner (extreme) point of the polyhedral. If this corner point is
integer then it is optimal solution of the IP, too. However, if the corner point is not integer (one
or its entire component is not integer), then it is not optimal solution of the IP since it is not even
a feasible solution for the IP. Hence, the following is the general steps to solve an IP:
Step 1: Ignoring the integrality condition of the IP, solve its LPR using the Simplex Method.
(Note: If the problem is a BIP, replace xj{0,1} by 0 xj 1 to form its LPR. )
Step 2: If the optimal solution of the LPR is integer, it is optimal solution of the IP, too. If so,
the IP is solved. Otherwise go to Step 3.
Step 3: If the optimal solution of the LPR is not integer, then starting from this solution, ‘devise
a way’ that eventually yields an optimal integer solution of the IP.
Here assuming that you know how to solve LP using the Simplex method, our main focus will be
on Step 3. The first idea that springs to mind might be ‘rounding the optimal solution of the LPR
to the nearest integer’. Unfortunately, this is often unsatisfactory as the following example
shows.
Example 3: Consider the integer program:
376 950
As you see from the adjacent figure, the optimal solution of the LPR is , . The nearest
193 193
5
1. Integer Programming
integer point to this is (2,5) but it is infeasible as it does not satisfy the first constraint. The
nearest feasible integer solution is (2,4) but this is far from the optimal solution of the IP which
is (5,0).
Therefore, rounding an optimal solution of the LPR to the nearest integer may not yield optimal
solution of IP. There are two general methods that can be used at Step 3 to find an optimal
solution of integer programs: Cutting Plane Method and Branch & Bounded Method. We
will discuss these methods in the next sections.
Step 1: The following is the LPR of this IP and corresponding graphical representation:
max 4x 6 y
s.t. 2y 7
x 3 y 12
x 6
x, y 0
6
1. Integer Programming
Step 3: Cutting plane: We include a new constraint (cut plane), say x+y 6. This constraint
cuts off X (because X does not satisfy x+y 6) but does not cut off any of the feasible
integer solutions. The modified LPR (with the new constraint) and its graphical
representation is the following.
max 4x 6 y
s.t. 2y 7
x 3 y 12
2x 9
x y 6
x, y 0
The cutting plane technique discussed above and the way of constructing the desired cut to solve
integer programming problems was first suggested by R.E. Gomory in 1958. Following the
basic ideas (steps) given above, Gomory cutting plane algorithm starts by solving the
corresponding linear programming problem (LPR) using the usual Simplex method. If the value
of each basic feasible variable in the final (optimal) simplex tableau is integer, then the IP
problem is solved. Otherwise, the method selects a row of the final simplex tableau that contains
a basic variable whose value is not integer. This row is called the source row. The desired cut is
then constructed from the fractional components of the numbers in the source row. For this
reason it is referred to as the fractional cut. We consider the following notations and concepts
before further details.
Notation: For any r Î R, let ë rû = the greatest integer less than or equal to r
7
1. Integer Programming
r =2 Þ ë2û = 2 ; f =0
Recall also the following from your Linear Programming (Optimization I) course. Consider,
max cT x
(LP) s.t. Ax b , where A is mn matrix, cRn and bRm.
x 0.
and non-basic variables, respectively. Accordingly, partition A into mm basic submatrix B
and m(nm) non-basic submatrix N so that A=(B,N). Then, by writing this in the simplex
tableau (where the upper row, called 0th row, is for the objective function) and applying the usual
pivot operations we get the simplex tableau of the following form.
xB xN RHS
z z 0 c N c B B 1 N zB
xB I B 1 N B 1b
1 1
Optimality: If cN cB B N 0 , then the current basic feasible solution ( xB , xN ) ( B b, 0) is
optimal solution of the LP with maximum objective value z* z B .
Then, to see how a Gomory cutting plane is generated, suppose that the final (optimal) simplex
tableau of the LPR has the following form where xB ( x1 , x2 ,.., xm ) and xN ( y1 , y2 ,.., yk ) .
T T
x1 x2 …xi… xm y1 y2 … yk RHS
– 0 0 …. 0 ….0 c1 c2 … ck –zB
z
x1 1 0 …. 0 …. 0 a11 a12 … a1k b1 x1 b1 y1 0
x b y 0
, 2
x2 0 1 …. 0 …. 0 a21 a22 … a2k b2 2 2
: : : : : :
xi 0 0 …. 1 …. 0 ai1 ai2 … aik bi xm bm yk 0
: : : : : :
xm 0 0 …. 0 …. 1 am1 am2 … amk bm
8
1. Integer Programming
That is, the current optimal solution of the LPR is (x1,..,xi,…, xm) =(b1,..,bi,…,bm) and each non-
basic variable yj=0. This solution is not integer if and only if one or more values the basic
variables is not integer. So, suppose biÏZ. We choose the i-th row of the simplex tableau as the
source row to generate the Gomory fractional cut where the cut is given by the inequality given
in the following Theorem.
Theorem: Gomory Fractional Cut (GFC): Suppose the optimal (final) simplex tableau is as
shown above and let biÏZ. Consider the fractional part of each entry in the i-th row; i.e.,
fij aij aij , for each j 1, 2,..., k , and f i b i bi .
Proof: We need to show two things: (i) The current non integer optimal solution of the LPR
does not satisfy the inequality (so that it is cut off by the inequality) (ii) Every integer feasible
solution of the IP satisfies this inequality (so that no integer feasible solution is removed)
(i) Note that f i1 y1 f i 2 y2 f ik yk 0 since y1=y2=…= yk=0 as they are non-basic in the
current optimal solution of the LPR. But fi is positive ( 0 fi 1 ) since biÏZ. Therefore, the
current optimal solution of the LPR does not satisfy the given inequality.
(ii) From the simplex tableau, observe that the i-th constraint of the IP can be written as
integer value is at most equal to bi so that it is at most bi . Therefore, for every integer feasible
solution of the IP we have
9
1. Integer Programming
Therefore, if the optimal solution of the LPR is not integer and y1, …,yk are non basic variables
in the current solution, then the we can form a new constraint (GFC)
f i1 y1 f i 2 y2 f ik yk f i
Or, f i1 y1 f i 2 y2 f ik yk f i
to cut off the current non integer solution. Adding to the last inequality a slack variable s 0 , we
obtain the following new constraint equation, called Gormory fractional cutting plane:
f i1 y1 fi 2 y2 fik yk s f i (4)
Then add this constraint in the final simplex tableau taking s to be a basic variable of the new
row as shown in the following table:
x1 x2 …xi… xm y1 y2 … yk s RHS
– 0 0 …. 0 ….0 c1 c2 … ck 0 –zB
z
x1 1 0 …. 0 …. 0 a11 a12 … a1k 0 b1
x2 0 1 …. 0 …. 0 a21 a22 … a2k 0 b2
: : : : : :
xi 0 0 …. 1 …. 0 ai1 ai2 … aik 0 bi
: : : : : :
xm 0 0 …. 0 …. 1 am1 am2 … amk 0 bm
s 0 0 …. 0 … 0 fm1 fm2 …fmk 1 fi
After inclusion of the new row (new constraint), we re-solve the problem. Note that the
optimality condition is still satisfied in the objective row but, in the new row, s = fi 0 which is
infeasible. Consequently, dual simplex method should now be used to clear this infeasibility.
Therefore, applying the dual simplex method to the updated simplex tableau, with the new row
being the initial pivot row, a new optimal solution can be obtained. If this new optimal solution
is integer, it is an optimal solution of also the original IP and the procedure terminates. But if the
10
1. Integer Programming
new optimal solution is not integer, a new Gomory fractional cut is generated exactly as
discussed above and the dual simplex method is applied again. This procedure is repeated until
integer solution is obtained. This procedure is summarized in the following algorithm.
Step 2: Choose an i-th row of the optimal simplex tableau where bi Ï Z (If there are more than
one rows with non-integer bi choose the row whose fractional part of bi is the largest)
• Generate the GFC using the fractional parts of the entries of this row as (4) above:
f i1 y1 f i 2 y2 f ik yk s f i
and include this in the final simplex tableau (with s the corresponding basic variable)
• Re-solve the ‘tableau’ using dual–simplex method.
• If the solution obtained by dual-simplex is integer STOP.
• Otherwise, repeat the procedure from Step 2.
Adding the slack variables x3, x4 & x5 , the LPR of this IP problem is
11
1. Integer Programming
max 4 x1 x2
s.t 7 x1 2 x2 x3 14
x2 x4 3
2 x1 2 x2 x5 3
x1 , , x5 0
Now solving the LPR using the Simplex method we obtain the following optimal tableau:
x1 x2 x3 x4 x5 RHS
– 0 0 4/7 1/7 0 –59/7
z
x1 1 0 1/7 2/7 0 20/7
x2 0 1 0 1 0 3
x5 0 0 2/7 10/7 1 23/7
The optimal solution of the LPR is ( x1 , x2 , x3 , x 4 , x5 ) (20/7, 3,0,0, 23/7) Z+ . From the first and
5
second rows x1=20/7 and x5=23/7 but the fractional part of 20/7 is greater than that of 23/7. So we
choose the first row to generate the GFC:
1x 2x 6 1 x 2 x x6 6
7 3 7 4 7 7 3 7 4 7
where x6 is slack variable. Adding this constraint in the simplex tableau as last row we get:
x1 x2 x3 x4 x5 x6 RHS
– 0 0 4/7 1/7 0 0 –59/7
z
x1 1 0 1/7 2/7 0 0 20/7
x2 0 1 0 1 0 0 3
x5 0 0 2/7 10/7 1 0 23/7
x6 0 0 1/7 2/7 0 1 6/7
Now re-solving this tableau using the dual simplex method (with the new row as the first pivot
row) we obtain the following optimal tableau.
x1 x2 x3 x4 x5 x6 RHS
– 0 0 0 0 1/2 3 –15/2
z
x1 1 0 0 0 0 1 2
x2 0 1 0 0 1/2 1 1/2
12
1. Integer Programming
x3 0 0 1 0 1 5 1
x4 0 0 0 1 1/2 6 5/2
The new optimal solution is still not integer. So, we again generate a GFC using row 2 where
x2=1/2 is not integer. The corresponding GFC is
1
2 x5 1
2 12 x5 x7 12
where x7 is slack variable. Including this into the final tableau and re-optimizing again using the
dual simplex method, we obtain the integer optimal solution (x1,x2) = (2,1). Therefore, the
optimal solution of the given IP is (x1, x2) = (2, 1) with the maximum objective value z =7.
Drawbacks of the cutting plane method: As you have seen above, the cutting plane method is
very useful to solve an IP problem. However, the method has the following drawbacks
1. The number of re-optimizations (or number of cutting planes) required to generate an integer
solution in the cutting plane procedure may be very large for some problems. For example, try to
solve the following IP using the Gomory fractional cutting method.
max 20 x1 2 x2 4 x3
s.t. 20 x1 2 x2 x3 15
20 x1 6 x2 6 x3 20
x1 , x2 , x3 0, and integer
2. There is no known better or efficient way of generating effective cutting planes that lead to
optimal integer solution with a reasonably few number of iterations.
Hence, cutting plane method can become inefficient to solve some problems. An alternative
general solution method for IP is branch and bound method.
max cT x
(IP) s.t. x S {x | Ax b, x 0, and Integer },
max cT x
(LPR) s.t. x S R { x | Ax b, x 0 },
Notations:
S = The set of feasible solutions of the IP
SR = The set of feasible solutions of the corresponding LPR.
13
1. Integer Programming
xj = bj Z.
14
1. Integer Programming
Then, there is only two possibilities for the value of xj: either x j b j or x j b j 1 .
These two conditions are mutually exclusive and when they are included separately into the LPR
of the problem, two different subproblems (also called nodes) are formed. In particular, the
feasible set S (as well as SR) is divided into two. This can be shown by the following tree
diagram, called solution tree.
U, ,
S
x j b j x j b j 1
S1= S {x: }
S1 S2 S2= S {x: +1 }
Such division is called branching; and xj is called branching variable. Each small circle on the
solution tree is called a node. The first (upper) node that contains S is called root node and it
corresponds to the original problem. The other nodes correspond to subproblems. For example,
the left and right nodes that branched from the root node in the above tree correspond to the
subproblems P1 and P2, where
P1 : max cT x P2 : max cT x
s.t. Ax b s.t. Ax b
x j b j and x j b j +1
x 0 and Integer x 0 and Integer
We keep record of the subproblems by listing them in a set called LIST. Initially, LIST contains
the original problem. Then, the original problem is taken out of the list, solved by simplex
method, and then divided into two subproblems P1 and P2. These subproblems are included in
LIST so that LIST={P1, P2}. Moreover, we record the upper bound of Z*, denoted by U, at root
*
node. Note that U = Z R (optimal value of the LPR). If an integer feasible solution x is known,
then we record also x as incumbent solution and the corresponding objective value Z cx . An
incumbent solution may not be known at the beginning. In this case, we can write x =Void and
Z .
Branching is a recursive process; i.e., each subproblem is a basis of another branching. That
means, take one of the subproblems from LIST, say P1, and solve it using simplex. If a solution
of P1 so obtained is integer, then the subproblem is completely solved and its integer solution
may be taken as incumbent if its value is better than that of the current incumbent. However, if
the optimal solution of P1 contains a non-integer component, say xk = bk Z, then xk is a
15
1. Integer Programming
branching variable. That is, either xk bk or xk bk 1 . This divides P1 into two
subproblems P11 and P12 where
P11 : max cT x P12 : max cT x
s.t. Ax b s.t. Ax b
x j b j , xk bk and x j b j , xk bk +1
x 0 and Integer x 0 and Integer
and the two subproblems are included in LIST. That is, LIST={ P2, P11, P12}. This can be shown
on solution tree as follows.
S U
x j b j x j b j 1
,
S1 S2
Continuing in similar manner, at each iteration of the B&B, we remove from the LIST a
subproblem, say, Pk : max { cx : x Î Sk }, and solve the LPR of Pk using simplex. If the
optimal solution of the subproblem is integer, the search for integer solution in the subproblem is
completed and we may use the integer solution to update the current incumbent. Otherwise, if the
solution of the subproblem has a non-integer component, then this component becomes a
branching variable to generate two new subproblems both of which may have to be included it he
LIST.
Now the question is how far do we keep branching? Fortunately, such branching does not
continue indefinitely. The B&B method cleverly discards some of the subproblems (nodes) so
that in the final analysis only few subproblems are required to be solved.
In particular, if we have obtained certain evidence that shows branching from a given node does
not lead to a better a solution, then the node is discarded from further investigation (branching).
In this case, we say that the node is pruned or fathomed. We prune (fathom) a node based on
any one of the following three reasons:
1. Pruning by infeasibility: Suppose Pk is a subproblem at node k. If Pk is found to be
infeasible, then we have to discard this node from further consideration since the domain of
the subproblem contains no feasible point at all. In this case, the node is said to be pruned (or
fathomed) by infeasibility.
16
1. Integer Programming
2. Pruning by Bound: Suppose x is the current incumbent (known integer solution) and
Z cx . Then Z Z* U. Now, suppose Zk is the optimal (maximum) objective value of
the LPR of a subproblem Pk at node k (obtained by simplex). If Z k Z , then the domain of
this subproblem does not have an integer feasible solution whose value is better than Z
because for all x in the domain of this problem we have cx Z k Z . Therefore, we can
discard this subproblem from further investigation and the node is said to be pruned by
bound (or dominance).
2: While LIST ¹ Æ Do :
• Remove a recently included subproblem Pk from LIST.
• Solving the LPR of Pk using dual simplex and get its optimal solution xk* and Z k* cxk*
17
1. Integer Programming
ii. If xk* is not-integer create two subproblems by branching using a non- integer
Example 6: Use branch and bound method to solve the following IP:
max x1 8 x2
s.t 3x1 2 x2 1
x1 6 x2 18
x1 , x2 0 and integer
Iteration 1: Using graphical method the optimal solution of the LPR of the problem is found at
x0* ( 32 , 114 ) , and its objective value is Z 0* 47
2 .
So, choosing x1 to be the branching variable form two subproblems P1 and P2 with feasible sets
S1 S {( x1 , x2 ) : x1 1 } and S 2 S {( x1 , x2 ) : x1 2 }
Thus, LIST ={P1, P2}. These are shown in the following figure
18
1. Integer Programming
Iteration 2: Next take P1 from LIST, so LIST ={P2}, and solve P1 (on the polyhedral S1) using
*
graphical method. The optimal solution of this subproblem is x1 (1, 2) , which is integer and its
Hence, we update the incumbent: x (1, 2) , Z 17 and the
*
value Z1 17 Z = – ¥.
subproblem is pruned by optimality.
Iteration 3: Take P2 from LIST, so LIST ={ }, and solve P2 (on the polyhedral S2) using
*
graphical method. The optimal solution of this subproblem is x2 (2, 83 ) , which is not integer
and its objective value is Z 2* 70 / 3 Z 17 . Hence we branch (create two subproblems) from
P2 using the non integer component x2; i.e., x2 2 or x2 3. That is, we generate two
subproblems, say P3 and P4, whose respective domain (feasible set) is
S3 S 2 {( x1 , x2 ) : x2 2 } and S 4 S 2 {( x1 , x2 ) : x2 3 } ,
Iteration 4: Next take P3 from LIST, so LIST ={P4}, and solve P3 (on the polyhedral S3) using
*
graphical method. The optimal solution of this subproblem is x3 (6, 2) , which is integer and
its value Z 2 22 Z = 17. Hence, we update the incumbent: x (6, 2) , Z 22 and the
*
19
1. Integer Programming
Iteration 6: At this stage LIST is empty; and hence the incumbent is optimal solution of the IP,
and the procedure terminates. That is, the optimal solution of the given IP is
x* (6, 2) and optimal objective value is Z * 22 .
Remark: If a binary variable xk is a branching variable, then the two subproblems are created by
setting xk =0 in one of the subproblem and xk =1 in the other subproblem.
In this section we construct a solution procedure for a class of binary integer programming (BIP)
problem given as
max cT x
(BIP) s.t. Ax b (1)
x j {0,1}, for each j 1, 2,.., n
where the coefficients of the objective function and the coefficients each constraints are all
nonnegative. Indeed, a number of practical BIP problems are of this type. If this BIP has only
one constraint, then it is known as binary knapsack problem. That is, binary knapsack problem
with n decision variables is:
max c1 x1 c2 x cn x
(2)
s.t. a1 x1 a2 x an x b
x1 ,..., xn {0,1}
The special B&B method is intended to solve such BIP is basically the same as the general B&B
method discussed in the previous section except that here we do not need to solve LPR of the
problem by simplex.
For the above BIP, let
S {x | Ax b, x1 ,..., xn {0,1}}
Then, S can be divided into two subsets where x1=1 in the first subset and x1=0 in the second
subset. This can be shown by the following tree diagram.
20
1. Integer Programming
S
x1=1 x1=0
1 0
The nodes that branched off from the root node are called Level 1 nodes. There are two level 1
nodes in each of which the value of x1 is specified. The remaining variables at this level are said
to be free. We specify the values of the free variables step by step following the order of their
indices by branching off from the terminal nodes. So, the two possible values of x2 can be
specified by branching from each level 1 node as follows.
S Root node
x1=1 x1=0
0 Level 1
1
x2=1 x2=0 x2=1 x2=0
11 10 01 00 Level 2
The resulted nodes are called Level 2 nodes. The first two variables, x1 and x2 are specified in
each of the level 2 nodes and the remaining variables are free. We can form level 3 nodes by
making two branches from each of the level 2 nodes in each of which x3 is specified either 0 or 1.
Continuing likewise, a node in level k contains a binary string of length k (sequence of k binary
digits) which specify the values of x1, x2,…, and xk, respectively. For instance, a binary sting of
length 5 in level 5, say, 01011 represents x1=0, x2=1, x3=0, x4=1, and x5=1.
Thus, a binary string at a node in level k contains k binary digits which specify the values of x1,
x2,…, and xk. Suppose the string of the k binary digits is denoted by Sk. Then, we can
additionally specify xk+1 either to 1 or 0. This yields a binary string of length k+1 at Level k+1
which may be denoted by Sk1 if xk+1=1 and Sk0 if xk+1=0 (without a change on the first k binary
digits of Sk).
In this manner we can, in principle, explicitly enumerate all possible solutions of the n binary
21
1. Integer Programming
variables on n levels, evaluate the objective function at each of these solutions and select the best
solution that maximizes the objective function. Such explicit enumeration involves testing about
2n possible solutions which is not practical if n is large. However, as in the general B&B method,
also the branch & bound method for BIP discards some of the solutions by pruning some nodes
so that in the final analysis only a few of the 2n solutions require to be investigated explicitly.
The three reasons for pruning of anode in this special B&B procedure are described below.
1. Pruning by infeasibility: Suppose Sk is a binary string of length k that specifies the values of
the first k binary variables x1, x2,…, xk. If these values violate any of the constraints (taking all
free variables to be 0), then the solution specified in Sk is infeasible; and every values in the
subsequent nodes that branch from this nodes are infeasible. Hence we can discard this node
from further consideration. In this case, the node is said to be pruned by infeasibility.
Example 7: Consider the following problem:
max 4 x1 3x2 x3
s.t. 3 x1 4 x2 2 x3 6
x1 , x2 , x3 {0,1}
Inf.
2. Pruning by Bound: Let Z* denotes the optimal objective value of the BIP problem. Since
the coefficients the objective function of the BIP, c1, c2, …, cn, are positive, we have
0 Z * c1 c2 cn . Hence, to the root node we assign a lower bound L=0 and an upper
bound U c1 c2 cn . Then, the lower bound and upper bound will be updated recursively
at each node. For instance, observe the lower and upper bounds assigned to the nodes on the
following diagram:
22
1. Integer Programming
U j 1 c j
- At the left node x1=1 and in all the nodes that follows n
23
1. Integer Programming
In particular, if the objective value of this feasible solution is Z 0 such that Z 0 Z , then this
feasible solution is better than X . In this case, update the incumbent solution by replacing X
with the current feasible solution and also replace Z by Z 0 .
Continuing in this way, the procedure terminates when there is no more active node (all nodes
are pruned). At termination, the current incumbent solution X is the optimal solution of the
given BIP with optimal objective value Z . To illustrate this let us continue with Example 7:
max 4 x1 3 x2 x3
s.t. 3x1 4 x2 2 x3 6
x1 , x2 , x3 {0,1}
Preprocessing: Before applying the B&B method, it may be useful to reformulate (preprocess)
a given BIP in order to be able to quickly obtain a good feasible solution. Hence, we will
perform preprocessing (reformulation) of the given BIP problem as follows.
1. For a BIP of the form (1) reorder or rename the variables so that c1 c2…cn (from the
highest coefficient of the objective function to the lowest). For example, if the objective
function is 3x1+x2+4x3, then let y1=x3, y2=x1 and y3=x2 in the problem so that the objective
24
1. Integer Programming
function is 4y1+3y2+y3.
2. For a knapsack BIP, as in (2) above, reorder or rename the variables so that
c1 c2 c
n (from the highest value per unit weight to the least). For example,
a1 a2 an
max 2 x1 x2 3x3 max 3 y1 2 y2 y3
s.t. 4 x1 4 x2 2 x3 7 is eauivalent to s.t. 2 y1 4 y2 4 y3 7
x1 , x2 , x3 {0,1} y1 , y2 , y3 {0,1}
3 2 1
Here we set y1=x3, y2=x1, and y3=x2 since
2 4 4
Solution:. First perform preprocessing: Since 5 4 2 1, set y1=x2, y2=x1, y3=x4, and y4=x3
(or x1= y2, x2= y1, x3= y4 and x4=y3). So the equivalent BIP that we solve by the B&B is:
max 5 y1 +4 y2 2 y3 y4
s.t. 3 y1 +3 y2 2 y3 y4 5
4 y1 +5 y2 2 y3 2 y4 7
y1 , , y4 {0,1}
Now, since c1=5, c2=4, c3=2 and c4=1, U=5+4+2+1=12 is the upper bound at the root node.
1.5 Exercises
1. A manufacturer produces two different items I1 and I2 using three machines M1, M2 and M3.
The items are indivisible (cannot be fractional). The following table shows the processing
time per unit of each item required on each machine.
Processing time (in hour) on
Items M1 M2 M3
I1 2 2 0
I2 0 3 1
The machines M1, M2 and M3 can be used for at most 12 hours, 18 hours and 4 hours,
respectively, per day. The profit (in Birr) per unit of I 1 and I2 is 6 and 3, respectively. The
manufacturer can sell as much as he can produce of both items. The problem is to find the
number of each type of the items that should be produced per day in order to maximize daily
profit. Formulate the problem as an IP model and determine its optimal solution.
2. Nurses in a hospital work five consecutive days and have two consecutive days off (rest).
Their five days of work can start on any day of the week and the schedule rotates
indefinitely. The hospital requires the following minimum number of nurses that should be
on work:
Mon. 55, Tues. 60, Wed. 50, Thurs. 60, Fri. 50, Sat. 45, and Sun. 35.
The hospital management wants to determine the minimum number of total nurses required
in the hospital while satisfying the daily requirements. Write the IP formulation of the
problem.
3. There are five investment projects, P1, P2, …, P5, in a budget year each of which can be
26
1. Integer Programming
undertaken only fully (not in a portion). The following table shows the running cost (in
thousands of Birr) required by each project and its expected return if it is undertaken.
Projects P1 P2 P3 P4 P5
Running cost 250 120 215 82 322
Return 360 200 350 185 500
However, the total budget available for the investments is Birr 600,000; and it is required to
choose some of the projects for the investment that maximize the total return while the total
running cost does not exceed the available budget. Determine the BIP formulation of the
problem and solve it using the B&B method.
4. A manufacture wants to produce two indivisible products P 1 and P2 from two row materials
R1 and R2. A production of a unit of P1 requires 3 units of R1 and 2 units of R2. Similarly, a
unit of P2 requires 1 unit of R1 and 4 units of R2. There are only 21 units of R1 and 30 units
of R2 available for the production. The profit per unit of P 1 and P2 will be 40 and 60 dollars.
The manufacturer wants to know the number of each product which maximizes the profit.
Formulate the problem as an IP and solve it using the Gomory cutting plane method.
5. Solve the following IP problems using the Gomory cutting plane method.
(a) max 5 x y (d) min 7 x 9 y
s.t. 4 x 34 y 17 s.t. x 3 y 3
5 x 12 y 9 14 x 2 y 35
x, y 0 and Integer x, y 0 and Integer
27
1. Integer Programming
(b) Re-solve the problems given in the above problem (5a) to (5f) using B&B method.
7. Solve the following BIP problems using the special B&B method for BIP.
max 2 x1 3 x2 x3 2 x4
(a) max 40 x1 42 x2 44 x3 46 x4
(c) s.t. x1 x2 x3 x4 3
s.t. 30 x1 42 x2 55 x3 69 x4 110
x1 , , x4 {0,1} x1 12x2 9x3 14x4 27
x1 , , x4 {0,1}
max 20 x1 80 x2 66 x3 70 x4 32 x5
(b)
s.t. 40 x1 40 x2 44 x3 28 x4 32 x5 105
x1 , , x5 {0,1}
28