2. 1. The LP divisibility assumption (fractional
solutions are permissible) is not always
valid.
2. Binary variables allow powerful new
techniques like logical constraints.
3. Many different real-life situations can be
modeled as integer programs (IPs).
4. There are efficient algorithms to solve IPs.
Why study integer programming?
2
3. Applications
• Project Selection Problem (Knapsack Problem)
• Facility Location Problem
• Fixed Charge Problem
• Cutting Stock Problem
• Set Covering Problem
3
4. Project Selection Problem (Knapsack Problem)
• You have 5 Projects
• Your budget is Rs. 18000. Which Projects will you
choose so that total net profit is maximized?
4
Project Cost Net profit
P1 5000 4000
P2 6000 4500
P3 3500 3000
P4 8000 9500
P5 7500 6400
5. Project Selection: Formulation
Decision Variable
xi =1, if project Pi is selected
0, otherwise for all i = 1, 2, …,5
Max 4000 x1+ 4500 x2+ 3000 x3+ 9500 x4+ 6400 x5
s.t. 5000 x1+ 6000 x2+ 3500 x3+ 8000 x4+ 7500 x5≤ 18000
xi ∈ {0,1}, for all i = 1, 2, …,5
• Additional Constraints:
i. At most three projects can be selected
ii. If project 2 is selected then project 1 must be selected
iii. If Project 2 is selected then project 4 cannot be selected
5
6. Project Selection: Formulation
Decision Variable
xi =1, if project Pi is selected
0, otherwise for all i = 1, 2, …,5
Max 4000 x1+ 4500 x2+ 3000 x3+ 9500 x4+ 6400 x5
s.t. 5000 x1+ 6000 x2+ 3500 x3+ 8000 x4+ 7500 x5≤ 18000
xi ∈ {0,1}, for all i = 1, 2, …,5
• Additional Constraints:
i. At most three projects can be selected: x1+ x2+ x3+ x4+ x5≤ 3
ii. If project 2 is selected then project 1 must be selected: x2 ≤ x1
iii. If Project 2 is selected then project 4 cannot be selected: x2+x4 ≤ 1
6
7. Rounding down a LP solution is okay in
these cases
x1
x2
LP
optimum
IP
optimum
Increasing
objective
function value
8
8. You can go wrong here
x1
x2
LP
optimum
IP
optimum
Increasing
objective
function value
■ Rounding non-integer solution values up to the nearest integer
value can result in an infeasible solution.
9
9. You could go wrong
➢ If you have a particularly pointed feasible
region
➢ If you use LP to predict the solution for an IP
where variables can have only 0-1 values
(Typically in take/leave situations).
10
10. What an Integer Program looks like?
Linear Program
0
,
6
12
3
4
6
3
S.t.
2
3
Min
2
1
2
1
2
1
2
1
2
1
+
+
+
+
x
x
x
x
x
x
x
x
x
x
Integer Program
Integer
,
0
,
6
12
3
4
6
3
S.t.
2
3
Min
2
1
2
1
2
1
2
1
2
1
+
+
+
+
x
x
x
x
x
x
x
x
x
x
11
11. Binary (or 0-1) IP
(xj = 0 or 1)
PURE IP
(all xj integer)
Mixed IP
(some xj ≥ 0 & remaining xj
integer)
Integer Programming (IP)
(LP problem + xj are integers)
i.e., Integer Linear Programming (ILP) Problem
12
12. Machine
Required
Floor Space (ft.2
) Purchase Price
Press
Lathe
15
30
$8,000
4,000
Pure Integer Model
■ Machine shop obtaining new presses and lathes.
■ Marginal profitability: each press $100/day; each lathe $150/day.
■ Resource constraints: $40,000 budget, 200 sq. ft. floor space.
■ Machine purchase prices and space requirements:
13
13. Pure Integer Model: Formulation
Integer Programming Model:
Maximize Z = $100x1 + $150x2
subject to:
$8,000x1 + 4,000x2 $40,000
15x1 + 30x2 200 ft2
x1, x2 0 and integer
x1 = number of presses
x2 = number of lathes
14
14. ■ Recreation facilities selection to maximize daily usage by residents.
■ Resource constraints: $120,000 budget; 12 acres of land.
■ Selection constraint: either swimming pool or tennis center (not
both).
Recreation
Facility
Expected Usage
(people/day) Cost ($)
Land Requirement
(acres)
Swimming pool
Tennis Center
Athletic field
Gymnasium
300
90
400
150
35,000
10,000
25,000
90,000
4
2
7
3
0 - 1 Integer Model
15
15. Integer Programming Model:
Maximize Z = 300x1 + 90x2 + 400x3 + 150x4
subject to:
$35,000x1 + 10,000x2 + 25,000x3 + 90,000x4 $120,000
4x1 + 2x2 + 7x3 + 3x4 12 acres
x1 + x2 1 facility
x1, x2, x3, x4 = 0 or 1
x1 = construction of a swimming pool
x2 = construction of a tennis center
x3 = construction of an athletic field
x4 = construction of a gymnasium
0 - 1 Integer Model Formulation
16
16. Mixed Integer Model
■ $250,000 available for investments providing greatest return after
one year.
■ Data:
▪ Condo cost $50,000/unit; $9,000 profit if sold after one year.
▪ Land cost $12,000/ acre; $1,500 profit if sold after one year.
▪ Municipal bond cost $8,000/bond; $1,000 profit if sold after
one year.
▪ Only 4 condominiums, 15 acres of land, and 20 municipal bonds
available.
17
18. Linear Program Solution Space
(1.2, 2.4)
x1
x2
LP Optimal Solution
Feasible Solution Space
0
,
6
12
3
4
6
3
S.t.
2
3
Min
2
1
2
1
2
1
2
1
2
1
+
+
+
+
x
x
x
x
x
x
x
x
x
x
19
19. Integer Program Solution Space
x1
x2
IP Optimal Solution (1, 3)
Feasible solution
Integer
,
0
,
6
12
3
4
6
3
S.t.
2
3
Min
2
1
2
1
2
1
2
1
2
1
+
+
+
+
x
x
x
x
x
x
x
x
x
x
20
20. ▪ Enumeration Techniques
- Exhaustive Enumeration
- Branch and Bound
▪ Cutting Plane Approach
▪ Exhaustive Enumeration
Systematically generate and evaluate all
possible solutions and choose the (feasible)
solution with the optimal (best) value
Solving Integer Linear Programming Problem
21
22. ➢A way of systematically enumerating a small
fraction (hopefully) of feasible solutions to come
up with the optimal solution.
➢The concept of this method is that of divide and
conquer, where we break down the large difficult
problem into smaller sub-problems.
• 2 mechanisms:
– A mechanism to generate branches when searching
the solution space
– A mechanism to generate a bound so that many
braches can be terminated
Branch and Bound
23
23. These three basic steps:
➢ Branching
➢ Bounding, and
➢ Fathoming
Branching:
Choose one of the variables whose value will be fixed to create new
subproblems.
Branch and Bound (contd…)
24
24. Bounding: A bound is an optimistic estimate of the
solution of a problem. Solving the LP relaxation of a
subproblem will yield an optimistic estimate of solution
- In case of Minimization problems, the value of the bound
will be less than the optimal solution (ZLP ≤ Z*)
- In case of Maximization problems, the value of the
bound will be greater than the optimal solution (ZLP ≥ Z*)
A general bound for ILP
The LP relaxation of an ILP is a valid bound for ILP.
Branch and Bound (contd…)
25
25. FATHOMING CRITERIA
There are three situations that will arise that lets us know when
we no longer need to break down problems.
A subproblem is fathomed if
• Its LP relaxation's optimal solution is integral
• Its bound is worse than the best solution found so far
• Its LP relaxation has no feasible solution
Branch and Bound (contd…)
26
27. Branch and Bound (contd…)
integer
,
;
0
,
45
5
9
6
S.t.
5
8
Max Z
2
1
2
1
2
1
2
1
2
1
x
x
x
x
x
x
x
x
x
x
+
+
+
=
Pure Integer Programming Problem
0
,
45
5
9
6
S.t.
5
8
Max Z
2
1
2
1
2
1
2
1
+
+
+
=
x
x
x
x
x
x
x
x
LP relaxation of the original problem
Subproblem P0:
28
28. Branch and Bound (contd…)
P0
x1
x2
IP Feasible solution
Optimal Solution for LP Bound for
P0
(3.75, 2.25)
29
0
,
45
5
9
6
S.t.
5
8
Max Z
2
1
2
1
2
1
2
1
+
+
+
=
x
x
x
x
x
x
x
x
Subproblem P0
29. Branch and Bound (contd…)
LP Bound Solution of P0:
Branching on x1 of P0 creates two subproblems:
P1: P0 + Constraint: x1 ≥ 4
P2: P0 + Constraint: x1 ≤ 3
P0: ZLP=41.25
(x1=3.75, x2=2.25)
30
1 2
1 2
1 2
1 2
Max Z 8 5
S.t. 6
9 5 45
P
, 0
0
x x
x x
x x
x x
= +
+
+
30. Branch and Bound (contd…)
x1
x2
P2
P1
Optimal Solution for LP Bound for P1
Optimal Solution for LP Bound for P2
IP Feasible solution
31
36. Another Example: (LP relaxation of the original problem)
Max P0
St Max
St
Bound: LP Relaxation
Problem Selection: Newest Problem (LIFO rule)
Branch and Bound (contd…)
2
1 77
78 x
x
Z +
=
82
4
11 2
1
+ x
x
77
33
87 2
1
+
− x
x
2
1, x
x ≥ and integer
37
2
1 77
78 x
x
Z +
=
82
4
11 2
1
+ x
x
77
33
87 2
1
+
− x
x
1 2
, 0
x x
50. Branch-and-bound: binary integer programs
Modification: When branching on a binary variable xi, which has a fractional value xi*
in the current LP solution, the two new sub-problems are created by setting
xi = 0 and xi = 1.
}
1
,
0
{
,
,
,
0
0
1
10
2
5
3
6
S.t.
4
6
5
9
Max Z
4
3
2
1
4
2
3
1
4
3
4
3
2
1
4
3
2
1
+
−
+
−
+
+
+
+
+
+
+
=
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
LP relaxation of the original problem
Subproblem P0:
Example
4
,
3
,
2
,
1
for
,
1
0
0
0
1
10
2
5
3
6
S.t.
4
6
5
9
Max Z
4
2
3
1
4
3
4
3
2
1
4
3
2
1
=
+
−
+
−
+
+
+
+
+
+
+
=
j
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
j 51