Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Class 9: Linear Programming

40e37c08199ed4d3866ce6e1ff0be06d?s=47 David Evans
February 12, 2019
590

Class 9: Linear Programming

Class 9: Linear Programming
https://uvammm.github.io/class9

Markets, Mechanisms, and Machines
University of Virginia
cs4501/econ4559 Spring 2019
David Evans and Denis Nekipelov
https://uvammm.github.io/

40e37c08199ed4d3866ce6e1ff0be06d?s=128

David Evans

February 12, 2019
Tweet

Transcript

  1. MARKETS, MECHANISMS, MACHINES University of Virginia, Spring 2019 Class 9:

    Applications of Linear Programming 12 February 2019 cs4501/econ4559 Spring 2019 David Evans and Denis Nekipelov https://uvammm.github.io Zinedine Zidane’s penalty in 2006 World Cup Final
  2. What is the “Programming” in “Linear Programming”?

  3. None
  4. Linear Program 3 ) subject to ≤

  5. Possibilities 4 ) subject to ≤ Infeasible: no solution satisfies

    all the inequalities
  6. Possibilities 5 ) subject to ≤ Infeasible: no solution satisfies

    all the inequalities 6 subject to 6 ≤ 5 −6 ≤ −7
  7. Possibilities 6 ) subject to ≤ Unbounded: no limit on

    maximized value 6 subject to −6 ≤ −7
  8. Brewer’s Problem 7 Robert Sedgewick and Kevin Wayne, Princeton Course

    Limited Resources Available Recipes and Outputs How much of each should we brew to maximize total profits?
  9. 8 Robert Sedgewick and Kevin Wayne, Princeton Course

  10. 9 Robert Sedgewick and Kevin Wayne, Princeton Course Maxmimize =

    13 + 23 subject to constraints: 5 + 15 ≤ 480 (corn) 4 + 4 ≤ 160 hops 35 + 20 ≤ 1190 (malt) ≥ 0, ≥ 0
  11. 10 Robert Sedgewick and Kevin Wayne, Princeton Course Maxmimize =

    13 + 23 subject to constraints: 5 + 15 ≤ 480 (corn) 4 + 4 ≤ 160 hops 35 + 20 ≤ 1190 (malt) ≥ 0, ≥ 0 Feasible Region (convex polygon)
  12. 11 Robert Sedgewick and Kevin Wayne, Princeton Course Maxmimize =

    13 + 23 subject to constraints: 5 + 15 ≤ 480 (corn) 4 + 4 ≤ 160 hops 35 + 20 ≤ 1190 (malt) ≥ 0, ≥ 0
  13. 12 Robert Sedgewick and Kevin Wayne, Princeton Course Optimal solution

    must be at an extreme point (intersection of constraints)
  14. see Jupyter Notebook 13

  15. Dual Problem 14 Brewer Entrepreneur = 13 + 23 subject

    to constraints: 5 + 15 ≤ 480 (corn) 4 + 4 ≤ 160 hops 35 + 20 ≤ 1190 (malt) ≥ 0, ≥ 0 = 480 + 160ℎ + 1190 , ℎ, = unit prices for ingredients 5 + 4ℎ + 35 ≥ 13 (ale) 15 + 4ℎ + 20 ≥ 23 beer ≥ 0, ℎ ≥ 0, ≥ 0
  16. Dual Theorem 15 ) subject to ≤ ≥ 0 )

    subject to ) ≥ ≥ 0 primal problem dual problem T = T Proof sketch: roughly – show that simplex algorithm for both problems produces same result. if both feasible:
  17. see Jupyter Notebook 16

  18. Example: Network Flow 17 Source: Avrim Blum, Manual Blum, CMU

    course: https://www.cs.cmu.edu/~avrim/451f11/lectures/lect1101.pdf
  19. Example: Network Flow 18 Source: Avrim Blum, Manual Blum, CMU

    course: https://www.cs.cmu.edu/~avrim/451f11/lectures/lect1101.pdf hi ≤ 4 hj ≤ 2 ik ≤ 3 jk ≤ 2 kj ≤ 1 kl ≤ 2 ml ≤ 4 maximize kl + ml subject to:
  20. Example: Network Flow 19 Source: Avrim Blum, Manual Blum, CMU

    course: https://www.cs.cmu.edu/~avrim/451f11/lectures/lect1101.pdf hi ≤ 4 hj ≤ 4 ik ≤ 3 jk ≤ 2 kj ≤ 1 kl ≤ 2 jm ≤ 3 ml ≤ 4 maximize kl + ml subject to: hi = ik kl + kj = ik hj + kj = jm + jk ml = jm
  21. see Jupyter Notebook 20

  22. Minimize Cost: Network Flow 21 Source: Avrim Blum, Manual Blum,

    CMU course: https://www.cs.cmu.edu/~avrim/451f11/lectures/lect1101.pdf $2 $2
  23. Penalty Kicks 22

  24. Penalty Kicks Model Goalkeeper Direction Left Center Right Kicker Direction

    Left Center Right 23
  25. Penalty Kicks Model Goalkeeper Direction Left Center Right Kicker Direction

    Left 0.20 0.90 0.90 Center 0.99 0.01 0.99 Right 0.98 0.98 0.40 24 two-player, zero-sum game
  26. Goalkeeper Direction Left Center Right Kicker Direction Left 0.20 0.90

    0.90 Center 0.99 0.01 0.99 Right 0.98 0.98 0.40 25 Kicker’s goal: maximize minimum payoff (probability to score assuming goalkeeper behaves optimally)
  27. Goalkeeper Direction Left Center Right Kicker Direction Left 0.20 0.90

    0.90 Center 0.99 0.01 0.99 Right 0.98 0.98 0.40 26 Kicker’s goal: maximize minimum payoff (probability to score assuming goalkeeper behaves optimally) Variables: opqr , sptrpu , uvwxr , v ≥ 0 and ∑ v = 1 v Objective: maximize Constraints: | v v} ≥ v
  28. see Jupyter Notebook 27

  29. 28

  30. Charge If you don’t have a team for Project 3,

    see us now 29