DDA5002Lecture13 Annotated
DDA5002Lecture13 Annotated
Yuang Chen
1 LP Duality
4 Complementary Slackness
5 Dual Applications
1 LP Duality
4 Complementary Slackness
5 Dual Applications
Primal Dual
minimize cT x maximize bT y
subject to aiT x → bi , i ↑ M1 , subject to yi → 0, i ↑ M1
aiT x ↓ bi , i ↑ M2 , yi ↓ 0, i ↑ M2
aiT x = bi , i ↑ M3 , yi free, i ↑ M3
xj → 0, j ↑ N1 , ATj y ↓ cj , j ↑ N1
xj ↓ 0, j ↑ N2 , ATj y → cj , j ↑ N2
xj free, j ↑ N3 , ATj y = cj , j ↑ N3
max x1 + 2x2 + x3 + x4
s.t. x1 + 2x2 + 3x3 ↓ 2
x2 + x4 ↓ 1
x1 + 2x3 → 1
x1 , x3 → 0, x2 , x4 free
s.t. y1 + 2y2 + y3 ↓ 1
5y1 + 3y2 + y3 → 2
4y1 ↑ y2 ↑ 2y3 = 3
y1 → 0, y2 free, y3 ↓ 0
Yuang Chen (SDS/CUHK-SZ) DDA5002/CIE6010 Lecture 13 March 10, 2025 7 / 44
Form Dual Example III
(P): min cT x
s.t. Ax → b
Dx ↑ d
x ↑0
Theorem
If we transform a linear program to an equivalent one (such as by replacing
free variables, adding slack variables, etc), then the dual of the two
problems will be equivalent.
Theorem
If we transform the primal to its dual, then transform the dual to its dual,
then we will obtain a problem equivalent to the primal problem, that is,
the dual of dual is the primal.
1 LP Duality
4 Complementary Slackness
5 Dual Applications
Primal Dual
min cT x max b T y
s.t. Ax = b, x → 0 s.t. AT y ↑ c
bT y ↑ c T x
Based on the strong duality theorem, we know that (x, y ) is optimal to the
primal and dual respectively if and only if
x is primal feasible
y is dual feasible
They achieve the same objective value
1 LP Duality
4 Complementary Slackness
5 Dual Applications
1 LP Duality
4 Complementary Slackness
5 Dual Applications
Theorem
Let x and y are feasible solutions to the primal and dual problems
respectively. Then x and y are optimal if and only if
Proof in homework!
1 LP Duality
4 Complementary Slackness
5 Dual Applications
Pricing
Alternative Systems
Max Flow and Min Cut Problems
Robust Optimization
xj → 0 ↑j = 1, ..., n
We want to study how the change of right-hand side of the constraint,
namely bi ’s, would a!ect the optimal cost of the diet problem. In
particular, if bi of a specific nutrient i increases by a unit, while holding all
other components of the RHS constant, how would the minimum cost
change? Should it increase or decrease?
Yuang Chen (SDS/CUHK-SZ) DDA5002/CIE6010 Lecture 13 March 10, 2025 27 / 44
Shadow price
Shadow price
The shadow price of a constraint is the change of the objective cost from
the current optimal level if the right-hand side of this constraint is
increased by a unit from the current level.
m
!
max b i yi
i=1
m
!
s.t. aij yi ↓ cj ↑j = 1, .., n
i=1
yi → 0 ↑i = 1, ..., m
AT y ↓ c
Ax = 0, x → 0, cT x < 0
Assume there is an imaginary node o, with edges (o, s) and (t, o). There
is no capacity constraint on those two edges
The problem becomes a closed system. One wants to maximize the
flow from o to s, which we denote by #.
Using this transformation, we can write down the LP formulation. Let xij
denote the amount of flow across edge (i, j).
maximizex,! #
" "
subject to xji ≃ j:(i,j)↓E xij = 0,
j:(j,i)↓E ↑i ↗= s, t
" "
xjs ≃ j:(s,j)↓E xsj + # = 0
"j:(j,s)↓E "
j:(j,t)↓E xjt ≃ j:(t,j)↓E xtj ≃ # = 0
xij ↓ wij , ↑(i, j) ↔ E
xij → 0, ↑(i, j) ↔ E
The first constraint is the flow balancing constraints for all nodes
other than s and t
The second (third, resp.) constraint is the flow balancing constraints
for node s (t, resp.)
Theorem
The maximum flow of the network is equal to the smallest cut size of any
subset S of vertices.
Corollary
If the value of a flow is equal to the value of some cut, then both are
optimal.
min c ↭x
s.t. a↭ x ↓ b
Suppose the coe”cient a is not known exactly, but all we know is that a
lives in some polytope U :
U = {a : Ba ↓ d}
Suppose there are two assets. We know that the return on asset 1 will be
in between 0.8 and 1.1 and that on asset 2 will be in between 0.75 and
1.25. Also the return on asset 1 will be no less than that of 2.
We will make a decision x such that it remains feasible for all variations of
a ↔ U, i.e. find x such that
a↭ x ↓ b ↑a ↔ U
a↭ x ↓ b, ↑a ↔ U = {a : Ba ↓ d}
↭
⇐ max a x ↓ b
a:Ba↗d
⇐ min d ↭y ↓ b
y :B ↭ y =x,y ↘0
↭
d y ↓ b
⇐ B ↭y = x
y →0
min c ↭x
s.t. a↭ x ↓ b
a ↔ U = {a : Ba ↓ d}
min c ↭x
d ↭y ↓ b
B ↭y = x
y →0