lecture 2 linear programming and duality lecture outline
play

Lecture 2: Linear Programming and Duality Lecture Outline Part I: - PowerPoint PPT Presentation

Lecture 2: Linear Programming and Duality Lecture Outline Part I: Linear Programming and Examples Part II: Von Neumanns Minimax Theorem and Linear Programming Duality Part III: Linear Programming as a Problem Relaxation Part I:


  1. Lecture 2: Linear Programming and Duality

  2. Lecture Outline • Part I: Linear Programming and Examples • Part II: Von Neumann’s Minimax Theorem and Linear Programming Duality • Part III: Linear Programming as a Problem Relaxation

  3. Part I: Linear Programming, Examples, and Canonical Form

  4. Linear Programming • Linear Programming: Want to optimize a linear function over linear equalities and inequalities. • Example: Maximize f x, y, z = 3𝑦 + 4𝑧 + 5𝑨 when 1. 𝑦 + 𝑧 + 𝑨 = 1 𝑦 ≥ 0 2. 𝑧 ≥ 0 3. 4. 𝑨 ≥ 0 • Answer: 𝑦 = 𝑧 = 0, 𝑨 = 1, 𝑔 𝑦, 𝑧, 𝑨 = 5

  5. Example: Directed Connectivity • Directed connectivity: Is there a path from 𝑡 = 𝑦 1 to 𝑢 = 𝑦 𝑜 in a directed graph 𝐻 ? • Linear program: Minimize 𝑦 𝑜 subject to 𝑦 1 = 1 1. 𝑦 𝑘 ≥ 𝑦 𝑗 whenever x 𝑗 → 𝑦 𝑘 ∈ 𝐹(𝐻) 2. ∀𝑗, 𝑦 𝑗 ≥ 0 3. • Answer is 1 if there is a path from 𝑡 to 𝑢 in 𝐻 and 0 otherwise.

  6. Example: Maximum Flow • Max flow: Given edge capacities 𝑑 𝑗𝑘 for each edge 𝑦 𝑗 → 𝑦 𝑘 in 𝐻 , what is the maximum flow from 𝑡 = 𝑦 1 to 𝑢 = 𝑦 𝑜 ? • Example: 2 3 4 3 3 2 6 6 4 6 6 4 1 2 1 4 4 6 s t 2 4

  7. Example Answer: 15 • Answer: 15. Actual flow is red/purple, capacity is blue/purple. 2 2 3 4 3 3 2 4 6 6 1 6 5 3 4 4 6 1 2 0 2 5 1 s 4 t 4 6 2 3 4

  8. Max Flow Equations • Take 𝑦 𝑗𝑘 = flow from 𝑗 to 𝑘 • Recall: 𝑑 𝑗𝑘 is the capacity from 𝑗 to 𝑘 • Program: Maximize 𝑦 𝑜1 subject to 1. ∀𝑗, 𝑘, 0 ≤ 𝑦 𝑗𝑘 ≤ 𝑑 𝑗𝑘 (no capacity is exceeded, no negative flow) 𝑜 𝑜 ∀𝑗, σ 𝑘=1 𝑦 𝑘𝑗 = σ 𝑘=1 𝑦 𝑗𝑘 (flow in = flow out) 2.

  9. In-class Exercise • Shortest path problem: Given a directed graph 𝐻 with lengths 𝑚 𝑗𝑘 on the edges, what is the shortest path from 𝑡 = 𝑦 1 to 𝑢 = 𝑦 𝑜 in 𝐻 ? • Exercise: Express the shortest path problem as a linear program.

  10. In-class Exercise Answer • Shortest path problem: How long is the shortest path from 𝑡 = 𝑦 1 to 𝑢 = 𝑦 𝑜 in a directed graph 𝐻 ? • Linear Program: Have variables 𝑒 𝑗 representing the distance of vertex 𝑦 𝑗 from vertex 𝑡 = 𝑦 1 . Maximize 𝑒 𝑜 subject to 𝑒 1 = 0 1. 2. ∀𝑗, 𝑘, 𝑒 𝑘 ≤ 𝑒 𝑗 + 𝑚 𝑗𝑘 where 𝑚 𝑗𝑘 is the length of the edge from 𝑦 𝑗 to 𝑦 𝑘

  11. Canonical Form • Canonical form: Maximize c T 𝑦 subject to 𝐵𝑦 ≤ 𝑐 1. 𝑦 ≥ 0 2.

  12. Putting Things Into Canonical Form • Canonical form: Maximize c T 𝑦 subject to 𝐵𝑦 ≤ 𝑐 1. 𝑦 ≥ 0 2. • To put a linear program into canonical form: 𝑈 𝑦 = 𝑐 𝑗 with two 1. Replace each equality 𝑏 𝑗 𝑈 𝑦 ≤ 𝑐 𝑗 and −𝑏 𝑗 𝑈 𝑦 ≤ −𝑐 𝑗 inequalities 𝑏 𝑗 + −𝑦 𝑘 − ) 2. In each expression, replace 𝑦 𝑘 with (𝑦 𝑘 − are two new variables. + , 𝑦 𝑘 where 𝑦 𝑘

  13. Slack Form • Slack form: Maximize c T 𝑦 subject to 𝐵𝑦 = 𝑐 1. 𝑦 ≥ 0 2.

  14. Putting Things Into Slack Form • Slack form: Maximize c T 𝑦 subject to 𝐵𝑦 = 𝑐 1. 𝑦 ≥ 0 2. • To put a linear program into slack form from canonical form, simply add a slack variable for each inequality. 𝑜 𝑜 σ 𝑘=1 𝑏 𝑗𝑘 𝑦 𝑘 ≤ 𝑐 𝑗 ⬄ (σ 𝑘=1 𝑏 𝑗𝑘 𝑦 𝑘 ) + 𝑡 𝑗 = 𝑐 𝑗 , 𝑡 𝑗 ≥ 0

  15. Part II: Von Neumann’s Minimax Theorem and Linear Programming Duality

  16. Linear Programming Duality • Primal: Maximize c T 𝑦 subject to 𝐵𝑦 ≤ 𝑐 1. 𝑦 ≥ 0 2. • Dual: Minimize 𝑐 𝑈 𝑧 subject to 𝐵 𝑈 𝑧 ≥ 𝑑 1. 2. 𝑧 ≥ 0 • Observation: For any feasible 𝑦, 𝑧 , 𝑑 𝑈 𝑦 ≤ 𝑐 𝑈 𝑧 because 𝑑 𝑈 𝑦 ≤ 𝑧 𝑈 𝐵𝑦 = 𝑧 𝑈 𝐵𝑦 − 𝑐 + 𝑧 𝑈 𝑐 ≤ 𝑐 𝑈 𝑧 • Strong duality: 𝑑 𝑈 𝑦 = 𝑐 𝑈 𝑧 at optimal 𝑦, 𝑧

  17. Heart of Duality • Game: Have a function 𝑔: 𝑌 × 𝑍 → 𝑆 . • 𝑌 player wants to minimize 𝑔(𝑦, 𝑧) , 𝑍 player wants to maximize 𝑔(𝑦, 𝑧) • Obvious: Better to go second, i.e max 𝑧∈𝑍 min 𝑦∈𝑌 𝑔(𝑦, 𝑧) ≤ min 𝑦∈𝑌 max 𝑧∈𝑍 𝑔(𝑦, 𝑧) • Minimax theorems: Under certain conditions, max 𝑧∈𝑍 min 𝑦∈𝑌 𝑔(𝑦, 𝑧) = min 𝑦∈𝑌 max 𝑧∈𝑍 𝑔(𝑦, 𝑧) !

  18. Von Neumann’s Minimax Theorem • Von Neumann [1928]: If 𝑌 and 𝑍 are convex compact subsets of 𝑆 𝑛 and 𝑆 𝑜 and 𝑔: 𝑌 × 𝑍 → 𝑆 is a continuous function which is convex in 𝑌 and concave in 𝑍 then max 𝑧∈𝑍 min 𝑦∈𝑌 𝑔(𝑦, 𝑧) = min 𝑦∈𝑌 max 𝑧∈𝑍 𝑔(𝑦, 𝑧) • These conditions are necessary (see problem set)

  19. Example • Let 𝑌 = 𝑍 = [−1,1] and consider the function 𝑔 𝑦, 𝑧 = 𝑦𝑧 . • If the 𝑦 player goes first and plays 𝑦 = .5 , the 𝑧 player should play 𝑧 = 1 , obtaining 𝑔 𝑦, 𝑧 = .5 • If the 𝑦 player goes first and plays 𝑦 = −.5 , the 𝑧 player should play 𝑧 = −1 , obtaining 𝑔 𝑦, 𝑧 = .5 • The best play for the 𝑦 player is 𝑦 = 0 as then 𝑔 𝑦, 𝑧 = 0 regardless of what 𝑧 is.

  20. Connection to Nash Equilibria • Recall: 𝑌 player wants to minimize 𝑔(𝑦, 𝑧) , 𝑍 player wants to maximize 𝑔(𝑦, 𝑧) . • If (𝑦 ∗ , 𝑧 ∗ ) is a Nash equilibrium then 𝑔 𝑦 ∗ , 𝑧 ∗ ≤ max 𝑧∈𝑍 min 𝑦∈𝑌 𝑔 𝑦, 𝑧 𝑧∈𝑍 𝑔 𝑦, 𝑧 ≤ 𝑔(𝑦 ∗ , 𝑧 ∗ ) ≤ min 𝑦∈𝑌 max • Note: Since 𝑔 is convex in 𝑦 and concave in 𝑧 , pure strategies are always optimal. • However, this is circular: proof that Nash equilibria exist ≈ proof of minimax theorem

  21. Minimax Theorem Proof Sketch • Proof idea: 1. Define a function 𝑈: 𝑌 × 𝑍 → 𝑌 × 𝑍 so that 𝑈 𝑦, 𝑧 = (𝑦, 𝑧) if and only if (𝑦, 𝑧) is a Nash equilibrium. 2. Use Brouwer’s fixed point theorem to argue that T must have a fixed point.

  22. Attempt #1 • We could try to define 𝑈 as follows 1. Starting from (𝑦, 𝑧) , take 𝑦′ to be the closest point to 𝑦 which minimizes 𝑔(𝑦 ′ , 𝑧) . 2. Now take 𝑧′ to be the closest point to 𝑧 which maximizes 𝑔(𝑦′, 𝑧′) 3. Take 𝑈 𝑦, 𝑧 = (𝑦 ′ , 𝑧′) • 𝑈 𝑦, 𝑧 = 𝑦, 𝑧 ⬄(𝑦, 𝑧) is a Nash equilibrium.

  23. Brouwer’s Fixed Point Theorem • Brouwer’s fixed point theorem : If 𝑌 is a convex, compact subset of 𝑆 𝑜 then any continuous map 𝑔: 𝑌 → 𝑌 has a fixed point • Example: Any continuous function 𝑔: 𝐸 2 → 𝐸 2 has a fixed point.

  24. Correct function T • Problem: Previous 𝑈 may not be continuous! • Correct 𝑈 : Starting from 𝑦, 𝑧 : 1. Define Δ 𝑦 2 = 𝑔 𝑦, 𝑧 − 𝑔 𝑦 2 , 𝑧 if 𝑔 𝑦 2 , 𝑧 < 𝑔(𝑦, 𝑧) and Δ 𝑦 2 = 0 otherwise. 𝑦+׬ 𝑦2∈𝑌 Δ 𝑦 2 𝑦 2 2. Take 𝑦 ′ = 1+׬ 𝑦2∈𝑌 Δ 𝑦 2 3. Define Δ 𝑧 2 = 𝑔 𝑦′, 𝑧 2 − 𝑔 𝑦′, 𝑧 if 𝑔 𝑦, 𝑧 2 > 𝑔(𝑦, 𝑧) and Δ 𝑧 2 = 0 otherwise. 𝑧+׬ 𝑧2∈𝑍 Δ 𝑧 2 𝑧 2 4. Take 𝑧 ′ = and 𝑈 𝑦, 𝑧 = (𝑦 ′ , 𝑧 ′ ) 1+׬ 𝑧2∈𝑍 Δ 𝑧 2

  25. Duality Via Minimax Theorem • Idea: Instead of trying to enforce some of the constraints, make the program into a two player game where the new player can punish any violated constraints. • Example: Maximize c T 𝑦 subject to 𝐵𝑦 ≤ 𝑐 1. 𝑦 ≥ 0 2. • Game: Take 𝑔 𝑦, 𝑧 = 𝑑 𝑈 𝑦 + 𝑧 𝑈 𝑐 − 𝐵𝑦 where we have the constraint that 𝑧 ≥ 0 (here 𝑧 wants to minimize 𝑔(𝑦, 𝑧) ). • If 𝐵𝑦 𝑗 > 𝑐 𝑗 , 𝑧 can take 𝑧 𝑗 → ∞ to punish this.

  26. Strong Duality Intuition • Canonical primal form: Maximize c T 𝑦 subject to 𝐵𝑦 ≤ 𝑐 1. 𝑦 ≥ 0 2. 𝑧≥0 𝑑 𝑈 𝑦 + 𝑧 𝑈 𝑐 − 𝐵𝑦 • = max 𝑦≥0 min 𝑦≥0 𝑧 𝑈 𝑐 + (𝑑 𝑈 − 𝑧 𝑈 𝐵)𝑦 • = min 𝑧≥0 max • Canonical dual form: Minimize 𝑐 𝑈 𝑧 subject to 𝐵 𝑈 𝑧 ≥ 𝑑 𝑈 1. 𝑧 ≥ 0 2. • Not quite a proof, domains of 𝑦, 𝑧 aren’t compact!

  27. Slack Form Duality Intuition • Slack primal form: Maximize c T 𝑦 subject to 𝐵𝑦 = 𝑐 1. 𝑦 ≥ 0 2. 𝑧 𝑑 𝑈 𝑦 + 𝑧 𝑈 𝑐 − 𝐵𝑦 • = max 𝑦≥0 min 𝑦≥0 𝑧 𝑈 𝑐 + (𝑑 𝑈 − 𝑧 𝑈 𝐵)𝑦 • = min 𝑧 max • Slack dual form: Minimize 𝑐 𝑈 𝑧 subject to 𝐵 𝑈 𝑧 ≥ 𝑑 𝑈 1. • See problem set for a true proof of strong duality.

  28. Max-flow/Min-cut Theorem • Classical duality example: max-flow/min-cut • Max-flow/min-cut theorem: The maximum flow from 𝑡 to 𝑢 is equal to the minimum capacity across a cut separating 𝑡 and 𝑢 . • Duality is a bit subtle (see problem set)

  29. Max-flow/Min-cut Example • Maximum flow was 15, this is matched by the minimal cut shown below: 2 3 4 3 3 2 6 6 4 6 6 4 1 2 1 4 4 6 s t 2 4

  30. Part III: Linear Programming as a Problem Relaxation

Recommend


More recommend