You are on page 1of 34

Integer

Programming
Taufik Djatna, Dr.Eng.
Integer programming ::
Methods
• Relaxation
• Branch and Bound
• Cutting planes
• Column generation
• Heuristics

Min Max Theorem Close the


gap!
Integer linear programming
Input:
• A linear objective function f: Zn  Z
• A set of linear constraint functions: gi: Zn  Z
• A set of constraint values: bi

Goal:
Find x in Zn which:
1. maximizes f(x)
2. satisfies gi(x) <= bi
Area of Application
• Binary Integer Model:: Plant Expansion decision
1 if decision j is YES subject to
xj   j  1, 2,3, 4
0 if decision j is NO 6 x1  3 x2  5 x3  2 x4  10
let : x3 + x 4  1
Z  total Net Present Value= 9x1  5 x2  6 x3  4 x4  x1 +x 3 0
xj  

• Investment Analysis/Capital Budgeting


• Site Selection
• Designing a Production and Distribution Network
• Dispatching Shipments
• Scheduling Interrelated Activities
• Airline application—Fleet Assignment problem
Branch-and-
Bound
Technique for
Solving
Integer
Basic Concepts
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 subproblems
until these subproblems 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.
x1 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 6 7 8 9
x2
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).
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)
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=20 Z=39

0 1 2 3 4 5 6 7 8
Solution tree
S1: x2  3
For each subproblem, we record
All
(3, 3) int.
• the restriction that creates the subproblem 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 Subproblem 1 is integral: (3, 3).
 If further branching on a subproblem will yield no useful
information, then we can fathom (dismiss) the subproblem.
In our case, we can fathom Subproblem 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 - Branch Subproblem 2 on x1 :
(1, 4.44)
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.
The subproblem is infeasible
3
Z=40.55

1
Z=20

0 1 2 3 4 5 6 7 8
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 6 7 8
Solution tree (final)
S1: x2  3 S5: x2  4
int.
All (3, 3) S3: x1  1 (1, 4) int.
(2.25, 3.75) Z=39 Z=37
(1, 4.44)
Z=41.25
S2: x2 ≥ 4 Z=40.55 S6: x2 ≥ 5
(1.8, 4) (0, 5)
int.
Z=41 S4: x1 ≥ 2 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.
y objective

optimum of
LP relaxation

IP optimum
feasible rounding down optimum
solutions = of LP relaxation

x
Integer Program
Solving MIPs: Branch and Bound
Consider the following integer program:
Maximize x + y + 2z
Subject to 7x + 2y + 3z  36 (IP0)
5x + 4y + 7z  42
2x + 3y + 5z  28
x, y, z  0, integer
Branch & Bound: Example
 3 
 x 1 
 11 
obj  11
5 IP0
 y  0  11
 z  5 1 
 11 
x 1 x2
Best IP
value

/ 10/ 11
1 
 0  obj  11.4 obj  10  2 1 
 5.2  IP2 IP1  2 0 0
  0 Best IP
 4  4 5
  solution    
z 5 z6 Integral
1 
1 1
  obj  11 IP4 IP3
3 3
5 
y0 y 1 Infeasible

1  obj  11 obj  11.2 1 


0 IP6 IP5 1
5  4.6 
   

Integral z4 z 5 z 5

1  obj  9 IP8 IP7 obj  11  0 


 2 1
5
 4  
 
Obj.  Obj. 
incumbent incumbent
Diet Problem

The Pill Salesman

A pill salesman offers Bob energy, protein, and


calcium pills to fulfill his nutritional needs. We
will represent the costs of each of the pills as
follows:
y1 cost (in dollars) of 1 kcal energy pill
y2 cost (in dollars) of 1 g protein pill
y3 cost (in dollars) of 1mg calcium pill
Diet Problem

LP constraints

Nutritional requirements

110x1 + 205x2 + 160x3 + 160x4 + 420x5 + 260x6  2000 y1


4x1 + 32x2 + 13x3 + 8x4 + 4x5 + 14x6  55 y2
2x1 + 12x2 + 54x3 + 285x4 + 22x5 + 80x6  800 y3
Diet Problem

LP constraints
Minimize Cost
0.3x1 + 2.40x2 + 1.30x3 + 0.90x4 + 2.0x5 + 1.9x6

Nutritional requirements

110x1 + 205x2 + 160x3 + 160x4 + 420x5 + 260x6  2000 y1 kcal


4x1 + 32x2 + 13x3 + 8x4 + 4x5 + 14x6  55 y2 protein
2x1 + 12x2 + 54x3 + 285x4 + 22x5 + 80x6  800 y3 calcium

x1 = servings of oatmeal: The cost of the nutrients in one


serving of oatmeal shouldn’t exceed the cost of just buying
one serving of oatmeal:
110y1 + 4y2 + 2y3  0.3 (4 y2 = cost of protein in oatmeal)
Diet Problem

The salesman’s requirements


The pill salesman wants to make as much money as possible,
given Bob’s constraints. He knows Bob wants 2000 kcal, 55g
protein, and 800 mg calcium, so his problem is as follows:

Maximize 2000y1 + 55y2 + 800y3


Subject to 110y1 + 4y2 + 2y3  0.3
205y1 + 32y2 + 12y3  2.4
160y1 + 13y2 + 54y3  1.3
160y1 + 8y2 + 285y3  0.9
420y1 + 4y2 + 22y3  2.0
260y1 + 14y2 + 80y3  1.9
y1 , y2 , y3  0
Diet Problem

Solution

Solving this LP gives us the following pill


prices:

$0.27 for 1 kcal energy pill


$0.00 for 1 g protein pill
$0.16 for 1mg calcium pill

Total cost = 0.27 (2000) + 0.16 (800) = $6.71


THE SAME AS THE LOWEST COST DIET!
Diet Problem

Weak Duality:
Cost of any feas. diet  Price of any feas. pills

Strong Duality: (Von Neumann, 1947)


Optimal cost of diet = Optimal cost of pills
Diet Problem

MORAL:
The values of the dual variables, which are
always available as part of LP solution, equal
the marginal value of corresponding
resources.
Summary
Summary of branch-and-bound for integer programs
• Which variable to branch on?
• Which open subproblem to solve first?
• Updating the bounds (lower and upper) on OPT(IP)
• Summary of fathoming criteria
• Optimality test
Branch-and-bound applied to
• binary integer programs
• mixed integer programs

You might also like