Linear Programming Duality
Eric Price
UT Austin
CS 331, Spring 2020 Coronavirus Edition
Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
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
Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
◮ Solution lies at a vertex of feasible region. ◮ Ways to translate between formulations (≤ / = / ≥, x ≥ 0 or not) ◮ Ways to solve (simplex) Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
◮ OPT ≥ 6 because (6, 0) possible. Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
◮ OPT ≥ 6 because (6, 0) possible.
Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
◮ OPT ≥ 6 because (6, 0) possible.
◮ Is the answer larger than 20? Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
◮ OPT ≥ 6 because (6, 0) possible.
◮ Is the answer larger than 20? ◮ No: C + 2T ≤ 2C + 3T ≤ 12. Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
◮ OPT ≥ 6 because (6, 0) possible.
◮ Is the answer larger than 20? ◮ No: C + 2T ≤ 2C + 3T ≤ 12. ◮ But also:
Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
◮ And the primal is a lower bound on the dual. Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
◮ And the primal is a lower bound on the dual. ◮ Any feasible primal value is ≤ any feasible dual value. Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
◮ And the primal is a lower bound on the dual. ◮ Any feasible primal value is ≤ any feasible dual value. ◮ This is “weak duality” Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
◮ And the primal is a lower bound on the dual. ◮ Any feasible primal value is ≤ any feasible dual value. ◮ This is “weak duality”
Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
◮ And the primal is a lower bound on the dual. ◮ Any feasible primal value is ≤ any feasible dual value. ◮ This is “weak duality”
◮ This is “strong duality.” Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
◮ And the primal is a lower bound on the dual. ◮ Any feasible primal value is ≤ any feasible dual value. ◮ This is “weak duality”
◮ This is “strong duality.”
Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
◮ If C, T are negative, first step doesn’t hold =
Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
◮ If C, T are negative, first step doesn’t hold =
◮ If equations are equalities, can subtract them =
Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
◮ With ǫ more metal, OPT will rise by αǫ. Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
◮ With ǫ more metal, OPT will rise by αǫ. ◮ Check: 13 metal gives (C, T) = ( 20
7 , 17 7 ) for 54 7 = 51 7 + 3 7.
Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
◮ With ǫ more metal, OPT will rise by αǫ. ◮ Check: 13 metal gives (C, T) = ( 20
7 , 17 7 ) for 54 7 = 51 7 + 3 7.
Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
◮ Each fuv appears in 3 constraints, F appears in two. Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
◮ Each fuv appears in 3 constraints, F appears in two.
Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
◮ yuv is 1 if edge uv is cut, 0 otherwise. Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
◮ yuv is 1 if edge uv is cut, 0 otherwise. ◮ xu is 0 if u ∈ S, 1 otherwise. Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
◮ yuv is 1 if edge uv is cut, 0 otherwise. ◮ xu is 0 if u ∈ S, 1 otherwise. Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
◮ yuv is 1 if edge uv is cut, 0 otherwise. ◮ xu is 0 if u ∈ S, 1 otherwise.
Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
◮ yuv is 1 if edge uv is cut, 0 otherwise. ◮ xu is 0 if u ∈ S, 1 otherwise.
◮ If yuv, xu ∈ {0, 1}, this equivalence works. Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
◮ yuv is 1 if edge uv is cut, 0 otherwise. ◮ xu is 0 if u ∈ S, 1 otherwise.
◮ If yuv, xu ∈ {0, 1}, this equivalence works. ◮ Not hard to argue that opt lies in [0, 1]. Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
◮ yuv is 1 if edge uv is cut, 0 otherwise. ◮ xu is 0 if u ∈ S, 1 otherwise.
◮ If yuv, xu ∈ {0, 1}, this equivalence works. ◮ Not hard to argue that opt lies in [0, 1]. ◮ But how come the solution can’t be fractional? Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
◮ yuv is 1 if edge uv is cut, 0 otherwise. ◮ xu is 0 if u ∈ S, 1 otherwise.
◮ If yuv, xu ∈ {0, 1}, this equivalence works. ◮ Not hard to argue that opt lies in [0, 1]. ◮ But how come the solution can’t be fractional? ◮ This LP is special (“totally unimodular”): every vertex is integral. Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
◮ Motivated by certifying an upper bound. ◮ Mechanically easy to write down ◮ Constraints ⇐
◮ Dual variables are shadow prices: the marginal value of the constraint. Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
◮ Motivated by certifying an upper bound. ◮ Mechanically easy to write down ◮ Constraints ⇐
◮ Dual variables are shadow prices: the marginal value of the constraint.
Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
◮ Motivated by certifying an upper bound. ◮ Mechanically easy to write down ◮ Constraints ⇐
◮ Dual variables are shadow prices: the marginal value of the constraint.
Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
◮ Motivated by certifying an upper bound. ◮ Mechanically easy to write down ◮ Constraints ⇐
◮ Dual variables are shadow prices: the marginal value of the constraint.
◮ “Integral” LPs are ones that happen to have integer vertices. Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
◮ Motivated by certifying an upper bound. ◮ Mechanically easy to write down ◮ Constraints ⇐
◮ Dual variables are shadow prices: the marginal value of the constraint.
◮ “Integral” LPs are ones that happen to have integer vertices. ◮ “Integer” LPs add a new constraint that x ∈ Zn. This is NP-hard. Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19
Eric Price (UT Austin) Linear Programming Duality CS 331, Spring / 19