You are on page 1of 30

Chapter Three

Integer Programming

5-1
Introduction
 In LP problems ,decision variables are non negative
values
 It demonstrates one of the properties of LP namely,
continuity, which means that fractional values of the
decision variables are possible in the solution of a LP
model.
 For some problems like: product mix , balanced diet
(nutrition) etc. the assumption of continuity may be
valid .

5-2
 Cont. …

 But some items cannot be produced in fractions,


Say ship, cranes, tables, chairs etc.
 If we round off the production volume of such
products:
 Corresponding solution may be different from
the optimal solution.

3
5-3
 Cont.…

 There would be a significant difference in the total


profit, if the profit per unit of each of the products is
very high
 There are problems where it is also necessary to assign
people , machines, vehicles to activities in integer
quantities.
 That means these variables should take integer values.

4
5-4
 Hence there is a need for Integer programming
methods.
 The mathematical model for IP or more precisely ILP
is the LP model with one additional
restriction/constraint: “variables must have integer
values”.
 If only some of the variables of the problem should
be integers then they are called “Mixed IP problems”
5
5-5
 Cont. …
 If all the variables should take integer values then we
have “Pure IP problems”.
 There is another area of application, namely problems
involving a number of interrelated “yes no decisions” .
In such decisions, the only two possible choices are yes
or no.

6
5-6
Cont.…
 Integer linear programing is classified in to Pure ,
Mixed and (0,1 or yea/No) type based on the
decision variables
 There are two methods of solving integer linear
programing
 1. Gomory’s cutting plan method
 2.Brnanch and Band Method

5-7
Consider the following ILP problem

Maximize Z=7x1+10x2
Subject to : - x1+3x2 ≤6
7x1+x2 ≤35
x1,x2 ≥ 0 and integer

8
5-8
1.Gomory Cutting plane algorithm
The general procedure for Gomory’s cutting plane method is:

Step1:find the original LP solution (using the simplex method)


ignoring the integer constraint.

Step 2:if the solution is integer stop. Otherwise , construct a


“cut” derived from the row that has a non integer variable
with the largest fractional value and add to the current
final tableau. If there is a tie select any row arbitrarily.

Step 3:solve the augmented LP problem ,and return to step 2.


9
5-9
 Consider the solution of the problem shown
in the optimum tableau is given below

Basic x1 x2 s1 s2 solution

z 0 0 63/22 31/22 66 ½
x2 0 1 7/22 1/22 3½
x1 1 0 -1/22 3/22 4½

10
5-10
 The information in the optimum tableau can be written
explicitly as
 Z+63/22 S1+31/22 S2 =66 ½
 X2+ 7/22 S1+1/22 S2 =3 ½
 X1 -1/22 S1 + 3/22 S2=4 ½

 First ,factor out all the non integer coefficients into an


integer value and a strictly positive fractional
component.
 A constraint row with a non integer value, can be used
as a source row for generating a cut. 11
5-11
1
2

 Factoring the x2 row,


7 1 1
X2  S1  S2  3
22 22 2

7 1 1
X2  (0  ) S1  (0  )S2  3 
22 22 2
7 1 1
X2  0 S1  0 S 2  3   S1  S2  0
22 22 2

since s1 and s2 are non negative and the


corresponding coefficients are positive fractions
middle term is 1/2.
since the LHS is all integer values we can say it is 0

5-12
7 1 1
 S1  S2  0
22 22 2

7 1 1
 S1  S2  
22 22 2

-7/22s1-1/22s2+Sg1=-1/2

Any cut can be used in the first iteration of the


cutting plane algorithm.
This is the constraint , that is added as an
additional constraint which is also known as the
cut, to the LP optimum tableau.
Resulting tableau is:
5-13
1
4
 We get the following optimal ,but infeasible tableau.

Basic x1 x2 s1 s2 Sg1 solution


z 0 0 63/22 31/22 0 66 ½
x2 0 1 7/22 1/22 0 3½
x1 1 0 -1/22 3/22 0 4½
Sg1 0 0 -7/22 -1/22 1 -1/2

Ratio -9 -31

Smallest absolute value (Z/new row)

5-14
1
5
 Applying the dual simplex method to recover
feasibility, yields,

Basi x1 x2 s1 s2 Sg1 solution


c
z 0 0 0 1 9 62
x2 0 1 0 0 1 3
x1 1 0 0 1/7 -1/7 4 4/7
S1 0 0 1 1/7 -22/7 1 4/7
This solution is still non integer in x1 and s1.selecting x1

arbitrarily as the next source row the associated cut is


1 6 4
 S2  S g1  S g 2  
7 7 7
5-15
1
6

Basi x1 x2 s1 s2 Sg1 Sg2 solution


c
z 0 0 0 1 9 0 62
x2 0 1 0 0 1 0 3
x1 1 0 0 1/7 -1/7 0 4 4/7
S1 0 0 1 1/7 -22/7 0 1 4/7
Sg2 0 0 0 -1/7 -6/7 1 -4/7
Ratio -7 -31/2

Smallest absolute value

5-16
1
7
The dual simplex method yields the following
tableau which is optimal, feasible and integer .

Basi x1 x2 s1 s2 Sg1 Sg2 solution


c
z 0 0 0 0 3 7 58
x2 0 1 0 0 1 0 3
x1 1 0 0 0 -1 1 4
S1 0 0 1 0 -4 1 1
S2 0 0 0 1 6 -7 4
The feasible solution which is pure integer is x1=4,
x2=3, s1=1, s2=4 and z= 58
5-17
1
8

 It is important to note that the fractional cut


assumes that all the variables including the
slack and the surplus variables are integer.
 This means that the cut deals with pure
integer problems only.

5-18
Integer Programming Models, (Types of Models)

Total Integer All decision variables required to have


Model: integer solution values.
Integer Programming: all variables
must have Integer values

0-1 Integer Model: All decision variables required to have


integer values of zero or one.

Mixed Integer Some of the decision variables (but not


Model: all) required to have integer values.
5-19
2. Branch and Bound Method
The basic concept underlying the branch-and-bound technique
is to divide and conquer.
Since the original “large” problem is hard to solve directly,
it is divided into smaller and smaller sub problems
until these sub problems can be conquered.
The dividing (branching) is done by partitioning
the entire set of feasible solutions into smaller and smaller subsets.
The conquering (fathoming) is done partially by
(i) giving a bound for the best solution in the subset;
(ii) discarding the subset if the bound indicates that
it can’t contain an optimal solution.

These three basic steps – branching, bounding, and fathoming –


are illustrated on the following example.

5-20
Example of Branch-and-Bound
6
x1 + x2 = 6 Max Z = 5x1 + 8x2
5
s.t. x1 + x2  6
5x1 + 9x2  45
4 (2.25, 3.75) x1 , x2 ≥ 0 integer

Z=41.25
2 5x1 + 9x2 = 45

1
Z=20

0 1 2 3 4 5 7 8
6
5-21
Utilizing the information about the optimal solution of the
LP-relaxation
 Fact: If LP-relaxation has integral optimal solution x*,
then x* is optimal for IP too.
 In our case, (x1, x2) = (2.25, 3.75) is the optimal solution of the LP-
relaxation. But, unfortunately, it is not integral.

 The optimal value is 41.25 .


 Fact: OPT(LP-relaxation) ≥ OPT(IP)
(for maximization problems)
That is, the optimal value of the LP-relaxation
is an upper bound for the optimal value of the integer
program.
 In our case, 41.25 is an upper bound for OPT(IP).
5-22
Branching step
 In an attempt to find out more
about the location of the IP’s optimal solution,
partition the feasible region of the LP-relaxation.
 Choose a variable that is fractional in the optimal solution to the
LP-relaxation – say, x2 . Observe that every feasible IP point
must have either x2  3 or x2 ≥ 4 .
 With this in mind, branch on the variable x2 to create the
following two subproblems:
Subproblem 1 Subproblem 2
Max Z = 5x1 + 8x2 Max Z = 5x1 + 8x2
s.t. x1 + x2  6 s.t. x1 + x2  6
5x1 + 9x2  45 5x1 + 9x2  45
x2  3 x2 ≥ 4
x1 , x2 ≥ 0 x1 , x2 ≥ 0
 Solve both subproblems
(note that the original optimal solution (2.25, 3.75) can’t recur)
5-23
Branching step (graphically)
Z=41
Subproblem 1: Opt. solution (3,3) with value 39
5 Subproblem 2: Opt. solution (1.8,4) with value 41
Subproblem 2
4
(1.8, 4)

3 (3, 3)

2
Subproblem 1

1 Z=39
Z=20

0 1 2 3 4 5 6 7 8
Solution tree
S1: x2  3
For each sub problem, we record (3, 3) int.
All
• the restriction that creates the sub problem Z=39
(2.25, 3.75)
• the optimal LP solution
Z=41.25 S2: x2 ≥ 4
• the LP optimum value
(1.8, 4)
Z=41
The optimal solution for Sub problem 1 is integral: (3, 3).
 If further branching on a sub problem will yield no useful
information, then we can fathom (dismiss) the sub problem.
In our case, we can fathom Sub problem 1 because its solution is integral.
 The best integer solution found so far is stored as incumbent.
The value of the incumbent is denoted by Z*.
In our case, the first incumbent is (3, 3), and Z*=39.
 Z* is a lower bound for OPT(IP): OPT(IP) ≥ Z* .
In our case, OPT(IP) ≥ 39. The upper bound is 41: OPT(IP)  41.
Next branching step (graphically)

- Fathom Subproblem 1.
5
(1, 4.44)
- Branch Subproblem 2 on x 1 :
Subpr. 4
Subpr. 3 Subproblem 3: New restriction is x1  1.
4 Opt. solution (1, 4.44) with value 40.55
Subproblem 4: New restriction is x1 ≥ 2.
3 The subproblem is infeasible
Z=40.55

1
Z=20

0 1 2 3 4 5 7 8
6
Solution tree (cont.)
S1: x2  3
int.
All (3, 3) S3: x1  1
(2.25, 3.75) Z=39
(1, 4.44)
Z=41.25
S2: x2 ≥ 4 Z=40.55

(1.8, 4)
Z=41 S4: x1 ≥ 2
infeasible

 If a subproblem is infeasible, then it is fathomed.


In our case, Subproblem 4 is infeasible; fathom it.

 The upper bound for OPT(IP) is updated: 39  OPT(IP)  40.55 .

 Next branch Subproblem 3 on x2 .


(Note that the branching variable might recur).
Next branching step (graphically)

(0, 5) Branch Subproblem 3 on x2 :


5 Subproblem 5: New restriction is x2  4.
Feasible region:
4 the segment joining (0,4) and (1,4)
(1, 4) Opt. solution (1, 4) with value 37
Subproblem 6: New restriction is x2 ≥ 5.
3
Feasible region is just one point: (0, 5)
Opt. solution (0, 5) with value 40
2

1
Z=20

0 1 2 3 4 5 7 8
6
Solution tree (final)
S1: x2  3 int. S5: x2  4
int.
All (3, 3) S3: x1  1 (1, 4)
(2.25, 3.75) Z=39 Z=37
(1, 4.44)
Z=41.25
S2: x2 ≥ 4 Z=40.55 S6: x2 ≥ 5
int.
(1.8, 4) S4: x1 ≥ 2 (0, 5)
Z=41 Z=40
infeasible

 If the optimal value of a subproblem is  Z*, then it is fathomed.


• In our case, Subproblem 5 is fathomed because 37  39 = Z*.
 If a subproblem has integral optimal solution x*,
and its value > Z*, then x* replaces the current incumbent.
• In our case, Subproblem 5 has integral optimal solution, and its value
40>39=Z*. Thus, (0,5) is the new incumbent, and new Z*=40.
 If there are no unfathomed subproblems left, then the current
incumbent is an optimal solution for (IP).
• In our case, (0, 5) is an optimal solution with optimal value 40.
5-30

You might also like