CS675: Convex and Combinatorial Optimization Fall 2019 Introduction - - PowerPoint PPT Presentation

cs675 convex and combinatorial optimization fall 2019
SMART_READER_LITE
LIVE PREVIEW

CS675: Convex and Combinatorial Optimization Fall 2019 Introduction - - PowerPoint PPT Presentation

CS675: Convex and Combinatorial Optimization Fall 2019 Introduction to Linear Programming Instructor: Shaddin Dughmi Outline Linear Programming Basics 1 Duality and Its Interpretations 2 3 Properties of Duals Weak and Strong Duality 4 5


slide-1
SLIDE 1

CS675: Convex and Combinatorial Optimization Fall 2019 Introduction to Linear Programming

Instructor: Shaddin Dughmi

slide-2
SLIDE 2

Outline

1

Linear Programming Basics

2

Duality and Its Interpretations

3

Properties of Duals

4

Weak and Strong Duality

5

Formal Proof of Strong Duality of LP

6

Consequences of Duality

7

More Examples of Duality

slide-3
SLIDE 3

Outline

1

Linear Programming Basics

2

Duality and Its Interpretations

3

Properties of Duals

4

Weak and Strong Duality

5

Formal Proof of Strong Duality of LP

6

Consequences of Duality

7

More Examples of Duality

slide-4
SLIDE 4

A Brief History

The forefather of convex optimization problems, and the most ubiquitous. Developed by Kantorovich during World War II (1939) for planning the Soviet army’s expenditures and returns. Kept secret. Discovered a few years later by George Dantzig, who in 1947 developed the simplex method for solving linear programs John von Neumann developed LP duality in 1947, and applied it to game theory Polynomial-time algorithms: Ellipsoid method (Khachiyan 1979), interior point methods (Karmarkar 1984).

Linear Programming Basics 1/40

slide-5
SLIDE 5

LP General Form

minimize (or maximize) c⊺x subject to a⊺

i x ≤ bi,

for i ∈ C1. a⊺

i x ≥ bi,

for i ∈ C2. a⊺

i x = bi,

for i ∈ C3. Decision variables: x ∈ Rn Parameters:

c ∈ Rn defines the linear objective function ai ∈ Rn and bi ∈ R define the i’th constraint.

Linear Programming Basics 2/40

slide-6
SLIDE 6

Standard Form

maximize c⊺x subject to a⊺

i x ≤ bi,

for i = 1, . . . , m. xj ≥ 0, for j = 1, . . . , n. Every LP can be transformed to this form minimizing c⊺x is equivalent to maximizing −c⊺x ≥ constraints can be flipped by multiplying by −1 Each equality constraint can be replaced by two inequalities Uconstrained variable xj can be replaced by x+

j − x− j , where both

x+

j and x− j are constrained to be nonnegative.

Linear Programming Basics 3/40

slide-7
SLIDE 7

Geometric View

Linear Programming Basics 4/40

slide-8
SLIDE 8

Geometric View

Linear Programming Basics 4/40

slide-9
SLIDE 9

A 2-D example

maximize x1 + x2 subject to x1 + 2x2 ≤ 2 2x1 + x2 ≤ 2 x1, x2 ≥ 0

Linear Programming Basics 5/40

slide-10
SLIDE 10

Application: Optimal Production

n products, m raw materials Every unit of product j uses aij units of raw material i There are bi units of material i available Product j yields profit cj per unit Facility wants to maximize profit subject to available raw materials maximize c⊺x subject to a⊺

i x ≤ bi,

for i = 1, . . . , m. xj ≥ 0, for j = 1, . . . , n.

Linear Programming Basics 6/40

slide-11
SLIDE 11

Terminology

Hyperplane: The region defined by a linear equality Halfspace: The region defined by a linear inequality a⊺

i x ≤ bi.

Polyhedron: The intersection of a set of linear inequalities

Feasible region of an LP is a polyhedron

Polytope: Bounded polyhedron

Equivalently: convex hull of a finite set of points

Vertex: A point x is a vertex of polyhedron P if ∃y = 0 with x + y ∈ P and x − y ∈ P Face of P: The intersection with P of a hyperplane H disjoint from the interior of P

Linear Programming Basics 7/40

slide-12
SLIDE 12

Basic Facts about LPs and Polyhedrons

Fact

Feasible regions of LPs (i.e. polyhedrons) are convex

Linear Programming Basics 8/40

slide-13
SLIDE 13

Basic Facts about LPs and Polyhedrons

Fact

Feasible regions of LPs (i.e. polyhedrons) are convex

Fact

Set of optimal solutions of an LP is convex In fact, a face of the polyhedron intersection of P with hyperplane c⊺x = OPT

Linear Programming Basics 8/40

slide-14
SLIDE 14

Basic Facts about LPs and Polyhedrons

Fact

Feasible regions of LPs (i.e. polyhedrons) are convex

Fact

Set of optimal solutions of an LP is convex In fact, a face of the polyhedron intersection of P with hyperplane c⊺x = OPT

Fact

A feasible point x is a vertex if and only if n linearly independent constraints are tight (i.e., satisfied with equality) at x.

Linear Programming Basics 8/40

slide-15
SLIDE 15

Basic Facts about LPs and Polyhedrons

Fact

An LP either has an optimal solution, or is unbounded or infeasible

Linear Programming Basics 9/40

slide-16
SLIDE 16

Fundamental Theorem of LP

If an LP in standard form has an optimal solution, then it has a vertex

  • ptimal solution.

Linear Programming Basics 10/40

slide-17
SLIDE 17

Fundamental Theorem of LP

If an LP in standard form has an optimal solution, then it has a vertex

  • ptimal solution.

Proof

Assume not, and take a non-vertex optimal solution x with the maximum number of tight constraints

Linear Programming Basics 10/40

slide-18
SLIDE 18

Fundamental Theorem of LP

If an LP in standard form has an optimal solution, then it has a vertex

  • ptimal solution.

Proof

Assume not, and take a non-vertex optimal solution x with the maximum number of tight constraints There is y = 0 s.t. x ± y are feasible

Linear Programming Basics 10/40

slide-19
SLIDE 19

Fundamental Theorem of LP

If an LP in standard form has an optimal solution, then it has a vertex

  • ptimal solution.

Proof

Assume not, and take a non-vertex optimal solution x with the maximum number of tight constraints There is y = 0 s.t. x ± y are feasible y is perpendicular to the objective function and the tight constraints at x.

i.e. c⊺y = 0, and a⊺

i y = 0 whenever the i’th constraint is tight for x.

Linear Programming Basics 10/40

slide-20
SLIDE 20

Fundamental Theorem of LP

If an LP in standard form has an optimal solution, then it has a vertex

  • ptimal solution.

Proof

Assume not, and take a non-vertex optimal solution x with the maximum number of tight constraints There is y = 0 s.t. x ± y are feasible y is perpendicular to the objective function and the tight constraints at x.

i.e. c⊺y = 0, and a⊺

i y = 0 whenever the i’th constraint is tight for x.

Can choose y s.t. yj < 0 for some j

Linear Programming Basics 10/40

slide-21
SLIDE 21

Fundamental Theorem of LP

If an LP in standard form has an optimal solution, then it has a vertex

  • ptimal solution.

Proof

Assume not, and take a non-vertex optimal solution x with the maximum number of tight constraints There is y = 0 s.t. x ± y are feasible y is perpendicular to the objective function and the tight constraints at x.

i.e. c⊺y = 0, and a⊺

i y = 0 whenever the i’th constraint is tight for x.

Can choose y s.t. yj < 0 for some j Let α be the largest constant such that x + αy is feasible

Such an α exists

Linear Programming Basics 10/40

slide-22
SLIDE 22

Fundamental Theorem of LP

If an LP in standard form has an optimal solution, then it has a vertex

  • ptimal solution.

Proof

Assume not, and take a non-vertex optimal solution x with the maximum number of tight constraints There is y = 0 s.t. x ± y are feasible y is perpendicular to the objective function and the tight constraints at x.

i.e. c⊺y = 0, and a⊺

i y = 0 whenever the i’th constraint is tight for x.

Can choose y s.t. yj < 0 for some j Let α be the largest constant such that x + αy is feasible

Such an α exists

An additional constraint becomes tight at x + αy, a contradiction.

Linear Programming Basics 10/40

slide-23
SLIDE 23

Counting non-zero Variables

Corollary

If an LP in standard form has an optimal solution, then there is an

  • ptimal solution with at most m non-zero variables.

maximize c⊺x subject to a⊺

i x ≤ bi,

for i = 1, . . . , m. xj ≥ 0, for j = 1, . . . , n. e.g. for optimal production with n products and m raw materials, there is an optimal plan with at most m products.

Linear Programming Basics 11/40

slide-24
SLIDE 24

Outline

1

Linear Programming Basics

2

Duality and Its Interpretations

3

Properties of Duals

4

Weak and Strong Duality

5

Formal Proof of Strong Duality of LP

6

Consequences of Duality

7

More Examples of Duality

slide-25
SLIDE 25

Linear Programming Duality

Primal LP

maximize c⊺x subject to Ax b

Dual LP

minimize b⊺y subject to A⊺y = c y 0 A ∈ Rm×n, c ∈ Rn, b ∈ Rm yi is the dual variable corresponding to primal constraint Aix ≤ bi AT

j y = cj is the dual constraint corresponding to primal variable xj

Duality and Its Interpretations 12/40

slide-26
SLIDE 26

Linear Programming Duality: Standard Form, and Visualization

Primal LP

maximize c⊺x subject to Ax b x 0

Dual LP

minimize y⊺b subject to A⊺y c y 0

Duality and Its Interpretations 13/40

slide-27
SLIDE 27

Linear Programming Duality: Standard Form, and Visualization

Primal LP

maximize c⊺x subject to Ax b x 0

Dual LP

minimize y⊺b subject to A⊺y c y 0 x1 x2 x3 x4 y1 a11 a12 a13 a14 b1 y2 a21 a22 a23 a24 b2 y3 a31 a32 a33 a34 b3 c1 c2 c3 c4

Duality and Its Interpretations 13/40

slide-28
SLIDE 28

Linear Programming Duality: Standard Form, and Visualization

Primal LP

maximize c⊺x subject to Ax b x 0

Dual LP

minimize y⊺b subject to A⊺y c y 0 x1 x2 x3 x4 y1 a11 a12 a13 a14 b1 y2 a21 a22 a23 a24 b2 y3 a31 a32 a33 a34 b3 c1 c2 c3 c4 yi is the dual variable corresponding to primal constraint Aix ≤ bi AT

j y ≥ cj is the dual constraint corresponding to primal variable xj

Duality and Its Interpretations 13/40

slide-29
SLIDE 29

Interpretation 1: Economic Interpretation

Recall the Optimal Production problem from last lecture n products, m raw materials Every unit of product j uses aij units of raw material i There are bi units of material i available Product j yields profit cj per unit Facility wants to maximize profit subject to available raw materials

Duality and Its Interpretations 14/40

slide-30
SLIDE 30

Interpretation 1: Economic Interpretation

Primal LP

max n

j=1 cjxj

s.t. n

j=1 aijxj ≤ bi,

for i ∈ [m]. xj ≥ 0, for j ∈ [n].

Duality and Its Interpretations 14/40

slide-31
SLIDE 31

Interpretation 1: Economic Interpretation

Primal LP

max n

j=1 cjxj

s.t. n

j=1 aijxj ≤ bi,

for i ∈ [m]. xj ≥ 0, for j ∈ [n].

Dual LP

min m

i=1 biyi

s.t. m

i=1 aijyi ≥ cj,

for j ∈ [n]. yi ≥ 0, for i ∈ [m].

Duality and Its Interpretations 14/40

slide-32
SLIDE 32

Interpretation 1: Economic Interpretation

Primal LP

max n

j=1 cjxj

s.t. n

j=1 aijxj ≤ bi,

for i ∈ [m]. xj ≥ 0, for j ∈ [n].

Dual LP

min m

i=1 biyi

s.t. m

i=1 aijyi ≥ cj,

for j ∈ [n]. yi ≥ 0, for i ∈ [m].

x1 x2 x3 x4 y1 a11 a12 a13 a14 b1 y2 a21 a22 a23 a24 b2 y3 a31 a32 a33 a34 b3 c1 c2 c3 c4

Duality and Its Interpretations 14/40

slide-33
SLIDE 33

Interpretation 1: Economic Interpretation

Primal LP

max n

j=1 cjxj

s.t. n

j=1 aijxj ≤ bi,

for i ∈ [m]. xj ≥ 0, for j ∈ [n].

Dual LP

min m

i=1 biyi

s.t. m

i=1 aijyi ≥ cj,

for j ∈ [n]. yi ≥ 0, for i ∈ [m].

x1 x2 x3 x4 y1 a11 a12 a13 a14 b1 y2 a21 a22 a23 a24 b2 y3 a31 a32 a33 a34 b3 c1 c2 c3 c4 Dual variable yi is a proposed price per unit of raw material i Dual price vector is feasible if facility has incentive to sell materials Buyer wants to spend as little as possible to buy materials

Duality and Its Interpretations 14/40

slide-34
SLIDE 34

Interpretation 2: Finding the Best Upperbound

Consider the simple LP from last lecture maximize x1 + x2 subject to x1 + 2x2 ≤ 2 2x1 + x2 ≤ 2 x1, x2 ≥ 0 We found that the optimal solution was at ( 2

3, 2 3), with an optimal

value of 4/3.

Duality and Its Interpretations 15/40

slide-35
SLIDE 35

Interpretation 2: Finding the Best Upperbound

Consider the simple LP from last lecture maximize x1 + x2 subject to x1 + 2x2 ≤ 2 2x1 + x2 ≤ 2 x1, x2 ≥ 0 We found that the optimal solution was at ( 2

3, 2 3), with an optimal

value of 4/3. What if, instead of finding the optimal solution, we saught to find an upperbound on its value by combining inequalities?

Each inequality implies an upper bound of 2 Multiplying each by 1

3 and summing gives x1 + x2 ≤ 4/3.

Duality and Its Interpretations 15/40

slide-36
SLIDE 36

Interpretation 2: Finding the Best Upperbound

x1 x2 x3 x4 y1 a11 a12 a13 a14 b1 y2 a21 a22 a23 a24 b2 y3 a31 a32 a33 a34 b3 c1 c2 c3 c4 Multiplying each row i by yi and summing gives the inequality yT Ax ≤ yT b

Duality and Its Interpretations 16/40

slide-37
SLIDE 37

Interpretation 2: Finding the Best Upperbound

x1 x2 x3 x4 y1 a11 a12 a13 a14 b1 y2 a21 a22 a23 a24 b2 y3 a31 a32 a33 a34 b3 c1 c2 c3 c4 Multiplying each row i by yi and summing gives the inequality yT Ax ≤ yT b When yT A ≥ cT , the right hand side of the inequality is an upper bound on cT x for every feasible x. cT x ≤ yT Ax ≤ yT b

Duality and Its Interpretations 16/40

slide-38
SLIDE 38

Interpretation 2: Finding the Best Upperbound

x1 x2 x3 x4 y1 a11 a12 a13 a14 b1 y2 a21 a22 a23 a24 b2 y3 a31 a32 a33 a34 b3 c1 c2 c3 c4 Multiplying each row i by yi and summing gives the inequality yT Ax ≤ yT b When yT A ≥ cT , the right hand side of the inequality is an upper bound on cT x for every feasible x. cT x ≤ yT Ax ≤ yT b The dual LP can be thought of as trying to find the best upperbound on the primal that can be achieved this way.

Duality and Its Interpretations 16/40

slide-39
SLIDE 39

Interpretation 3: Physical Forces

Apply force field c to a ball inside bounded polytope Ax b.

Duality and Its Interpretations 17/40

slide-40
SLIDE 40

Interpretation 3: Physical Forces

Apply force field c to a ball inside bounded polytope Ax b. Eventually, ball will come to rest against the walls of the polytope.

Duality and Its Interpretations 17/40

slide-41
SLIDE 41

Interpretation 3: Physical Forces

Apply force field c to a ball inside bounded polytope Ax b. Eventually, ball will come to rest against the walls of the polytope. Wall aix ≤ bi applies some force −yiai to the ball

Duality and Its Interpretations 17/40

slide-42
SLIDE 42

Interpretation 3: Physical Forces

Apply force field c to a ball inside bounded polytope Ax b. Eventually, ball will come to rest against the walls of the polytope. Wall aix ≤ bi applies some force −yiai to the ball Since the ball is still, cT =

i yiai = yT A.

Duality and Its Interpretations 17/40

slide-43
SLIDE 43

Interpretation 3: Physical Forces

Apply force field c to a ball inside bounded polytope Ax b. Eventually, ball will come to rest against the walls of the polytope. Wall aix ≤ bi applies some force −yiai to the ball Since the ball is still, cT =

i yiai = yT A.

Dual can be thought of as trying to minimize “work”

i yibi to

bring ball back to origin by moving polytope We will see that, at optimality, only the walls adjacent to the ball push (Complementary Slackness)

Duality and Its Interpretations 17/40

slide-44
SLIDE 44

Outline

1

Linear Programming Basics

2

Duality and Its Interpretations

3

Properties of Duals

4

Weak and Strong Duality

5

Formal Proof of Strong Duality of LP

6

Consequences of Duality

7

More Examples of Duality

slide-45
SLIDE 45

Duality is an Inversion

Primal LP

maximize c⊺x subject to Ax b x 0

Dual LP

minimize b⊺y subject to A⊺y c y 0

Duality is an Inversion

Given a primal LP in standard form, the dual of its dual is itself.

Properties of Duals 18/40

slide-46
SLIDE 46

Correspondance Between Variables and Constraints

Primal LP

max n

j=1 cjxj

s.t. n

j=1 aijxj ≤ bi,

for i ∈ [m]. xj ≥ 0, for j ∈ [n].

Dual LP

min m

i=1 biyi

s.t. m

i=1 aijyi ≥ cj,

for j ∈ [n]. yi ≥ 0, for i ∈ [m].

Properties of Duals 19/40

slide-47
SLIDE 47

Correspondance Between Variables and Constraints

Primal LP

max n

j=1 cjxj

s.t. yi : n

j=1 aijxj ≤ bi,

for i ∈ [m]. xj ≥ 0, for j ∈ [n].

Dual LP

min m

i=1 biyi

s.t. m

i=1 aijyi ≥ cj,

for j ∈ [n]. yi ≥ 0, for i ∈ [m].

The i’th primal constraint gives rise to the i’th dual variable yi

Properties of Duals 19/40

slide-48
SLIDE 48

Correspondance Between Variables and Constraints

Primal LP

max n

j=1 cjxj

s.t. yi : n

j=1 aijxj ≤ bi,

for i ∈ [m]. xj ≥ 0, for j ∈ [n].

Dual LP

min m

i=1 biyi

s.t. xj : m

i=1 aijyi ≥ cj,

for j ∈ [n]. yi ≥ 0, for i ∈ [m].

The i’th primal constraint gives rise to the i’th dual variable yi The j’th primal variable xj gives rise to the j’th dual constraint

Properties of Duals 19/40

slide-49
SLIDE 49

Syntactic Rules

Primal LP

max c⊺x s.t. yi : aix ≤ bi, for i ∈ C1. yi : aix = bi, for i ∈ C2. xj ≥ 0, for j ∈ D1. xj ∈ R, for j ∈ D2.

Dual LP

min b⊺y s.t. xj : a⊺

j y ≥ cj,

for j ∈ D1. xj : a⊺

j y = cj,

for j ∈ D2. yi ≥ 0, for i ∈ C1. yi ∈ R, for i ∈ C2.

Rules of Thumb

Lenient constraint (i.e. inequality) ⇒ stringent dual variable (i.e. nonnegative) Stringent constraint (i.e. equality) ⇒ lenient dual variable (i.e. unconstrained)

Properties of Duals 20/40

slide-50
SLIDE 50

Outline

1

Linear Programming Basics

2

Duality and Its Interpretations

3

Properties of Duals

4

Weak and Strong Duality

5

Formal Proof of Strong Duality of LP

6

Consequences of Duality

7

More Examples of Duality

slide-51
SLIDE 51

Weak Duality

Primal LP

maximize c⊺x subject to Ax b x 0

Dual LP

minimize b⊺y subject to A⊺y c y 0

Theorem (Weak Duality)

For every primal feasible x and dual feasible y, we have c⊺x ≤ b⊺y.

Corollary

If primal and dual both feasible and bounded, OPT(Primal) ≤ OPT(Dual) If primal is unbounded, dual is infeasible If dual is unbounded, primal is infeasible

Weak and Strong Duality 21/40

slide-52
SLIDE 52

Weak Duality

Primal LP

maximize c⊺x subject to Ax b x 0

Dual LP

minimize b⊺y subject to A⊺y c y 0

Theorem (Weak Duality)

For every primal feasible x and dual feasible y, we have c⊺x ≤ b⊺y.

Corollary

If x∗ is primal feasible, and y∗ is dual feasible, and c⊺x∗ = b⊺y∗, then both are optimal.

Weak and Strong Duality 21/40

slide-53
SLIDE 53

Interpretation of Weak Duality

Economic Interpretation

If selling the raw materials is more profitable than making any individual product, then total money collected from sale of raw materials would exceed profit from production.

Weak and Strong Duality 22/40

slide-54
SLIDE 54

Interpretation of Weak Duality

Economic Interpretation

If selling the raw materials is more profitable than making any individual product, then total money collected from sale of raw materials would exceed profit from production.

Upperbound Interpretation

Self explanatory

Weak and Strong Duality 22/40

slide-55
SLIDE 55

Interpretation of Weak Duality

Economic Interpretation

If selling the raw materials is more profitable than making any individual product, then total money collected from sale of raw materials would exceed profit from production.

Upperbound Interpretation

Self explanatory

Physical Interpretation

Work required to bring ball back to origin by pulling polytope is at least potential energy difference between origin and primal optimum.

Weak and Strong Duality 22/40

slide-56
SLIDE 56

Proof of Weak Duality

Primal LP

maximize c⊺x subject to Ax b x 0

Dual LP

minimize b⊺y subject to A⊺y c y 0

c⊺x ≤ y⊺Ax ≤ y⊺b

Weak and Strong Duality 23/40

slide-57
SLIDE 57

Strong Duality

Primal LP

maximize c⊺x subject to Ax b x 0

Dual LP

minimize b⊺y subject to A⊺y c y 0

Theorem (Strong Duality)

If either the primal or dual is feasible and bounded, then so is the other and OPT(Primal) = OPT(Dual).

Weak and Strong Duality 24/40

slide-58
SLIDE 58

Interpretation of Strong Duality

Economic Interpretation

Buyer can offer prices for raw materials that would make facility indifferent between production and sale.

Weak and Strong Duality 25/40

slide-59
SLIDE 59

Interpretation of Strong Duality

Economic Interpretation

Buyer can offer prices for raw materials that would make facility indifferent between production and sale.

Upperbound Interpretation

The method of scaling and summing inequalities yields a tight upperbound on the primal optimal value.

Weak and Strong Duality 25/40

slide-60
SLIDE 60

Interpretation of Strong Duality

Economic Interpretation

Buyer can offer prices for raw materials that would make facility indifferent between production and sale.

Upperbound Interpretation

The method of scaling and summing inequalities yields a tight upperbound on the primal optimal value.

Physical Interpretation

There is an assignment of forces to the walls of the polytope that brings ball back to the origin without wasting energy.

Weak and Strong Duality 25/40

slide-61
SLIDE 61

Informal Proof of Strong Duality

Recall the physical interpretation of duality

Weak and Strong Duality 26/40

slide-62
SLIDE 62

Informal Proof of Strong Duality

Recall the physical interpretation of duality When ball is stationary at x, we expect force c to be neutralized

  • nly by constraints that are tight. i.e. force multipliers y 0 s.t.

y⊺A = c yi(bi − aix) = 0

Weak and Strong Duality 26/40

slide-63
SLIDE 63

Informal Proof of Strong Duality

Recall the physical interpretation of duality When ball is stationary at x, we expect force c to be neutralized

  • nly by constraints that are tight. i.e. force multipliers y 0 s.t.

y⊺A = c yi(bi − aix) = 0

y⊺b − c⊺x = y⊺b − y⊺Ax =

  • i

yi(bi − aix) = 0 We found a primal and dual solution that are equal in value!

Weak and Strong Duality 26/40

slide-64
SLIDE 64

Outline

1

Linear Programming Basics

2

Duality and Its Interpretations

3

Properties of Duals

4

Weak and Strong Duality

5

Formal Proof of Strong Duality of LP

6

Consequences of Duality

7

More Examples of Duality

slide-65
SLIDE 65

Separating Hyperplane Theorem

If A, B ⊆ Rn are disjoint convex sets, then there is a hyperplane separating them. That is, there is a ∈ Rn and b ∈ R such that a⊺x ≤ b for every x ∈ A and a⊺y ≥ b for every y ∈ B. Moreover, if both A and B are closed and at least one of them is compact, then there is a hyperplane strictly separating them (i.e. aT x < b for x ∈ A and aT y > b for y ∈ B).

Formal Proof of Strong Duality of LP 27/40

slide-66
SLIDE 66

Definition

A convex cone is a convex subset of Rn which is closed under nonnegative scaling and convex combinations.

Definition

The convex cone generated by vectors u1, . . . , um ∈ Rn is the set of all nonnegative-weighted sums of these vectors (also known as conic combinations). Cone(u1, . . . , um) = m

  • i=1

αiui : αi ≥ 0 ∀i

  • Formal Proof of Strong Duality of LP

28/40

slide-67
SLIDE 67

The following follows from the separating hyperplane Theorem (try to prove it).

Farkas’ Lemma

Let C be the convex cone generated by vectors u1, . . . , um ∈ Rn, and let w ∈ Rn. Exactly one of the following is true: w ∈ C There is z ∈ Rn such that z · ui ≤ 0 for all i, and z · w > 0.

Formal Proof of Strong Duality of LP 28/40

slide-68
SLIDE 68

Equivalently: Theorem of the Alternative

Exactly one of the following is true for U = [u1, . . . , um] and w The system Uz = w, z 0 has a solution The system U ⊺z 0, z⊺w > 0 has a solution.

Formal Proof of Strong Duality of LP 28/40

slide-69
SLIDE 69

Formal Proof of Strong Duality

Primal LP

maximize c⊺x subject to Ax b

Dual LP

minimize b⊺y subject to A⊺y = c y 0 Given v ∈ R, by Farkas’ Lemma exactly one of the following is true

1

The system A⊺ b⊺ 1

  • z =

c v

  • , z 0 has a solution.

Let y ∈ Rm

+ and δ ∈ R+ be such that z =

y δ

  • Implies dual is feasible and OPT(dual) ≤ v

Formal Proof of Strong Duality of LP 29/40

slide-70
SLIDE 70

Formal Proof of Strong Duality

Primal LP

maximize c⊺x subject to Ax b

Dual LP

minimize b⊺y subject to A⊺y = c y 0 Given v ∈ R, by Farkas’ Lemma exactly one of the following is true

1

The system A⊺ b⊺ 1

  • z =

c v

  • , z 0 has a solution.

Let y ∈ Rm

+ and δ ∈ R+ be such that z =

y δ

  • Implies dual is feasible and OPT(dual) ≤ v

2

The system A b 1

  • z 0, z⊺

c v

  • > 0 has a solution.

Let z = z1 z2

  • , where z1 ∈ Rn and z2 ∈ R with z2 ≤ 0

A

When z2 = 0, x = −z1/z2 is primal feasible and cT x > v

Formal Proof of Strong Duality of LP 29/40

slide-71
SLIDE 71

Formal Proof of Strong Duality

Primal LP

maximize c⊺x subject to Ax b

Dual LP

minimize b⊺y subject to A⊺y = c y 0 Given v ∈ R, by Farkas’ Lemma exactly one of the following is true

1

The system A⊺ b⊺ 1

  • z =

c v

  • , z 0 has a solution.

Let y ∈ Rm

+ and δ ∈ R+ be such that z =

y δ

  • Implies dual is feasible and OPT(dual) ≤ v

2

The system A b 1

  • z 0, z⊺

c v

  • > 0 has a solution.

Let z = z1 z2

  • , where z1 ∈ Rn and z2 ∈ R with z2 ≤ 0

A

When z2 = 0, x = −z1/z2 is primal feasible and cT x > v

B

When z2 = 0, primal is either infeasible or unbounded, and dual is infeasible (prove it)

Formal Proof of Strong Duality of LP 29/40

slide-72
SLIDE 72

Outline

1

Linear Programming Basics

2

Duality and Its Interpretations

3

Properties of Duals

4

Weak and Strong Duality

5

Formal Proof of Strong Duality of LP

6

Consequences of Duality

7

More Examples of Duality

slide-73
SLIDE 73

Complementary Slackness

Primal LP

maximize c⊺x subject to Ax b x 0

Dual LP

minimize y⊺b subject to A⊺y c y 0

Consequences of Duality 30/40

slide-74
SLIDE 74

Complementary Slackness

Primal LP

maximize c⊺x subject to Ax b x 0

Dual LP

minimize y⊺b subject to A⊺y c y 0 Let si = (b − Ax)i be the i’th primal slack variable Let tj = (A⊺y − c)j be the j’th dual slack variable

Consequences of Duality 30/40

slide-75
SLIDE 75

Complementary Slackness

Primal LP

maximize c⊺x subject to Ax b x 0

Dual LP

minimize y⊺b subject to A⊺y c y 0 Let si = (b − Ax)i be the i’th primal slack variable Let tj = (A⊺y − c)j be the j’th dual slack variable

Complementary Slackness

Feasible x and y are optimal if and

  • nly if

xjtj = 0 for all j = 1, . . . , n yisi = 0 for all i = 1, . . . , m x1 x2 x3 x4 y1 a11 a12 a13 a14 b1 y2 a21 a22 a23 a24 b2 y3 a31 a32 a33 a34 b3 c1 c2 c3 c4

Consequences of Duality 30/40

slide-76
SLIDE 76

Interpretation of Complementary Slackness

Economic Interpretation

Given an optimal primal production vector x and optimal dual offer prices y, Facility produces only products for which it is indifferent between sale and production. Only raw materials that are binding constraints on production are priced greater than 0

Consequences of Duality 31/40

slide-77
SLIDE 77

Interpretation of Complementary Slackness

Physical Interpretation

Only walls adjacent to the balls equilibrium position push back on it.

Consequences of Duality 31/40

slide-78
SLIDE 78

Proof of Complementary Slackness

Primal LP

maximize c⊺x subject to Ax b x 0

Dual LP

minimize y⊺b subject to A⊺y c y 0

Consequences of Duality 32/40

slide-79
SLIDE 79

Proof of Complementary Slackness

Primal LP

maximize c⊺x subject to Ax + s = b x 0 s 0

Dual LP

minimize y⊺b subject to A⊺y − t = c y 0 t 0 Can equivalently rewrite LP using slack variables

Consequences of Duality 32/40

slide-80
SLIDE 80

Proof of Complementary Slackness

Primal LP

maximize c⊺x subject to Ax + s = b x 0 s 0

Dual LP

minimize y⊺b subject to A⊺y − t = c y 0 t 0 Can equivalently rewrite LP using slack variables

y⊺b − c⊺x = y⊺(Ax + s) − (y⊺A − t⊺)x = y⊺s + t⊺x

Consequences of Duality 32/40

slide-81
SLIDE 81

Proof of Complementary Slackness

Primal LP

maximize c⊺x subject to Ax + s = b x 0 s 0

Dual LP

minimize y⊺b subject to A⊺y − t = c y 0 t 0 Can equivalently rewrite LP using slack variables

y⊺b − c⊺x = y⊺(Ax + s) − (y⊺A − t⊺)x = y⊺s + t⊺x Gap between primal and dual objectives is 0 if and only if complementary slackness holds.

Consequences of Duality 32/40

slide-82
SLIDE 82

Recovering Primal from Dual

Will encounter LPs where the dual is easier to solve than primal Complementary slackness allows us to recover the primal optimal from the dual optimal, and vice versa.

Consequences of Duality 33/40

slide-83
SLIDE 83

Recovering Primal from Dual

Will encounter LPs where the dual is easier to solve than primal Complementary slackness allows us to recover the primal optimal from the dual optimal, and vice versa.

Assuming non-degeneracy: At every vertex of primal [dual] there are exactly n [m] tight constraints which are linearly independent.

Consequences of Duality 33/40

slide-84
SLIDE 84

Recovering Primal from Dual

Will encounter LPs where the dual is easier to solve than primal Complementary slackness allows us to recover the primal optimal from the dual optimal, and vice versa.

Assuming non-degeneracy: At every vertex of primal [dual] there are exactly n [m] tight constraints which are linearly independent.

Primal LP

(n variables, m + n constraints)

maximize c⊺x subject to Ax b x 0

Dual LP

(m variables, m + n constraints)

minimize y⊺b subject to A⊺y c y 0

Consequences of Duality 33/40

slide-85
SLIDE 85

Recovering Primal from Dual

Will encounter LPs where the dual is easier to solve than primal Complementary slackness allows us to recover the primal optimal from the dual optimal, and vice versa.

Assuming non-degeneracy: At every vertex of primal [dual] there are exactly n [m] tight constraints which are linearly independent.

Primal LP

(n variables, m + n constraints)

maximize c⊺x subject to Ax b x 0

Dual LP

(m variables, m + n constraints)

minimize y⊺b subject to A⊺y c y 0 Let y be dual optimal. By non-degeneracy:

Exactly m of the m + n dual constraints are tight at y Exactly n dual constraints are loose

Consequences of Duality 33/40

slide-86
SLIDE 86

Recovering Primal from Dual

Will encounter LPs where the dual is easier to solve than primal Complementary slackness allows us to recover the primal optimal from the dual optimal, and vice versa.

Assuming non-degeneracy: At every vertex of primal [dual] there are exactly n [m] tight constraints which are linearly independent.

Primal LP

(n variables, m + n constraints)

maximize c⊺x subject to Ax b x 0

Dual LP

(m variables, m + n constraints)

minimize y⊺b subject to A⊺y c y 0 Let y be dual optimal. By non-degeneracy:

Exactly m of the m + n dual constraints are tight at y Exactly n dual constraints are loose

n loose dual constraints impose n tight primal constraints

Consequences of Duality 33/40

slide-87
SLIDE 87

Recovering Primal from Dual

Will encounter LPs where the dual is easier to solve than primal Complementary slackness allows us to recover the primal optimal from the dual optimal, and vice versa.

Assuming non-degeneracy: At every vertex of primal [dual] there are exactly n [m] tight constraints which are linearly independent.

Primal LP

(n variables, m + n constraints)

maximize c⊺x subject to Ax b x 0

Dual LP

(m variables, m + n constraints)

minimize y⊺b subject to A⊺y c y 0 Let y be dual optimal. By non-degeneracy:

Exactly m of the m + n dual constraints are tight at y Exactly n dual constraints are loose

n loose dual constraints impose n tight primal constraints

Assuming non-degeneracy, solving the linear equation yields a unique primal optimum solution x.

Consequences of Duality 33/40

slide-88
SLIDE 88

Sensitivity Analysis

Primal LP

maximize c⊺x subject to Ax b x 0

Dual LP

minimize y⊺b subject to A⊺y c y 0 Sometimes, we want to examine how the optimal value of our LP changes with its parameters c and b

Consequences of Duality 34/40

slide-89
SLIDE 89

Sensitivity Analysis

Primal LP

maximize c⊺x subject to Ax b x 0

Dual LP

minimize y⊺b subject to A⊺y c y 0 Sometimes, we want to examine how the optimal value of our LP changes with its parameters c and b

Sensitivity Analysis

Let OPT = OPT(A, c, b) be the optimal value of the above LP . Let x and y be the primal and dual optima.

∂OPT ∂cj

= xj when x is the unique primal optimum.

∂OPT ∂bi

= yi when y is the unique dual optimum.

Consequences of Duality 34/40

slide-90
SLIDE 90

Sensitivity Analysis

Primal LP

maximize c⊺x subject to Ax b x 0

Dual LP

minimize y⊺b subject to A⊺y c y 0 Sometimes, we want to examine how the optimal value of our LP changes with its parameters c and b

Economic Interpretation of Sensitivity Analysis

A small increase δ in cj increases profit by δ · xj A small increase δ in bi increases profit by δ · yi

yi measures the “marginal value” of resource i for production

Consequences of Duality 34/40

slide-91
SLIDE 91

Outline

1

Linear Programming Basics

2

Duality and Its Interpretations

3

Properties of Duals

4

Weak and Strong Duality

5

Formal Proof of Strong Duality of LP

6

Consequences of Duality

7

More Examples of Duality

slide-92
SLIDE 92

Shortest Path

Given a directed network G = (V, E) where edge e has length ℓe ∈ R+, find the minimum cost path from s to t.

s t 1 1 1 2 2 2 2 3 3 3 5 1

More Examples of Duality 35/40

slide-93
SLIDE 93

Shortest Path

s t 1 1 1 2 2 2 2 3 3 3 5 1

Primal LP

min

  • e∈E ℓexe

s.t.

  • e→v

xe −

v→e

xe = δv, ∀v ∈ V. xe ≥ 0, ∀e ∈ E.

Dual LP

max yt − ys s.t. yv − yu ≤ ℓe, ∀(u, v) ∈ E. Where δv = −1 if v = s, 1 if v = t, and 0 otherwise.

More Examples of Duality 35/40

slide-94
SLIDE 94

Shortest Path

s t 1 1 1 2 2 2 2 3 3 3 5 1

Primal LP

min

  • e∈E ℓexe

s.t.

  • e→v

xe −

v→e

xe = δv, ∀v ∈ V. xe ≥ 0, ∀e ∈ E.

Dual LP

max yt − ys s.t. yv − yu ≤ ℓe, ∀(u, v) ∈ E. Where δv = −1 if v = s, 1 if v = t, and 0 otherwise.

Interpretation of Dual

Stretch s and t as far apart as possible, subject to edge lengths.

More Examples of Duality 35/40

slide-95
SLIDE 95

Maximum Weighted Bipartite Matching

Set B of buyers, and set G of goods. Buyer i has value wij for good j, and interested in at most one good. Find maximum value assignment

  • f goods to buyers.

More Examples of Duality 36/40

slide-96
SLIDE 96

Maximum Weighted Bipartite Matching

Primal LP

max

  • i,j

wijxij s.t.

  • j∈G

xij ≤ 1, ∀i ∈ B.

  • i∈B

xij ≤ 1, ∀j ∈ G. xij ≥ 0, ∀i ∈ B, j ∈ G.

Dual LP

min

  • i∈B

ui +

j∈G

pj s.t. ui + pj ≥ wij, ∀i ∈ B, j ∈ G. ui ≥ 0, ∀i ∈ B. pj ≥ 0, ∀j ∈ G.

More Examples of Duality 36/40

slide-97
SLIDE 97

Maximum Weighted Bipartite Matching

Primal LP

max

  • i,j

wijxij s.t.

  • j∈G

xij ≤ 1, ∀i ∈ B.

  • i∈B

xij ≤ 1, ∀j ∈ G. xij ≥ 0, ∀i ∈ B, j ∈ G.

Dual LP

min

  • i∈B

ui +

j∈G

pj s.t. ui + pj ≥ wij, ∀i ∈ B, j ∈ G. ui ≥ 0, ∀i ∈ B. pj ≥ 0, ∀j ∈ G.

Interpretation of Dual

pj is price of good j ui is utility of buyer i Complementary Slackness:

A buyer i only grabs goods j maximizing wij − pj Only fully assigned goods have non-zero price A buyer witn nonzero utility must receive an item

More Examples of Duality 36/40

slide-98
SLIDE 98

2-Player Zero-Sum Games

Rock-Paper-Scissors R P S R 1 −1 P −1 1 S 1 −1 Two players, row and column Game described by matrix A When row player plays pure strategy i and column player plays pure strategy j, row player pays column player Aij

More Examples of Duality 37/40

slide-99
SLIDE 99

2-Player Zero-Sum Games

Rock-Paper-Scissors R P S R 1 −1 P −1 1 S 1 −1 Two players, row and column Game described by matrix A When row player plays pure strategy i and column player plays pure strategy j, row player pays column player Aij Mixed Strategy: distribution over pure strategies

More Examples of Duality 37/40

slide-100
SLIDE 100

2-Player Zero-Sum Games

Rock-Paper-Scissors R P S R 1 −1 P −1 1 S 1 −1 Two players, row and column Game described by matrix A When row player plays pure strategy i and column player plays pure strategy j, row player pays column player Aij Mixed Strategy: distribution over pure strategies If one of the players moves first, the other observes his mixed strategy but not the outcome of his coin flips.

More Examples of Duality 37/40

slide-101
SLIDE 101

2-Player Zero-Sum Games

Assume row player moves first with distribution y ∈ ∆m

Payment as a function of Column’s strategy given by y⊺A A best response by column is pure strategy j maximizing (y⊺A)j Row player solves an LP to determine optimal strategy y, payment u for himself

x1 x2 x3 x4 y1 a11 a12 a13 a14 y2 a21 a22 a23 a24 y3 a31 a32 a33 a34

More Examples of Duality 38/40

slide-102
SLIDE 102

2-Player Zero-Sum Games

Assume row player moves first with distribution y ∈ ∆m

Payment as a function of Column’s strategy given by y⊺A A best response by column is pure strategy j maximizing (y⊺A)j Row player solves an LP to determine optimal strategy y, payment u for himself

Row Moves First

min maxj(y⊺A)j s.t. m

i=1 yi = 1

y

More Examples of Duality 38/40

slide-103
SLIDE 103

2-Player Zero-Sum Games

Assume row player moves first with distribution y ∈ ∆m

Payment as a function of Column’s strategy given by y⊺A A best response by column is pure strategy j maximizing (y⊺A)j Row player solves an LP to determine optimal strategy y, payment u for himself

Row Moves First

min u s.t. u 1 − y⊺A m

i=1 yi = 1

y

More Examples of Duality 38/40

slide-104
SLIDE 104

2-Player Zero-Sum Games

Assume row player moves first with distribution y ∈ ∆m

Payment as a function of Column’s strategy given by y⊺A A best response by column is pure strategy j maximizing (y⊺A)j Row player solves an LP to determine optimal strategy y, payment u for himself Similarly when column moves first, column solves an LP to determine optimal strategy x, payment v for himself

Row Moves First

min u s.t. u 1 − y⊺A m

i=1 yi = 1

y

Column Moves First

max v s.t. v 1 − Ax n

j=1 xj = 1

x

More Examples of Duality 38/40

slide-105
SLIDE 105

2-Player Zero-Sum Games

Assume row player moves first with distribution y ∈ ∆m

Payment as a function of Column’s strategy given by y⊺A A best response by column is pure strategy j maximizing (y⊺A)j Row player solves an LP to determine optimal strategy y, payment u for himself Similarly when column moves first, column solves an LP to determine optimal strategy x, payment v for himself

Row Moves First

min u s.t. u 1 − y⊺A m

i=1 yi = 1

y

Column Moves First

max v s.t. v 1 − Ax n

j=1 xj = 1

x These two optimization problems are LP Duals!

More Examples of Duality 38/40

slide-106
SLIDE 106

Duality and Zero Sum Games

Weak Duality

u∗ ≥ v∗ Zero sum games have a second mover advantage (weakly)

More Examples of Duality 39/40

slide-107
SLIDE 107

Duality and Zero Sum Games

Weak Duality

u∗ ≥ v∗ Zero sum games have a second mover advantage (weakly)

Strong Duality (Minimax Theorem)

u∗ = v∗ There is no second or first mover advantage in zero sum games with mixed strategies Each player can guarantee u∗ = v∗ even if they move first (i.e., regardless of other’s strategy). y∗, x∗ are simultaneously best responses to each other (Nash Equilibrium)

More Examples of Duality 39/40

slide-108
SLIDE 108

Duality and Zero Sum Games

Weak Duality

u∗ ≥ v∗ Zero sum games have a second mover advantage (weakly)

Strong Duality (Minimax Theorem)

u∗ = v∗ There is no second or first mover advantage in zero sum games with mixed strategies Each player can guarantee u∗ = v∗ even if they move first (i.e., regardless of other’s strategy). y∗, x∗ are simultaneously best responses to each other (Nash Equilibrium)

Complementary Slackness

x∗ randomizes over pure best responses to y∗, and vice versa.

More Examples of Duality 39/40

slide-109
SLIDE 109

Saddle Point Interpretation

Consider the matching pennies game H T H −1 1 T 1 −1 Unique equilibrium: each player randomizes uniformly If row player deviates, he pays out more If column player deviates, he gets paid less

More Examples of Duality 40/40

slide-110
SLIDE 110

Saddle Point Interpretation

Unique equilibrium: each player randomizes uniformly If row player deviates, he pays out more If column player deviates, he gets paid less

More Examples of Duality 40/40