Duality (I)

48
Duality (I) Lijun Zhang [email protected] http://cs.nju.edu.cn/zlj

Transcript of Duality (I)

Page 1: Duality (I)

Duality (I)

Lijun [email protected]://cs.nju.edu.cn/zlj

Page 2: Duality (I)

Outline

The Lagrange Dual Function The Lagrange Dual Function Lower Bound on Optimal Value The Lagrange Dual Function and

Conjugate Functions The Lagrange Dual Problem Making Dual Constraints Explicit Weak Duality Strong Duality and Slater’s Constraint

Qualification

Page 3: Duality (I)

Optimization Problems

Standard Form

Domain is nonempty

Denote the optimal value by βˆ—

We do not assume the problem is convex

π’Ÿ dom 𝑓 ∩ dom β„Ž

min 𝑓 π‘₯ s. t. 𝑓 π‘₯ 0, 𝑖 1, . . . , π‘š

β„Ž π‘₯ 0 𝑖 1, . . . , 𝑝 1

Page 4: Duality (I)

The Lagrangian

: the Lagrange multiplier associated with

the -th inequality constraint 𝜈 : the Lagrange multiplier associated with

the -th equality constraint Vectors and : dual variables or

Lagrange multiplier vectors

The Lagrangian

𝐿 π‘₯, πœ†, 𝜈 𝑓 π‘₯ πœ† 𝑓 π‘₯ 𝜈 β„Ž π‘₯

Page 5: Duality (I)

The Lagrange Dual Function

When is unbounded below in , is concave 𝑔 is the pointwise infimum of a family of

affine functions of πœ†, 𝑣 It is unconstrained

𝑔 πœ†, 𝜈 infβˆˆπ’Ÿ

𝐿 π‘₯, πœ†, 𝜈

infβˆˆπ’Ÿ

𝑓 π‘₯ πœ† 𝑓 π‘₯ 𝜈 β„Ž π‘₯

Page 6: Duality (I)

Outline

The Lagrange Dual Function The Lagrange Dual Function Lower Bound on Optimal Value The Lagrange Dual Function and

Conjugate Functions The Lagrange Dual Problem Making Dual Constraints Explicit Weak Duality Strong Duality and Slater’s Constraint

Qualification

Page 7: Duality (I)

Lower Bounds on

For any and any

Proof is a feasible point for original problem

Since

Therefore

𝑔 πœ†, 𝜈 π‘βˆ—

𝑓 π‘₯ 0, β„Ž π‘₯ 0

πœ† 𝑓 π‘₯ 𝜈 β„Ž π‘₯ 0

𝐿 π‘₯, πœ†, 𝜈 𝑓 π‘₯ πœ† 𝑓 π‘₯ 𝜈 β„Ž π‘₯ 𝑓 π‘₯

Page 8: Duality (I)

Lower Bounds on

For any and any

Proof Hence

Note that for any feasible Discussions The lower bound is vacuous, when 𝑔 πœ†, 𝜈 ∞ It is nontrivial only when πœ† ≽ 0, πœ†, 𝜈 ∈ dom 𝑔 Dual feasible: πœ†, 𝜈 with πœ† ≽ 0, πœ†, 𝜈 ∈ dom 𝑔

𝑔 πœ†, 𝜈 π‘βˆ—

𝑔 πœ†, 𝜈 infβˆˆπ’Ÿ

𝐿 π‘₯, πœ†, 𝜈 𝐿 π‘₯, πœ†, 𝜈 𝑓 π‘₯

Page 9: Duality (I)

Example

A Simple Problem with Lower bound from a dual feasible point

Solid curve: objective function 𝑓 Dashed curve: constraint function 𝑓 Feasible set: 0.46, 0.46 (indicated by the two

dotted vertical lines)

Page 10: Duality (I)

Example

A Simple Problem with Lower bound from a dual feasible point

Optimal point and value: π‘₯βˆ— 0.46, π‘βˆ— 1.54 Dotted curves: 𝐿 π‘₯, πœ† for πœ† 0.1, 0.2, … , 1.0.

β€’ Each has a minimum value smaller than π‘βˆ— as on the feasible set (and for πœ† 0), 𝐿 π‘₯, πœ† 𝑓 π‘₯

𝐿 π‘₯, πœ† 𝑓 π‘₯

𝑔 πœ† infβˆˆπ’Ÿ

𝐿 π‘₯, πœ†

Page 11: Duality (I)

Example

The dual function

Neither nor is convex, but the dual function is concave

Horizontal dashed line: βˆ— (the optimal value of the problem)

Page 12: Duality (I)

Example

Least-squares Solution of Linear Equations

No inequality constraints (linear) equality constraints

Lagrangian

Domain:

min π‘₯ π‘₯ s. t. 𝐴π‘₯ 𝑏

𝐿 π‘₯, 𝜈 π‘₯ π‘₯ 𝜈 𝐴π‘₯ 𝑏

Page 13: Duality (I)

Example

Least-squares Solution of Linear Equations

Dual Function

Optimality condition

𝑔 𝜈 inf 𝐿 π‘₯, 𝜈 inf π‘₯ π‘₯ 𝜈 𝐴π‘₯ 𝑏

𝛻 𝐿 π‘₯, 𝜈 2π‘₯ 𝐴 𝜈 0 β‡’ π‘₯ 1/2 𝐴 𝜈

min π‘₯ π‘₯ s. t. 𝐴π‘₯ 𝑏

Page 14: Duality (I)

Example

Least-squares Solution of Linear Equations

Dual Function

Concave Function Lower Bound Property

β‡’ 𝑔 𝜈 𝐿 1/2 𝐴 𝜈, 𝜈 1/4 𝜈 𝐴𝐴 𝜈 𝑏 𝜈

1/4 𝜈 𝐴𝐴 𝜈 𝑏 𝜈 inf π‘₯ π‘₯ 𝐴π‘₯ 𝑏

min π‘₯ π‘₯ s. t. 𝐴π‘₯ 𝑏

Page 15: Duality (I)

Example

Standard Form LP

Inequality constraints: Lagrangian

Dual Function

min 𝑐 π‘₯ s. t. 𝐴π‘₯ 𝑏

π‘₯ ≽ 0

𝐿 π‘₯, πœ†, 𝜈 𝑐 π‘₯ βˆ‘ πœ† π‘₯ 𝜈 𝐴π‘₯ 𝑏

𝑏 𝜈 𝑐 𝐴 𝜈 πœ† π‘₯

𝑔 πœ†, 𝜈 inf 𝐿 π‘₯, πœ†, 𝜈 𝑏 𝜈 inf 𝑐 𝐴 𝜈 πœ† π‘₯

Page 16: Duality (I)

Example

Standard Form LP

Inequality constraints: Dual Function

The lower bound is nontrivial only when and satisfy and

min 𝑐 π‘₯ s. t. 𝐴π‘₯ 𝑏

π‘₯ ≽ 0

𝑔 πœ†, 𝜈 𝑏 𝜈 𝐴 𝜈 πœ† 𝑐 0,∞ otherwise.

Page 17: Duality (I)

Outline

The Lagrange Dual Function The Lagrange Dual Function Lower Bound on Optimal Value The Lagrange Dual Function and

Conjugate Functions The Lagrange Dual Problem Making Dual Constraints Explicit Weak Duality Strong Duality and Slater’s Constraint

Qualification

Page 18: Duality (I)

Conjugate Function Its conjugate function is

dom π‘“βˆ— 𝑦|π‘“βˆ— 𝑦 ∞ π‘“βˆ— is always convex

π‘“βˆ— 𝑦 sup∈

𝑦 π‘₯ 𝑓 π‘₯

Page 19: Duality (I)

The Lagrange Dual Function and Conjugate Functions

A Simple Example

Lagrangian

Dual Function

min 𝑓 π‘₯ s. t. π‘₯ 0

𝐿 π‘₯, 𝜈 𝑓 π‘₯ 𝜈 π‘₯

𝑔 𝜈 inf 𝑓 π‘₯ 𝜈 π‘₯

sup 𝜈 π‘₯ 𝑓 π‘₯ π‘“βˆ— 𝜈

Page 20: Duality (I)

The Lagrange Dual Function and Conjugate Functions

A More General Example

Lagrangian

Dual Function

min 𝑓 π‘₯ s. t. 𝐴π‘₯ β‰Ό 𝑏

𝐢π‘₯ 𝑑

𝐿 π‘₯, πœ†, 𝜈 𝑓 π‘₯ πœ† 𝐴π‘₯ 𝑏 𝜈 𝐢π‘₯ 𝑑

𝑔 πœ†, 𝜈 inf 𝑓 π‘₯ πœ† 𝐴π‘₯ 𝑏 𝜈 𝐢π‘₯ 𝑑

𝑏 πœ† 𝑑 𝜈 inf 𝑓 π‘₯ 𝐴 πœ† 𝐢 𝜈 π‘₯

𝑏 πœ† 𝑑 𝜈 π‘“βˆ— 𝐴 πœ† 𝐢 𝜈

Page 21: Duality (I)

The Lagrange Dual Function and Conjugate Functions

A More General Example

Lagrangian

Dual Function

βˆ—

min 𝑓 π‘₯ s. t. 𝐴π‘₯ β‰Ό 𝑏

𝐢π‘₯ 𝑑

𝑔 πœ†, 𝜈 𝑏 πœ† 𝑑 𝜈 π‘“βˆ— 𝐴 πœ† 𝐢 𝜈

𝐿 π‘₯, πœ†, 𝜈 𝑓 π‘₯ πœ† 𝐴π‘₯ 𝑏 𝜈 𝐢π‘₯ 𝑑

Page 22: Duality (I)

Example

Equality Constrained Norm Minimization

Conjugate of

The Dual Function

min π‘₯ s. t. 𝐴π‘₯ 𝑏

π‘“βˆ— 𝑦 0 𝑦 βˆ— 1,∞ otherwise.

𝑔 𝜈 𝑏 𝜈 π‘“βˆ— 𝐴 𝜈 𝑏 𝜈 𝐴 𝜈 βˆ— 1,∞ otherwise.

Page 23: Duality (I)

Example

Entropy Maximization

Conjugate of

The Dual Function

min 𝑓 π‘₯ π‘₯ log π‘₯

s. t. 𝐴π‘₯ β‰Ό 𝑏 𝟏 π‘₯ 1

π‘“βˆ— 𝑦 𝑒

𝑔 πœ†, 𝜈 𝑏 πœ† 𝜈 π‘“βˆ— 𝐴 πœ† π‘£πŸ= 𝑏 πœ† 𝜈 βˆ‘ 𝑒

𝑏 πœ† 𝜈 𝑒 βˆ‘ 𝑒

Page 24: Duality (I)

Outline

The Lagrange Dual Function The Lagrange Dual Function Lower Bound on Optimal Value The Lagrange Dual Function and

Conjugate Functions The Lagrange Dual Problem Making Dual Constraints Explicit Weak Duality Strong Duality and Slater’s Constraint

Qualification

Page 25: Duality (I)

The Lagrange Dual Problem

For any and any

What is the best lower bound? Lagrange Dual Problem

Primal Problem

𝑔 πœ†, 𝜈 π‘βˆ—

max 𝑔 πœ†, 𝜈s. t. πœ† ≽ 0

min 𝑓 π‘₯ s. t. 𝑓 π‘₯ 0, 𝑖 1, . . . , π‘š

β„Ž π‘₯ 0 𝑖 1, . . . , 𝑝 1

Page 26: Duality (I)

The Lagrange Dual Problem

For any and any

What is the best lower bound? Lagrange Dual Problem

Dual feasible: with Dual optimal or optimal Lagrange

multipliers: βˆ— βˆ—

A convex optimization problem

𝑔 πœ†, 𝜈 π‘βˆ—

max 𝑔 πœ†, 𝜈s. t. πœ† ≽ 0

Page 27: Duality (I)

Outline

The Lagrange Dual Function The Lagrange Dual Function Lower Bound on Optimal Value The Lagrange Dual Function and

Conjugate Functions The Lagrange Dual Problem Making Dual Constraints Explicit Weak Duality Strong Duality and Slater’s Constraint

Qualification

Page 28: Duality (I)

Making Dual Constraints Explicit

Motivation The may have

dimension Identify the equality constraints that are

β€˜hidden’ or β€˜implicit’ in Standard Form LP

Dual Function

dom 𝑔 πœ†, 𝜈 𝑔 πœ†, 𝜈 ∞

𝑔 πœ†, 𝜈 𝑏 𝜈 𝐴 𝜈 πœ† 𝑐 0,∞ otherwise.

min 𝑐 π‘₯ s. t. 𝐴π‘₯ 𝑏

π‘₯ ≽ 0

Page 29: Duality (I)

Example

Lagrange Dual of Standard Form LP Lagrange Dual Problem

An Equivalent Problem

Make equality constraints explicit

max 𝑔 πœ†, 𝜈 𝑏 𝜈 𝐴 𝜈 πœ† 𝑐 0,∞ otherwise.

s. t. πœ† ≽ 0

max 𝑏 𝜈 s. t. 𝐴 𝜈 πœ† 𝑐 0

πœ† ≽ 0

Page 30: Duality (I)

Example

Lagrange Dual of Standard Form LP Lagrange Dual Problem

Another Equivalent Problem

An LP in inequality form

max 𝑔 πœ†, 𝜈 𝑏 𝜈 𝐴 𝜈 πœ† 𝑐 0,∞ otherwise.

s. t. πœ† ≽ 0

max 𝑏 𝜈 s. t. 𝐴 𝜈 𝑐 ≽ 0

Standard Form LP Inequality Form LPLagrange Dual

Page 31: Duality (I)

Example

Lagrange Dual of Inequality Form LP Inequality form LP (Primal Problem)

Lagrangian

Lagrange dual function

min 𝑐 π‘₯ s. t. 𝐴π‘₯ β‰Ό 𝑏

𝐿 π‘₯, πœ† 𝑐 π‘₯ πœ† 𝐴π‘₯ 𝑏 𝑏 πœ† 𝐴 πœ† 𝑐 π‘₯

𝑔 πœ† inf 𝐿 π‘₯, πœ† 𝑏 πœ† inf 𝐴 πœ† 𝑐 π‘₯

𝑏 πœ† 𝐴 πœ† 𝑐 0,∞ otherwise.

Page 32: Duality (I)

Example

Lagrange Dual of Inequality Form LP Inequality form LP (Primal Problem)

Lagrange Dual Problem

An Equivalent Problem

min 𝑐 π‘₯ s. t. 𝐴π‘₯ β‰Ό 𝑏

max 𝑔 πœ† 𝑏 πœ† 𝐴 πœ† 𝑐 0,∞ otherwise.

s. t. πœ† ≽ 0

max 𝑏 πœ† s. t. 𝐴 πœ† 𝑐 0

πœ† ≽ 0

Page 33: Duality (I)

Example

Lagrange Dual of Inequality Form LP Inequality form LP (Primal Problem)

An Equivalent Problem

An LP in standard form

min 𝑐 π‘₯ s. t. 𝐴π‘₯ β‰Ό 𝑏

max 𝑏 πœ† s. t. 𝐴 πœ† 𝑐 0

πœ† ≽ 0

Standard Form LPInequality Form LPLagrange Dual

Page 34: Duality (I)

Outline

The Lagrange Dual Function The Lagrange Dual Function Lower Bound on Optimal Value The Lagrange Dual Function and

Conjugate Functions The Lagrange Dual Problem Making Dual Constraints Explicit Weak Duality Strong Duality and Slater’s Constraint

Qualification

Page 35: Duality (I)

Weak Duality

For any and any

What is the best lower bound? Lagrange Dual Problem

Optimal value βˆ—

Weak Duality

𝑔 πœ†, 𝜈 π‘βˆ—

max 𝑔 πœ†, 𝜈s. t. πœ† ≽ 0

π‘‘βˆ— π‘βˆ—

Does not rely on convexity!

Page 36: Duality (I)

Weak Duality

Weak Duality

If the primal problem is unbounded below, i.e., βˆ— , we must have βˆ—

, i.e., the Lagrange dual problem is infeasible

If βˆ— , we must have βˆ—

Optimal duality gap

Nonegativeπ‘βˆ— π‘‘βˆ—

π‘‘βˆ— π‘βˆ—

Page 37: Duality (I)

Outline

The Lagrange Dual Function The Lagrange Dual Function Lower Bound on Optimal Value The Lagrange Dual Function and

Conjugate Functions The Lagrange Dual Problem Making Dual Constraints Explicit Weak Duality Strong Duality and Slater’s Constraint

Qualification

Page 38: Duality (I)

Strong Duality

Strong Duality

The optimal duality gap is zero The best bound that can be obtained

from the Lagrange dual function is tight In general, does not hold

Usually hold for convex optimization

are convex

βˆ— βˆ—

min 𝑓 π‘₯ s. t. 𝑓 π‘₯ 0, 𝑖 1, . . . , π‘š

𝐴π‘₯ 𝑏

Page 39: Duality (I)

Slater’s Constraint Qualification

Constraint Qualifications Sufficient conditions for strong duality

Slater’s condition such that

Such a point is called strictly feasible If Slater’s condition holds and the

problem is convex Strong duality holds Dual optimal value is attained when βˆ—

𝑓 π‘₯ 0, 𝑖 1, … , π‘š, 𝐴π‘₯ 𝑏

Page 40: Duality (I)

Slater’s Constraint Qualification

Constraint Qualifications Sufficient conditions for strong duality

Slater’s condition (weaker form) If the first constraint functions are affine such that

When constraints are all linear equalities and inequalities, and is open Reduce to feasibility

𝑓 π‘₯ 0, 𝑖 1, … , π‘˜ 𝑓 π‘₯ 0, 𝑖 π‘˜ 1, … , π‘šπ΄π‘₯ 𝑏

Page 41: Duality (I)

Example

Least-squares Solution of Linear Equations

Dual Problem

Slater’s condition The primal problem is feasible, i.e.,

Strong duality always holds Even when

min π‘₯ π‘₯ s. t. 𝐴π‘₯ 𝑏

max 1/4 Ξ½ 𝐴𝐴 𝜈 𝑏 𝜈

Page 42: Duality (I)

Example

Lagrange dual of LP

Strong duality holds for any LP If the primal problem is feasible or the

dual problem is feasible

Strong duality may fail If both the primal and dual problems are

infeasible

Standard Form LP Inequality Form LPLagrange Dual

Page 43: Duality (I)

Example

QCQP (Primal Problem)

𝑃 ∈ 𝐒 and 𝑃 ∈ 𝐒 , 𝑖 1, … , π‘š

Dual Problem

𝑃 πœ† 𝑃 βˆ‘ πœ† 𝑃 , π‘ž πœ† π‘ž βˆ‘ πœ† π‘ž π‘Ÿ πœ† π‘Ÿ βˆ‘ πœ† π‘Ÿ

Slater’s condition βˆƒπ‘₯ , 1/2 π‘₯ 𝑃 π‘₯ π‘ž π‘₯ π‘Ÿ 0, 𝑖 1, … , π‘š

min 1/2 π‘₯ 𝑃 π‘₯ π‘ž π‘₯ π‘Ÿ s. t. 1/2 π‘₯ 𝑃 π‘₯ π‘ž π‘₯ π‘Ÿ 0, 𝑖 1, … , π‘š

max 1/2 π‘ž πœ† 𝑃 πœ† π‘ž πœ† π‘Ÿ πœ†s. t. πœ† ≽ 0

Page 44: Duality (I)

Example

A Nonconvex Quadratic Problem (Primal Problem)

Lagrangian

Dual Function

min π‘₯ 𝐴π‘₯ 2𝑏 π‘₯s. t. π‘₯ π‘₯ 1

𝐿 π‘₯, πœ† π‘₯ 𝐴π‘₯ 2𝑏 π‘₯ πœ† π‘₯ π‘₯ 1 π‘₯ 𝐴 πœ†πΌ π‘₯ 2𝑏 π‘₯ πœ†

𝑔 πœ† 𝑏 𝐴 πœ†πΌ 𝑏 πœ† 𝐴 πœ†πΌ ≽ 0, 𝑏 ∈ β„› 𝐴 πœ†πΌβˆž otherwise

Page 45: Duality (I)

Example

A Nonconvex Quadratic Problem (Primal Problem)

Dual Problem

A convex optimization problem

min π‘₯ 𝐴π‘₯ 2𝑏 π‘₯s. t. π‘₯ π‘₯ 1

max 𝑏 𝐴 πœ†πΌ 𝑏 πœ† s. t. 𝐴 πœ†πΌ ≽ 0, 𝑏 ∈ β„› 𝐴 πœ†πΌ

Page 46: Duality (I)

Example

A Nonconvex Quadratic Problem (Primal Problem)

Dual Problem

A convex optimization problem and : eigenvalues and corresponding

(orthonormal) eigenvectors of

min π‘₯ 𝐴π‘₯ 2𝑏 π‘₯s. t. π‘₯ π‘₯ 1

max βˆ‘ π‘ž 𝑏 / πœ† πœ† πœ†s. t. πœ† πœ† 𝐴

Strong duality holds

Page 47: Duality (I)

Example

A Nonconvex Quadratic Problem (Primal Problem)

Dual Problem

A convex optimization problem and : eigenvalues and corresponding

(orthonormal) eigenvectors of

min π‘₯ 𝐴π‘₯ 2𝑏 π‘₯s. t. π‘₯ π‘₯ 1

max βˆ‘ π‘ž 𝑏 / πœ† πœ† πœ†s. t. πœ† πœ† 𝐴

Strong duality holds for anyoptimization problem withquadratic objective and onequadratic inequality constraint,provided Slater’s conditionholds

Page 48: Duality (I)

Summary

The Lagrange Dual Function The Lagrange Dual Function Lower Bound on Optimal Value The Lagrange Dual Function and

Conjugate Functions The Lagrange Dual Problem Making Dual Constraints Explicit Weak Duality Strong Duality and Slater’s Constraint

Qualification