Slide 1

Slide 1 text

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

Slide 2

Slide 2 text

What is the “Programming” in “Linear Programming”?

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

Linear Program 3 ) subject to ≤

Slide 5

Slide 5 text

Possibilities 4 ) subject to ≤ Infeasible: no solution satisfies all the inequalities

Slide 6

Slide 6 text

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

Slide 7

Slide 7 text

Possibilities 6 ) subject to ≤ Unbounded: no limit on maximized value 6 subject to −6 ≤ −7

Slide 8

Slide 8 text

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?

Slide 9

Slide 9 text

8 Robert Sedgewick and Kevin Wayne, Princeton Course

Slide 10

Slide 10 text

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

Slide 11

Slide 11 text

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)

Slide 12

Slide 12 text

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

Slide 13

Slide 13 text

12 Robert Sedgewick and Kevin Wayne, Princeton Course Optimal solution must be at an extreme point (intersection of constraints)

Slide 14

Slide 14 text

see Jupyter Notebook 13

Slide 15

Slide 15 text

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

Slide 16

Slide 16 text

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:

Slide 17

Slide 17 text

see Jupyter Notebook 16

Slide 18

Slide 18 text

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

Slide 19

Slide 19 text

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:

Slide 20

Slide 20 text

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

Slide 21

Slide 21 text

see Jupyter Notebook 20

Slide 22

Slide 22 text

Minimize Cost: Network Flow 21 Source: Avrim Blum, Manual Blum, CMU course: https://www.cs.cmu.edu/~avrim/451f11/lectures/lect1101.pdf $2 $2

Slide 23

Slide 23 text

Penalty Kicks 22

Slide 24

Slide 24 text

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

Slide 25

Slide 25 text

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

Slide 26

Slide 26 text

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)

Slide 27

Slide 27 text

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

Slide 28

Slide 28 text

see Jupyter Notebook 27

Slide 29

Slide 29 text

28

Slide 30

Slide 30 text

Charge If you don’t have a team for Project 3, see us now 29