Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
151 views

Integer Programming

This document discusses integer programming (IP), which is a linear programming problem with the additional constraint that decision variables must take integer values. It provides the general formulation of an IP as maximizing/minimizing an objective function subject to constraints, with variables constrained to non-negative integers. The document also discusses binary integer programming (BIP) where variables are 0 or 1. It provides examples of IP and BIP problems and outlines the typical solution method of solving the linear programming relaxation to obtain an initial feasible solution and then finding an optimal integer solution.

Uploaded by

asrat
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
151 views

Integer Programming

This document discusses integer programming (IP), which is a linear programming problem with the additional constraint that decision variables must take integer values. It provides the general formulation of an IP as maximizing/minimizing an objective function subject to constraints, with variables constrained to non-negative integers. The document also discusses binary integer programming (BIP) where variables are 0 or 1. It provides examples of IP and BIP problems and outlines the typical solution method of solving the linear programming relaxation to obtain an initial feasible solution and then finding an optimal integer solution.

Uploaded by

asrat
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 28

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)
x0

where c  (c1 , c2 ,..., cn ), b  (b1 , b2 ,..., bm ) , A is an m  n matrix and x  ( x1 , x2 ,..., xn ) is the


T T T

vector of decision variables. The feasible set of the LP is a polyhedral


S  {x  R | Ax  b, x  0} . An optimal solution occurs at an extreme point of the polyhedral
n

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 ‘x0 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

1.2 Problem Formulation


Like any other LP problem, an IP problem constitutes three basic elements; namely, decision
variables, objective function and constraints. Thus, formulation of an IP problem involves
identifying its decision variables and expressing its objective function and constraints in terms of
the decision variables.
Example 1: A community service center of a town is open for 24 hours every day from Monday
to Friday. The minimum number of employees required daily at the center depends on
different time period of a day as given in the following table. (0 hr or 24 hr is at midnight,
12.00 PM )

Period 1 2 3 4 5 6
Time (24 hrs clock) 04 48 812 1216 1620 2024
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

For instance, consider the following problem.


Example 2: A cargo plane is to be loaded with some (or all) of n distinct items I1, I2, …, In for a
particular flight. There is exactly one indivisible item of each type. However, the plane can carry
a cargo of at most W kg and its available space is only V m3. The value, weight and volume of
each of the items is shown in the following table
Item I1 I2  Ij  In
  Capacity
Value c1 c2 cj cn
Weight (kg) w1 w2  wj  wn W
Volume (m3) v1 v2  vj  vn V
The problem is to select the set of items so that the carrying capacity of the plane is not exceeded
and the total value of the selected items is maximized. Write the mathematical formulation of the
problem.
Solution:
Decision Variables: The problem is to make a ‘yes’ or ‘no’ decision corresponding to each
item: ‘take’ or ‘do not take’ the item. So, we define a binary variable xj to represent the decision
that Ij is taken or not taken. That is, for each j=1,…,n, let
xj =1, if item Ij is taken , and
xj =0, if it is not taken.
Objective function: The goal is to maximize the total value of the items taken on the flight.

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.

1.3 Solution Methods


The theory and solution method of linear programs is fundamental in understanding and solving
integer programs. In particular, given an integer program
max cT x
(IP) s.t. Ax  b
x  0 and Integer

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

Fig. 1.1: S feasible set of LP Fig. 1.2: Feasible solutions of IP

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:

max x  0.64 y  376 , 950 


 
s.t. 50 x  31y  250 5   
 193 193 

 3x  2 y  4 4    
x, y  0 and Integer 3    
2    
1    
 1  
2 
3 5

 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.

1.3.1 Cutting Plane Method

To solve an integer programming problem


max cT x
(IP)
s.t. x  S  { x  R n | Ax  b, x  0 and Integer}
the cutting plane method basically performs the following three steps iteratively.
Step 1: Solve the corresponding LPR using the primal simplex or dual simplex. Let x be the
optimal solution of the LPR.
Step 2: If x is integer STOP; x is an optimal solution of the IP, too. Otherwise, go to Step 3.
Step 3: Include a new constraint, called cutting plane, to the LPR such that the new
constraint cuts off (excludes) x from S without excluding any integer feasible solution.
Then, repeat the steps starting from Step 1 until optimal integer solution is found.
In Step 3, the desired property of the new cutting constraint is that x should not satisfy this
constraint while all feasible integer solution of the IP should satisfy the constraint. We illustrate
this idea using the following example.
Example 4: Consider the following integer programming problem:
max 4x  6 y
s.t. 2y  7
x  3 y  12
x 6
x, y  0 and Integer

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 2: The LPR can be solved graphically which is X   


9 5
,
2 2
Since this solution is not integer we proceed to Step 3.

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

Solving this graphically, we get ( x, y )   3, 3 which is integer. Thus, ( x, y )   3, 3 is the


optimal solution of the given IP.
From the above discussion you could notice that the essential task in cutting plane method is how
to construct the desired new constraint (cutting plane). We will describe this in the next
subsection.

1.3.2 Gomory Fractional Cutting Plane

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

f = r – ërû , called fractional part of r .

For example, r = 2.6 Þ ë2.6û = 2 ; f =0.6

7
1. Integer Programming

r = -2.6 Þ ë -2.6û = -3; f =0.4

r =2 Þ ë2û = 2 ; f =0

Remark: 0 ≤ f < 1 for all r Î R; and f = 0 if and only if r is integer.

Recall also the following from your Linear Programming (Optimization I) course. Consider,

max cT x
(LP) s.t. Ax  b , where A is mn matrix, cRn and bRm.
x  0.

Let c x  cB xB  cN xN  z or cB xB  cN xN  z  0 , where xB and xN are the vectors of basic


T T T T T

and non-basic variables, respectively. Accordingly, partition A into mm basic submatrix B
and m(nm) 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  .

Then, the inequality


f i1 y1  fi 2 y2    fik yk  f i

is the desired cut, called Gomory fractional cut (GFC).

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

xi  ai1 y1  ai 2 y2    aik yk  bi (1)


Hence, every integer feasible solution satisfies this equation. Since each feasible solution yj 0
and  aij   a ij we have  aij  y j  a ij y j for each j=1,2,…,k. Hence, using this and equation
(1), for every feasible solution (x1,…, xm ,y1, …,yk ) it holds that
xi   ai1  y1   ai 2  y2     aik  yk  xi  ai1 y1  ai 2 y2    aik yk  bi

 xi   ai1  y1   ai 2  y2    aik  yk  bi (2)


If (x1,…, xm ,y1, …,yk) is any integer feasible solution, then xi ,y1, …,yk are integer and since each
 aij  is integer the sum xi   ai1  y1   ai 2  y2     aik  yk is integer. Moreover, From (2), this

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

xi   ai1  y1   ai 2  y2     aik  yk  bi 

or  xi   ai1  y1   ai 2  y2     aik  yk   bi  (3)


Now, adding equation (1) to (3), we get
( xi  xi ) + (ai1   ai1 ) y1  (ai 2   ai 2  ) y2    (aik  aik  ) yk  bi  bi 
 f i1 y1  fi 2 y2    fik yk  fi for every integer feasible solution of the IP.

Thus proof is completed.

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.

Gomory Fractional Cutting Plane Algorithm: To solve an integer programming problem:


Step 1: (Initial) Solve the LPR of the problem using the Simplex method.
• If the optimal solution so found is integer, it is optimal solution of the IP, too. If so,
STOP
Otherwise, go to Step 2.

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.

Example 5: Consider the following integer programming problem:


max 4 x1  x2
s.t 7 x1  2 x2  14
x2  3
2 x1  2 x2  3
x1 , x2  0 and Integer

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.

1.3.3 Branch and Bound Method

We consider again an IP problem

max cT x
(IP) s.t. x  S  {x | Ax  b, x  0, and Integer },

and its LPR is:

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

Z * = The maximum value (optimal value) of the IP.


Z R* = The maximum value (optimal value) of the corresponding LPR.
*
Note that Z R can be found by solving the LPR using simplex method. Our interest is to find Z *
*
by utilizing information related to Z R .
*
As you already know, S is the integer points in SR; i.e., S  SR. Therefore, Z *  Z R .
Consequently, the optimal (maximum) value of the LPR is an upper bound to the optimal
(maximum) value of the IP. On the other hand, if x is a feasible integer solution (i.e, x  S )
and Z  cx , then obviously Z  Z * . Therefore, the value of the objective function Z at an
integer feasible solution provides a lower bound to Z * . These can be summarized as:
*
Z  Z *  ZR .
*
Consequently, if we succeed to find a feasible integer point x  S such that Z  cx = Z R , then
Z * = Z  cx ; i.e., x is an optimal solution of the IP. This observation and the above notion of
lower and upper bounds of Z * will be useful in branch and bound method. Among lower
bounds, the largest possible lower bound provides good bound of Z* from below. Moreover,
among all known integer feasible solutions the one which yields the largest objective value is the
best candidate for optimal solution. Such point is called incumbent solution.
That is, a known feasible integer solution with best (largest) objective value is called incumbent
solution. In branch and bound procedure we keep updating the incumbent solution and we put
Z  cx when x incumbent solution is at any stage.
Branch and Bound (B&B) method is a divide and conquer technique. The basic idea is to
partition the set of feasible solutions S of the problem into disjoint smaller subsets S1, S2, …,Sk,
such that S  S1  S2 ...  S k ; and find the maxima of the objective function on each of the
smaller subsets. If Zi is the maximum value of the objective function over Si, for each i=1,2,…,k,
then the optimal objective value (maximum of the given problem) is Z*= max{ Z1, Z2, …, Zk}.
In this method also, the linear programming relaxation (LPR) of the problem is first solved using
Simplex method. If the optimal solution of the LPR is integer, then the optimal solution of the IP
is obtained. However, if in the optimal solution of the LPR any basic variable is not integer, then
the feasible region is divided into two smaller parts as follows:
Suppose xj is non-integer basic variable in the optimal solution of the LPR. That is,

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

xk  bk  xk  bk   1 S11= S1  {x: }


S12= S1 {x: +1 }
S111 S12

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).

3. Pruning by Optimality: Suppose an optimal solution xk* of a subproblem Pk that found by


simplex is integer with objective value Z k*  cxk*  Z . Now, update the incumbent by replacing
it with xk* . That is, let x  xk* and Z  Z k*  cxk* . Then, since the best integer solution of this
subproblem has been found, we will not need further investigation (branching) with regard to
this subproblem. In this case, the node is said to be pruned by optimality.
Nodes that have not been pruned are called active nodes. Each active node (or its corresponding
subproblem) is active element of LIST. The B&B procedure iteratively takes any one active node
(subproblem) from LIST, solve the subproblem by simplex method (dual simplex) and prune the
node if any one of the three reasons for pruning is observed. If none of the pruning reasons
appears, branching will take place in which case two new subproblems are included in LIST.
Continuing in this manner, the procedure terminates when LIST becomes empty; i.e., when all
nodes are pruned. At termination, the current incumbent solution x is the optimal solution of
the given IP with optimal objective value Z .

Summary: B&B procedure to solve IP: max { cx : x Î S }


1. Initial: - Put the IP in the LIST
• Let x be incumbent (integer) solution if it is known and Z  cx (otherwise, Z = – ¥ ).

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*

Then try to prune Pk by any one of the followings, if possible:


 If Pk is infeasible, prune it by infeasibility.
 If Z k* £ Z , prune it by bound (or dominance).
 If Z k*  cxk*  Z , do one of the following :
i. If xk* is integer, update the incumbent: x = xk* and Z  Z k* ;

17
1. Integer Programming

and prune Pk by optimality.

ii. If xk* is not-integer create two subproblems by branching using a non- integer

component of xk* and include them into the LIST .

3. Termination: If LIST = Æ , Optimal solution of the IP is: x * = x and Z *  Z .

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

Solution: The feasible set of the IP is


S  {( x1 , x2 ) :  3x1  2 x2  1, x1  6 x2  18
x1 , x2  0 and integer }
Initially, LIST= {IP}, the given problem itself, and set Z = – ¥. Since the problem has only
two variables, we can use graphical method to solve the LPR of the problem.

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 } ,

and include P3 and P4 in LIST. So, LIST ={P3, P4}.


These are shown in the following figure.

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
*

subproblem is pruned by optimality.


Iteration 5: Next take P4 from LIST, so LIST ={ }, and solve P4. Observe that P4 is infeasible.
Hence P4 is pruned by infeasibility.

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.

1.3.4 Branch and Bound for BIP

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).

Sk ( For example, for k =3,


xk+1=1 xk+1=0
if Sk := 110, then Sk1:= 1101,
and Sk0 = 1100. )
Sk1 Sk0

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}

The solution tree of this problem up to Level 2 is shown below.


The left node in Level 2 specifies that x1=1 and x2=1. S
But this violates the constraint (so, infeasible), since
3x1+4x2 = 3+4  6 is not true. Therefore, the node is 1
0
pruned by infeasibility. At this stage, the remaining
three terminal nodes (in Level 2) are active.
11 10 01 00

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

from this node x1 will remain the same. Further, at a S L=0


solution in which x1=1 the value of the objective function
x1=1 x1=0
is at least c1; i.e., c1  Z*  U .
U U c1
- At the right node x1=0 and the same holds for all nodes 1 0
L=c1 L=0
that follow from this. Hence, the coefficient of x1, i.e., c1,
does not contribute into Z*. Thus, for all solutions where
x1=0 the maximum that may be attained is U  c1.
In general, at Level k, where kn, suppose an active node with a binary string Sk of length k has
lower bound Lk and upper bound and Uk. Then, the lower and upper bound of these nodes can
be determined as follows.
- At the node of Sk1, xk+1 is included (xk+1=1). Check whether Uk
this is feasible. If Sk1 is infeasible, prune by infeasibility. If it Sk Lk
is feasible, then its lower bound becomes Lk+ck+1 since the xk+1=1 xk+1=0
inclusion of xk+1 increases the value of the objective function Uk  ck+1
U
by ck+1. The upper bound of Sk1 is remained Uk. Sk1 L k+c Sk0 L
k k+1 k

- At the node of Sk0, xk+1 is excluded (xk+1=0). In this case, xk+1


do not contribute to the value of the objective function.
Thus, the upper bound of Sk0 becomes Ukck+1 and its lower
bound is remained Lk.
Now suppose there is a best feasible solution (incumbent) X known so far at which the value of
the objective function is Z . Further, at any level k, suppose a node contains Sk. If Z  U k , then
this node can be pruned since branching from this will not lead to a solution better than X . This
is because the value of the objective function at every solution that follows by branching from
this node will be at most Uk (will not increase). In this case the node is said to be pruned by
bound (or dominance).
Remark: Pruning by bound is more effective if we have an incumbent with large objective
value. Therefore, in order to get a feasible solution with good objective value, we make
branching always from active node whose lower bound is the largest until a feasible
solution (at level n) is found. This is called depth first approach.
2. Pruning by Optimality: If a feasible solution is found at level n where the upper bound and
lower bound of the node are equal. We do not branch from this node and so it is pruned, called
pruning by optimality. This feasible solution may lead to the modification of the incumbent.

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}

 c1=4, c2=3 and c3=1. U=8


S L=0
Initially, U=4+3+1=8. Always branching
from the active node that has largest lower U=8 U=4
bound, we obtain the feasible node 101 with L=4 1 0 L=0
L=U=5. So, we record the best feasible
solution known so far to be X  101 with 11 U=5
10
L=4
Z  5, and prune the node by optimality. Inf
.
 Next, the node 100 is also feasible. But its U=5
U=4 100
L=5 101
objective value is 4 which is smaller than L=4
Opt. Boun
Z  5 . Hence this node is discarded (pruned d
by bound).
 There is still an active node (right node in the first level). But its upper bound is 4 which is
less than Z  5 . Hence, this node is also pruned (by bound); and no more node is active. So,
the procedure terminates and the incumbent solution X  101 is optimal solution.
That is, x1=1, x2=0 and x3=1 is the optimal solution of the BIP with maximum value Z*=5.

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

Example 8: Solve the following BIP using the B&B method


max 4 x1  5 x2  x3  2 x4
s.t. 3 x1  3 x2  x3  2 x4  5
5 x1  4 x2  2 x3  2 x4  7
x1 , , x4  {0,1}

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.

 Branching off from node with largest lower U=12


S L=0
bound recursively (step by step) we come to
the feasible node 1010. So, we record the U=12 U=7
incumbent solution to be X  1010 its L=5 1 0 L=0

objective value Z  7 . Boun


11 U=8 d
10 L=5
 The nodes that contain (11) and (1011) have Inf
.
been pruned by infeasibility. The next active U=8 U=6
L=7 101 100 L=5
node with largest lower bound is (100) with Boun
5
d
upper bound U=6. But this should be pruned 1011 1010
U=7
L=7
Inf Opt.
.
25
1. Integer Programming

by bound (dominance) since Z  7  6 .

 The remaining active node is (0) with upper


bound U=7 (on level 1). But this should be
pruned by bound since Z  7  7 .
Now there is no active node. Hence the current incumbent X  1010 is the optimal solution of
the BIP. That is, y1=1, y2=0, y3=1 and y4=0. Therefore, resetting the variables back to xi’s, the
optimal solution of the given BIP is x1= 0, x2= 1, x3= 0 and x4=1 with optimal value Z*=7.

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

(b) max 3 x1  2 x2  2 x3 max 2 x1  20 x2  10 x3


(e)
s.t. 2 x1  x2  2 x3  7 s.t. 2x1  20 x2  4 x3  15
3 x1  4 x2  2 x3  13 6 x1  20 x2  4 x3  20
x1 , x2 , x3  0 and Integer x1 , x2 , x3  0 and Integer

(c) max 3 x1  4 x2 (f) min 2x1  3 x2  x3


s.t. 3 x1  x2  x3  12 s.t. x1  4 x2  x3  6
3 x1  11x2  x4  66 2x1  3 x2  3 x3  4
x1 , , x4  0 and Integer x1 , x2 , x3  0 and Integer

6. Use Branch & Bound method to solve the following IP


(a) 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

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

You might also like