KKT Conditions and Duality: March 23, 2012
KKT Conditions and Duality: March 23, 2012
KKT Conditions and Duality: March 23, 2012
subject to
g(x) = 2 − x1 − x2 ≤ 0
Tutorial example - Cost function
x2
iso-contours of f (x)
x1
x2
iso-contours of f (x)
feasible region
x1
g(x) = 2 − x1 − x2 ≤ 0
Solve this problem with Lagrange Multipliers
Can solve this constrained optimization with Lagrange multipliers:
Solution:
The Lagrangian is
∂L(x∗ , λ∗ )
= .8 x∗1 − λ∗ = 0
∂x1
∂L(x∗ , λ∗ )
= .8 x∗2 − λ∗ = 0
∂x2
∂L(x∗ , λ∗ )
= 2 − x∗1 − x∗2 = 0
∂λ
Solve this problem with Lagrange Multipliers
Can solve this constrained optimization with Lagrange multipliers:
Solution ctd:
Find (x∗1 , x∗2 , λ∗ ) which fulfill these simultaneous equations. The first two
equations imply
5 ∗ 5 ∗
x∗1 = λ , x2 = λ
4 4
Substituting these into the last equation we get
4
8 − 5λ∗ − 5λ∗ = 0 =⇒ λ∗ = ← greater than 0
5
and in turn this means
5 ∗ 5 ∗
x∗1 = λ = 1, x∗2 = λ =1
4 4
Solve this particular problem in another way
Alternate solution:
Construct the Lagrangian dual function
∂q(λ) 5 4
=− λ+2=0 =⇒ λ∗ = =⇒ x∗1 = x∗2 = 1
∂λ 2 5
Solve the same problem in another way
where
min f (x)
x∈X
subject to
where
x1 G y
⇒
z
(g(x), f (x))
G y
z
(g(x), f (x))
(y ∗ , z ∗ )
G y
z
(g(x), f (x))
(y ∗ , z ∗ )
G y
z + λy = α
z
(g(x), f (x))
q(λ)
(y ∗ , z ∗ )
G y
z + λy = q(λ)
z
(g(x), f (x))
∗
q(λ )
(y ∗ , z ∗ )
G y
z + λ∗ y = q(λ∗ )
z + λy = q(λ)
• the line with slope −λ with maximal intercept, q(λ), on the z-axis.
• This line has slope λ∗ and dual optimal solution q(λ∗ ).
Solving the Dual Problem
z
(g(x), f (x))
∗
q(λ )
(y ∗ , z ∗ )
G y
z + λ∗ y = q(λ∗ )
z + λy = q(λ)
• For this problem the optimal dual objective z ∗ equals the optimal
primal objective z ∗ .
• In such cases, there is no duality gap (strong duality).
Properties of the Lagrangian Dual Function
q(λ) is concave
Theorem
Let Dq = {λ | q(λ) > −∞} then q(λ) is concave function on Dq .
Proof.
For any x ∈ X and λ1 , λ2 ∈ Dq and α ∈ (0, 1)
≥ α min{L(x, λ1 )} + (1 − α) min{L(x, λ2 )}
x∈X x∈X
Therefore
Theorem
Let Dq = {λ | q(λ) > −∞}. This constraint ensures valid Lagrange
Multipliers exist. Then Dq is a convex set.
Proof.
Let λ1 , λ2 ∈ Dq . Therefore q(λ1 ) > −∞ and q(λ2 ) > −∞. Let
α ∈ (0, 1), then as q is concave
α λ1 + (1 − α) λ2 ∈ Dq
f (x) ≥ q(λ, µ)
Weak Duality
Then we have
Corollary
Let
then
q∗ ≤ f ∗
• Thus the
optimal value of the primal problem ≥ optimal value of the dual problem.
• If optimal value of the primal problem > optimal value of the
dual problem, then there exists a duality gap.
Weak Duality
Corollary
Let
then
q∗ ≤ f ∗
• Thus the
optimal value of the primal problem ≥ optimal value of the dual problem.
• If optimal value of the primal problem > optimal value of the
dual problem, then there exists a duality gap.
Example with a Duality Gap
Example with a non-convex objective function
f (x) non-convex f (x)
feasible region
defined by g(x) ≤ 0
Duality Gap
Optimal dual objective
then the
sup{q(λ, µ) : λ ≥ 0}
(λ∗ )t g(x∗ ) = 0