Intro To Mathematical Programming MIT
Intro To Mathematical Programming MIT
Formula,tionn: Lcc. I
Duality
Thcory: Lc,:. 9-11
Sensitivity
.-inalysin: Lei:. 12
.
Scmii:lcfinitc opt,imizatii:,n: Lcc. 22
~ b..
il ~ c~t cOpt,imizatii:,n:
, Lcc. 24-2;
2 Requirements
Homcmorkn:
30%)
Mii:ltcrm Exam:
30%)
Iml:,ortant tic
brakcr: cont,ribut,ionst,o ,class
Lnc of
CPLEX fi:n si:,lving ol:,timiza,tion problems
3 Lecture Outline
History
of Optimizatio~l
Whcrc
LOPS Arisc?
Examplcs of
Fi:,rmulatii:,ns
4 History of Opti~rlization
Fermat, 1638: Newton, 1670
Euler, 1755
Lagrange, 1707
5 Nonlinear Optirrlizatiovl
5.1 The general problem
~ninimizc c'z
sul,jcct ti:, Az2h
z20
7 History of LO
1950s Applicat,ions.
. .si supply
ti,?
of i t h plant, i = 1. . . m
i:lcrnnn,S of j t h >iarchousc, j = I . . . 11
10 Sorting through LO
11 Invest ~ r ~ e vurlder
~ t taxation
.. You have purchnsci:l
Cl~rrrcntprice of stock i is pi
.5i sharcs i:,f stock i at pricc yi. i = 1, . . . . 11
You cxpcct that the l:,ricc i:,f stock i i:,nc scar fii:,m now will bc ri
You ]:,a- a cal:,ital-gains t,ax a t thc rat? of 30% ,311 any capital gains at t,hc
t,imc i:,f the sale.
You pay
1%)
in transaction costs
Example: You sell 1.000 shares a t $50 per sharc; you ha,~:cbought them
a t $30 per sharc: Vet cash is:
B is availablc in 1994.
S1.OOO.OOO in 1993.
13 Manufacturing
13.1 Data
11 l:,roilucts, m raw nlatcrials
13.2 Formulat,ion
13.2.1 Decision variables
rj = amount
i:,f pri:,,Suct j pri:,iSucc,S.
n
max
C qis,i
j=l
14 Capacity Exparlsiovi
14.1 Data and C;olistraiilt,s
Dt: fc,rccast,ccl clcmani:l fi:n electricit,:: a t ::car t
Et: cxisti~lgcal:,acity (in oil) nvailablc nt t
c,: ci:,st ti:, l:,roclucc 11\I\\' using coal capncity
15 Scheduling
15.1 Decision variables
Hospital ~ i a n t ,ti:,
s mnkc >icckl:: night,shift fi:,r its llurscs
16 Revenue Managerrlerlt
16.1 The indust,ry
Deregulation in 1978
17 Revenue Managerrlerlt
. 11
I hub
origins. 11 ilcstinatii:,ns
.
2 irlasscs (for simplicity), (2-class. Ti-class
R c ~ c n u c sT,! ZJ 1.j.;.
i = I .. . . T I ; C,0.i. .I. = I , . . . I L
.
Ca1:)acitics:
18.2 LO Forillulatioil
..
18.2.1
Q,,:
Decision Variables
# o f Q-class cu~tomersme accept from i t o j
1;,: # of Y-class cu~tomers accept from i t o j
19 Revenue
Managerrlerlt
F\'c c s t i m a t , ~t,hat RVI hns gcncrat,cil $1.4 billion in in,rrcmcntal rcvcnuc fi,r
Anlcri,ran Airlines in the last three ycnrs ali:,nc. This is not a i:,nc-time benefit.
F\'c c x p r t RM t o gcncrat,c at lcnst $500 millii:,n nnnually for the fi:,rcsccnl:,lc
future. .-is me continue t o invest in the cnhanccmcnt of DIV.-i?rlO me cxl:,cct t,o
cnpt,urc nn even lnrgcr rcvcnuc premium.
20 Messages
20.1 How t,o formulate?
1. Define your ilccision variables clearly.
2.
ITrritc ci:,nstraints ani:l ol:,jcctivc funct,ion.
22 Convex furlctiorls
. f :.S+R
For all sl.s 2E ,Y
f(As1 + ( l h ) s ? )5 Xf(sl)+(lPA)f(s2)
. ,f (z) ci:,ncavc if f (z)ci:,nvcx.
-
23 0 x 1 the power of LO
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
15.081J/6.251J Introduction to Mathematical
Programming
Lecture 2: Geometry of Linear Optimization I
1 Outline: Slide 1
1. What is the central problem?
2. Standard Form.
3. Preliminary Geometric Insights.
4. Geometric Concepts (Polyhedra, \Corners").
5. Equivalence of algebraic and geometric concepts.
subject to ai x =
0
bi i 2 M1
ai x
0
bi i 2 M2
ai x
0
bi i 2 M3
xj0 j 2 N1
>
x j <0 j 2 N2
subject to Ax = b
x0
Characteristics
Minimization problem
Equality constraints
Non-negative variables
ai x
0
bi ai x + si = bi si 0
0
,
ai x
0
bi ai x ; i =
0
s i
b i0
s
>
xj < 0 x j = xj ; xj+ ;
j 0 xj 0
+ ;
x
x1+2 2 1 x
>
x1 <0 2 0 x
+
;minimize ;x+1 + x1 + x2 ;
subject to x+1 ; x1 + x2 + s1 ;
=1
x1 ; x1 + 2x2 ; s2 = 1
+ ;
x1 x1 x2 s1 s2 0
+ ;
3 Preliminary Insights
Slide 6
minimize ; 1 ; 2 x x
subject to 1 + 2 2 3x x
2 1+ 23
x x
1 20 x x
x2
- x1 - x2 = - 2
1.5
- x1 - x2 = z
(1,1)
- x1 - x2 = 0
1.5 3 x1
c x1 + 2x2 < 3
2x1 + x2 < 3
Slide 7
;x1 + x2 1
x1 0
x2 0
Slide 8
There exists a unique optimal solution.
There exist multiple optimal solutions in this case, the set of optimal
solutions can be either bounded or unbounded.
2
x2
c = (1,0)
c = (- 1,- 1)
1
c = (0,1)
c = (1,1)
x1
4 Polyhedra
4.1 Denitions Slide 9
The set fx j a x = g is called a hyperplane.
0
b
= b3
a '2
a '3x
x=
b2
a3
a2
a' x < b a4
a' x > b a1
=b a 4' x = b4
=b
1
a' x a5
1x
a'
a
a5' x = b
5
(a) (b)
3
5 Corners
5.1 Extreme Points Slide 10
Polyhedron P = fx j Ax bg
x 2 P is an extreme point of P
if 6 9 y z 2 P (y =
6 x z 6= x):
. . u
.
v
w
. . z
. y
x
minimize cy
0
subject to y2 P
4
'w }
.
w
=c
c 'y
{y | P
c
.
x
'x }
{y | c
'y = c
x3
A.
E . P . C
x2
D . .
B
x1
Then 3 hyperplanes are tight, but constraints are not linearly independent.
Slide 14
Intuition: a point at which inequalities are tight and corresponding equations
n
I = fi j ai x = bi g
0
is <n .
5.3.1 Degeneracy
Slide 15
If jI j = n, then ai i 2 I are linearly independent x nondegenerate.
5
If jI j > n, then there exist n linearly independent fai i 2 I g x degener-
ate.
C
P
B
E
(a) (b)
5.3.2 Example
Slide 16
min x1 + 52 x ;2x3
st : : x 1+ 2+ x x3 4
x1 2
x3 3
3 2+
x x3 6
x1 x2 x3 0
Slide 17
6 Equivalence of denitions
Slide 18
Theorem: = fx j Ax bg. Let x 2 .
P P
x = y + (1 ; )z . But c x c y c x c z
0
<
0
0
<
0
) c x = c y + (1 ; )c z c x contradiction
0
0
0
<
0
Slide 20
2. Extreme point ) BFS
Suppose x is not a BFS.
6
Let = f : ai x = ig. But ai do not
I i
0
b
Let
x1 = x + z
x2 = x ; z )
aix1 = i 0
b
aix2 = i 2 0
b
i I
Slide 21
i 62 I : aix < bi ) ai (x + z ) < bi
0 0
ai (x ; z)
0
< b i
for small enough.
) x1 x2 2 : yet x = x1 +2 x2 )
P
x BFS �
= f : ai x = i g
0 �
I i b
Let i = 10 262
i I
d
i I:
c = ;d A 0 0
Then c x = ;d Ax = ;
Pm P P .
iai x = ; ai x = ; Slide 23
� � � �
0
i 0
d
0 0
b
i�1 i I i I
But 8x 2 P : ai x i )
2 2
0
b
x optimum
c x = ; P aix ; P i = c x
�
0
min cx
0
b
0 � 0
i2I i2I x2 P:
Why unique?
7
Equality holds if ai x = i 2 since ai spans <n
0
b i I aix = i has a unique
0
b
solution x = x .
�
MIT OpenCourseWare
http://ocw.mit.edu
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
15.081J/6.251J Introduction to Mathematical
Programming
Lecture 3: Geometry of Linear Optimization II
1 Outline Slide 1
BFS for standard form polyhedra
Deeper understanding of degeneracy
Existence of extreme points
Optimality of Extreme Points
Representation of Polyhedra
Ax = b ! BxB + NxN = b
xN = 0 xB = B; b 1
1
Solution: x = (0 0 0 8 12 4 6), a BFS
A1
A2
A4 = - A1
2.4 Example 2
Slide 6
General form
Slide 7
x1 + x2 + x3 4
x1 2
x3 3
3x2 + x3 6
x1 x2 x3 0
2
Standard form
x1 + x2 + x3 + s1 = 4
x1 + s2 = 2
x3 + s3 = 3
3x2 + x3 + s4 = 6
x1 x2 x3 s1 : : : s4 0
Slide 8
Using the denition for BFS in polyhedra in general form :
x1 + x2 + x3 = 4 =
x2 =0
1 1 0
Slide 9
Pick the basic variables: x1 x3 s2 s3 : xB = (x1 x3 s2 s3)
Partition A:
2 x1 x2 x3 s1 s2 s3 s4 3
1 1 1 1 0 0 0
A = 664 1 0 0 0 1 0 0 77 = B N ]
0 3 1 0 0 1 0
0 0 1 0 0 0 1
21 1 0 03 21 1 0
3
Slide 11
6 7 6 0 77 B non-singular
B = 64 10 01 10 01 57 N = 64 03 0
05
0 1 0 0
0 x 1 0 1 10 0 1
1 3
2
s3 3
8 0 1 1 0 1 1 0 0 1 9
< 1 0 0 =
B=
: @ 0
A @ 0
A @ 1
A
0 3 0
A1
A 2 A 6
Slide 15
Columns in B are linearly independent.
Rank (A) = 4
jBj = 3 < 4
Can we augment B?
Choices:
{ B0 = B fA3 g basic variables x1 x2 x3 x6
{ B0 = B fA7 g basic variables x1 x2 x6 x7
n o
4
n = 3, m = 2 and n ; m = 1. (1 1 0) is nondegenerate, while (0,0,1) is
degenerate.
n
Consider the representation P = (x1 x2 x3) x1 ;x2 = 0 x1 +x2 +2x3 =
o
2 x1 0 x3 0 : (0,0,1) is now nondegenerate.
4 Existence of
extreme points
Slide 18
P Q
Note that P = f(x1 x2) : 0 x1 1g does not have an extreme point, while
P 0 = f(x1 x2) : x1 x2 x1 0 x2 0g has one. Why?
4.1 Denition Slide 19
A polyhedron P <n contains a line if there exists a vector x 2 P and a
nonzero vector d 2 <n such that x + d 2 P for all scalars .
4.2 Theorem Slide 20
Suppose that the polyhedron P = fx 2 <n j ai 0 x bi i = 1 : : : mg is
nonempty. Then, the following are equivalent:
(a) The polyhedron P has at least one extreme point.
independent.
5
4.3 Corollary Slide 21
Polyhedra in standard form contain an extreme point.
Bounded polyhedra contain an extreme point.
4.4 Proof Slide 22
Let P = fx j Ax = b x 0g 6=
rank(A) = m. If there exists a feasible
solution in P, then there is an extreme point.
Proof
0 otherwise.
Slide 23
Clearly A x() = b
n o
Let: 1 = max
d >0j
; xdjj (if all dj 0)
n x o 1 = ;1)
2 = dmin
>0 ; d
j
j
j
(if all dj 0)
2 = +1
For1 2 (suciently small)
x() 0
Slide 24
Since at least one (d1 : : : dt) 6= 0 ) at least one from 1 2 is nite, say 1 .
But then x(1 ) 0 and number of nonzeros decreased.
xj + dj 0 ) xj ;dj
4.5 Example 3 Slide 25
P = fx j x1 + x2 + x3 =2
x1 +x4 = 1 x1 : : : x4 0g
x = ; 12 21 1 21
6
1 1 1 0
B= 1 0 0 1
1 1 1 0 0
1 1 ;
0 +0
0 ;
1 = 0
Slide 26
1
Consider: x() = 2 + 12 ; 1 12 ; for ; 12 12 :
x() 2 P.
5 Optimality of
Extreme Points
Q = fx j c x = v Ax bg 0
Q P and P contains no lines, Q does not contain any lines, hence is has
an extreme point x� .
Slide 29
v = c x� = c y + (1 ; )c w
0 0 0
cyv )
c w v ) c y = c w = v ) y w 2 Q
0 0
0
7
6 Representation
of Polyhedra
.
y
z. P
.
u
Q a 'i*x = bi*
8
MIT OpenCourseWare
http://ocw.mit.edu
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
15.081J/6.251J Introduction to Mathematical
Programming
2 Projections of polyhedra
Slide 2
• πk : ℜn �→ ℜk projects x onto its first k coordinates:
• � �
Πk (S) = πk (x) | x ∈ S ;
Equivalently
� �
Πk (S) = (x1 , . . . , xk ) � there exist xk+1 , . . . , xn
�
s.t. (x1 , . . . , xn ) ∈ S .
x3
x2
P 2( S )
P 1( S )
x1
x1 + x2 ≥ 1
1
x1 + x2 + 2x3 ≥ 2
2x1 + 3x3 ≥ 3
x1 − 4x3 ≥ 4
−2x1 + x2 − x3 ≥ 5.
0 ≥ 1 − x1 − x2
x3 ≥ 1 − (x1 /2) − (x2 /2)
x3 ≥ 1 − (2x1 /3)
−1 + (x1 /4) ≥ x3
−5 − 2x1 + x2 ≥ x3 .
0 ≥ 1 − x1 − x2
−1 + x1 /4 ≥ 1 − (x1 /2) − (x2 /2)
−1 + x1 /4 ≥ 1 − (2x1 /3)
−5 − 2x1 + x2 ≥ 1 − (x1 /2) − (x2 /2)
−5 − 2x1 + x2 ≥ 1 − (2x1 /3).
if ain =
� 0, divide both sides by ain . By letting x = (x1 , . . . , xn−1 ) that P
is represented by:
xn ≥ di + f ′i x, if ain > 0,
dj + f ′j x ≥ xn , if ajn < 0,
0 ≥ dk + f ′k x, if akn = 0.
Theorem:
projection Πn−1 (P ) of P .
2
2.3 Implications
Slide 5
• Let P ⊂ ℜn+k be a polyhedron. Then, the set
x ∈ ℜn � there exists y ∈ ℜk such that (x, y) ∈ P
� � �
is also a polyhedron.
3 Optimality Conditions
3.1 Feasible directions
Slide 7
• We are at x ∈ P and we contemplate moving away from x, in the direction
of a vector d ∈ ℜn .
Slide 8
3
Slide 9
• x be a BFS to the standard form problem corresponding to a basis B.
• xi = 0, i ∈ N , xB = B −1 B.
• We consider moving away from x, to a new vector x + θd, by selecting a
−B −1 Aj .
• Nonnegativity constraints?
small.
• Effects in cost?
cj of the variable xj .
3.2 Theorem
Slide 10
• x BFS associated with basis B
• c reduced costs
Then
• If c ≥ 0 ⇒ x optimal
• x optimal and non-degenerate ⇒ c ≥ 0
3.3 Proof
• y arbitrary feasible solution
• d = y − x ⇒ Ax = Ay = b ⇒ Ad = 0
� Slide 11
⇒ BdB + Ai di = 0
i∈N
� −1
⇒ dB = − B Ai di
i∈N �
⇒ c′ d = c′B dB + ci di
i∈N
Slide 12
(ci − cB B −1 Ai )di =
� ′
�
= ci di
i∈N i∈N
4
• Since yi ≥ 0 and xi = 0, i ∈ N , then di = yi − xi ≥ 0, i ∈ N
• c′ d = c′ (y − x) ≥ 0 ⇒ c′ y ≥ c′ x
⇒ x optimal
5
MIT OpenCourseWare
http://ocw.mit.edu
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
15.081J/6.251J Introduction to Mathematical
Programming
2 Matrix View
Slide 2
min c′ x
s.t. Ax = b
x≥0
A = [B, N ]
Ax = b ⇒ B · xB + N · xN = b
⇒ xB + B −1 N xN = B −1 b
⇒ xB = B −1 b − B −1 N xN
Then
• If c ≥ 0 ⇒ x optimal
• x optimal and non-degenerate ⇒ c ≥ 0
1
3 Improving the Cost
Slide 5
• Suppose cj = cj − c′B B −1 Aj < 0
• Let dB = −B −1 Aj
dj = 1, di = 0, i =
� B(1), . . . , B(m), j.
4 Unboundness
Slide 7
• Is y = x + θ · d feasible?
Since Ad = 0 ⇒ Ay = Ax = b
• y ≥ 0 ?
If d ≥ 0 ⇒ x + θ · d ≥ 0 ∀ θ ≥ 0
⇒ objective unbounded.
5 Improvement
Slide 8
If di < 0, then
xi
xi + θdi ≥ 0 ⇒ θ ≤ −
di
� �
xi
⇒ θ∗ = min −
{i|di <0} di
xB(i)
� �
∗
⇒θ = min −
{i=1,...,m|dB(i) <0} dB(i)
5.1 Example
Slide 9
min x1 + 5x2 −2x3
s.t. x1 + x2 + x3 ≤4
x1 ≤2
x3 ≤3
3x2 + x3 ≤6
x1 , x2 , x3 ≥0
2
x3
(0,0,3) (1,0,3)
(2,0,2)
(0,1,3)
x1
(0,2,0) (2,2,0)
Slide 10
x2
x1
Slide 11
A1 A2 A3 A4 A5 A6 A7
x2
1 1 1 1 0 0 0 4
x3
1 0 0 0 1 0 0 2
x4 =
0 0 1 0 0 1 0 3
x5
0 3 1 0 0 0 1 6
x6
x7
B = [A1 , A3 , A6 , A7 ]
BFS: x = (2, 0, 2, 0,0, 1, 4)′ Slide 12
1 1 0 0 0 1 0 0
1 0 0 0 −1
1 −1 0 0
B= c′ = (0, 7, 0, 2, −3, 0, 0)
0 1 1 0 , B = −1
1 1 0
0 1 0 1 −1 1 0 1
d1 −1
d3 −1
1
d5 = 1, d2 = d4 = 0, d6 = −B A5
= −1
Slide 13
d7 −1
y ′ = x′ + θd′ = (2 − θ, 0, 2 + θ, 0, θ, 1 − θ, 4 − θ)
What happens as θ increases? � �
x
θ∗ = min{i=1,...,m|dB(i)<0 } − Bdi(i) =
� �
min − (−21) , − (−11) , − (−41) = 1.
l = 6 (A6 exits the basis).
New solution
y = (1, 0, 3, 0, 1, 0, 3)′ Slide 14
New basis B = (A1 , A3 , A5 , A7 ) Slide 15
3
x3
(0,0,3) (1,0,3)
(2,0,2)
(0,1,3)
x1
(0,2,0) (2,2,0)
1 1 0 0 1 0 −1 0
x21 0 1 0
, B −1 = 0 0 1 0
B =
0
1 0 0 −1 1 1 0
0 1 0 1 0 0 −1 1
−1
c ′ = c′ − c′B B A = (0, 4, 0, −1, 0, 3, 0)
Need to continue, column A4 enters the basis.
6 Correctness
Slide 16
xB(l) xB(i)
� �
− = min − = θ∗
dB(l) i=1,...,m,dB(i)<0 dB(i)
Theorem
and a BFS x.
2. Compute cj = cj − c′B B −1 Aj
• If cj ≥ 0; x optimal; stop.
• Else select j : cj < 0.
4
Slide 18
3. Compute u = −d = B −1 Aj .
• If u ≤ 0 ⇒ cost unbounded; stop
• Else
∗ xB(i) uB(l)
4. θ = min =
1≤i≤m,ui >0 ui ul
5. Form a new basis by replacing AB(l) with Aj .
6. yj = θ∗
yB(i) = xB(i) − θ∗ ui
Then
xB(i)
min ⇒
1≤i≤m,ui >0 ui
next BFS degenerate.
• Finite termination not guaranteed; cycling is possible.
Slide 21
- g
x
f g
h x
=0 5 =0
x4
=0
3
x
x6
=0
x
2 =0
. y
c
=0
x1
5
7.3 Pivot Selection
Slide 22
• Choices for the entering column:
(a) Choose a column Aj , with cj < 0, whose reduced cost is the most
negative.
(b) Choose a column with cj < 0 for which the corresponding cost de
smallest subscript rule: out of all variables eligible to exit the basis, choose
among all variables eligible to exit the basis, pick the one with the smallest
subscript.
6
MIT OpenCourseWare
http://ocw.mit.edu
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
15.081J/6.251J Introduction to Mathematical
Programming
2 Revised Simplex
Slide 2
Initial data: A, b, c
1. Start with basis B = [AB(1) , . . . , AB(m) ]
and B −1 .
2. Compute p′ = c′B B −1
cj = cj − p ′ A j
• If cj ≥ 0; x optimal; stop.
• Else select j : cj < 0.
Slide 3
−1
3. Compute u = B Aj .
• If u ≤ 0 ⇒ cost unbounded; stop
• Else
xB(i) uB(l)
4. θ∗ = min =
1≤i≤m,ui >0 ui ul
5. Form a new basis B by replacing AB(l) with Aj .
6. yj = θ∗ , yB(i) = xB(i) − θ∗ ui
Slide 4
7. Form [B −1 |u]
8. Add to each one of its rows a multiple of the lth row in order to make the
−1
The first m columns is B .
2.1 Example
Slide 5
min x1 + 5x2 −2x3
s.t. x1 + x2 + x3 ≤4
x1 ≤2
x3 ≤3
3x2 + x3 ≤6
x1 , x2 , x3 ≥0
Slide 6
1
B = {A1 , A3 , A6 , A7 }, BFS: x = (2, 0, 2, 0, 0, 1, 4)′
′
c = (0, 7, 0, 2, −3, 0,0)
1 1 0 0 0 1 0 0
1 0 0 0 −1
1 −1 0 0
B= 0 1 1 0 , B = −1
1 1 0
0 1 0 1 −1 1 0 1
(u1 , u3 , u6�, u7 )′ =�B −1 A5 = (1, −1, 1, 1)′
θ∗ = min 21 , 11 , 41 = 1, l = 6
l = 6 (A6 exits the basis). Slide 7
0 1 0 0 1
1 −1 0 0 −1
[B −1 |u] = −1
1 1 0 1
−1 1 0 1 1
1 0 −1 0
−1 0 0 1 0
⇒B = −1 1
1 0
0 0 −1 1
−c′B xB c1 ... cn
xB(1) | |
..
. B −1 A1 ... B −1 An
xB(m) | |
2
3.1 Example
Slide 10
min −10x1 − 12x2 − 12x3
s.t. x1 + 2x2 + 2x3 ≤ 20
2x1 + x2 + 2x3 ≤ 20
2x1 + 2x2 + x3 ≤ 20
x1 , x2 , x3 ≥ 0
min −10x1 − 12x2 − 12x3
s.t. x1 + 2x2 + 2x3 + x4 = 20
2x1 + x2 + 2x3 + x5 = 20
2x1 + 2x2 + x3 + x6 = 20
x1 , . . . , x6 ≥ 0
BFS: x = (0, 0, 0, 20, 20, 20)′
B=[A4 , A5 , A6 ] Slide 11
x1 x2 x3 x4 x5 x6
0 −10 −12 −12 0 0 0
x4 = 20 1 2 2 1 0 0
x5 = 20 2* 1 2 0 1 0
x6 = 20 2 2 1 0 0 1
x1 x2 x3 x4 x5 x6
100 0 −7 −2 0 5 0
x4 = 10 0 1.5 1* 1 −0.5 0
x1 = 10 1 0.5 1 0 0.5 0
x6 = 0 0 1 −1 0 −1 1
Slide 13
x1 x2 x3 x4 x5 x6
120 0 −4 0 2 4 0
x3 = 10 0 1.5 1 1 −0.5 0
x1 = 0 1 −1 0 −1 1 0
x6 = 10 0 2.5* 0 1 −1.5 1
Slide 14
3
x1 x2 x3 x4 x5 x6
136 0 0 0 3.6 1.6 1.6
x3 = 4 0 0 1 0.4 0.4 −0.6
x1 = 4 1 0 0 −0.6 0.4 0.4
x2 = 4 0 1 0 0.4 −0.6 0.4
Slide 15
x3
.B = (0,0,10)
A = (0,0,0) .
E = (4,4,4) .
. .C = (0,10,0)
D = (10,0,0)
x1 x2
4 Comparison of implementations
Slide 16
Full tableau Revised simplex
5 Anticycling
5.1 Degeneracy in Practice
Slide 17
Does degeneracy really happen in practice?
�n
xij = 1
j=1
�n
xij = 1
i=1
xij ≥ 0
4
n! vertices:
For each vertex ∃ 2n−1 nn−2 different bases (n = 8) for each vertex ∃ 33, 554, 432
bases.
5.2 Perturbations
Slide 18
(P ) min c′ x (Pǫ ) min c′ x
ǫ
ǫ2
s.t. Ax = b s.t. Ax = b + ..
.
ǫm
x ≥ 0 x ≥ 0.
5.2.1 Theorem
Slide 19
∃ ǫ1 > 0: for all 0 < ǫ < ǫ1
ǫ
Ax = b + ...
ǫm
x≥0
is non-degenerate.
5.2.2 Proof
Slide 20
Let B 1 , . . . , B r be all the bases.
r
b1 + B r11 ǫ + · · · + B r1m
ǫm
ǫ
. ..
B −1
r b + .. =
.
r
ǫm bm + B rm1 ǫ + · · · + B rmm ǫm
where: r
B r11 B r 1m
··· b1
B −1 = ... .. −1
, Br b =
..
r . .
r
B rm1 · · · B r mm bm
Slide 21
r
• bi + B ri1 θ + · · · + B rim θm is a polynomial in θ
• Roots θi,r1 , θi,r2 , . . . , θi,m
r
r
• If ǫ �= θi,r1 , . . . , θi,m
r
⇒ bi + B ri1 ǫ + · · · + B rim ǫm �= 0.
• Let ǫ1 the smallest positive root ⇒ 0 < ǫ < ǫ1 all RHS are =
� 0 ⇒
non-degeneracy.
5
5.3 Lexicography
Slide 22
L
• u is lexicographically larger than v, u > v, if u =
• Example:
L
(0, 2, 3, 0) > (0, 2, 1, 4),
L
(0, 4, 5, 0) < (1, 2, 1, 2).
5.4 Lexicography-Pertubation
5.4.1 Theorem
Slide 23
Let B be a basis of Ax = b, x ≥ 0. Then B is feasible for Ax = b +
′
(ǫ, . . . , ǫm ) , x ≥ 0 for sufficiently small ǫ if and only if
L
ui = (bi , Bi1 , . . . , Bim ) > 0, ∀ i
B −1 = (Bij )
(B −1 b)i = (bi )
5.4.2 Proof
Slide 24
B is feasible for peturbed problem “⇔” B −1 (b + (ǫ, . . . , ǫm )′ ) ≥ 0 ⇔
bi + B i1 ǫ + · · · + B im ǫm ≥ 0 ∀ i
⇔ First non-zero component of ui = (bi , Bi1 , . . . , Bim ) is positive ∀ i.
5.5 Summary
Slide 25
1. We start with: (P ) : Ax = b, x ≥ 0
2. We introduce (Pǫ ): Ax = b + (ǫ, . . . , ǫm )′ , x ≥ 0
L
3. A basis is feasible + non-degenerate in (Pǫ ) ⇔ ui > 0 in (P ).
L
4. If we maintain ui > 0 in (P ) ⇒ (Pǫ ) is non-degenerate ⇒ Simplex is
finite in (Pǫ ) for sufficiently small ǫ.
6
5.6.1 Example
Slide 27
• j = 3
1 0 5 3 ···
• 2 4 6 −1 ···
3 0 7 9 ···
respectively, to obtain:
• Since 7/9 < 5/3, the third row is chosen to be the pivot row, and the
5.6.2 Uniqueness
Slide 28
• Why lexicographic pivoting rule always leads to a unique choice for the
exiting variable?
rank(A) < m
5.7 Theorem
Slide 29
If simplex starts with all the rows in the simplex tableau, other than the zeroth
row, lexicographically positive and the lexicographic pivoting rule is followed,
then
(a) Every row of the simplex tableau, other than the zeroth row, remains
2. Out of all variables xi that are tied in the test for choosing an exiting
7
MIT OpenCourseWare
http://ocw.mit.edu
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
15.081J/6.251J Introduction to Mathematical
Programming
• Special case: b ≥ 0
Ax ≤ b, x ≥ 0
⇒ Ax + s = b, x, s ≥ 0
s = b, x=0
min y1 + y2 + . . . + ym
s.t. Ax + y = b
x, y ≥ 0
Slide 4
3. If cost > 0 ⇒ LOP infeasible; stop.
4. If cost = 0 and no artificial variable is in the basis, then a BFS was found.
5. Else, all yi∗ = 0, but some are still in the basis. Say we have AB(1) , . . . , AB(k)
Slide 5
6. Drive artificial variables out of the basis: If lth basic variable is artifi
1
2.2 Example
Slide 6
min x1 + x2 + x3
s.t. x1 + 2x2 + 3x3 = 3
−x1 + 2x2 + 6x3 = 2
4x2 + 9x3 = 5
3x3 + x4 = 1
x1 , . . . , x4 ≥ 0.
min x5 + x6 + x7 + x8
s.t. x1 + 2x2 + 3x3 + x5 = 3
−x1 + 2x2 + 6x3 + x6 = 2
4x2 + 9x3 + x7 = 5
3x3 + x4 + x8 = 1
x1 , . . . , x8 ≥ 0.
Slide 7
x1 x2 x3 x4 x5 x6 x7 x8
−11 0 −8 −21 −1 0 0 0 0
x5 = 3 1 2 3 0 1 0 0 0
x6 = 2 −1 2 6 0 0 1 0 0
x7 = 5 0 4 9 0 0 0 1 0
x8 = 1 0 0 3 1* 0 0 0 1
x1 x2 x3 x4 x5 x6 x7 x8
−10 0 −8 −18 0 0 0 0 1
x5 = 3 1 2 3 0 1 0 0 0
x6 = 2 −1 2 6 0 0 1 0 0
x7 = 5 0 4 9 0 0 0 1 0
x4 = 1 0 0 3* 1 0 0 0 1
Slide 8
x1 x2 x3 x4 x5 x6 x7 x8
−4 0 −8 0 6 0 0 0 7
x5 = 2 1 2 0 −1 1 0 0 −1
x6 = 0 −1 2* 0 −2 0 1 0 −2
x7 = 2 0 4 0 −3 0 0 1 −3
x3 = 1/3 0 0 1 1/3 0 0 0 1/3
2
x1 x2 x3 x4 x5 x6 x7 x8
−4 −4 0 0 −2 0 4 0 −1
x5 = 2 2* 0 0 1 1 −1 0 1
x2 = 0 −1/2 1 0 −1 0 1/2 0 −1
x7 = 2 2 0 0 1 0 −2 1 1
x3 = 1/3 0 0 1 1/3 0 0 0 1/3
Slide 9
x1 x2 x3 x4 x5 x6 x7 x8
0 0 0 0 0 2 2 0 1
x1 = 1 1 0 0 1/2 1/2 −1/2 0 1/2
x2 = 1/2 0 1 0 −3/4 1/4 1/4 0 −3/4
x7 = 0 0 0 0 0 −1 −1 1 0
x3 = 1/3 0 0 1 1/3 0 0 0 1/3
Slide 10
x1 x2 x3 x4
∗ ∗ ∗ ∗ ∗
x1 = 1 1 0 0 1/2
x2 = 1/2 0 1 0 −3/4
x3 = 1/3 0 0 1 1/3
b ≥ 0.
�m
2. Introduce y1 , . . . , ym , if necessary, and apply the simplex method to min i=1 yi .
3. If cost> 0, original problem is infeasible; STOP.
4. If cost= 0, a feasible solution to the original problem has been found.
5. Drive artificial variables out of the basis, potentially eliminating redundant
rows.
Slide 12
Phase II:
3
1. Let the final basis and tableau obtained from Phase I be the initial basis
and tableau for Phase II.
2. Compute the reduced costs of all variables for this initial basis, using the
cost coefficients of the original problem.
3. Apply the simplex method to the original problem.
4
z
B
. I C
F
H .
G . D
b .
initialbasis
z
. 6
3. . . . 2
1
4 . 7
nextbasis
8
. . 5
. b
optimalbasis
x3
x2
x2
x1 x1
(a) (b)
• There exists a pivoting rule under which the simplex method requires
starting from x.
. .
. .
. . .
. . .
. . . . .
(a) (b)
6
MIT OpenCourseWare
http://ocw.mit.edu
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
15.081J/6.251J Introduction to Mathematical
Programming
2 Motivation
2.1 An idea from Lagrange
Slide 2
Consider the LOP, called the primal with optimal solution x∗
min c′ x
s.t. Ax = b
x≥0
g(p) ≤ c′ x∗ + p′ (b − Ax∗ ) = c′ x∗
Get the tightest lower bound, i.e.,
max g(p)
� �
g(p) = min c′ x + p′ (b − Ax)
x ≥0
= p′ b + min (c′ − p′ A)x
x ≥0
Note that �
′ ′ 0, if c′ − p′ A ≥ 0′ ,
min (c − p A)x =
x≥0 −∞, otherwise.
s.t. p′ A ≤ c′
1
3 General form of the dual
Slide 3
Primal Dual
min c′
x max p′ b
s.t. a′i
x ≥ bi i ∈ M1 s.t. pi ≥ 0 i ∈ M1
a′i
x ≤ bi i ∈ M2 pi ≤ 0 i ∈ M1
a′i
x = bi i ∈ M3 pi >< 0 i ∈ M3
xj ≥ 0 j ∈ N1 p′ Aj ≤ cj j ∈ N1
xj ≤ 0 j ∈ N2 p′ Aj ≥ cj j ∈ N2
xj >< 0 j ∈ N3 p′ Aj = cj j ∈ N3
3.1 Example
Slide 4
min x1 + 2x2 + 3x3 max 5p1 + 6p2 + 4p3
s.t. −x1 + 3x2 =5 s.t. p1 free
2x1 − x2 + 3x3 ≥ 6 p2 ≥0
x3 ≤ 4 p3 ≤0
x1 ≥ 0 −p1 + 2p2 ≤1
x2 ≤ 0 3p1 − p2 ≥2
x3 free, 3p2 + p3 = 3.
Slide 5
Primal min max dual
≥ bi ≥0
constraints ≤ bi ≤0 variables
>
= bi <0
≥0 ≤ cj
variables ≤0 ≥ cj constraints
>
<0 = cj
4 Weak Duality
Slide 7
Theorem:
If x is primal feasible and p is dual feasible then p′ b ≤ c′ x
Proof
p′ b = p′ Ax ≤ c′ x
2
Corollary:
5 Strong Duality
Slide 8
Theorem: If the LOP has optimal solution, then so does the dual, and optimal
Proof:
min c′ x
s.t. Ax = b
x ≥ 0
Apply Simplex; optimal solution x, basis B.
Optimality conditions:
c′ − c′B B −1 A ≥ 0′
Slide 9
Define p′ = c′B B −1 ⇒ p′ A ≤ c′
⇒ p dual feasible for
max p′ b
s.t. p′ A ≤ c′
p′ b = c′B B −1 b = c′B xB = c′ x
⇒ x, p are primal and dual optimal
5.1 Intuition
Slide 10
a3
c
a2
a1
p 2a 2 p 1a 1
.
x *
3
6 Relations between primal and dual
Slide 11
Finite opt. Unbounded Infeasible
Finite opt. *
Unbounded *
Infeasible * *
7 Economic Interpretation
Slide 12
• x optimal nondegenerate solution: B −1 b > 0
• Suppose b changes to b + d for some small d
• How is the optimal cost affected?
• For small d feasibilty unaffected
• Optimality conditions unaffected
• New cost c′B B −1 (b + d) = p′ (b + d)
• If resource i changes by di , cost changes by pi di : “Marginal Price”
8 Complementary slackness
8.1 Theorem
Slide 13
Let x primal feasible and p dual feasible. Then x, p optimal if and only if
pi (a′i x − bi ) = 0, ∀i
xj (cj − p′ Aj ) = 0, ∀j
8.2 Proof
Slide 14
• ui = pi (a′i x − bi ) and vj = (cj − p′ Aj )xj
• If x primal feasible and p dual feasible, we have ui ≥ 0 and vj ≥ 0 for all
i and j.
• Also � �
c ′ x − p′ b = ui + vj .
i j
ui = vj = 0 for all i, j.
4
8.3 Example
Slide 15
3x1 + x2 = 3 p1 + p2 ≤ 10
x1 , x2 , x3 ≥ 0 3p1 ≤ 6
⇒ p1 = 2, p2 = 1
Objective=19
MIT OpenCourseWare
http://ocw.mit.edu
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
15.081J/6.251J Introduction to Mathematical
Programming
min c′ x max p′ b
s.t. Ax ≥ b s.t. p′ A ≤ c′
x ≥ 0, p ≥ 0.
There exist optimal solutions to the primal and to the dual that satisfy
• For every j, either xj > 0 or p′ Aj < cj .
• For every i, we have either a′i x > bi or pi > 0.
2.1 Example
Slide 3
min 5x1 + 5x2
s.t. x1 + x2 ≥ 2
2x1 − x2 ≥ 0
x1 , x2 ≥ 0.
max p′ b
m
�
s.t. pi ai = c
i=1
p≥0
1
c
c
a1
a3
A
a5
a2 c a4
a1
B a3 c
a4 a2
a1
C c
a1
a5
D a1
a2 c
a1
a3 a3
a2
x * a1
c′ − c′B B −1 A ≥ 0′
• Do not require B −1 b ≥ 0
• Require c̄ ≥ 0 (dual feasibility)
• Dual cost is
p′ b = c′B B −1 b = c′B xB
4.2 An iteration
Slide 7
1. Start with basis matrix B and all reduced costs ≥ 0.
Slide 8
4. Else, let j s.t.
c̄j c̄i
= min
|vj | {i|vi <0} |vi |
5. Pivot element vj : Aj enters the basis and AB(l) exits.
3
x2 p2
1 . D
c b
. B . C
1
. C
. .
A
1
D
.
E
2 x1
A
. B
1/2
. .
1
E
p1
(a) (b)
4.3 An example
Slide 9
min x1 + x2
s.t. x1 + 2x2 ≥ 2
x1 ≥ 1
x1 , x2 ≥ 0
min x1 + x2 max 2p1 + p2
s.t. x1 + 2x2 − x3 = 2 s.t. p1 + p2 ≤ 1
x1 − x4 = 1 2p1 ≤ 1
x1 , x2 , x3 , x4 ≥ 0 p1 , p2 ≥ 0
Slide 10
x1 x2 x3 x4
0 1 1 0 0
x3 = −2 −1 −2* 1 0
x4 = −1 −1 0 0 1
Slide 11
x1 x2 x3 x4
−1 1/2 0 1/2 0
x2 = 1 1/2 1 −1/2 0
x4 = −1 −1* 0 0 1
x1 x2 x3 x4
−3/2 0 0 1/2 1/2
x2 = 1/2 0 1 −1/2 1/2
x1 = 1 1 0 0 −1
4
x2 p2
B . A'
.
.
C c
.
C
A
. . B
.
D
p1
A
. .
D
x1
A' ' . b
(a) (b)
is zero.
5.1 Example
Slide 13
min 3x1 + x2 max 2p1
s.t. x1 + x2 − x3 = 2 s.t. p1 + 2p2 ≤ 3
2x1 − x2 − x4 = 0 p1 − p2 ≤ 1
x1 , x2 , x3 , x4 ≥ 0, p1 , p2 ≥ 0.
Equivalent primal problem
min 3x1 + x2
s.t. x1 + x2 ≥ 2
2x1 − x2 ≥ 0
x1 , x2 ≥ 0.
Slide 14
Slide 15
• Four basic solutions in primal: A, B, C, D.
• Six distinct basic solutions in dual: A, A′ , A′′ , B, C, D.
• Different bases may lead to the same basic solution for the primal, but
to different basic solutions for the dual. Some are feasible and some are
infeasible.
5
5.2 Degeneracy and uniqueness
Slide 16
• If dual has a nondegenerate optimal solution, the primal problem has a
• It is possible, however, that dual has a degenerate solution and the dual
6
MIT OpenCourseWare
http://ocw.mit.edu
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
15.081J/6.251J Introduction to Mathematical
Programming
b
.
1 Outline
Slide 1
• Farkas lemma
• Asset pricing
• Cones and extreme rays
• Representation of Polyhedra
2 Farkas lemma
Slide 2
Theorem:
1. ∃x ≥ 0 s.t. Ax = b.
2. ∃p s.t. p′ A ≥ 0′ and p′ b < 0.
2.1 Proof
Slide 3
“ ⇒′′
If ∃x ≥ 0 s.t. Ax = b, and if p′ A ≥ 0′ , then p′ b = p′ Ax ≥ 0
“ ⇐′′
Assume there is no x ≥ 0 s.t. Ax = b
1
3 Asset Pricing
Slide 4
• n different assets
• m possible states of nature
• one dollar invested in some asset i, and state of nature is s, we receive a
payoff of rsi
• m × n payoff matrix:
r11 . . . r1n
.. .. ..
R= . . .
rm1 . . . rmn
Slide 5
� �
• xi : amount held of asset i. A portfolio of assets is x = x1 , . . . , xn .
• A negative value of xi indicates a “short” position in asset i: this amounts
to selling |xi | units of asset i at the beginning of the period, with a promise
to buy them back at the end. Hence, one must pay out rsi |xi | if state s
Slide 6
� �
• w = w1 , . . . , wm , w = Rx
� �
• pi : price of asset i, p = p1 , . . . , pn
• Cost of acquiring x is p′ x.
3.1 Arbitrage
Slide 7
• Central problem: Determine pi
• Absence of arbitrage: no investor can get a guaranteed nonnegative
payoff out of a negative investment. In other words, any portfolio that pays
cost.
if Rx ≥ 0, then p′ x ≥ 0.
Slide 8
2
• Theorem: The absence of arbitrage condition holds if and only if there
asset i is given by
�m
pi = qs rsi .
s=1
cone
4.2 Applications
� � Slide 10
• P = x ∈ ℜn | Ax ≥ b , y ∈ P
• The recession cone at y
RC = d ∈ ℜn | y + λd ∈ P, ∀ λ ≥ 0
� �
• RC independent of y
Slide 11
3
x2 x3
0
x=
- a1
. ..
a'
1
y
. - a2
x2
0
a 2' x =
x1
x1
(a) (b)
4
w 1
x1
.
x1 .
y
recession
x2
. cone
.
x3 w 2 x2
5 Resolution Theorem
Slide 15
P = x ∈ ℜn | Ax ≥ b
� �
Then, Q = P .
5.1 Example
Slide 16
x1 − x2 ≥ −2
x1 + x2 ≥ 1
x1 , x2 ≥ 0
Slide 17
• Extreme points: x1 = (0, 2), x2 = (0, 1), and x3 = (1, 0).
• Extreme rays w1 = (1, 1) and w2 = (1, 0).
• � � � � � � � �
2 0 1 1
y= = + + = x2 + w 1 + w 2 .
2 1 1 0
5
5.2 Proof
Slide 18
• Q ⊂ P . Let x ∈ Q:
k
� r
�
x= λi xi + θj wj
i=1 j=1
�k
λi , θj ≥ 0 i=1 λi = 1.
�k
• y = i=1 λi xi ∈ P and satisfies Ay ≥ b.
�r
• Aw j ≥ 0 for every j: z = j=1 θj wj satisfies Az ≥ 0.
• x = y + z satisfies Ax ≥ b and belongs to P .
Slide 19
For the reverse, assume there is a z ∈ P , such that z ∈
/ Q.
k
� r
�
max 0λi + 0θj
i=1 j=1
k r
� �
s.t. λi x i + θj w j = z
i=1 j=1
k
�
λi = 1
i=1
λi ≥ 0, i = 1, . . . , k,
θj ≥ 0, j = 1, . . . , r,
Is this feasible? Slide 20
• Dual
min p′
z + q
s.t. p′ xi + q ≥ 0, i = 1, . . . , k,
p′
wj ≥ 0, j = 1, . . . , r.
• This is unbounded. Why?
• There exists a feasible solution (p, q) whose cost p′
z + q < 0
• p′ z < p′ xi for all i and p′ w j ≥ 0 for all j.
Slide 21
•
min p′
x
s.t. Ax ≥ b.
contradiction.
• If the optimal cost is −∞, there exists an extreme ray wj such that
6
MIT OpenCourseWare
http://ocw.mit.edu
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
15.081J/6.251J Introduction to Mathematical
Programming
Duality
mental
3 Closed sets
Slide 3
• A set S ⊂ ℜn is closed if x1 , x2 , . . . is a sequence of elements of S that
4 Weierstrass’ theorem
Slide 4
If f : ℜn �→ ℜ is a continuous function, and if S is a nonempty, closed, and
bounded subset of ℜn , then there exists some x∗ ∈ S such that f (x∗ ) ≤ f (x)
for all x ∈ S. Similarly, there exists some y ∗ ∈ S such that f (y ∗ ) ≥ f (x) for
all x ∈ S.
Note: Weierstrass’ theorem is not valid if the set S is not closed. Consider,
S = {x ∈ ℜ | x > 0}, f (x) = x
5 Separation
Slide 5
Theorem: Let S be a nonempty closed convex subset of ℜn and let x∗ ∈ ℜn :
/ S. Then, there exists some vector c ∈ ℜn such that c′ x∗ < c′ x for all
x∗ ∈
x ∈ S.
1
S
.
x *
.x *
B
.
x *
.
c
. . y
w
.y
q
.
x
S S
(a) (b)
5.1 Proof
Slide 6
• Fix w ∈ S
� � �
• B = x � ||x − x∗ || ≤ ||w − x∗ || ,
• D =S∩B
• D �= ∅, closed and bounded. Why?
• Consider min ||x − x∗ ||
Slide 7
Slide 8
• By Weierstrass’ theorem there exists some y ∈ D such that
2
Slide 9
• x ∈ S. ∀λ satisfying 0 < λ ≤ 1, y + λ(x − y) ∈ S (S convex)
• ||y − x∗ ||2 ≤ ||y + λ(x − y) − x∗ ||2
(y − x∗ )′ x ≥ (y − x∗ )′ y
= (y − x∗ )′ x∗ + (y − x∗ )′ (y − x∗ )
> (y − x∗ )′ x∗ .
• c = y − x∗ proves theorem
6 Farkas’ lemma
Slide 10
Theorem: If Ax = b, x ≥ 0 is infeasible, then there exists a vector p such that
p′ A ≥ 0′ and p′ b < 0.
� � �
• S = y � there exists x such that y = Ax, x ≥ 0 b ∈ / S.
7 Duality theorem
Slide 11
min c′ x max p′ b
s.t. Ax ≥ b s.t. p′ A = c ′
p≥0
and we assume that the primal has an optimal solution x∗ . We will show that
the dual problem also has a feasible solution with the same cost. Strong duality
follows then from weak duality. Slide 12
• I = {i | a′i x∗ = bi }
• We next show: if a′i d ≥ 0 for every i ∈ I, then c′ d ≥ 0
3
• a′i (x∗ + ǫd) ≥ ai x∗ = bi for all i ∈ I.
/ I, a′i x∗ > bi hence a′i (x∗ + ǫd) > bi .
• If i ∈
• x∗ + ǫd is feasible
Slide 13
• By optimality x∗ , c′ d ≥ 0
• By Farkas’ lemma �
c= pi a i .
i∈I
/ I, we define pi = 0, so p′ A = c′ .
• For i ∈
• � �
p′ b = pi b i = pi ai′ x∗ = c′ x∗ ,
i∈I i∈I
4
MIT OpenCourseWare
http://ocw.mit.edu
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
15.081J/6.251J Introduction to Mathematical
Programming
x ≥ 0
2 Outline
Slide 2
1. Global sensitivity analysis
2. Local sensitivity analysis
(a) Changes in b
(b) Changes in c
(c) A new variable is added
(d) A new constraint is added
(e) Changes in A
3. Detailed example
3.2 Dependence on b
Slide 4
Primal Dual
F (b) = min c′ x
F (b) = max p′ b
s.t. Ax = b
s.t. p′ A ≤ c′
x≥0
F (b) = maxi=1,...,N (pi )′ b is a convex function of b
1
( c + q d) ' ( x3)
( c + q d) ' ( x2
)
x1 o p t i m a l
. x2 o p t i m a l
. x3 o p t i m a l
. x4 o p t i m a l q
f( q)
( p1) ' ( b* + q d)
( p3) ' ( b* + q d)
( p2) ' ( b* + q d)
q1 q2 q
1. Feasibility conditions: B −1 b ≥ 0
2. Optimality conditions: c′ − cB
′
B −1 A ≥ 0′
Slide 6
• Suppose that there is a change in either b or c for example
• How do we find whether B is still optimal?
• Need to check whether the feasibility and optimality conditions are satis
fied
x≥0 x ≥ 0
1. Feasibility: B −1 (b + Δei ) ≥ 0
2. Optimality: c′ − cB
′
B −1 A ≥ 0′
Observations:
1. Changes in b affect feasibility
2. Optimality conditions are not affected
Slide 9
B −1 (b + Δei ) ≥ 0
βij = [B −1 ]ij
bj = [B −1 b]j
Thus,
(B −1 b)j + Δ(B −1 ei )j ≥ 0 ⇒ bj + Δβji ≥ 0 ⇒
3
bj bj
max − ≤ Δ ≤ min −
βji >0 βji βji <0 βji
Slide 10
Δ≤Δ≤Δ
5.2 Changes in c
Slide 11
cj → cj + Δ
Need to check:
1. Feasibility: B −1 b ≥ 0, unaffected
2. Optimality: c′ − cB
′
B −1 A ≥ 0′ , affected
• xj nonbasic
5.2.1 xj nonbasic
Slide 12
cB unaffected
(cj + Δ) − c′B B −1 Aj ≥ 0 ⇒ cj + Δ ≥ 0
Solution optimal if Δ ≥ −cj
What if Δ = −cj ?
What if Δ < −cj ?
4
5.2.2 xj basic
Slide 13
cB ← ĉB = cB + Δej
Then,
[c′ − ĉB
′
B −1 A]i ≥ 0 ⇒ ci − [cB + Δej ]′ B −1 Ai ≥ 0
[B −1 A]ji = aji
ci ci
ci − Δaji ≥ 0 ⇒ max ≤ Δ ≤ min
aji <0 aji aji >0 aji
5
5.5 Changes in A
Slide 17
• Suppose aij ← aij + Δ
• Assume Aj does not belong in the basis
• Feasibility conditions: B −1 b ≥ 0, unaffected
• Optimality conditions: cl − c′B B −1 Al ≥ 0, l 6= j, unaffected
• Optimality condition: cj − p′ (Aj + Δei ) ≥ 0 ⇒ cj − Δpi ≥ 0
6 Example
6.1 A Furniture company
Slide 18
• A furniture company makes desks, tables, chairs
• The production requires wood, finishing labor, carpentry labor
6.2 Formulation
Slide 19
Decision variables:
x1 = # desks, x2 = # tables, x3 = # chairs
6
Final tableau: s1 s2 s3 x1 x2 x3
280 0 10 10 0 5 0
s1 = 24 1 2 -8 0 -2 0
x3 = 8 0 2 -4 0 -2 1
x1 = 2 0 -0.5 1.5 1 1.25 0
• What is B −1 ?
1 2 −8
B −1 = 0 2 −4
0 −0.5 1.5
Slide 22
• What is the optimal solution?
• What is the optimal solution value?
• Is it a bit surprising?
• What is the optimal dual solution?
• What is the shadow price of the wood constraint?
• What is the shadow price of the finishing hours constraint?
• What is the reduced cost for x2 ?
7
• Suppose you can hire 1h of finishing overtime at $7. Would you do it?
• Another check
1 2 −8
c′B B −1 = (0, −20, −60) 0 2 −4 =
0 −0.5 1.5
8x1 + x3 + s1 + 6·1 = 48 s1 = 26
4x1 + 1.5x3 + 2·1 = 20 ⇒ x1 = 0.75
2x1 + 0.5x3 + 1.5 · 1 = 8 x3 = 10
z ′ − z = (60 ∗ 0.75 + 20 ∗ 10) − (60 ∗ 2 + 20 ∗ 8 + 30 ∗ 1) = −35 + 30 = −5 Slide 27
Another way to calculate the same thing: If x2 = 1
Suppose profit from tables increases from $30 to $34. Should it be produced?
At $35? At $36?
Optimality conditions:
cj − c′B B −1 Aj ≥ 0 ⇒
1 2 −8
" #
′
0 −0.5 1.5
8
6
c2 = c2 − p′ A2 = −30 + [0, 10 − 0.5Δ, 10 + 1.5Δ] 2 = 5 + 1.25Δ
1.5
cs2 = 10 − 0.5Δ
cs3 = 10 + 1.5Δ
Current basis optimal:
5 + 1.25Δ ≥ 0
10 − 0.5Δ ≥ 0 −4 ≤ Δ ≤ 20
10 + 1.5Δ ≥ 0
= 8 + 2Δ ≥ 0
2 − 0.5Δ
s1 = 24 + 2Δ
x3 = 8 + 2Δ
x1 = 2 − 0.5Δ
z = 60(2 − 0.5Δ) + 20(8 + 2Δ) = 280 + 10Δ
Slide 32
Suppose
Δ =
10 then
s1 44
x3 = 25 ← inf. (Use dual simplex)
x1 −3
xi ≥ 0
9
1
!
c4 −c′B B −1 A4 = −15 − (0, −10, −10) 1 =5≥0
1
Current basis still optimal. Do not produce stools
10
MIT OpenCourseWare
http://ocw.mit.edu
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
15.081J/6.251J Introduction to Mathematical
Programming
2003.
2 Structure
Slide 2
• Motivation
• Data Uncertainty
• Experimental Results
3 Motivation
Slide 3
• The classical paradigm in optimization is to develop a model that assumes
that the input data is precisely known and equal to some nominal values.
This approach, however, does not take into account the influence of data
Slide 4
1
3.1 Literature
Slide 5
• Ellipsoidal uncertainty; Robust convex optimization Ben-Tal and Nemirovski
4 Goal
Slide 6
Develop an approach to address data uncertainty for optimization problems
that:
• It allows to control the degree of conservatism of the solution;
• It is computationally tractable both practically and theoretically.
5 Data Uncertainty
Slide 7
minimize c′ x
subject to Ax ≤ b
l≤x≤u
xi ∈ Z, i = 1, . . . , k,
WLOG data uncertainty affects only A and c, but not the vector b. Slide 8
6 Robust MIP
Slide 9
• Consider an integer Γi ∈ [0, |Ji |], i = 0, 1, . . . , m.
• Γi adjusts the robustness of the proposed method against the level of
allowed to change.
Slide 10
• Nature will be restricted in its behavior, in that only a subset of the
2
• We will guarantee that if nature behaves like this then the robust solution
6.1 Problem
( ) Slide 11
X
′
minimize c x+ max dj |xj |
{S0 | S0 ⊆J0 ,|S0 |≤Γ0 }
j∈S0
( )
X X
subject to aij xj + max ˆij |xj |
a ≤ bi , ∀i
{Si | Si ⊆Ji ,|Si |≤Γi }
j j∈Si
l ≤ x ≤
u
xi ∈ Z, ∀i = 1, . . . k.
6.2 Theorem 1
Slide 12
The robust problem can be reformulated has an equivalent MIP:
P
minimize c ′ x + z 0 Γ0 + p
X j∈J0X0j
subject to aij xj + zi Γi + pij ≤ bi ∀i
j j∈Ji
z0 + p0j ≥ dj yj ∀j ∈ J0
zi + pij ≥ âij yj ∀i �= 0, j ∈ Ji
pij , yj , zi ≥ 0 ∀i, j ∈ Ji
−yj ≤ xj ≤ yj ∀j
lj ≤ xj ≤ uj ∀j
xi ∈ Z i = 1, . . . , k.
6.3 Proof
Slide 13
Given a vector x∗ , we define:
( )
X
βi (x∗ ) = max âij |x∗j | .
{Si | Si ⊆Ji ,|Si |=Γi }
j∈Si
3
|Ji | Γi
5 5
10 8.3565
100 24.263
200 33.899
6.4 Size
Slide 15
• Original Problem has n variables and m constraints
Pm
• Robust counterpart has 2n + m + l variables, where l = i=0 |Ji | is the
1
X X n X n
Pr ãij x∗j > bi ≤ (1 − µ) +µ ,
2n l l
j l=⌊ν⌋ l=⌊ν⌋+1
7 Experimental Results
7.1 Knapsack Problems
• Slide 19
X
maximize ci xi
i∈N
X
subject to wi xi ≤ b
i∈N
x ∈ {0, 1}n.
4
0
10
Approx bound
Bound 2
−1
10
−2
10
−3
10
−4
10
0 1 2 3 4 5 6 7 8 9 10
Γi
[wi − δi , wi + δi ];
7.1.1 Data
Slide 20
• |N | = 200, b = 4000,
• wi randomly chosen from {20, 21, . . . , 29}.
• ci randomly chosen from {16, 17, . . . , 77}.
• δi = 0.1wi .
5
7.1.2 Results
Slide 21
minimize c′ x
subject to x ∈ X ⊂ {0, 1}n .
• Robust Counterpart:
X
Z∗ = minimize c′ x + max dj x j
{S| S⊆J,|S|=Γ}
j∈S
subject to x ∈ X,
• WLOG d1 ≥ d2 ≥ . . . ≥ dn .
8.1 Remarks
Slide 23
• Examples: the shortest path, the minimum spanning tree, the minimum
assignment, the traveling salesman, the vehicle routing and matroid inter
section problems.
8.2 Approach
X Slide 24
6
8.3 Algorithm A
Slide 25
• Solution: yj = max(dj xj − θ, 0)
• X
Z∗ = min θΓ + (cj xj + max(dj xj − θ, 0))
x∈X,θ≥0
j
• X
Z∗ = min θΓ + (cj + max(dj − θ, 0)) xj
x∈X,θ≥0
j
Slide 26
• d1 ≥ d2 ≥ . . . ≥ dn ≥ dn+1 = 0.
• For dl ≥ θ ≥ dl+1 ,
n l
X X
min θΓ + cj xj + (dj − θ)xj =
x∈X,dl ≥θ≥dl+1
j=1 j=1
n l
X X
dl Γ + min cj xj + (dj − dl )xj = Zl
x∈X
j=1 j=1
•
n l
X X
Z∗ = min dl Γ + min cj xj + (dj − dl )xj .
l=1,...,n+1 x∈X
j=1 j=1
8.4 Theorem 3
Slide 27
• Algorithm A correctly solves the robust 0-1 optimization problem.
• It requires at most |J| + 1 solutions of nominal problems. Thus, If the
nominal problem is polynomially time solvable, then the robust 0-1 coun
9 Experimental Results
9.1 Robust Sorting
X Slide 28
minimize ci xi
i∈N
X
subject to xi = k
i∈N
x ∈ {0, 1}n .
7
Γ ¯
Z(Γ) ¯
% change in Z(Γ)
σ(Γ) % change in σ(Γ)
0 8822 0 %
501.0 0.0 %
10 8827 0.056 %
493.1 -1.6 %
20 8923 1.145 %
471.9 -5.8 %
30 9059 2.686 %
454.3 -9.3 %
40 9627 9.125 %
396.3 -20.9 %
50 10049 13.91 %
371.6 -25.8 %
60 10146 15.00 %
365.7 -27.0 %
70 10355 17.38 %
352.9 -29.6 %
80 10619 20.37 %
342.5 -31.6 %
100 10619 20.37 %
340.1 -32.1 %
X
Z ∗ (Γ) = minimize c′ x + max dj x j
{S| S⊆J,|S|=Γ}
j∈S
X
subject to xi = k
i∈N
x ∈ {0, 1}n .
9.1.1 Data
Slide 29
• |N | = 200;
• k = 100;
• cj ∼ U [50, 200]; dj ∼ U [20, 200];
• For testing robustness, generate instances such that each cost component
cj to cj + dj .
9.1.2 Results
Slide 30
10 Robust Network Flows
Slide 31
• Nominal
X
min cij xij
(i,j)∈A
X X
s.t. xij − xji = bi ∀i ∈ N
{j:(i,j)∈A} {j:(j,i)∈A}
8
(cost, capacity)
(cij, uij)
i j
) j’ ( 0,
,� �)
(d ij
i i’ j
(cij, uij) (0, θ/ dij)
10.1 Reformulation
Slide 32
•
Z ∗ = min Z(θ),
θ≥0
X
′
Z(θ) = Γθ + min c x+ pij
(i,j)∈A
subject to pij ≥ dij xij − θ ∀(i, j) ∈ A
pij ≥ 0 ∀(i, j) ∈ A
x ∈ X.
• Equivalently
′
X θ
Z(θ) = Γθ + min c x+ dij max xij − ,0
dij
(i,j)∈A
subject to x ∈ X.
10.3 Complexity
Slide 34
• Z(θ) is a convex function and for all θ1 , θ2 ≥ 0, we have
ˆ ∈
X with robust
• For any fixed Γ ≤ |A| and every ǫ > 0, we can find a solution x
objective value X
Ẑ = c′ x̂ + max dij x̂ij
{S| S⊆A,|S|≤Γ}
(i,j)∈S
such that
Z ∗ ≤ Ẑ ≤ (1 + ǫ)Z ∗
9
3000
Γ=0
Γ=3
Γ=6
Γ = 10
2500
2000
1500
1000
500
3 4 5 6 7 8 9
Distributions of path cost
11 Experimental Results
Slide 35
12 Conclusions
Slide 36
• Robust counterpart of a MIP remains a MIP, of comparable size.
• Approach permits flexibility of adjusting the level of conservatism in terms of
probabilistic bound of constraint violation
• For polynomial solvable 0-1 optimization problems with cost uncertainty, the
10
MIT OpenCourseWare
http://ocw.mit.edu
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
15.081J/6.251J Introduction to Mathematical
Programming
2 Column Generation
Slide 2
• For x ∈ ℜn and n large consider the LOP:
min c′ x
s.t. Ax = b
x≥0
• Restricted problem �
min ci xi
i∈I
�
s.t. Ai xi = b
i∈I
x≥0
70 − (3 × 17 + 1 × 15) = 4
Slide 5
• Given w1 , . . . , wm and W there are many cutting patterns: (3, 1) and (2, 2)
for example
3 × 17 + 1 × 15 ≤ 70
2 × 17 + 2 × 15 ≤ 70
1
• Pattern: (a1 , . . . , am ) integers:
�
ai wi ≤ W
i=1
3.1 Problem
Slide 6
• Given wi , bi , i = 1, . . . , m (bi : number of rolls of width wi demanded,
• Find how to cut the large rolls in order to minimize the number of rolls
used.
�� �� �� �� � � �� �� �� �� �� ��
�0� �1� �0� �0
�
4 , 4 , 5 , 6
� � � � � �
1 2 0 12
s.t. x1 + x2 + · · · + x15 =
0 0 6 17
x1 , . . . , x15 ≥ 0
Slide 9
� � � � � � � �
0 0 3 12
• Example: 2 +1 +4 = 7 rolls used
6 5 0 17
� � � � � � � �
0 0 3 12
4 + +4 = 9 rolls used
4 1 0 17
• Any ideas?
2
3.3 Formulation
Slide 10
Decision variables: xj = number of rolls cut by pattern j characterized by vector
Aj :
�n
min xj
j=1
b1
n
Aj · xj = ...
�
j=1
bm
xj ≥ 0 ( integer)
Slide 11
• Huge number of variables.
• Can we apply column generation, that is generate the patterns Aj on the
fly?
3.4 Algorithm
Slide 12
Idea: Generate feasible patterns as needed.
W
⌊ w1 ⌋ 0 0 0
0 ⌊W ⌋ 0
0
1) Start with initial patterns: w2
0 , 0
, W ,
⌊ ⌋
w3
0
W
0 0 0 ⌊w4
⌋
Slide 13
2) Solve:
min x1 + · · · + xm
x1 A1 + · · · + xm Am = b
xi ≥ 0
Slide 14
3) Compute reduced costs
3
3.4.1 Key Idea
Slide 15
4) Solve
m
�
z ∗ = max p i ai
i=1
�m
s.t. wi ai ≤ W
i=1
ai ≥ 0, integer
This is the integer knapsack problem
Slide 16
• If z ∗ ≤ 1 ⇒ 1 − p′ Aj > 0 ∀j ⇒ current solution optimal
• If z ∗ > 1 ⇒ ∃ s: 1 − p′ As < 0 ⇒ Variable xs becomes basic, i.e., a new
i=1,...,m
Why ?
3.6 Example
Slide 18
max 11x1 + 7x2 + 5x3 + x4
s.t. 6x1 + 4x2 + 3x3 + x4 ≤ 25
xi ≥ 0, xi integer
F (0) = 0
F (1) = 1
F (2) = 1 + F (1) = 2
Slide 19
F (3) = max(5 + F (0)∗ , 1 + F (2)) = 5
F (9) = 11 + F (3) = 16
F (10) = 11 + F (4) = 18
F (u) = 11 + F (u − 6) = 16 u ≥ 11
4
⇒ F (25) = 11 + F (19) = 11 + 11 + F (13) = 11 + 11 + 11 + F (7) = 33 + 12 = 45
x∗ = (4, 0, 0, 1)
4 Stochastic Programming
4.1 Example
Slide 20
Wrenches
Pliers Cap.
Steel (lbs)
1.5
1.0 27,000
Molding machine (hrs)
1.0
1.0 21,000
Assembly machine (hrs)
0.3
0.5 9,000* Slide 21
Demand limit (tools/day)
15,000
16,000
Contribution to earnings
$130*
$100
($/1000 units)
max 130W + 100P
s.t. W ≤ 15
P ≤ 16
1.5W + P ≤ 27
W + P ≤ 21
0.3W + 0.5P ≤ 9
W, P ≥ 0
4.1.2 Decisions
Slide 23
• Need to decide steel capacity in the current quarter. Cost 58$/1000lbs.
• Soon after, uncertainty will be resolved.
• Next quarter, company will decide production quantities.
4.1.3 Formulation
Slide 24
5
State
Cap. W. contr.
Prob.
1
8,000 160
0.25
2
10,000 160
0.25
3
8,000 90
0.25
4
10,000 90
0.25
Decision Variables: S: steel capacity,
Mol. 1 W1 + P1 ≤ 21
Ste. 1 −S + 1.5W1 + P1 ≤ 0
W.d. 1 W1 ≤ 15
P.d. 1 P1 ≤ 16
Slide 26
Mol. 2 W2 + P2 ≤ 21
Ste. 2 −S + 1.5W2 + P2 ≤ 0
W.d. 2 W2 ≤ 15
P.d. 2 P2 ≤ 16
Slide 27
Mol. 3 W3 + P3 ≤ 21
Ste. 3 −S + 1.5W3 + P3 ≤ 0
W.d. 3 W3 ≤ 15
P.d. 3 P3 ≤ 16
Slide 28
Mol. 4 W4 + P4 ≤ 21
Ste. 4 −S + 1.5W4 + P4 ≤ 0
W.d. 4 W4 ≤ 15
P.d. 4 P4 ≤ 16
S, Wi , Pi ≥ 0
4.1.4 Solution
Slide 29
αw .
Bw x + Dw yw = dw , yw ≥ 0.
4.2.1 Formulation
Slide 31
min c′ x + α1 f1′ y1 + ··· + αk fk′ yk
Ax =b
B1 x + D 1 y1 = d1
B2 x + D 2 y2 = d2 Slide 32
. . .. ..
.
. .
Bk x + D k yk = dk
x, y1 , y2 , . . . , yk ≥ 0.
Structure: x y1 y2 y3 y4
Objective
7
MIT OpenCourseWare
http://ocw.mit.edu
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
15.081J/6.251J Introduction to Mathematical
Programming
2 Decomposition
Slide 2
min c′1 x1 + c′2 x2
s.t. D 1 x1 + D 2 x2 = b 0
F 1 x 1 = b1
F 2 x 2 = b2
x1 , x 2 ≥ 0
• Relation with stochastic programming?
• Firm’s problem
2.1 Reformulation
� � Slide 3
• Pi = xi ≥ 0 | F i xi = bi , i = 1, 2
• xji , j ∈ Ji extreme points of Pi
• w ki , k ∈ Ki , extreme rays of Pi .
• For all xi ∈ Pi � �
xi = λji xji + θik wki ,
j∈Ji k∈Ki
λji ≥ 0, θik ≥ 0, ∀ i, j, k.
1
Huge # variables, m0 + 2 constraints Slide 5
• A bfs is available with a basis matrix B
• p′ = c′B B −1 ; p = (q, r1 , r2 )
• Is B optimal?
• Check reduced costs
(c′1 − q ′ D 1 )xj1 − r1
(c′1 − q ′ D 1 )wk1
• Huge number of them
3 Key idea
Slide 6
Consider subproblem:
[D 1 wk1 , 0, 0]′
4 Remarks
Slide 7
• Economic interpretation
• Applicability of the method
2
min c′ x
s.t. Dx = b0
F x = b
x ≥ 0,
4.1 Termination
Slide 8
• Finite termination
• Algorithm makes substantial progress in the beginning, but very slow later
on
• no faster than the revised simplex method applied to the original problem
• Storage with t subproblems
• Original: O (m0 + tm1 )2
� �
• Decomposition algorithm O (m0 + t)2 for the tableau of the master prob
� �
decomposition algorithm are about 100 times smaller than revised simplex
method.
5 Example
Slide 9
•
min −4x1 − x2 − 6x3
s.t. 3x1 + 2x2 + 4x3 = 17
1 ≤ x1 ≤2
1 ≤ x2 ≤2
1 ≤ x3 ≤ 2.
Slide 10
• x1 = (2, 2, 2) and x2 = (1, 1, 2); Dx1 = 18, Dx2 = 13
3
� � � �
18 13 0.2 −2.6
• B= ; B −1 =
1 1 −0.2 3.6
•
2
= c′ x1 = − 4 − 1 − 6 2 = −22,
� �
cB(1)
2
1
= c′ x2 = − 4 − 1 − 6 1 = −17.
� �
cB(2)
2
� � � � � �
• p′ = q ′ r = c′B B −1 = − 22 − 17 B −1 = − 1 − 4 .
• � � �
c′ − q ′ D = − 4 − 1 − 6] − (−1) 3 2 4 = [−1 1 − 2],
optimal solution is x3 = (2, 1, 2) with optimal cost −5 ≤ r = −4
• Generate the column corresponding to λ3 .
Slide 11
x3
x2 = ( 1 ,1,2 ) ( 1 ,2 , 2 )
. .
A
B
x3 = ( 2 , 1,2 ) x1 = ( 2 , 2 , 2 )
x2
(1,1,1) ( 1 ,2 , 1)
( 2 , 1,1) ( 2 , 2 , 1)
x1
t=1
� � �
s.t. λji Di xji + θik D i wki + y = b0
i=1,2 j∈Ji k∈Ki
�
λj1 = 1
j∈J1
4
�
λj2 = 1
j∈J2
λji ≥ 0, θik ≥ 0, yt ≥ 0, ∀ i, j, k, t.
7 Bounds
Slide 13
• Optimal cost z ∗
• z cost of feasible solution obtained at some intermediate stage ofe decom
position algorithm.
• ri be the value of the dual variable associated with the convexity constraint
7.1 Proof
Slide 14
Dual of master problem
max q ′ b0 + r1 + r2
s.t. q ′ D 1 xj1 + r1 ≤ c′1 xj1 , ∀ j ∈ J1 ,
q ′
D 1 wk1 ≤ c′1 w k1 , ∀ k ∈ K1 ,
q ′ D 2 xj2 + r2 ≤ c′2 xj2 , ∀ j ∈ J2 ,
q ′
D 2 wk2 ≤ c′2 w k2 , ∀ k ∈ K2 .
Slide 15
q ′ b0 + r1 + r2 = z
5
• By weak duality,
z ∗ ≥ q ′ b0 + z1 + z2
= q ′ b0 + r1 + r2 + (z1 − r1 ) + (z2 − r2 )
= z + (z1 − r1 ) + (z2 − r2 ),
7.2 Example
Slide 16
• (λ1 , λ2 ) = (0.8, 0.2)
6
MIT OpenCourseWare
http://ocw.mit.edu
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
15.081J/6.251J Introduction to Mathematical
Programming
2 Common Thrust
Slide 2
Move some entity (electricity, a consumer product, a person, a vehicle, a mes
sage, . . . ) from one point to another in the underlying network, as efficiently as
possible.
3 Shortest Path
3.1 Description
Slide 3
• Identify a shortest path from a given source node to a given sink node.
• Finding a path of minimum length.
• Finding a path taking minimum time.
• Finding a path of maximum reliability.
4 Maximum Flow
4.1 Description
Slide 4
• Determine the maximum flow that can be sent from a given source node
1
5 Min-Cost Flow
5.1 Description
Slide 5
• Determine a least cost shipment of a commodity through a network in
• Distribution of products
• Flow of items in a production line
• Routing of cars through street networks
• Routing of telephone calls
�
min cij xij
(i,j)∈A
� �
s.t. xij − xji = bi for all i ∈ N
j:(i,j)∈A j:(j,i)∈A
xij ≤ uij for all (i, j) ∈ A
xij ≥ 0 for all (i, j) ∈ A
6 Outline
Slide 7
• Shortest path applications
• Maximum Flow applications
• Minimum cost flow applications
7 Shortest Path
7.1 Interword Spacing in LATEX
Slide 8
The spacing between words and characters is normally set
2
The spacing between words and characters is normally set auto
LATEX also attempts to keep the word spacing for different lines
For instance,
job j is completed.
• ci duration of job i
• Find the least possible duration of the project
7.4.1 Formulation
Slide 12
• Introduce two artificial jobs s and t, of zero duration, that signify the
3
Slide 13
•
min pt − ps
s.t pj − pi ≥ ci , ∀ (i, j) ∈ A.
• Dual �
max ci fij
(i,j)∈A
� �
s.t. fji − fij = bi
{j|(j,i)∈A} {j|(i,j)∈A}
fij ≥ 0
Slide 14
• bs = −1, bt = 1, and bi = 0 for i �= s, t.
• Shortest path problem, where each precedence relation (i, j) ∈ A corre
sponds to an arc with cost of −ci .
Slide 15
Activity
Immediate Predecessor
Time(ci )
s
0
A
S
14
B
S
3
C
A,B
5
D
A
7
E
C,D
10
t
E
0
Slide 16
0 14
S A D T
7
0 14
10
3 5
B C E
B = b1 · · · bp and D = d1 · · · dq
4
7.5.1 Transformation costs
Slide 18
• α = cost of inserting a letter in B
• β = cost of deleting a letter from B
• g(bi , dj ) = cost of mutating a letter bi into dj
7.5.3 Algorithm
Slide 20
• f (b1 · · · bp , d1 · · · dq ): the min cost of transforming B into D by the three
f (∅ · · · ∅, d1 · · · dj ) = jα, j = 1, ..., q
Slide 21
Substitution
B′ = b1 ··· bi
D= d1 ··· dj
f (b1 · · · bi , d1 · · · dj )
= f (b1 · · · bi−1 , d1 · · · dj−1 ) + g(bi , dj )
Slide 22
• Addition of dj
B′ = b1 ··· bi ··· ∅
D= d1 ··· ··· dj
f (b1 · · · bi , d1 · · · dj ) = f (b1 · · · bi , d1 · · · dj−1 ) + α.
• Deletion of bi :
Slide 23
Recursion
f (b1 · · · bi , d1 · · · dj )
= min{f (b1 · · · bi−1 , d1 · · · dj−1 ) + g(bi , dj ),
f (b1 · · · bi , d1 · · · dj−1 ) + α,
f (b1 · · · bi−1 , d1 · · · dj ) + β}
Slide 24
The shortest path from 00 to 32
5
8 Maximum Flow
8.1 The tournament problem
Slide 25
• Each of n teams plays against every other team a total of k games.
• Each game ends in a win or a loss (no draws)
8.1.1 Formulation
Slide 26
• Supply nodes T1 , ..., Tn represent teams with supply x1 , ..., xn
• Since total number of wins total number of games, we must have
�
xi = n(n − 1)k/2
• Demand nodes
G12 , ..., G1n , G23 , ..., G2n , ..., Gij , ..., Gn−1,n
• Arcs: (Ti , Gij ), (Tj , Gij ). The flow from Ti to Gij represents the total
6
8.2 Preemptive Scheduling
Slide 27
• m identical machines to process n jobs
• Job j must be processed for pj periods, j = 1, ..., n
• It can not start before period rj and must be competed before period dj
• We allow preemption, i.e., we can disrupt the processing of one job with
another
Slide 28
• Problem Find a schedule (which job is processed by which machine at
which period) such that all jobs are processed after their release times and
completed before their deadlines
• Cj : completion time of job j: We need to have
rj + pj ≤ Cj ≤ dj for all j
8.3 Formulation
Slide 29
• Rank all release times and deadlines in ascending order. The ordered
list of numbers divides the time horizon into a number of nonoverlapping
intervals.
• Tkl be the interval that starts in the period k and ends in period l. During
Tkl , we can process any job j that has been released (rj ≤ k) and its
deadline has not yet been reached (l ≤ dj ).
8.3.1 Example
Slide 30
• 4 jobs with release times 3, 1, 3, 5, and deadlines 5, 4, 7, 9.
• The ascending list of release times and deadlines is 1, 3, 4, 5, 7, 9.
• Five intervals: T13 , T34 , T45 , T57 , T79 .
8.3.2 Network
Slide 31
• Nodes: source s, sink t, a node corresponding to each job j, and a node
corresponding to each interval Tkl .
• Arcs: (s, j), with capacity pj . Flow represents the number of periods of
processing that job j receives.
• Arcs: (Tkl , t), with capacity m(l − k). Flow represents the total number
of machine-periods of processing during Tkl .
Slide 32
• Arcs: (j, Tkl ) if rj ≤ k ≤ l ≤ dj with capacity l − k. Flow represents the
number of periods that job j is processed during Tkl .
7
j
pj
l-k
s t
Tkl m( l - k)
9 Min-Cost Flow
9.1 Passenger Routing
Slide 33
• United Airlines has seven daily flights from BOS to SFO, every two hours,
starting at 7am.
confirmed reservations.
8
MIT OpenCourseWare
http://ocw.mit.edu
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
-15
2
2 4
2
5 3 1
4 4
10 1 5 7 10
3 6
6
3 6
5
-5
1
1
2 7
3 6
4 5
1 1
2 7 2 7
0
3 6 3 6
0
4 5 4 5
0
1 3 6 0 1 3 6 0
-4 -4
2
0 0
4 5 4 5
2 0 3 2 0 3
2
What is the flow in 1 1 What is the flow in 1 1
arc (3,2)? arc (2,6)?
-6 -6
2 7 3 2 7 3
6
1 3 6 0 1 3 6 0
-4 -4
2 3 2 3
0 0
4 5 4 5
2 0 3 2 0 3
3
3 1 3 1
4 4 4
2 2
1
7 7
5 2 5
3 1 2 3 2
3 3 6 6
4 4
5 4 5 4
2 1 1 1
3 2
2 2
7 7
6 7
3 1 3 0
6 6
5 4
5 3 5 2
1 1
2
2
7
7
3
6
4
5 2
4
0
1 Here is a spanning 1 There is a redundant constraint
5 -6 tree with arc costs. 5 -6 in the minimum cost flow
How can one choose problem.
2 7 node potentials so 2 7
3 -4 3 -4 One can set p1 arbitrarily. We
that reduced costs of
will let p1 = 0.
3 6 tree arcs are 0? 3 6
-2 1 -2 1
What is the node potential for 2?
4 5 4 5
0 0
1 1
5 -6 5 -6
-5 -5
-6
2 7 2 7
3 -4 3 -4
3 6 3 6
-2 1 -2 1
4 5 4 5
What is thenode potential for 7? What is the potential for node 3?
0 0
1 1
5 -6 5 -6
-5 -5
-6 -6
2 7 2 7
3 -4 3 -4
-2 -2
3 6 3 6 -1
-2 1 -2 1
4 5 4 5
What is the potential for node 6? What is the potential for node 4?
5
0 0
1 1
5 -6 5 -6
-5 -5
-6 -6
2 7 2 7
3 -4 3 -4
-2 -2
3 6 -1 3 6 -1
These are the node potentials
-2 1 -2 1 associated with this tree. They
4 5 4 5 do not depend on arc flows, nor
What is the potential for node 5? on costs of non-tree arcs.
-4 -4 -1
0
Node potentials 1
Flow on arcs 1
Original costs Reduced costs 4
3
-5
-6
2 7 2 7
7 4 2
6
-2
3 6 -1 3 6
-3 2 3 -3
4 5 4 5
-4 2 5
-1
Flow on arcs 1 1
4 4
3 3
2 7 2 7
4 1
6 3
3 6 3 6
2 3 0 2 0 3
4 5 4 5
6
1
2 7
3 6
4 5
7
1 1
2 7 2 7
3 6 3 6
4 5 4 5
2 7
3 6
4 5
8
9
MIT OpenCourseWare
http://ocw.mit.edu
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
15.081J/6.251J Introduction to Mathematical
Programming
2 Efficient algorithms
Slide 2
• The LO problem
min c′ x
s.t. Ax = b
x≥0
• A LO instance
min 2x + 3y
s.t. x + y ≤ 1
x , y ≥ 0
2.1 Size
Slide 3
• The size of an instance is the number of bits used to describe the instance,
• A number r ≤ U
r = ak 2k + ak−1 2k−1 + · · ·
+ a1 21 + a0
• Size of r is ⌊log 2 U ⌋ + 2
• Instance of LO: (c, A, b)
• Size is � �
(mn + m + n) ⌊log2 U ⌋ + 2
If there exists a constant α > 0 such that A terminates its computation after at most
α f (I) elementary steps for each instance I, then A runs in O(f ) time.
1
A “brute force” algorithm for solving the min-cost flow problem:
Consider all spanning trees and pick the best tree solution among the feasible ones.
Suppose we had a computer to check 1015 trees in a second. It would need more than
109 years to find the best tree for a 25-node min-cost flow problem.
It would need 1059 years for a 50-node instance.
That’s not efficient! Slide 6
Ideally, we would like to call an algorithm “efficient” when it is sufficiently fast to be
usable in practice, but this is a rather vague and slippery notion.
efficient = polynomial
has been accepted as the best available way of tying the empirical
matical concept.
2.5 Definition
Slide 9
An algorithm runs in polynomial time if its running time is O(|I|k ), where |I|
is the input size, and all numbers in intermediate computations can be stored
with O(|I|k ) bits.
2
3.1 The algorithm intuitively
Slide 11
• Problem: Decide whether a given polyhedron
P = x ∈ ℜn | Ax ≥ b
� �
is nonempty Slide 12
Et+1
P
xt 00
11
Et
11
00 xt+1
a′ x ≥ b
a′ x ≥ a′ xt
• Key property: We can find a new ellipsoid Et+1 that covers the half
ellipsoid and whose volume is only a fraction of the volume of the previous
ellipsoid Et
3
x2
E'
E
x1
3.3 Illustration
Slide 14
3.4 Assumptions
Slide 15
• A polyhedron P is full-dimensional if it has positive volume
• The polyhedron P is bounded: there exists a ball E0 = E(x0 , r2 I), with
• Either P is empty, or P has positive volume, i.e., Vol(P ) > v for some
v > 0
3.5 Input-Output
Slide 16
Input:
• A matrix A and a vector b that define the polyhedron P = {x ∈ ℜn |
a′i x ≥ bi , i = 1, . . . , m}
• A number v, such that either P is empty or Vol(P ) > v
4
• A ball E0 = E(x0 , r2 I) with volume at most V , such that P ⊂ E0
Output: A feasible point x∗ ∈ P if P is nonempty, or a statement that P is
empty
2. (Main iteration)
• If t = t∗ stop; P is empty.
• If xt ∈ P stop; P is nonempty.
/ P find a violated constraint, that is, find an i such that a′i xt < bi .
• If xt ∈
• Let Ht = {x ∈ ℜn | a′i x ≥ a′i xt }. Find an ellipsoid Et+1 containing Et ∩ Ht :
1 D a
xt+1 = xt + � t i ,
n + 1 a′i D t ai
n2
� �
2 D t ai a′i D t
D t+1 = 2 Dt − .
n −1 n + 1 a′i D t ai
• t := t + 1.
3.7 Correctness
Slide 18
Theorem: Let P be a bounded polyhedron that is either empty or full-dimensional
and for which the prior information x0 , r, v, V is available. Then, the ellipsoid
method decides correctly whether P is nonempty or not, i.e., if xt∗ −1 ∈
/ P , then
P is empty
3.8 Proof
Slide 19
• If xt ∈ P for t < t∗ , then the algorithm correctly decides that P is
nonempty
• Suppose x0 , . . . , xt∗ −1 ∈
/ P . We will show that P is empty.
• We prove by induction on k that P ⊂ Ek for k = 0, 1, . . . , t∗ . Note
induction.
Slide 20
5
• For any x ∈ P , we have
a′i(k) x ≥ bi(k) > a′i(k) xk
• Therefore, P ⊂ Ek ∩ Hk
Slide 21
By key geometric property, Ek ∩ Hk ⊂ Ek+1 ; hence P ⊂ Ek+1 and the induction is
complete
Vol(Et+1 )
< e−1/(2(n+1))
Vol(Et )
Vol(Et∗ ) ∗
< e−t /(2(n+1))
Vol(E0 )
V V
Vol(Et∗ ) < V e−⌈2(n+1) log v ⌉/(2(n+1)) ≤ V e− log v = v
If the ellipsoid method has not terminated after t∗ iterations, then Vol(P ) ≤ Vol(Et∗ ) ≤
v. This implies that P is empty
3.10 Boundedness of P
Slide 23
Let A be an m × n integer matrix and let b a vector in ℜn . Let U be the largest
absolute value of the entries in A and b.
Every extreme point of the polyhedron P = {x ∈ ℜn | Ax ≥ b} satisfies
−(nU )n ≤ xj ≤ (nU )n , j = 1, . . . , n
Slide 24
• All extreme points of P are contained in
PB = x ∈ P �
|xj | ≤ (nU )n , j = 1, . . . , n
� � �
2n
� �
• Since
� PB ⊆ 2n E 0,
� n(nU ) I , we can start the ellipsoid method with E0 =
E 0, n(nU ) I
• �n 2
V ol(E0 ) ≤ V = 2n(nU )n = (2n)n (nU )n
�
6
3.11 Full-dimensionality
Slide 25
Let P = {x ∈ ℜn | Ax ≥ b}. We assume that A and b have integer entries,
which are bounded in absolute value by U . Let
1 � �−(n+1)
ǫ= (n + 1)U .
2(n + 1)
Let
Pǫ = x ∈ ℜn | Ax ≥ b − ǫe ,
� �
3.12 Complexity
Slide 27
• P = {x ∈ ℜn | Ax ≥ b}, where A, b have integer entries with magni
tude bounded by some U and has full rank. If P is bounded and either
empty
� or full-dimensional,
� the ellipsoid method decides if P is empty in
• It has been shown that only O(n3 log U ) binary digits of precision are needed,
and the numbers computed during the algorithm have polynomially bounded
size
• The linear programming feasibility problem with integer data can be solved in
polynomial time
7
4.1 Sliding objective
Slide 30
• �
We first run the ellipsoid method to find a feasible solution x0 ∈ P =
x ∈ ℜn | Ax ≥ b .
�
P ∩ x ∈ ℜn | c′ x < c′ x0
� �
is empty.
• If it is empty, then x0 is optimal. If it is nonempty, we find a new solution
x1 in P with objective function value strictly smaller than c′ x0 .
Slide 31
ellipsoid method.
- c
programming problems
8
MIT OpenCourseWare
http://ocw.mit.edu
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
15.081J/6.251J Introduction to Mathematical
Programming
2 Problems
2.1 Example
� Slide 2
min ci xi
i
�
ai xi ≥ |S|, for all subsets S of {1, . . . , n}
i∈S
scalar parameters a1 , . . . , an
constant.
1
3 The separation problem
Slide 5
Given a polyhedron P ⊂ ℜn and a vector x ∈ ℜn , the separation problem is
to:
• Either decide that x ∈ P , or
• Find a vector d such that d′ x < d′ y for all y ∈ P
What is the separation problem for
�
ai xi ≥ |S|, for all subsets S of {1, . . . , n}?
i∈S
4 Polynomial solvability
4.1 Theorem
Slide 6
If we can solve the separation problem (for a family of polyhedra) in time
polynomial in n and log U , then we can also solve linear optimization problems
in time polynomial in n and log U . If log U ≤ Cnℓ logℓ U0 , then it is also
polynomial in log U0
• Proof ?
• Converse is also true
• Separation and optimization are polynomially equivalent
MST
for TSP)
Slide 8
• Given a graph G = (V, E) undirected and Costs ce , e ∈ E.
• Find a tree of minimum cost spanning all the nodes.
�
1, if edge e is included in the tree
• Decision variables xe =
0, otherwise
Slide 9
• The tree should be connected. How can you model this requirement?
2
• Let S be a set of vertices. Then S and V \ S should be connected
�
i∈S
• Let δ(S) = {e = (i, j) ∈ E :
j ∈V \S
• Then, �
xe ≥ 1
e∈δ(S)
4.2.1 Formulation
� Slide 10
IZMST = min ce xe
e∈E
�
xe ≥ 1 ∀ S ⊆ V, S �= ∅, V
e∈δ(S)
�
H xe = n − 1
e∈E
xe ∈ {0, 1}.
How can you solve the LP relaxation?
4.3.1 Formulation
� Slide 12
1, if edge e is included in the tour.
xe =
0, otherwise.
�
min ce xe
e∈E
�
s.t. xe ≥ 2, S⊆E
e∈δ(S)
�
xe = 2, i∈V
e∈δ(i)
xe ∈ {0, 1}
3
4.4 Probability Theory
Slide 13
• Events A1 , A2
• P (A1 ) = 0.5, P (A2 ) = 0.7, P (A1 ∩ A2 ) ≤ 0.1
• Are these beliefs consistent?
• General problem: Given n events Ai i ∈ N = {1, . . . , n}, beliefs
P(Ai ) ≤ pi , i ∈ N,
P(Ai ∩ Aj ) ≥ pij , i, j ∈ N, i < j.
• Given the numbers pi and pij , which are between 0 and 1, are these beliefs
consistent?
4.4.1 Formulation
� � � � �� Slide 14
x(S) = P ∩i∈S Ai ∩ ∩i∈S
/ Ai ,
�
x(S) ≤ pi , i ∈ N,
{S|i∈S}
�
x(S) ≥ pij , i, j ∈ N, i < j,
{S|i,j∈S}
�
x(S) = 1,
S
x(S) ≥ 0, ∀ S.
Slide 15
The previous LP is feasible if and only if there does not exist a vector (u, y, z) such
that � �
yij + ui + z ≥ 0, ∀ S,
i,j∈S,i<j i∈S
� �
pij yij + pi ui + z ≤ −1,
i,j∈N,i<j i∈N
yij ≤ 0, ui ≥ 0, i, j ∈ N, i < j.
Slide 16
Separation problem:
� �
z ∗ + min f (S) = ∗
yij + ui∗ ≥ 0?
S
i,j∈S,i<j i∈S
∗ ∗ ∗ ∗ ∗ ∗
Example: y12 = −2, y13 = −4, y14 = −4, y23 = −4, y24 = −1, y34 = −7,
∗ ∗ ∗ ∗ ∗
u1 = 9, u2 = 6, u3 = 4, u4 = 2, and z = 2 Slide 17
Slide 18
• The minimum cut corresponds to S0 = {3, 4} with value c(S0 ) = 21.
� �
∗
• f (S0 ) = yij + u∗i
= −7 + 4 + 2 = −1
i,j∈S0 ,i<j i∈S0
∗ ∗
• f (S) + z ≥ f (S0 ) + z = −1 + 2 = 1 > 0, ∀S
• Given solution (y ∗ , u∗ , z ∗ ) is feasible
4
1, 2
2
1, 3 1
4 9
4 1, 4 2 6
s t
4 4
2,3 3
1
2
2,4 4
7
3,4
5 Conclusions
Slide 19
• Ellipsoid algorithm can characterize the complexity of solving LOPs with
one
5
MIT OpenCourseWare
http://ocw.mit.edu
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
15.081J/6.251J Introduction to Mathematical
Programming
2 History
Slide 2
• In 1984, Karmakar at AT&T “invented” interior point method
• In 1985, Affine scaling “invented” at IBM + AT&T seeking intuitive ver
markar’s algorithm
3 Geometric intuition
3.1 Notation
Slide 3
min c′ x
s.t. Ax = b
x ≥ 0
and its dual
max p′ b
s.t. p′ A ≤ c′
• P = {x | Ax = b, x ≥ 0}
• {x ∈ P | x > 0} the interior of P and its elements interior points
1
c
x2 .
x1 .0
x.
2
d=x−y
min c′ d
s.t. Ad = 0
||Y −1 d|| ≤ β
4.2 Solution
Slide 7
If rows of A are linearly independent and c is not a linear combination of the
rows of A, then
• optimal solution d∗ :
Y 2 (c − A′ p)
d∗ = −β �� � , p = (AY 2 A′ )−1 AY 2 c.
|Y (c − A′ p)�|
• x = y + d∗ ∈ P
� �
• c′ x = c′ y − β �|Y (c − A′ p)�| < c′ y
4.2.1 Proof
Slide 8
• AY 2 A′ is invertible;if not, there exists some z =
� 0 such that z ′ AY 2 A′ z = 0
′ ′
• w = Y A z; w w = 0 ⇒ w = 0
• Hence A′ z = 0 contradiction
• Since c is not a linear combination of the rows of A, c − A′ p = � 0 and d∗ is well
defined
• d∗ feasible
Y (c − A′ p)
Y −1 d∗ = −β � � ⇒ ||Y −1 d∗ || = β
�|Y (c − A′ p)�|
Ad∗ = 0, since AY 2 (c − A′ p) = 0
•
c′ d = (c′ − p′ A)d
= (c′ − p′ A)Y Y −1 d
� �
≥ −�|Y (c − A′ p)�| · ||Y −1 d||
� �
≥ −β �|Y (c − A′ p)�|.
Slide 9
•
c′ d∗ = (c′ − p′ A)d∗
Y 2 (c − A′ p)
= −(c′ − p′ A)β � �
�|Y (c − A′ p)�|
� �′ � �
Y (c − A′ p) Y (c − A′ p)
= −β � �
�|Y (c − A′ p)�|
� �
= −β �|Y (c − A′ p)�|.
� �
• c′ x = c′ y + c′ d∗ = c′ y − β �|Y (c − A′ p)�|
3
4.3 Interpretation
Slide 10
• y be a nondegenerate BFS with basis B
• A = [B N ]
• Y = diag(y1 , . . . , ym , 0, . . . , 0) and Y 0 = diag(y1 , . . . , ym ), then AY =
[BY 0 0]
p = (AY 2 A′ )−1 AY 2 c
= (B ′ )−1 Y −2
0 B
−1
BY 20 cB
= (B ′ )−1 cB
r = c − A′ (B ′ )−1 cB
• Under degeneracy?
4.4 Termination
Slide 11
y and p be primal and dual feasible solutions with
c′ y − b′ p < ǫ
c′ y ∗ ≤ c′ y < c′ y ∗ + ǫ,
b′ p∗ − ǫ < b′ p ≤ b′ p∗
4.4.1 Proof
Slide 12
• c′ y ∗ ≤ c′ y
• By weak duality, b′ p ≤ c′ y ∗
• Since c′ y − b′ p < ǫ,
c′ y < b′ p + ǫ ≤ c′ y ∗ + ǫ
b′ p∗ = c′ y ∗ ≤ c′ y < b′ p + ǫ
4
5 Affine Scaling
5.1 Inputs
Slide 13
• (A, b, c);
• an initial primal feasible solution x0 > 0
• the optimality tolerance ǫ > 0
• the parameter β ∈ (0, 1)
xk > 0, let
X k = diag(xk1 , . . . , xkn ),
pk = (AX 2k A′ )−1 AX 2k c,
rk = c − A′ pk .
X 2k rk
xk+1 = xk − β .
||X k rk ||
5.3 Variants
Slide 15
• ||u||∞ = maxi |ui |, γ(u) = max{ui | ui > 0}
• γ(u) ≤ ||u||∞ ≤ ||u||
• Short-step method.
• Long-step variants
X 2k r k
xk+1 = xk − β
||X k r k ||∞
X 2k r k
xk+1 = xk − β
γ(X k r k )
5
6 Convergence
6.1 Assumptions
Slide 16
Assumptions A:
(a) The rows of the matrix A are linearly independent.
(b) The vector c is not a linear combination of the rows of A.
(c) There exists an optimal solution.
(d) There exists a positive feasible solution.
Assumptions B:
(a) Every BFS to the primal problem is nondegenerate.
(b) At every BFS to the primal problem, the reduced cost of every nonbasic
variable is nonzero.
6.2 Theorem
Slide 17
If we apply the long-step affine scaling algorithm with ǫ = 0, the following hold:
(a) For the Long-step variant and under Assumptions A and B, and if 0 < β < 1,
(b) For the second Long-step variant, and under Assumption A and if 0 < β <
2/3, the sequences xk and pk converge to some primal and dual optimal solutions,
respectively
7 Initialization
Slide 18
min c′ x + M xn+1
s.t. � � Ax + (b − Ae)xn+1 = b
x, xn+1 ≥ 0
8 Example
Slide 19
max x1 + 2x2
s.t. x1 + x2 ≤ 2
−x1 + x2 ≤ 1
x1 , x2 ≥0
9 Practical Performance
Slide 20
• Excellent practical performance, simple
• Major step: invert AX 2k A′
• Imitates the simplex method near the boundary
6
x2
..
1 ...
..
..
2 x1
MIT OpenCourseWare
http://ocw.mit.edu
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
15.081J/6.251J Introduction to Mathematical
Programming
1 Outline
Slide 1
1. Barrier Methods
2. The Central Path
3. Approximating the Central Path
4. The Primal Barrier Algorithm
5. Correctness and Complexity
2 Barrier methods
Slide 2
min f (x)
s.t. gj (x) ≤ 0, j = 1, . . . , p
hi (x) = 0, i = 1, . . . , m
2.1 Strategy
Slide 3
• A barrier function G(x) is a continous function with the property that is
• Examples:
p p
� � 1
G(x) = − log(−gj (x)), G(x) = −
j=1 j=1
gj (x)
Slide 4
• Consider a sequence of µk : 0 < µk+1 < µk and µk → 0.
• Consider the problem
1
. x*
.
x(0.01) c
central p a th . x(0.1)
.
x(1)
. x(10)
.
analy t ic center
Minimizer: x(µ)
3 Central Path
Slide 6
• As µ varies, minimizers x(µ) form the central path
• limµ→0 x(µ) exists and is an optimal solution x∗ to the initial LP
• For µ = ∞, x(∞) is called the analytic center
n
�
min − log xj
j=1
s.t. Ax = b
Slide 7
3.1 Example
Slide 8
min x2
s.t. x1 + x2 + x3 = 1
x1 , x2 , x3 ≥ 0
2
x3 ( 1 / 3 , 1/ 3 , 1/ 3 )
the analy t ic
Q centerof P
.
P
( 1 / 2 , 0 , 1/ 2 )
the analy t ic
.
x2
centerof Q
the central p a th
x1
�
• Q = x | x = (x1 , 0, x3 ), x1 + x3 = 1, x ≥ 0}, set of optimal solutions to
original LP
1 − x2 (µ)
x1 (µ) =
2 �
1 + 3µ − 1 + 9µ2 + 2µ
x2 (µ) =
2
1 − x2 (µ)
x3 (µ) =
2
The analytic center: (1/3, 1/3, 1/3) Slide 9
• Solution (KKT):
Ax(µ) = b
x(µ) ≥ 0
A′ p(µ) + s(µ) = c
s(µ) ≥ 0
X(µ)S(µ)e = eµ
3
Slide 11
• Theorem: If x∗ , p∗ , and s∗ satisfy optimality conditions, then they are
c − µX −1 e + µX −2 d − A′ p = 0
Ad = 0
Slide 15
and pi , i = 1, . . . , m).
4
.x*
.
x(0.01) c
central p a th . x(0.1)
.
x(1)
. x(10)
.
analy t ic center
• Solution:
� �� 1
�
d(µ) = I − X 2 A′ (AX 2 A′ )−1 A xe − X 2 c
µ
2 ′ −1 2
p(µ) = (AX A ) A(X c − µxe)
a Newton step
• Measure of closeness �� ��
�� 1 ��
�� XSe − e�� ≤ β,
�� µ ��
Slide 18
5
5 The Primal Barrier Algorithm
Slide 19
Input
(a) (A, b, c); A has full row rank;
(b) x0 > 0, s0 > 0, p0 ;
(c) optimality tolerance ǫ > 0;
(d) µ0 , and α, where 0 < α < 1. Slide 20
1. (Initialization) Start with some primal and dual feasible x0 > 0, s0 >
0, p0 , and set k = 0.
X k = diag(xk1 , . . . , xkn ),
µk+1 = αµk
Slide 21
4. (Computation of directions) Solve the linear system
µk+1 X −2 ′
k d−A p = µ
k+1
X −1
k e−c
Ad = 0
x k+1 = xk + d,
pk+1 = p,
sk+1 = c − A′ p.
6 Correctness
√ Slide 22
β−β
Theorem Given α = 1 − √ √ , β < 1, (x0 , s0 , p0 ), (x0 > 0, s0 > 0):
β+ n
�� ��
�� 1 ��
�� X 0 S 0 e − e�� ≤ β.
�� µ0 ��
Then, after � √ √
(s0 )′ x0 (1 + β)
�
β+ n
K= √ log
β−β ǫ(1 − β)
iterations, (xK , sK , pK ) is found:
(sK )′ xK ≤ ǫ.
6
6.1 Proof
� � Slide 23
� 1 �
• Claim (by induction): �| µk X k S k e − e��| ≤ β
�
µk+1 X −2 ′
k d−A p = µ
k+1
X −1
k e − c,
Ad = 0
2
||X −1
k d|| = d′ X k−2 d
� �′
1
= X −1
k e − c d
µk+1
� �′
1 1 k k
= X−
k e − (s + A p ) ′
d
µk+1
� �′
1
= X −1
k e− sk d
µk+1
� �′
1
= − X kSke − e X −1
k d
µk+1
� �
� 1 �
≤ ��| k+1 X k S k e − e��| ||X −1
k d||
µ
� 1
≤ β||X −
k d||
√
hence, ||X −1
k d|| ≤ β < 1.
7
• We next show that xk+1 and (pk+1 , sk+1 ) are primal and dual feasible Since
Ad = 0, we have
Axk+1 = b
xk+1 = xk + d = X k (e + X − 1
k d) > 0,
because ||X −1
k d|| < 1
A′ pk+1 + sk+1 = c,
by construction and
because ||X −1
k d|| < 1
•
� �
dj
xk+1
j = xjk 1 + ,
xkj
� �
µk+1 dj
sk+1
j = 1− k .
xkj xj
Therefore,
� � � �
1 1 dj µk+1 dj
xk+1 sk+1 − 1 = k+1 xkj 1 + k 1− −1
µk+1 j j
µ xj xkj xkj
� �2
dj
= − .
xkj
�
• D = diag(d1 , . . . , dn ), ||u||1 = i
|ui |. Note that ||u|| ≤ ||u||1
� �
� 1 � � −2 2 �
�|
� µk+1 X k+1 S k+1 e − e�| = |X k D e |
� � �
� �
2 �
≤ �|X −2
k D e | 1
2 2
= e′ X −
k D e
2
= e′ DX −
k De
= d′ X −2
k d
1 � 2
� �
= �|X −
k d |
�
≤ ( β)2
= β,
8
• � √ �k √
β−β
k k 0 β−β 0 −k √ √
β+ n µ0
µ =α µ = 1− √ √ µ ≤e
β+ n
• After
�√ √ � � √ √ �
β+ n µ0 n(1 + β) β+ n (s0 )′ x0 (1 + β)
√ log ≤ √ log =K
β−β ǫ β−β ǫ(1 − β)
iterations, the primal barrier algorithm finds primal and dual solutions xK ,
7 Complexity
Slide 24
• Work per iteration involves solving a linear system with m + n equations
9
MIT OpenCourseWare
http://ocw.mit.edu
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
15.081J/6.251J Introduction to Mathematical
Programming
1 Outline
Slide 1
1. The Barrier Problem
2. Solving Equations
3. The Primal-Dual Barrier Algorithm
4. Insight on Behavior
5. Computational Aspects
6. Conclusions
KKT: � �′
1 1
c−µ ,..., + A′ p(µ) = 0
x1 (µ) xn (µ)
Ax(µ) = b, x(µ) ≥ 0
Ax(µ) = b
x(µ) ≥ 0
′
A p(µ) + s(µ) = c
s(µ) ≥ 0
sj (µ)xj (µ) = µ or
X(µ)S(µ)e = eµ
� � � �
X(µ) = diag x1 (µ), . . . , xn (µ) , S(µ) = diag s1 (µ), . . . , sn (µ)
1
3 Solving Equations
Slide 4
Ax − b
F (z) = A′ p + s − c
XSe − µe
z = (x, p, s), r = 2n + m
Solve
F (z ∗ ) = 0
F (z k ) + J (z k )d = 0
Set z k+1 = z k + d (d is the Newton direction) Slide 6
(xk , pk , sk ) current primal and dual feasible solution
Newton direction d = (dkx , dkp , dsk )
k
Axk − b
A 0 0 dx
0 A′ I dkp = − A′ pk + sk − c
Sk 0 Xk dks X k S k e − µk e
k+1 k k
p = pk + βD dp
k+1 k k k
s = s + βD ds
xk
� � ��
k
βP = min 1, α min − ki ,
{i|(dk
x )i <0} (dx )i
ski
� � ��
k
βD = min 1, α min − ,
{i|(dk
s )i <0} (dks )i
0<α<1
2
4 The Primal-Dual Barrier Algorithm
Slide 8
1. (Initialization) Start with x0 > 0, s0 > 0, p0 , and set k = 0
2. (Optimality test) If (sk )′ xk < ǫ stop; else go to Step 3.
3. (Computation of Newton directions)
(sk )′ xk
µk =
n
Xk = diag(xk1 , . . . , xkn )
S k = diag(sk1 , . . . , skn )
dkx Axk − b
A 0 0
0 A
′
I dkp = − A′ pk + sk − c
Sk 0 Xk dks X k S k e − µk e
Slide 9
4. (Find step lengths)
xki
� � ��
βPk = min 1, α min −
{i|(dk
x )i <0} (dkx )i
sk
� � ��
k
βD = min 1, α min − ki
{i|(dk
s )i <0} (ds )i
5. (Solution update)
5 Insight on behavior
Slide 10
• Affine Scaling
� �
daffine = −X 2 I − A′ (AX 2 A′ )−1 AX 2 c
• Primal barrier
�� �
1 2
�
dprimal−barrier = I − X 2 A′ (AX 2 A′ )−1 A Xe − X c
µ
3
• For µ = ∞ � �
dcentering = I − X 2 A′ (AX 2 A′ )−1 A Xe
• Note that
1
dprimal−barrier = dcentering + daffine
µ
• When µ is large, then the centering direction dominates, i.e., in the beginning,
• When µ is small, then the affine scaling direction dominates, i.e., towards the
end, the barrier algorithm behaves like the affine scaling algorithm
AX 2k A′ = LL′ ,
Ly = f , L′ d = y
entries) of L
7 Conclusions
Slide 12
• IPMs represent the present and future of Optimization.
• Very successful in solving very large problems.
• Extend to general convex problems
4
MIT OpenCourseWare
http://ocw.mit.edu
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
15.081J/6.251J Introduction to Mathematical
Programming
2 Preliminaries
Slide 2
• A symmetric matrix A is positive semidefinite (A � 0) if and only if
u′ Au ≥ 0 ∀ u ∈ Rn
• trace(AB) = trace(BA)
• A • B = trace(A′ B)
3 SDO
Slide 4
• C symmetric n × n matrix
• Ai , i = 1, . . . , m symmetric n × n matrices
• bi , i = 1, . . . , m scalars
• Semidefinite optimization problem (SDO)
(P ) : min C • X
s.t. Ai • X = bi i = 1, . . . , m
X�0
1
3.1 Example
Slide 5
n = 3 and m = 2
1 0 1 0 2 8 1 2 3
A1 = 0 3 7 , A2 = 2 6 0, C = 2 9 0
1 7 5 8 0 4 3 0 7
b1 = 11, b2 = 19
x11 x12 x13
X = x21 x22 x23
x31 x32 x33
Slide 6
3.2 LO as SDO
Slide 7
LO : min c′ x
s.t. Ax = b
x≥0
ai1 0 ... 0 c1 0 ... 0
0 ai2 ... 0 0 c2 ... 0
Ai =
... .. .. ... , C = ...
.. .. ..
. . . . .
0 0 . . . ain 0 0 . . . cn
Slide 8
(P ) : min C • X
s.t. Ai • X = bi , i = 1, . . . , m
Xij = 0, i = 1, . . . , n, j = i + 1, . . . , n
X�0
x1 0 . . . 0
0 x2 . . . 0
X = ... .. . . .
. . ..
0 0 . . . xn
2
4 Duality
Slide 9
m
�
(D) : max yi bi
i=1
�m
s.t. yi Ai + S = C
i=1
S�0
Equivalently,
m
�
(D) : max yi bi
i=1
m
�
s.t. C − yi Ai � 0
i=1
4.1 Example
Slide 10
(D) max 11y1 + 19y2
1 0 1 0 2 8 1 2 3
s.t. y1 0 3 7 + y2 2 6 0+S = 2 9 0
1 7 5 8 0 4 3 0 7
S�0
3
4.3 Proof
Slide 12
• We must show that if S � 0 and X � 0, then S • X ≥ 0
• Let S = P DP ′ and X = QEQ′ where P, Q are orthonormal matrices
S • X = trace(S ′ X) = trace(SX)
= trace(P DP ′ QEQ′ )
n
�
= trace(DP ′ QEQ′ P ) = Djj (P ′ QEQ′ P )jj ≥ 0,
j=1
• The latter case implies that the j th row of P ′ QEQ′ P is all zeros. There
Theorem
• If there exist feasible solutions X̂ for (P ) and (ŷ, Ŝ) for (D) such that
X̂ ≻ 0, Ŝ ≻ 0
• then, both (P ) and (D) attain their optimal values zP∗ and zD
∗
• zP∗ = zD
∗
5 SDO vs LO
Slide 14
• There may be a finite or infinite duality gap. The primal and/or dual may
or may not attain their optima. Both problems will attain their common
4
• There is no finite algorithm for solving SDO. There is a simplex algorithm,
• Given rational data, the feasible region may have no rational solutions.
The optimal solution may not have rational components or rational eigen
values.
i = 1, . . . , m
min t
5
• Theorem λmax (X) ≤ t ⇔ t · I − X � 0
•
k
�
λi (X) ≤ t ⇔ t − k · s − trace(Z) ≥ 0
i=1
Z�0
Z −X +sI �0
n
�
• Recall trace(Z) = Zii
i=1
6.3 Optimizing
Structural Dynamics
Slide 19
• Select xi , cross-sectional area of structure i, i = 1, . . . , n
�
• M (x) = M 0 + i xi M i , mass matrix
�
• K(x) = K 0 + i xi K i , stiffness matrix
�
• Structure weight w = w0 + i xi wi
• Dynamics
¨ + K(x)d = 0
M (x)d
Slide 20
• d(t) vector of displacements
n
�
• di (t) = αij cos(ωj t − φj )
j=1
• det(K(x) − M (x)ω 2 ) = 0; ω1 ≤ ω2 ≤ · · · ≤ ωn
1/2
• Fundamental frequency: ω1 = λmin (M (x), K(x))
• We want to bound the fundamental frequency
ω1 ≥ Ω ⇐⇒ M (x)Ω2 − K(x) � 0
• Minimize weight
Slide 21
Problem: Minimize weight subject to
Fundamental frequency ω1 ≥ Ω
Limits on cross-sectional areas
Formulation
�
min w0 + i xi wi
6
6.4 Measurements with Noise
Slide 22
• x: ability of a random student on k tests
• y = x + v; E[y] = x̄
7
6.6 MAXCUT
Slide 26
• Given G = (N, E) undirected graph, weights wij ≥ 0 on edge (i, j) ∈ E
�
• Find a subset S ⊆ N : i∈S,j∈S̄ wij is maximized
6.6.1 Reformulation
Slide 27
• Let Y = xx′ , i.e., Yij = xi xj
• Let W = [wij ]
• Equivalent Formulation
n n
1 ��
M AXCU T : max wij − W • Y
4 i=1 j=1
s.t. xj ∈ {−1, 1}, j = 1, . . . , n
Yjj = 1, j = 1, . . . , n
Y = xx′
6.6.2 Relaxation
Slide 28
• Y = xx′ � 0
• Relaxation
n n
1 ��
RELAX : max wij − W • Y
4 i=1 j=1
s.t. Yjj = 1, j = 1, . . . , n
Y � 0
Slide 29
•
M AXCU T ≤ RELAX
8
7 Barrier Algorithm for SDO
Slide 30
• X � 0 ⇔ λ1 (X) ≥ 0, . . . , λn (X) ≥ 0
• Natural barrier to repel X from the boundary λ1 (X) > 0, . . . , λn (X) > 0:
n
�
− log(λi (X)) =
j=1
n
�
− log( λi (X)) = − log(det(X))
j=1
Slide 31
• Logarithmic barrier problem
X ≻ 0,
m
�
C − µX −1 = yi A i .
i=1
X ≻ 0, X = LL′
m
�
yi A i + S = C
i=1
I − µ1 L′ SL = 0
• Nonlinear equations: Take a Newton step analogously to IPM for LO.
�√
ǫ0
�
• Barrier algorithm needs O n log iterations to reduce duality gap from ǫ0
ǫ
to ǫ
9
8 Conclusions
Slide 32
• SDO is a very powerful modeling tool
• SDO represents the present and future in continuous optimization
• Barrier Algorithm is very powerful
• Research software available
10
MIT OpenCourseWare
http://ocw.mit.edu
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
15.081J/6.251J Introduction to Mathematical
Programming
2 Integer Programming
2.1 Mixed IP
Slide 2
(MIP) max c′ x + h′ y
s.t. Ax + By ≤ b
n
x ∈ Z+ (x ≥ 0, x integer)
n
y ∈ R+ (y ≥ 0)
2.2 Pure IP
Slide 3
(IP) max c′ x
s.t. Ax ≤ b
n
x ∈ Z+
Important special case: Binary IP
(BIP) max c′ x
s.t. Ax ≤ b
x ∈ {0, 1}n
2.3 LP
Slide 4
(LP) max c′ x
s.t. By ≤ b
n
y ∈ R+
1
n
�
max cj xj
j=1
�
s.t. aj xj ≤ b
xj ∈ {0, 1}
x2 − x1 = 0
0 ≤ y ≤ U x, x ∈ {0, 1}
m jobs
cij : cost
� of assigning person j to job i.
�
s.t. xij = 1 each job is assigned
j=1
�m
i=1
xij ∈ {0, 1}
2
3.5 Nonconvex functions
Slide 10
• How to model min c(x), where c(x) is piecewise linear but not convex?
I = {1 . . . m} set of clients
• Decision variables
�
1, a facility is placed at location j
xij =
0, otherwise
yij = fraction of demand of client i
satisfied by facility j.
Slide 12
n
� m �
� n
IZ1 = min cj xj + hij yij
j=1 i=1 j=1
�n
s.t. yij = 1
j=1
yij ≤ xj
xj ∈ {0, 1}, 0 ≤ yij ≤ 1.
Slide 13
Consider an alternative formulation.
n
� m �
� n
IZ2 = min cj xj + hij yij
j=1 i=1 j=1
�n
s.t. yij = 1
j=1
�m
yij ≤ m · xj
i=1
xj ∈ {0, 1}, 0 ≤ yij ≤ 1.
4.2 Observations
Slide 14
• IZ1 = IZ2 , since the integer points both formulations define are the same.
• n �
� 0 ≤ xj ≤ 1
P1 = {(x, y) : yij = 1, yij ≤ xj ,
0 ≤ yij ≤ 1
j=1
3
n
� m
�
P2 = {(x, y) : yij = 1, yij ≤ m · xj ,
j=1 i=1
�
0 ≤ xj ≤ 1
0 ≤ yij ≤ 1
Slide 15
• Let
Z1 = min cx + hy, Z2 = min cx + hy
(x, y) ∈ P1 (x, y) ∈ P2
• Z2 ≤ Z1 ≤ IZ1 = IZ2
4.3 Implications
Slide 16
• Finding IZ1 (= IZ2 ) is difficult.
• Solving to find Z1 , Z2 is an LP. Since Z1 is closer to IZ1 several methods
Slide 17
• Formulation 1 is better than Formulation 2. (Despite the fact that 1 has
Slide 19
• The extreme points of CH(H) have {0, 1} coordinates.
• So, if we know CH(H) explicitly, then by solving min cx + hy, (x, y) ∈
CH(H) ⊆ P1 ⊆ P2
4
5 Minimum Spanning
Tree (MST)
Slide 20
• How do telephone companies bill you?
• It used to be that rate/minute: Boston → LA proportional to distance in
MST
for TSP)
Slide 21
• Given a graph G = (V, E) undirected and Costs ce , e ∈ E.
• Find a tree of minimum cost spanning all the nodes.
�
1, if edge e is included in the tree
• Decision variables xe =
0, otherwise
Slide 22
• The tree should be connected. How can you model this requirement?
• Let S be a set of vertices. Then S and V \ S should be connected
�
i∈S
• Let δ(S) = {e = (i, j) ∈ E :
j ∈V \S
• Then, �
xe ≥ 1
e∈δ(S)
5.1 Formulation
� Slide 23
IZMST = min ce xe
e∈E
�
xe ≥ 1 ∀ S ⊆ V, S �= ∅, V
e∈δ(S)
�
H xe = n − 1
e∈E
xe ∈ {0, 1}.
Is this a good formulation? Slide 24
Pcut = {x ∈ R|E| : 0 ≤ x ≤ e,
�
xe = n − 1
e∈E
�
xe ≥ 1 ∀ S ⊆ V, S �= ∅, V }
e∈δ(S)
5
5.2 What is CH(H)?
Slide 25
Let �
Psub = {x ∈ R|E| : xe = n − 1
e∈E
�
xe ≤ |S| − 1 ∀ S ⊆ V, S =
� ∅, V }
e∈E(S)
� �
i∈S
E(S) = e = (i, j) :
j∈S
Why is this a valid IP formulation? Slide 26
straints.
6.1 Formulation I
� Slide 28
1, if edge e is included in the tour.
xe =
0, otherwise.
�
min ce xe
e∈E
�
s.t. xe ≥ 2, S⊆E
e∈δ(S)
�
xe = 2, i∈V
e∈δ(i)
xe ∈ {0, 1}
6.2 Formulation II
� Slide 29
min �ce xe
s.t. xe ≤ |S| − 1, S ⊆ E
e∈E(S)
�
xe = 2, i ∈ V
e∈δ(i)
xe ∈ {0, 1}
Slide 30
6
T SP
� �
Pcut = {x ∈ R|E| ; xe ≥ 2, xe = 2
e∈δ(S) e∈δ(i)
0 ≤ xe ≤ 1}
�
T SP
Psub = {x ∈ R|E| ; xe = 2
e∈δ(i)
�
xe ≤ |S| − 1
e∈δ(S)
0 ≤ xe ≤ 1}
Slide 31
T SP T SP
• Theorem: Pcut = Psub �⊇ CH(H)
• Nobody knows CH(H) for the TSP
7 Minimum Matching
Slide 32
• Given G = (V, E); ce costs on e ∈ E. Find a matching of minimum cost.
• Formulation: �
min �ce xe
s.t. xe = 1, i∈V
e∈δ(i)
xe ∈ {0, 1}
8 Observations
Slide 34
• For MST, Matching there are efficient algorithms. CH(H) is known.
• For TSP � ∃ efficient algorithm. TSP is an N P − hard problem. CH(H)
is not known.
7
9 Summary
Slide 35
1. An IP formulation is better than another one if the polyhedra of their LP
is known.
8
MIT OpenCourseWare
http://ocw.mit.edu
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.
15.081J/6.251J Introduction to Mathematical
Programming
2.1 Algorithm
Slide 3
• Solve the LP relaxation. Let x∗ be an optimal solution.
• If x∗ is integer stop; x∗ is an optimal solution to IP.
• If not, add a linear inequality constraint to LP relaxation that all integer
2.2 Example
Slide 4
• Let x∗ be an optimal BFS to LP ralxation with at least one fractional
basic variable.
1
• �
xi + aij xj = ai0 .
j∈N
• Since xj integer, �
xi + ⌊aij ⌋xj ≤ ⌊ai0 ⌋.
j∈N
• Valid cut
2.4 Example
Slide 6
min x1 − 2x2
s.t. −4x1 + 6x2 ≤ 9
x1 + x2 ≤ 4
x1 , x2 ≥0
x1 , x2 integer.
We transform the problem in standard form
min x1 − 2x2
s.t. −4x1 + 6x2 + x3 = 9
x1 + x2 + x4 = 4
x1 , . . . , x4 ≥ 0
x1 , . . . , x4 integer.
LP relaxation: x1 = (15/10, 25/10). Slide 7
•
1 1 25
x2 + x3 + x4 = .
10 10 10
• Gomory cut
x2 ≤ 2.
• Add constraints x2 + x5 = 2, x5 ≥ 0
• New optimal x2 = (3/4, 2).
• One of the equations in the optimal tableau is
1 6 3
x1 − x3 + x5 = .
4 4 4
• New Gomory cut
x1 − x3 + x5 ≤ 0,
2
x2
.
x1 - 3 x 1 + 5x2 < 7
2 ..
x2
x3
x2 < 2
0
1 2 3 4 x1
(stop), or break the corresponding problem into further subproblems, which are
3.1 LP Based
Slide 10
• Compute the lower bound b(F ) by solving the LP relaxation of the discrete
optimization problem.
xi ≤ ⌊x∗i ⌋, or xi ≥ ⌈xi∗ ⌉.
the problem
strategies.
3.2 Example
Slide 11
max 12x1 + 8x2 + 7x3 + 6x4
s.t. 8x1 + 6x2 + 5x3 + 4x4 ≤ 15
x1 , x2 , x3 , x4 are binary.
3
Ob j e ctiv e v a l u e =22.2
x1=1, x 2=0, x 3=0 . 6 , x 4=1
x3=0 x3=1
Ob j e ctiv e v a l u e =22.2
x1=1, x 2=0, x 3=0 . 6 , x 4=1
x3=0 x3=1
x4=0 x4=1
LP relaxation Slide 12
x1 ≤ 1, x2 ≤ 1, x3 ≤ 1, x4 ≤ 1
x1 , x2 , x3 , x4 ≥ 0
Slide 15
• There are n + 1 pigeons with n holes. We want to place the pigeons in the Slide 16
holes in such a way that no two pigeons go into the same hole.
• Formulation 1:
�
j
xij = 1, i = 1, . . . , n + 1
xij + xkj ≤ 1, ∀j, i =
� k
4
Ob j e ctiv e v a l u e =22.2
x1=1, x 2=0, x 3=0 . 6 , x 4=1
x3=0 x3=1
x4=0 x4=1
x1=0 x1=1
Ob j e ctiv e v a l u e =2 1 I n feasib l e
x1=0 x, 2=1 x, 3=1 x, 4=1
• Formulation 2:
�
j
xij = 1, i = 1, . . . , n + 1
�n+1
i=1
xij ≤ 1, ∀j
Nearly complete enumeration is needed for LP-based BB, since the prob
3.4 Preprocessing
Slide 19
• An effective way of improving integer programming formulations prior to and
during branch-and-bound.
• Logical Tests
– Removal of empty (all zeros) rows and columns;
– Removal of rows dominated by multiples of other rows;
– strengthening the bounds within rows by comparing individual variables
and coefficients to the right-hand-side.
– Additional strengthening may be possible for integral variables using round
ing.
• Probing : Setting temporarily a 0-1 variable to 0 or 1 and redo the logical
inequality x + y ≤ 1.
5
1 2 5
4 3 6 7
4 Application
4.1 Directed TSP
4.1.1 Assignment Lower Bound
Slide 20
Given a directed graph G = (N, A) with n nodes, and a cost cij for every arc,
find a tour (a directed cycle that visits all nodes) of minimum cost.
�n �n
min i=1
c x
j=1 ij ij
�n
s.t. : xij = 1, j = 1, . . . , n,
�i=1
n
j=1
xij = 1, i = 1, ..., n,
xij ∈ {0, 1}.
Slide 21
4.2 Improving BB
Slide 22
• Better LP solver
• Use problem structure to derive better branching strategy
• Better choice of lower bound b(F ) - better relaxation
• Better choice of upper bound U - heuristic to get good solution
• KEY: Start pruning the search tree as early as possible
6
MIT OpenCourseWare
http://ocw.mit.edu
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.