8/11/2019 11.IntegerProgramming
http://slidepdf.com/reader/full/11integerprogramming 1/26
0
Integer Programming
Introduction to Integer Programming (IP)
Difficulties of LP relaxation
IP Formulations
Branch and Bound Algorithms
Reference: Chapter 9 in W. L. Winston’s book.
8/11/2019 11.IntegerProgramming
http://slidepdf.com/reader/full/11integerprogramming 2/26
1
Integer Programming Model
An Integer Programming model is a linear programmingproblem where some or all of the variables are required to
be non-negative integers.
These models are in general substantially harder thansolving linear programming models.
Network models are special cases of integer programmingmodels and are very efficiently solvable.
We will discuss several applications of integer programmingmodels.
We will study the branch and bound technique, one of themost popular algorithm to solve integer programmingmodels.
8/11/2019 11.IntegerProgramming
http://slidepdf.com/reader/full/11integerprogramming 3/26
2
Classifications of IP Models
Pure IP Model: Where all variables must take integer values.
Maximize z = 3x1 + 2x2 subject to x1 + x2 6
x1, x2 0, x1 and x2 integer
Mixed IP Model: Where some variables must be integer while
others can take real values.
Maximize z = 3x1 + 2x2 subject to x1 + x2 6
x1, x2 0, x1 integer
0-1 IP Model: Where all variables must take values 0 or 1 .
Maximize z = x1 - x2 subject to x1 + 2x2 2
2x1 - x2 1, x1, x2 = 0 or 1
8/11/2019 11.IntegerProgramming
http://slidepdf.com/reader/full/11integerprogramming 4/26
3
Classifications of IP Models (contd.)
LP Relaxation: The LP obtained by omitting all integer or 0-1constraints on variables is called the LP relaxation of IP.
IP:Maximize z = 21x1
+ 11x2 subject to
7x1 + 4x2 13x1, x2 0, x1 and x2 integer
LP Relaxation:Maximize z = 21x1
+ 11x2
subject to7x1 + 4x2 13x1, x2 0
Result:
Optimal objective function value of IP
8/11/2019 11.IntegerProgramming
http://slidepdf.com/reader/full/11integerprogramming 5/26
4
IP and LP Relaxation
x x xx
x1
x2
1 2 3
1
3
2
7x1 + 4x2= 13
8/11/2019 11.IntegerProgramming
http://slidepdf.com/reader/full/11integerprogramming 6/26
5
Simple Approaches for Solving IP
Approach 1:
Enumerate all possible solutions Determine their objective function values Select the solution with the maximum (or, minimum) value.
Any potential difficulty with this approach?
Approach 2:
Solve the LP relaxation Round-off the solution to the nearest feasible integer
solution
Any potential difficulty with this approach?
8/11/2019 11.IntegerProgramming
http://slidepdf.com/reader/full/11integerprogramming 7/26
6
Capital Budgeting Problem
Stockco Co. is considering four investments
It has $14,000 available for investment
Formulate an IP model to maximize the NPV obtained fromthe investments
IP:
Maximize z = 16x1 + 22x2 + 12x3 + 8x4 subject to
5x1 + 7x2 + 4x3 + 3x4 14x1, x2,,x3, x4 0, 1
Investmentchoice
1 2 3 4
Cashoutflow
$5000 $7000 $4000 $3000
NPV $16000 $22000 $12000 $8000
8/11/2019 11.IntegerProgramming
http://slidepdf.com/reader/full/11integerprogramming 8/26
7
Fixed Charge Problem
Gandhi cloth company manufactures three types ofclothing: shirts, shorts, and pants
Machinery must be rented on a weekly basis to make eachtype of clothing. Rental Cost:
$200 per week for shirt machinery
$150 per week for shorts machinery $100 per week for pants machinery
There are 150 hours of labor available per week and 160square yards of cloth
Find a solution to maximize the weekly profit
Labor hr Cloth yd Var. cost PriceShirts 3 4 $12 $6Shorts 2 3 $8 $4Pants 6 4 $15 $8
8/11/2019 11.IntegerProgramming
http://slidepdf.com/reader/full/11integerprogramming 9/26
8
Fixed Charge Problem (contd.)
Decision Variables:
x1 = number of shirts produced each weekx2 = number of shorts produced each weekx3 = number of pants produced each week
y1 = 1 if shirts are produced and 0 otherwise
y2 = 1 if shorts are produced and 0 otherwisey3 = 1 if pants are produced and 0 otherwise
Formulation:
Max. z = 6x1
+ 4x2
+ 7x3
- 200y1
- 150 y2
- 100y3subject to
3x1 + 2x2 + 6x3 1504x1 + 3x2 + 4x3 160
x1 M y1, x2 M y2, x3 M y3
x1, x2,,x3 0, and integer; y1, y2,,y3 0 or 1
8/11/2019 11.IntegerProgramming
http://slidepdf.com/reader/full/11integerprogramming 10/26
9
Either-Or Constraints
Dorian Auto is considering manufacturing three types ofauto: compact, midsize, large.
Resources required and profits obtained from these carsare given below.
We have 6,000 tons of steel and 60,000 hours of labor
available.
If any car is produced, we must produce at least 1,000 unitsof that car.
Find a production plan to maximize the profit.
Compact Midsize Large
Steel Req. 1.5 tons 3 tons 5 tons
Labor Req. 30 hours 25 hours 40 hours
Profit $2000 $3000 $4000
8/11/2019 11.IntegerProgramming
http://slidepdf.com/reader/full/11integerprogramming 11/2610
Either-Or Constraints (contd.)
Decision Variables:
x1, x2, x3 = number of compact, midsize and large cars producedy1, y2, y3 = 1 if compact , midsize and large cars are produced or
not
Formulation:
Maximize z = 2x1 + 3x2 + 4x3 subject tox1 My1; x2 My2; x3 My3 1000 - x1 M(1-y1)
1000 - x2
M(1-y2
)1000 - x3 M(1-y3)
1.5 x1 + 3x2 + 5x3 600030 x1 + 25x2 + 40 x3 60000
x1, x2, x3 0 and integer; y1, y2, y3 = 0 or 1
8/11/2019 11.IntegerProgramming
http://slidepdf.com/reader/full/11integerprogramming 12/2611
Set Covering Problems
Western Airlines has decided to have hubs in USA.
Western runs flights between the following cities: Atlanta,Boston, Chicago, Denver, Houston, Los Angeles, NewOrleans, New York, Pittsburgh, Salt Lake City, SanFrancisco, and Seattle.
Western needs to have a hub within 1000 miles of each ofthese cities.
Determine the minimum number of hubs
Cities within 1000 milesAtlanta (AT) AT, CH, HO, NO, NY, PI
Boston (BO) BO, NY, PI
Chicago (CH) AT, CH, NY, NO, PI
Denver (DE) DE, SL
Houston (HO) AT, HO, NO
Los Angeles (LA) LA, SL, SF
New Orleans (NO) AT, CH, HO, NO
New York (NY) AT, BO, CH, NY, PIPittsburgh (PI) AT, BO, CH, NY, PI
Salt Lake City (SL) DE, LA, SL, SF, SE
San Francisco (SF) LA, SL, SF, SE
Seattle (SE) SL, SF, SE
8/11/2019 11.IntegerProgramming
http://slidepdf.com/reader/full/11integerprogramming 13/2612
Formulation of Set Covering Problems
Decision Variables:
xi = 1 if a hub is located in city ixi = 0 if a hub is not located in city i
Minimize xAT + xBO + xCH + xDE + xHO + xLA + xNO + xNY + xPI + xSL
+ xSF + xSE
subject toAT BO CH DE HO LA NO NY PI SL SF SE Required
AT 1 0 1 0 1 0 1 1 1 0 0 0 xAT >= 1
BO 0 1 0 0 0 0 0 1 1 0 0 0 xBO >= 1
CH 1 0 1 0 0 0 1 1 1 0 0 0 xCH >= 1
DE 0 0 0 1 0 0 0 0 0 1 0 0 xDE >= 1
HO 1 0 0 0 1 0 1 0 0 0 0 0 xHO >= 1
LA 0 0 0 0 0 1 0 0 0 1 1 0 xLA >= 1NO 1 0 1 0 1 0 1 0 0 0 0 0 xNO >= 1
NY 1 1 1 0 0 0 0 1 1 0 0 0 xNY >= 1
PI 1 1 1 0 0 0 0 1 1 0 0 0 xPI >= 1
SL 0 0 0 1 0 1 0 0 0 1 1 1 xSL >= 1
SF 0 0 0 0 0 1 0 0 0 1 1 1 xSF >= 1
SE 0 0 0 0 0 0 0 0 0 1 1 1 xSE >= 1
8/11/2019 11.IntegerProgramming
http://slidepdf.com/reader/full/11integerprogramming 14/2613
Additional Applications
Location of fire stations needed to cover all cities
Location of fire stations to cover all regions
Truck despatching problem
Political redistricting
Capital investments
8/11/2019 11.IntegerProgramming
http://slidepdf.com/reader/full/11integerprogramming 15/2614
Branch and Bound Algorithm
Branch and bound algorithms are the most popular methodsfor solving integer programming problems
They enumerate the entire solution space but only implicity;hence they are called implicit enumeration algorithms.
A general-purpose solution technique which must bespecialized for individual IP's.
Running time grows exponentially with the problem size, butsmall to moderate size problems can be solved inreasonable time.
8/11/2019 11.IntegerProgramming
http://slidepdf.com/reader/full/11integerprogramming 16/2615
An Example
Telfa Corporation makes tables and chairs
A table requires one hour of labor and 9 square board feetof wood
A chair requires one hour of labor and 5 square board feetof wood
Each table contributes $8 to profit, and eachchair contributes $5 to profit.
6 hours of labor and 45 square board feet isavailable
Find a product mix to maximize the profit
Maximize z = 8x1 + 5x2 subject to x1 + x2 6; 9x1 + 5x2 45; x1, x2 0; x1, x2 integer
8/11/2019 11.IntegerProgramming
http://slidepdf.com/reader/full/11integerprogramming 17/2616
Feasible Region for Telfa’s Problem
Subproblem 1 : The LP relaxation oforiginal
Optimal LP Solution: x1 = 3.75 andx2 = 2.25 and z = 41.25
Subproblem 2: Subproblem 1 +Constraint x1 4
Subproblem 3: Subproblem 1 +Constraint x1 3
8/11/2019 11.IntegerProgramming
http://slidepdf.com/reader/full/11integerprogramming 18/2617
Feasible Region for Subproblems
Branching : The process ofdecomposing a subproblem into two
or more subproblems is calledbranching.
Optimal solution of Subproblem 2:
z = 41, x1 = 4, x2 = 9/5 = 1.8
Subproblem 4: Subproblem 2 +Constraint x
2
2
Subproblem 5: Subproblem 2 +Constraint x2 1
8/11/2019 11.IntegerProgramming
http://slidepdf.com/reader/full/11integerprogramming 19/2618
Feasible Region for Subproblems 4 & 5
8/11/2019 11.IntegerProgramming
http://slidepdf.com/reader/full/11integerprogramming 20/2619
The Branch and Bound Tree
Subproblem 1z = 41.25x1 = 3.75x2 = 2.25
Optimal solution of Subproblem 5:
z = 40.05, x1 = 4.44, x2 = 1
Subproblem 6: Subproblem 5 + Constraint x1 5
Subproblem 5: Subproblem 5 + Constraint x1 4
3
Subproblem 2z = 41x1 = 4
x2 = 1.8
Subproblem 3
Subproblem 4Infeasible
Subproblem 5
x1 4 x1 3
x2 2 x2 1
1
2
4
8/11/2019 11.IntegerProgramming
http://slidepdf.com/reader/full/11integerprogramming 21/2620
Feasible Region for Subproblems 6 & 7
Optimal solution ofSubproblem 7:
z = 37, x1 = 4, x2 = 1
Optimal solution ofSubproblem 6:
z = 40, x1 = 5, x2 = 0
8/11/2019 11.IntegerProgramming
http://slidepdf.com/reader/full/11integerprogramming 22/2621
The Branch and Bound Tree
Subproblem 1z = 41.25x1 = 3.75x2 = 2.25
Subproblem 2z = 41x1 = 4
x2 = 1.8
Subproblem 3z = 3x1 = 3
x2 = 1, LB = 39
Subproblem 4Infeasible
Subproblem 5z = 40.55x1 = 4.44
x2 = 1
x1 4 x1 3
x2 2 x2 1
Subproblem 6z = 40x
1= 5
x2 = 0, LB = 37
Subproblem 7z = 37x1 = 4
x2 = 1
1
2
3 4
7
6 5
8/11/2019 11.IntegerProgramming
http://slidepdf.com/reader/full/11integerprogramming 23/2622
Solving Knapsack Problems
Max z = 16x1+ 22x2 + 12x3 + 8x4 subject to
5x1+ 7x2 + 4x3 + 3x4 14xi = 0 or 1 for all i = 1, 2, 3, 4
LP Relaxation:
Max z = 16x1+ 22x2 + 12x3 + 8x4 subject to
5x1+ 7x2 + 4x3 + 3x4 140 xi 1 for all i = 1, 2, 3, 4
Soving the LP Relaxation: Order xi’s in the decreasing order of ci /ai where ci are thecost coefficients and ai’s are the coefficients in theconstraint
Select items in this order until the constraint is satisfied withequality
8/11/2019 11.IntegerProgramming
http://slidepdf.com/reader/full/11integerprogramming 24/2623
The Branch and Bound Tree
x3 = 0x3 = 1
x2 = 0x4 = 1
Subproblem 1z = 44
x1 = x2 = 1x
3
=.51
72
8 9
Subproblem 5z = 43.6
x1 =.6, x2=x3=1x4 = 0, LB = 36
Subproblem 4z = 36
x1 = x3=1x2 = 0, x4 =1
Subproblem 3z = 43.7
x1 =x3= 1,x2 = .7, x4=0
Subproblem 6z = 42
x1 =0, x2=x3=1x4 = 1, LB = 36
5
Subproblem 7LB = 42
Infeasible6
x2 = 1
x1 = 0 x1 = 1
Subproblem 2z = 43.3, LB=42
x1 = x2=1x3 = 0, x4 =.67
Subproblem 8z = 38, LB=42
x1 = x2=1x3 = x4 = 0
Subproblem 9z= 42.85, LB=42
x1 = x4 =1x3 = 0, x2 = .85
x4 = 0
3 4
8/11/2019 11.IntegerProgramming
http://slidepdf.com/reader/full/11integerprogramming 25/2624
Strategies of Branch and Bound
The branch and bound algorithm is a divide and conqueralgorithm, where a problem is divided into smaller and smaller
subproblems. Each subproblem is solved separately, and thebest solution is taken.
Lower Bound (LB): Objective function value of the best solution
found so far.
Branching Strategy : The process of decomposing a subprobleminto two or more subproblems is called branching.
8/11/2019 11.IntegerProgramming
http://slidepdf.com/reader/full/11integerprogramming 26/26
Strategies of Branch and Bound (contd.)
Upper Bounding Strategy: The process of obtaining an upperbound (UB) for each subproblem is called an upper bounding
strategy.
Pruning Strategy: If for a subproblem, UB LB, then thesubproblem need not be explored further.
Searching Strategy: The order in which subproblems areexamined. Popular search strategies: LIFO and FIFO.