Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Optimization
Discrete Optimization:
Introduction
Shabbir Ahmed
Anderson-Interface Chair and Professor
School of Industrial and Systems Engineering
Learning Objectives
• Recall discrete optimization models
• Recognize the need for discrete
variables
Discrete Optimization Models
• A discrete optimization or an integer programming model is an
optimization problem where some of the decisions variables are
required to take integer values
min f (x)
s.t. gi (x) bi i = 1, . . . , m
x 2 Rn p ⇥ Z p
Linear Discrete Optimization
Models
• If the objective and constraints of a discrete optimization problem
consist of linear functions then it is known as a linear discrete
optimization problem or a mixed integer linear program
min c> x
s.t. Ax b
x 2 Rn p ⇥ Z p
Binary Optimization Models
• A special and important class of discrete optimization models are
those where the discrete variables are required to be binary, that is,
they are required to take values of 0 or 1.
min f (x)
s.t. gi (x) bi i = 1, . . . , m
x 2 Rn p ⇥ {0, 1}p
Why discrete variables?
• Indivisible decisions
• Yes/No choices
• Logical conditions
• Nonconvex functions and sets
Etc.
Example: Indivisible Decisions
• Given a set of supply ports and a set of demand ports with given
supplies and demands, how many cargo ships to lease to for each
route (supply-demand pair) at minimum cost?
P P
min c y
Pi2I j2J ij ij
s.t. Pi2I xij dj 8j2J
j2J xij si 8i2I
xij U yij 8i 2 I, j 2 J
xij 0, yij 2 Z+ 8i 2 I, j 2 J
Example: Yes/No Decisions
• Given a set of projects with their returns and costs, and a budget,
decide whether to investment in a project or not to maximize returns
n
X
max rj x j
j=1
Xn
s.t. c j xj B
j=1
xj 2 {0, 1} 8 j = 1, . . . , n
Example: Logical Conditions
• If I invest in project 1 then I must invest in projects 2 and 3
n
X
max rj x j
j=1
Xn
s.t. c j xj B
j=1
x1 x2
x1 x3
xj 2 {0, 1} j = 1, . . . , n
Example: Nonconvex Function
• Decide how much to buy from a set of different vendors (offering
quantity discounts) to satisfy a total need
n $0.5/unit
X
min fj (xj )
j=1
$1/unit
s.t. Ax b
0 xj Uj j = 1, . . . , n
⇢ 0
pj x j 0 xj Lj 100 150
fj (xj ) =
pj Lj + qj (xj Lj ) Lj xj U j
Example: Nonconvex Function
• Decide how much to buy from a set of different vendors (offering
quantity discounts) to satisfy a total need
n
X $0.5/unit
min [pj uj + pj Lj yj + qj (vj Lj )]
j=1
s.t. Ax b $1/unit
0 xj Uj j = 1, . . . , n
xj = uj + vj j = 1, . . . , n
0 uj Lj (1 yj ) j = 1, . . . , n
Lj yj vj Uj yj j = 1, . . . , n 0 100 150
yj 2 {0, 1} j = 1, . . . , n
Summary
• Discrete variables arise from the
need to model indivisible
decisions, yes/no choice, logical
relations, nonconvex
functions/sets
• Optimization models with binary
variables are very important class
of discrete optimization problems
Deterministic
Optimization
Discrete Optimization:
Introduction
Shabbir Ahmed
Anderson-Interface Chair and Professor
School of Industrial and Systems Engineering
Learning Objectives
• Recognize difficulties of solving
discrete optimization problems
Nonconvexity
• Discrete optimization involves optimization over a nonconvex set of
feasible solutions
Local vs Global Optima
• Local optimal solutions may be very far from a global optimal solution
• Example:
min x + y
s.t. 100x + y 99
x, y 2 Z+
5 0.0012
10 0.0049
15 0.1943
20 7.4745
25 311.9747
Computational Complexity
Discrete Optimization:
Challenges
Learning Objectives
• Discover computational complexity
Running time of Algorithms
• Given an instance I of a problem P and an algorithm A, we would
like to understand how much effort the algorithm requires to solve I
• Algorithm A:
5 0.0012
10 0.0049
15 0.1943
20 7.4745
25 311.9747
• We say that T(n) grows in “order” of f(n), i.e. T(n) = O(f(n)) if there
exists constants C and N such that
T(n) ≤ Cf(n) for all n ≥ N
More on Big-O
Example:
The function T (n) = 3n2 + 2n + 10 is O(n2 )
since T (n) 15n2 8 n 1
Source:
https://i.stack.imgur.com/ia6VB.png
Problem Class P and NP
• Problem class P: The set of all problems for which can be solved in
polynomial time (“easy” problems)
• Problem class NP: The set of all problems for which a given solution
can be “verified” or “checked” in polynomial time
NP
P NP-complete
Problems Not in NP
• For some problems it is not easy to check whether a given solution is
correct
• Example: Knapsack problem
n
X
max rj x j
j=1
Xn
s.t. c j xj B
j=1
xj 2 {0, 1} 8 j = 1, . . . , n
Source:
https://en.wikipedia.org/wiki/NP-
hardness#/media/File:P_np_np-
complete_np-hard.svg
Optimization Problems
• Linear programming and many important classes of convex
optimization problems (e.g. conic programming and semidefinite
programming) are known to be in P
Nonconvex functions
Modeling Nonconvex
Functions
Learning Objectives
• Figure out how to model nonconvex
functions using mixed integer linear
constraints
Problem Class
• Bounded variables n
X
• Separable objective function, min fj (xj )
i.e. sum of univariate functions
j=1
• Piecewise linear s.t. Ax b
• Nonconvex and nonlinear 0 xj Uj j = 1, . . . , n
• Continuous
Piecewise Linear Function
f (`0 )
f (`K 1)
cK 1
c0
c1
f (`1 )
`0 `1 `K 1 `K
Piecewise Linear Function
function value
at breakpoint slope
breakpoint
f (`0 )
f (`K 1)
cK 1
c0
c1
f (`1 )
`0 `1 `K 1 `K
Modeling Approach 1
Introduce new variables u0 , . . . , uK 1 and y0 , . . . , yK 1.
Introduce the following constraints:
K
X1
x= uk
k=0
`k yk uk `k+1 yk k = 0, . . . , K 1
K
X1
yk = 1
k=0
yk 2 {0, 1} k = 0, . . . , K 1
K
X1
Replace f (x) by [f (`k ) + ck (uk `k )]
k=0
A Wrong Approach
Introduce new variables y0 , . . . , yK 1 .
Introduce the following constraints:
`k yk x `k+1 yk k = 0, . . . , K 1
K
X1
yk = 1
k=0
yk 2 {0, 1} k = 0, . . . , K 1
K
X1
Replace f (x) by [f (`k ) + ck (x `k )] yk
k=0
⇢ 0
pj x j 0 xj Lj 100 150
fj (xj ) =
pj Lj + qj (xj Lj ) Lj xj U j
Example
• Decide how much to buy from a set of different vendors (offering
quantity discounts) to satisfy a total need
n
X $0.5/unit
min [pj uj + pj Lj yj + qj (vj Lj )]
j=1
s.t. Ax b $1/unit
0 xj Uj j = 1, . . . , n
xj = uj + vj j = 1, . . . , n
0 uj Lj (1 yj ) j = 1, . . . , n
Lj yj vj Uj yj j = 1, . . . , n 0 100 150
yj 2 {0, 1} j = 1, . . . , n
Modeling Approach 2
Introduce new variables 0 , . . . , K and y0 , . . . , yK 1
Introduce the following constraints:
K
X K
X K
X1
x= k `k , k = 1, yk = 1
k=0 k=0 k=0
yk 2 {0, 1}, k = 0, . . . , K 1, k 0, k = 0, . . . , K
0 y0 , k yk 1 + yk , k = 1, . . . , K 1, K yK 1
K
X
Replace f (x) by f (`k ) k
k=0
Example
• Decide how much to buy from a set of different vendors (offering
quantity discounts) to satisfy a total need
n
X
min [(0) j,1 + (pj Lj ) j,2 + (pj Lj + qj (Uj Lj )) j,3 ]
j=1
s.t. Ax b, 0 xj Uj j = 1, . . . , n
xj = (0) j,1 + (Lj ) j,2 + (Uj ) j,2 , j = 1, . . . , n
j,1 + j,2 + j,2 = 1, j = 1, . . . , n, 0
yj,1 + yj,2 = 1, y 2 {0, 1}
j,1 yj,1 , j,2 yj,1 + yj,2 , j,3 yj,2 , j = 1, . . . , n
Summary
• We learned two ways to model
piece-wise linear nonconvex
functions by introducing new
continuous and binary variables
• It is very important to make sure
the resulting formulations are
linear
Deterministic
Optimization
Discrete Optimization:
Modeling w/ binary
variables
Shabbir Ahmed
Anderson-Interface Chair and Professor
School of Industrial and Systems Engineering
Nonconvex Sets
Modeling Nonconvex
Sets
Learning Objectives
• Observe how to model some
nonconvex sets using mixed integer
linear constraints
Discrete Variables
• A discrete variable has a domain of the form
x 2 {a1 , a2 , . . . , aK }
a1 x aK , x 2 Z
where `1 u1 `2 u2 · · · `K uK .
✓ ◆ ✓ ◆
x1 + x2 2 1 x1 3
[
x1 0, x2 0 0 x2 2
Example 1
✓ ◆ ✓ ◆
x1 + x2 2 x1 1, x1 3
[
x1 0, x2 0 x2 0, x2 2
Example 1
✓ ◆ ✓ ◆
x1 + x2 2 x1 1, x1 3
[
x1 0, x2 0 x2 0, x2 2
Logical Relations
Modeling Logical
Relations
Learning Objectives
• Observe some examples of
modeling logical relations using
mixed integer linear constraints
An investment example
• We would like to invest in 5 assets, labelled {1, 2, 3, 4, 5}
• We can only invest nonnegative amounts, and cannot invest more than a
total of $1000 dollars (budget)
• Let xj denote the amount invested in asset j, then the constraints on our
decisions are
5
X
0 xj , 8 j = 1, . . . , 5, xj 10000
j=1
Modeling Logical Relations using
Binary variables
• We will model various logical constraints on our investment decisions
• We will make use of binary variables that indicate whether an investment
as been made of not
• Introduce binary variable yj which will take a value 1 if xj > 0
0 xj 1000yj , yj 2 {0, 1} 8 j = 1, . . . , 5,
“OR” constraint
x1 100y1 , x5 100y2 , y1 + y2 1
“XOR” Constraint
x1 100y1 , x5 100y2 , y1 + y2 = 1
Implication
• If we invest $100 or more in asset 1 then we must invest $100 or more in
asset 5
• Logically this constraint is: (x1 100) ) (x5 100)
• Introduce a new binary variable z that gets set to 1 if (x1 100)
y2 + y3 2 y1
y5 1 y1 , y5 1 y2
Summary
• We saw some examples on how
to model logical relations by
mixed integer linear programming
• It is very important to make sure
the resulting formulations are
linear
Deterministic
Optimization
Discrete Optimization:
Modeling w/ binary
variables
Shabbir Ahmed
Anderson-Interface Chair and Professor
School of Industrial and Systems Engineering
Learning Objectives
• Discover integer programming
formulations of set based models
• Observe a python example of
modeling and solving such a model
A Store Location Example
• Budget Stores is considering to locate superstores in 4 cities
• Its customer base is spread across 6 neighboring cities
• Customers from a city that is within driving distance from a store will
visit that store
• Budget does not want to locate two or more stores that are with driv-
ing distance of the same customer city (to avoid cannibalization of the
customer base)
• Budget wants to maximize the number of customers it can attract
Example: Data
City Location A Location B Location C Location D Customers
A 1 1 0 1 100
B 1 1 1 0 50
C 0 1 1 0 70
D 1 0 0 1 150
E 1 1 1 0 20
F 0 1 0 1 80
Cell (i, j) has an entry of 1 if city i is within driving distance of location j.
Example: Data
City Location A Location B Location C Location D Customers
A 1 1 0 1 100
B 1 1 1 0 50
C 0 1 1 0 70
D 1 0 0 1 150
E 1 1 1 0 20
F 0 1 0 1 80
Total 320 320 140 330
Model and Code
max 320xA + 320xB + 140xC + 330xD
s.t. xA + xB + xD 1
xA + xB + xC 1
xB + xC 1
xA + xD 1
xA + xB + xC 1
xB + xD 1
xA , xB , xC , xD 2 {0, 1}
Model and Code
max 320xA + 320xB + 140xC + 330xD
s.t. xA + xB + xD 1
xA + xB + xC 1
xB + xC 1
xA + xD 1
xA + xB + xC 1
xB + xD 1
xA , xB , xC , xD 2 {0, 1}
Model and Code
max 320xA + 320xB + 140xC + 330xD
s.t. xA + xB + xD 1
xA + xB + xC 1
xB + xC 1
xA + xD 1
xA + xB + xC 1
xB + xD 1
xA , xB , xC , xD 2 {0, 1}
Set Packing: General Formulation
Given m elements and a collection of subsets S1 , . . . , Sn ✓ {1, . . . , m} with
associated nonnegative weights w1 , . . . , wn , pick sets from this collection such
that they are disjoint and the sum of the weights is maximized.
n
X
max w j xj
j=1
X
s.t. xj 1 8 i = 1, . . . , m
j: i2Sj
xj 2 {0, 1} 8 j = 1, . . . , n.
Set Covering: General Formulation
Given m elements and a collection of subsets S1 , . . . , Sn ✓ {1, . . . , m} with
associated nonnegative weights w1 , . . . , wn , pick sets from this collection such
that they cover each item and the sum of the weights is minimized.
n
X
min w j xj
j=1
X
s.t. xj 1 8 i = 1, . . . , m
j: i2Sj
xj 2 {0, 1} 8 j = 1, . . . , n.
Set Partitioning: General
Formulation
Given m elements and a collection of subsets S1 , . . . , Sn ✓ {1, . . . , m} with asso-
ciated nonnegative weights w1 , . . . , wn , pick sets from this collection such that
they cover exactly one item and the sum of the weights is maximized/minimized.
n
X
max / min w j xj
j=1
X
s.t. xj = 1 8 i = 1, . . . , m
j: i2Sj
xj 2 {0, 1} 8 j = 1, . . . , n.
Summary
• Set packing/covering/partitioning
models arise in many applications
where decisions involve choosing
subsets of a given set of items
• We also observed an example of
using PuLP and glpk to solve an
integer programming formulation
of such a problem
Deterministic
Optimization
Discrete Optimization:
Modeling w/ binary
variables
Shabbir Ahmed
Anderson-Interface Chair and Professor
School of Industrial and Systems Engineering
Network Problems
Network Problems
Learning Objectives
• Discover minimum cost network flow
problems
• Observe an example using PuLP
Example
300 1200
• A company has two manufacturing
plants and 3 distribution centers (nodes) ($12, 1000) ($15, 300)
1 2 3 800
• The plants and DCs are connected by
($10, 200)
transportation channels (arcs)
($5, 100)
• The production amount and demand at
each node is shown
• The capacity and cost per unit for each
4 5
channel (arc) is shown ($15, 1000)
• Find the cheapest way to move units
from plants to DCs 500 200
Model
300 1200
min 12x12 + 10x14 + 15x23 + 8x24
+5x25 + 15x45 + 12x53 ($12, 1000) ($15, 300)
s.t. x12 + x14 = 300 1 2 3 800
x23 + x24 + x25 x12 = 1200
($10, 200)
($5, 100)
x23 x53 = 800
x45 x14 x24 = 500
x53 x25 x45 = 200
0 x12 1000, 0 x14 200,
0 x23 300, 0 x24 5000 4 5
0 x25 100, 0 x45 1000 ($15, 1000)
0 x53 1000
500 200
PuLP Code
300 1200
($10, 200)
($5, 100)
4 5
($15, 1000)
500 200
Solution
300 1200
($10, 200)
200
($5, 100)
100
4 600 5
($15, 1000)
500 200
Minimum Cost Network Flow
Problem
• We are given a directed network G = (N, A) with a set of nodes N and a
set of arcs A.
• Each node i 2 N has an associated “supply” bi . If bi > 0 the node is
a supply node, if bi < 0 Pit is a demand node. We will assume that the
network is balanced, i.e. i2N bi = 0.
• Each arc (i, j) 2 A has an associated cost cij and capacity uij .
• A flow on this network is a set of values on the arcs that obey capacities
and satisfy flow conservation at the nodes.
• The goal is to find a flow of minimum cost.
Minimum Cost Network Flow
Problem
X
min cij xij
(ij)2A
X X
s.t. xij xji = bi 8i2N
(ij)2A (ji)2A
8
X X < +1 i=s
s.t. xij xji = 0 i 2 N \ {s, t}
:
(ij)2A (ji)2A 1 i=t
8
X X < +1 i=s
s.t. xij xji = 0 i 2 N \ {s, t}
:
(ij)2A (ji)2A 1 i=t
…
…
• Introduce a “slack” node with demand of p q
q 1
• There is a arc from worker node i to task node j 1 p
with capacity of 1 and cost of cij
• There is a arc from each worker node to the slack 0 p-q
node with capacity of 1 and cost of 0
Summary
• Network problems are an easy
class of integer programs
• Some important classes of
integer programs can be
converted to network problems
Deterministic
Optimization
Discrete Optimization:
Modeling w/ binary
variables
Shabbir Ahmed
Anderson-Interface Chair and Professor
School of Industrial and Systems Engineering
Modeling Exercises 1
Modeling Exercises 1
Learning Objectives
• Observe modeling a facility location
problem
• Observe modeling a generation
scheduling problem
A Facility Location Problem
• We need to pick sites to locate distribution centers (DC) from a set of n
potential sites
• Let fj and vj denote the fixed and variable (per-unit capacity) cost of
locating at site j, respectively
• The DCs will serve m retail locations and the demand of retail i is di
• The per-unit-cost of transporting from DC location j to retail location i
is cij
• Decide where to locate the DCs, how much capacity to install, and how
to match DC capacity to retail demand at minimum total cost
A Facility Location Problem
Variables:
yj : Binary variable indicating whether location j is chosen
xj : Continuous variable indicating the capacity of DC located at j
zij : Units shipped from DC j to retail location i
n
X m X
X n
min (fj yj + vj xj ) + cij zij
j=1 i=1 j=1
n
X
s.t. zij = di 8 i = 1, . . . , m
j=1
Xm
zij xj 8 j = 1, . . . , n
i=1 Pm
0 xj ( i=1 di )yj 8 j = 1, . . . , n
0 zij di yj 8 i = 1, . . . , m, j = 1, . . . , n
yj 2 {0, 1} 8 j = 1, . . . , n
A Generator Scheduling Problem
Schedule generator
operation to meet
load over a time Dt
horizon
t=1 t=T
A Generator Scheduling Problem
Generation schedule
must satisfy some
operational
constraints
A Generator Scheduling Problem
Min/Max Production
Limits: If generator is
on it must produce
Pmax
within given min/max
limits
Pmin
A Generator Scheduling Problem
Tdown Tup
A Generator Scheduling Problem
Total cost =
generation cost + cost
of unmet load (spot
price)
y⌧ yt yt 1 8 ⌧ = t + 1, . . . , min{t + Tup , T }, 8 t = 1, . . . , T 1
t=1: y2 y1 , y3 y1
t=2: y3 y2 y1 , y4 y2 y1
t=3: y4 y3 y2 , y5 y3 y2
t=4: y5 y4 y3 , y6 y4 y3
t=5: y6 y5 y4
Min Down Constraints
y⌧ yt yt 1 + 1 8 ⌧ = t + 1, . . . , min{t + Tdown , T }, 8 t = 1, . . . , T 1
t=1: y2 y1 + 1, y3 y1 + 1
t=2: y3 y2 y1 + 1, y4 y2 y1 + 1
t=3: y4 y3 y2 + 1, y5 y3 y2 + 1
t=4: y5 y4 y3 + 1, y6 y4 y3 + 1
t=5: y6 y5 y 4 + 1
Summary
• We observed some examples of
modeling with integer variables
Deterministic
Optimization
Discrete Optimization:
Modeling w/ binary
variables
Shabbir Ahmed
Anderson-Interface Chair and Professor
School of Industrial and Systems Engineering
Modeling Exercises 2
Modeling Exercises 2
Learning Objectives
• Observe modeling the traveling
salesman problem (TSP)
• Solve a TSP example with PuLP and
Python
Traveling Salesman Problem (TSP)
n X
X n
min cij xij
i=1 j=1
Xn
s.t. xij = 1 8 i = 1, . . . , n
j=1
Xn
xji = 1 8 i = 1, . . . , n
j=1 X
X
xij |S| 1 8 S ⇢ {1, . . . , n}, |S| 2
i2S j2S
Formulation: Subtour Elimination
i ji i
i
i
i
i
i
S = {i, j}
xij + xji 1
Formulation: Subtour Elimination
i ji i
i
ki
i
i
i
S = {i, j, k}
xij + xik + xji + xjk + xki + xkj 2
Formulation: Subtour Elimination
• There are many (exponential in n) subtour elimination constraints
• Solve without any subtour elimination constraints
• Inspect the solution to check if there are subtours
• Add the subtour elimination constraint corresponding to the found
subtour
• Repeat
PuLP Code
PuLP Code
PuLP Code
PuLP Code
PuLP Code Output
Summary
• We studied a formulation of the
TSP and solved it using PuLP
• There are alternative formulations
Deterministic
Optimization
Discrete Optimization:
Modeling w/ binary
variables
Shabbir Ahmed
Anderson-Interface Chair and Professor
School of Industrial and Systems Engineering
Modeling Exercises 3
Modeling Exercises 3
Learning Objectives
• Observe modeling a mixed integer
nonlinear programming problems
Portfolio Optimization
• We are given a set of n stocks
• The expected return (in $/share) of stock j is estimated from historical
data and is given by rj
• The covariance between the return of asset i and j is ij
n X
X n
min ij xi xj
i=1 j=1
Xn
s.t. rj x j R
j=1
l j y j x j u j yj 8 j = 1, . . . , n
X n
yj k
j=1
xj 2 Z+ , yj 2 {0, 1} 8 j = 1, . . . , n
Remarks
Learning Objectives
• Examine the information provided by
the LP relaxation of an integer
program
LP Relaxation
vLP = min x 1 + y1
s.t. 3x + 2y 6
x + 4y 4
0 x 3, 0 y 3
LP Relaxation Properties
• If the LP relaxation is infeasible then so is the IP.
• (As long as all data is rational) If the LP relaxation is unbounded then
the IP can be either infeasible or unbounded.
• If the LP relaxation has an optimal solution, then the IP could be infeasible
or have an optimal solution.
• It always holds that vLP vIP (for minimization problems)
• If an optimal solution to the LP relaxation is integral, then it is an optimal
solution to the IP.
Optimality Gap
• The optimal value of the LP relaxation allows us to estimate the optimal
gap of a given feasible solution to the IP.
• Example: Consider the solution (2, 1) which is feasible and has an objec-
tive value of 3. The LP relaxation has an objective value of 2.2. Thus
2.2 vIP 3. The optimality gap of the solution (2, 1) is at most
(3 2.2) = 0.8.
Ideal Formulations
Ideal Formulation
Learning Objectives
• Identify strong and ideal formulations
of a mixed integer linear program
Formulations of a MILP
• The feasible region of a mixed integer linear program (MILP) is a set of
the form
X = {x : x 2 P \ (Rn p ⇥ Zp )}
where P is a polyhedral set.
• The same MILP can be formulated in di↵erent ways, e.g.
X = {x : x 2 Q \ (Rn p
⇥ Zp )}
• If we had the convex hull or ideal formulation then we can solve an MILP
by just solving an LP
• Getting the ideal formulation is as hard as (if not harder) to solve the
MILP
• We try to get strong formulation that are closer to the ideal formulation
so that the LP relaxation gives a good approximation of the MILP
Summary
• An ideal formulation of a MILP is
one whose LP relaxation solves
the MILP
• Ideal formulations are hard to
obtain so we strive to obtain
strong formulation that
approximate the ideal formulation
Deterministic
Optimization
Discrete Optimization:
Branch-and-Bound
Shabbir Ahmed
Anderson-Interface Chair and Professor
School of Industrial and Systems Engineering
Learning Objectives
• Inspect the branch-and-bound
algorithm for solving integer
programs
LP Relaxation
• We would like to solve the integer program:
LP0 LP1
• If any of the LPs return an integer solution then we have feasible solution
to the IP. If the objective value of this solution is better (smaller) then
any we have found so far, then we keep it as an “incumbent” solution and
maintain the objective as the best upper bound U B, i.e. v IP U .
• If an LP is infeasible, then we need not explore it any further.
• An LP that has not been fathomed need to be branched creating two new
LPs
• This process is arranged into a (inverted) tree where each LP is called a
node, and the initial LP relaxation is the “root” node.
Lower Bound
• At any point in time this tree has some nodes (LPs) that are pruned and
has some nodes that need to further explored.
• At any point in the recursive process, the minimum of the objective values
of the LPs that still need to be explored provide a lower bound LB.
• We can stop the search if the LB and U B are close together and return
the incumbent solution as a feasible solution with an optimality gap of at
most U B LB.
Branch and Bound
Shabbir Ahmed
Anderson-Interface Chair and Professor
School of Industrial and Systems Engineering
An Example
Example of the
Branch-and-Bound
Algorithm
Learning Objectives
• Observe an example of the branch-
and-bound algorithm
Example
We would like to solve:
v IP = min 3x1 + 2x2 + x3
s.t. 3x1 + 4x2 + 5x3 6
x1 , x2 , x3 0 and integer
The LP relaxation:
v LP = min 3x1 + 2x2 + x3
s.t. 3x1 + 4x2 + 5x3 6
x 1 , x2 , x3 0
Branch-and-Bound LB = 1.2 v IP U B = +1
x3 1 x3 2
x2 0
x3 1 x3 2
x2 0 x2 1