linear programming duality
play

Linear Programming Duality Eric Price UT Austin CS 331, Spring - PowerPoint PPT Presentation

Linear Programming Duality Eric Price UT Austin CS 331, Spring 2020 Coronavirus Edition CS 331, Spring Eric Price (UT Austin) Linear Programming Duality / 19 Plan for the class Today: linear programming duality Tonight: problem set on LPs


  1. Linear Programming Duality Eric Price UT Austin CS 331, Spring 2020 Coronavirus Edition CS 331, Spring Eric Price (UT Austin) Linear Programming Duality / 19

  2. Plan for the class Today: linear programming duality Tonight: problem set on LPs Last 2 weeks of class: complexity theory 1 problem set on complexity theory Final exam: given out after last class, due two days later. CS 331, Spring Eric Price (UT Austin) Linear Programming Duality / 19

  3. Class Outline LP Duality 1 Reducing Problems to Linear Programs 2 CS 331, Spring Eric Price (UT Austin) Linear Programming Duality / 19

  4. Linear Programming Maximize/minimize linear objective subject to linear constraints . CS 331, Spring Eric Price (UT Austin) Linear Programming Duality / 19

  5. Linear Programming Maximize/minimize linear objective subject to linear constraints . Last class: ◮ Solution lies at a vertex of feasible region . ◮ Ways to translate between formulations ( ≤ / = / ≥ , x ≥ 0 or not) ◮ Ways to solve (simplex) CS 331, Spring Eric Price (UT Austin) Linear Programming Duality / 19

  6. Special Cases Infeasible: no possible answer. CS 331, Spring Eric Price (UT Austin) Linear Programming Duality / 19

  7. Special Cases Infeasible: no possible answer. Unbounded: infinitely good answer. CS 331, Spring Eric Price (UT Austin) Linear Programming Duality / 19

  8. Linear Programming Upper bound? Cars & trucks example: maximize: C + 2 T (value) subject to: 2 C + 3 T ≤ 12 (metal) C + 5 T ≤ 15 (wood) C , T ≥ 0 CS 331, Spring Eric Price (UT Austin) Linear Programming Duality / 19

  9. Linear Programming Upper bound? Cars & trucks example: maximize: C + 2 T (value) subject to: 2 C + 3 T ≤ 12 (metal) C + 5 T ≤ 15 (wood) C , T ≥ 0 Last class we solved it, but it took some effort. CS 331, Spring Eric Price (UT Austin) Linear Programming Duality / 19

  10. Linear Programming Upper bound? Cars & trucks example: maximize: C + 2 T (value) subject to: 2 C + 3 T ≤ 12 (metal) C + 5 T ≤ 15 (wood) C , T ≥ 0 Last class we solved it, but it took some effort. Simple to prove a lower bound on answer OPT : CS 331, Spring Eric Price (UT Austin) Linear Programming Duality / 19

  11. Linear Programming Upper bound? Cars & trucks example: maximize: C + 2 T (value) subject to: 2 C + 3 T ≤ 12 (metal) C + 5 T ≤ 15 (wood) C , T ≥ 0 Last class we solved it, but it took some effort. Simple to prove a lower bound on answer OPT : ◮ OPT ≥ 6 because (6 , 0) possible. CS 331, Spring Eric Price (UT Austin) Linear Programming Duality / 19

  12. Linear Programming Upper bound? Cars & trucks example: maximize: C + 2 T (value) subject to: 2 C + 3 T ≤ 12 (metal) C + 5 T ≤ 15 (wood) C , T ≥ 0 Last class we solved it, but it took some effort. Simple to prove a lower bound on answer OPT : ◮ OPT ≥ 6 because (6 , 0) possible. Question: can you easily show an upper bound on OPT? CS 331, Spring Eric Price (UT Austin) Linear Programming Duality / 19

  13. Linear Programming Upper bound? Cars & trucks example: maximize: C + 2 T (value) subject to: 2 C + 3 T ≤ 12 (metal) C + 5 T ≤ 15 (wood) C , T ≥ 0 Last class we solved it, but it took some effort. Simple to prove a lower bound on answer OPT : ◮ OPT ≥ 6 because (6 , 0) possible. Question: can you easily show an upper bound on OPT? ◮ Is the answer larger than 20? CS 331, Spring Eric Price (UT Austin) Linear Programming Duality / 19

  14. Linear Programming Upper bound? Cars & trucks example: maximize: C + 2 T (value) subject to: 2 C + 3 T ≤ 12 (metal) C + 5 T ≤ 15 (wood) C , T ≥ 0 Last class we solved it, but it took some effort. Simple to prove a lower bound on answer OPT : ◮ OPT ≥ 6 because (6 , 0) possible. Question: can you easily show an upper bound on OPT? ◮ Is the answer larger than 20? ◮ No: C + 2 T ≤ 2 C + 3 T ≤ 12. CS 331, Spring Eric Price (UT Austin) Linear Programming Duality / 19

  15. Linear Programming Upper bound? Cars & trucks example: maximize: C + 2 T (value) subject to: 2 C + 3 T ≤ 12 (metal) C + 5 T ≤ 15 (wood) C , T ≥ 0 Last class we solved it, but it took some effort. Simple to prove a lower bound on answer OPT : ◮ OPT ≥ 6 because (6 , 0) possible. Question: can you easily show an upper bound on OPT? ◮ Is the answer larger than 20? ◮ No: C + 2 T ≤ 2 C + 3 T ≤ 12. ◮ But also: C + 2 T ≤ C + 8 3 T = 1 3((2 C + 3 T ) + ( C + 5 T )) ≤ 1 3(12 + 15) = 9 . CS 331, Spring Eric Price (UT Austin) Linear Programming Duality / 19

  16. Linear Programming Upper bound? maximize: C + 2 T (value) subject to: 2 C + 3 T ≤ 12 (metal) Primal C + 5 T ≤ 15 (wood) C , T ≥ 0 Get an upper bound by combining the constraints: C + 2 T ≤ C + 8 3 T = 1 3((2 C + 3 T ) + ( C + 5 T )) ≤ 1 3(12 + 15) = 9 . CS 331, Spring Eric Price (UT Austin) Linear Programming Duality / 19

  17. Linear Programming Upper bound? maximize: C + 2 T (value) subject to: 2 C + 3 T ≤ 12 (metal) Primal C + 5 T ≤ 15 (wood) C , T ≥ 0 Get an upper bound by combining the constraints: C + 2 T ≤ C + 8 3 T = 1 3((2 C + 3 T ) + ( C + 5 T )) ≤ 1 3(12 + 15) = 9 . The above is 1 3 of each. What is the best ( α, β ) combination? OPT ≤ 12 α + 15 β (value) where: 2 α + β ≥ 1 (cars) Dual 3 α + 5 β ≥ 2 (trucks) α, β ≥ 0 CS 331, Spring Eric Price (UT Austin) Linear Programming Duality / 19

  18. Linear Programming Duality maximize: C + 2 T (value) subject to: 2 C + 3 T ≤ 12 (metal) Primal C + 5 T ≤ 15 (wood) C , T ≥ 0 Get an upper bound by combining the constraints: C + 2 T ≤ C + 8 3 T = 1 3((2 C + 3 T ) + ( C + 5 T )) ≤ 1 3(12 + 15) = 9 . The above is 1 3 of each. What is the best ( α, β ) combination? minimize: 12 α + 15 β (value) where: 2 α + β ≥ 1 (cars) Dual 3 α + 5 β ≥ 2 (trucks) α, β ≥ 0 CS 331, Spring Eric Price (UT Austin) Linear Programming Duality / 19

  19. Linear Programming Duality maximize: C + 2 T (value) subject to: 2 C + 3 T ≤ 12 (metal) Primal C + 5 T ≤ 15 (wood) C , T ≥ 0 Get an upper bound by combining the constraints: C + 2 T ≤ C + 8 3 T = 1 3((2 C + 3 T ) + ( C + 5 T )) ≤ 1 3(12 + 15) = 9 . The above is 1 3 of each. What is the best ( α, β ) combination? minimize: 12 α + 15 β (value) where: 2 α + β ≥ 1 (cars) Dual 3 α + 5 β ≥ 2 (trucks) α, β ≥ 0 CS 331, Spring Eric Price (UT Austin) Linear Programming Duality / 19

  20. Linear Programming Duality Primal Dual maximize: c · x minimize: b · y A T y ≥ c subject to: Ax ≤ b ⇐ ⇒ subject to: x ≥ 0 y ≥ 0 CS 331, Spring Eric Price (UT Austin) Linear Programming Duality / 19

  21. Linear Programming Duality Primal Dual maximize: c · x minimize: b · y A T y ≥ c subject to: Ax ≤ b ⇐ ⇒ subject to: x ≥ 0 y ≥ 0 Primal solution ≤ Dual solution CS 331, Spring Eric Price (UT Austin) Linear Programming Duality / 19

  22. Linear Programming Duality Primal Dual maximize: c · x minimize: b · y A T y ≥ c subject to: Ax ≤ b ⇐ ⇒ subject to: x ≥ 0 y ≥ 0 Primal solution ≤ Dual solution By construction, the dual is an upper bound on the primal. CS 331, Spring Eric Price (UT Austin) Linear Programming Duality / 19

  23. Linear Programming Duality Primal Dual maximize: c · x minimize: b · y A T y ≥ c subject to: Ax ≤ b ⇐ ⇒ subject to: x ≥ 0 y ≥ 0 Primal solution ≤ Dual solution By construction, the dual is an upper bound on the primal. ◮ And the primal is a lower bound on the dual. CS 331, Spring Eric Price (UT Austin) Linear Programming Duality / 19

  24. Linear Programming Duality Primal Dual maximize: c · x minimize: b · y A T y ≥ c subject to: Ax ≤ b ⇐ ⇒ subject to: x ≥ 0 y ≥ 0 Primal solution ≤ Dual solution By construction, the dual is an upper bound on the primal. ◮ And the primal is a lower bound on the dual. ◮ Any feasible primal value is ≤ any feasible dual value. CS 331, Spring Eric Price (UT Austin) Linear Programming Duality / 19

  25. Linear Programming Duality Primal Dual maximize: c · x minimize: b · y A T y ≥ c subject to: Ax ≤ b ⇐ ⇒ subject to: x ≥ 0 y ≥ 0 Primal solution ≤ Dual solution By construction, the dual is an upper bound on the primal. ◮ And the primal is a lower bound on the dual. ◮ Any feasible primal value is ≤ any feasible dual value. ◮ This is “weak duality” CS 331, Spring Eric Price (UT Austin) Linear Programming Duality / 19

  26. Linear Programming Duality Primal Dual maximize: c · x minimize: b · y A T y ≥ c subject to: Ax ≤ b ⇐ ⇒ subject to: x ≥ 0 y ≥ 0 Primal solution = Dual solution By construction, the dual is an upper bound on the primal. ◮ And the primal is a lower bound on the dual. ◮ Any feasible primal value is ≤ any feasible dual value. ◮ This is “weak duality” Remarkable fact: the two are equal . CS 331, Spring Eric Price (UT Austin) Linear Programming Duality / 19

  27. Linear Programming Duality Primal Dual maximize: c · x minimize: b · y A T y ≥ c subject to: Ax ≤ b ⇐ ⇒ subject to: x ≥ 0 y ≥ 0 Primal solution = Dual solution By construction, the dual is an upper bound on the primal. ◮ And the primal is a lower bound on the dual. ◮ Any feasible primal value is ≤ any feasible dual value. ◮ This is “weak duality” Remarkable fact: the two are equal . ◮ This is “strong duality.” CS 331, Spring Eric Price (UT Austin) Linear Programming Duality / 19

Recommend


More recommend