Integer Programming PDF
Integer Programming PDF
Introduction
In LP problems, decision variables are non negative values,
i.e. they are restricted to be zero or more than zero.
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.
Further, in some problems such as, production of different
fertilizers (in kilograms or tonnages), usage of different
amounts of food items (in grams) etc. may satisfy the
continuity assumption.
2
Introduction
3
Example
Consider the problem
maximize 3x + 4y
subject to 5x + 8y 24
x, y 0 and integer
4
Example
0 1 2 3 4 5
5
A rounding technique that sometimes is useful, and
sometimes not.
6 0 1 2 3 4 5
Introduction
11
Example 1:
Maximize
z 3x1 2 x2
Subject to 2 x1 5x2 9
4 x1 2 x2 9
x1 , x2 0 and integers
12
Example
The associated LPP, LP0 is defined by removing the integer
restrictions.
Solving we get x1= 1.69, x2 = 1.13, z = 7.31.
Because the optimum LP0 solution does not satisfy the
integer requirements, the B&B algorithm modifies the
solution space in a manner that eventually identifies the
integer optimum solution.
First we select one of the variables whose optimum value at
LP0 is not an integer.
We select x1.
13
Example
We replace the original LP0 with two new LPPs,
LP1 and LP2 defined as
LP1 space = LP0 space + ( x1 1)
LP2 space = LP0 space + ( x1 2) Set lower bound = -
We solve the LP1 problem
(which is given by adding to LP0, the constraint x1 1)
The solution is
x1 = 1, x2 = 1.4, z = 5.80
Now x1 is integer but x2 is not.
14
Example
So we replace the LP1 problem with two new LPs, LP3,LP4,
defined as
LP3 space = LP1 space + ( x2 1)
LP4 space = LP1 space + ( x2 2)
We now solve the LP3 problem.
The solution is : x1 = 1, x2 = 1, z = 5
Thus we have now got an all integer solution. So we need not
consider this node any further as we will not get a better
optimum since we will be looking at smaller subsets. We say
this node is fathomed. We also update the lower bound to 5.
15
Example
16
Example:
Thus we replace the LP5 problem with two new LPs LP7, LP8
defined as
LP7 = LP5 + ( x1 2)
LP8 = LP5 + ( x1 3)
Solving LP7 we get the all-integer solution
x1 = 2, x2 = 0, z = 6 and this node is fathomed.
We update the lower bound to 6.
We find LP8 is infeasible. Thus this is also fathomed.
We also find LP6 is infeasible. Thus this is also fathomed.
Thus ultimately we got the all-integer optimum solution as
x1 = 2, x2 = 0, z = 6.
17
All the above are depicted graphically as follows
LP0
x1=1.69,x2=1.13,z=7.31
x1 1 x1 2
LP1 LP2
x1=1,x2=1.4,z=5.8 x1=2,x2=0.5,z=7.0
x2 1 x2 2 x2 1
LP3 LP4 LP6
x1=1,x2=1,z=5 Infeasible x2 0 Infeasible
(fathomed) (fathomed) (fathomed)
LP5
x1=2.25,x2=0, z=6.75
x1 2 x1 3
LP7 LP8
x1=2,x2=0,z=6 Infeasible
Optimum Solution (fathomed) (fathomed)
18
Example 2:
Maximize
z 5x1 7 x2
subject to
2 x1 x2 13
5 x1 9 x2 41
x1 , x2 0 and integers
Optimal
Solution
(0,41/9)
(5.85, 1.31)
z=38.38
(13/2,0)
LP1: LP0 + {x1 5 }
Optimal
Solution
(0,41/9)
(5,1.78) z=37.44
(5,0) (13/2,0)
LP2: LP0 + { x1 6 }
Optimal
Solution
(0,41/9)
(6,1) z=37
Fathomed
(6,0) (13/2,0)
LP3: LP1 + {x2 1 }
Optimal
(0,41/9) Solution
(5,1) z=32
Fathomed
(5,0) (13/2,0)
LP4: LP1 + { x2 2 }.
Optimal
Solution
(0,41/9)
(4.60,2) z=37
(0,2)
Fathomed
(5,0) (13/2,0)
Thus though we have not got all integer
solution, we have got z=37 and since any
further subdivision will only yield z < 37, we
say this node is fathomed.
And the all integer optimum solution is:
x1=6, x2=1 with z = 37
Algebraic solution of LP0 (given problem without
integer restrictions)
Basic z x1 x2 s1 s2 Solution
z 1 -5 -7 0 0 0
s1 0 2 1 1 0 13
s2 0 5 9 0 1 41
z 1 -10/9 0 0 7/9 287/9
s1 0 13/9 0 1 -1/9 76/9
x2 0 5/9 1 0 1/9 41/9
z 1 0 0 10/13 9/13 499/13
x1 0 1 0 9/13 -1/13 76/13
x2 0 0 1 -5/13 2/13 17/13
Algebraic solution of LP1= LP0 + { x1 5}
Basic z x1 x2 s1 s2 s3 Solution
z 1 0 0 10/13 9/13 0 499/13
x1 0 1 0 9/13 -1/13 0 76/13
x2 0 0 1 -5/13 2/13 0 17/13
s3 0 1 0 0 0 1 5
0 0 - 9/13 1/13 -11/13
z 1 0 0 0 7/9 10/9 337/9
x1 0 1 0 0 0 1 5
x2 0 0 1 0 1/9 -5/9 16/9
s1 0 0 0 1 -1/9 -13/9 11/9
Algebraic solution of LP2= LP0 + { x1 6}
Basic z x1 x2 s1 s2 s3 Solution
z 1 0 0 10/13 9/13 0 499/13
x1 0 1 0 9/13 -1/13 0 76/13
x2 0 0 1 -5/13 2/13 0 17/13
s3 0 -1 0 0 0 1 -6
0 0 9/13 - 1/13 -2/13
z 1 0 0 7 0 9 37
x1 0 1 0 0 0 -1 6
x2 0 0 1 1 0 2 1
s2 0 0 0 -9 1 -13 2
Algebraic solution of LP3= LP1+ { x2 1}
Basic z x1 x2 s1 s2 s3 s4 Solution
z 1 0 0 0 7/9 10/9 0 337/9
x1 0 1 0 0 0 1 0 5
x2 0 0 1 0 1/9 -5/9 0 16/9
s1 0 0 0 1 -1/9 -13/9 0 11/9
s4 0 0 1 0 0 0 1 1
0 -1/9 5/9 -7/9
z 1 0 0 7 0 5 7 32
x1 0 1 0 0 0 1 0 5
x2 0 0 1 0 0 0 1 1
s1 0 0 0 1 0 -2 -1 2
s2 0 0 0 0 1 -5 -9 7
Algebraic solution of LP4= LP1+ { x2 2}
Basic z x1 x2 s1 s2 s3 s4 Solution
z 1 0 0 0 7/9 10/9 0 337/9
x1 0 1 0 0 0 1 0 5
x2 0 0 1 0 1/9 -5/9 0 16/9
s1 0 0 0 1 -1/9 -13/9 0 11/9
s4 0 0 -1 0 0 0 1 -2
0 1/9 -5/9 -2/9
z 1 0 0 0 1 0 2 37
x1 0 1 0 0 -1/5 0 9/5 23/5
x2 0 0 1 0 0 0 -1 2
s1 0 0 0 1 -2/5 0 -13/5 9/5
s3 0 0 0 0 -1/5 1 -9/5 2/5
All the above are depicted graphically as follows
LP0
x1=5.85,x2=1.31,z=38.38
x1 5 x1 6
LP1 LP2
x1=5,x2=1.78,z=37.44 x1=6, x2=1,z=37
(fathomed)
x2 1 x2 2
LP3 LP4
x1=5,x2=1, z=32 x1=4.6,x2=2, z=37
(fathomed) (fathomed)
Optimum Solution
Example 3:
Minimize z 5x1 4 x2
subject to 3x 2 x 5
1 2
2 x1 3x2 7
x1 , x2 0 and integers
(5/3,0) (7/2,0)
LP1 : LP0 + { x1 0 }
(5/3,0) (7/2,0)
(1,0) (5/3,0)
(7/2,0)
LP3 : LP1 + { x2 2 }
(0,5/2) Infeasible
(0,7/3)
(0,2)
(5/3,0) (7/2,0)
(0,3)
(0,5/2) x1=0
Optimum solution
(0,7/3) x2=3
z=12
(5/3,0) (7/2,0)
(5/3,0) (7/2,0)
(0,5/2)
(0,2) (1,2) x1=1
(0,7/3) Optimum Solution x2=2
z = 13
(5/3,0) (7/2,0)
All the above are depicted graphically as follows
LP0
x1=0.2,x2=2.2,z=9.8
x1 0 x1 1
LP1 LP2
x1=0,x2=2.5,z=10 x1=1,x2=1.66,z=11.66
x2 2 x2 3 x2 1
LP3 LP4 LP6
Infeasible x1=0,x2=3, z=12 x2 1 x1=1,x2=2,z=13
(fathomed) (fathomed) (fathomed)
LP5
x1=2,x2=1, z=14
(fathomed)
Optimum Solution