15.093 Optimization Methods Lecture 6: Duality Theory II c c a1 a3 A c a2 a5 a4 a1 B c a3 a4 a2 a1 c C a1 a5 D 1 Outline a1 Slide 1 • Geometry of duality • The dual simplex algorithm • Farkas lemma • Duality as a proof technique 2 The Geometry of Duality Slide 2 min s.t. c′ x a′i x ≥ bi , i = 1, . . . , m max p′ b m � pi ai = c s.t. i=1 p≥0 3 Dual Simplex Algorithm 3.1 Motivation Slide 3 • In simplex method B −1 b ≥ 0 • Primal optimality condition c′ − c′B B −1 A ≥ 0′ same as dual feasibility 1 a2 c a1 a3 a3 a2 x * a1 • Simplex is a primal algorithm: maintains primal feasibility and works towards dual feasibility • Dual algorithm: maintains dual feasibility and works towards primal feasibility Slide 4 −c′B xB xB(1) .. . xB(m) c̄1 | ... c̄n | B −1 A1 | ... B −1 An | • Do not require B −1 b ≥ 0 • Require c̄ ≥ 0 (dual feasibility) • Dual cost is p′ b = c′B B −1 b = c′B xB • If B −1 b ≥ 0 then both dual feasibility and primal feasibility, and also same cost ⇒ optimality • Otherwise, change basis 3.2 An iteration Slide 5 1. Start with basis matrix B and all reduced costs ≥ 0. 2. If B −1 b ≥ 0 optimal solution found; else, choose l s.t. xB(l) < 0. 2 x2 p2 1 . D c 1 . . . . . B b C C A . A E D 1 x1 2 . B 1/2 . . E 1 p1 (b) (a) 3. Consider the lth row (pivot row) xB(l) , v1 , . . . , vn . If ∀i vi ≥ 0 then dual optimal cost = +∞ and algorithm terminates. Slide 6 4. Else, let j s.t. c̄j c̄i = min |vj | {i|vi <0} |vi | 5. Pivot element vj : Aj enters the basis and AB(l) exits. 3.3 An example Slide 7 min x1 + x2 s.t. x1 + 2x2 ≥ 2 x1 ≥ 1 x1 , x2 ≥ 0 min s.t. x1 + x2 x1 + 2x2 − x3 = 2 x1 − x4 = 1 x1 , x2 , x3 , x4 ≥ 0 max s.t. 2p1 + p2 p1 + p2 ≤ 1 2p1 ≤ 1 p1 , p2 ≥ 0 x1 x2 x3 x4 0 1 1 0 0 x3 = −2 −1 −2* 1 0 x4 = −1 −1 0 0 1 Slide 8 Slide 9 x1 x2 x3 x4 −1 1/2 0 1/2 0 x2 = 1 1/2 1 −1/2 0 x4 = −1 −1* 0 0 1 3 A 1 A A 3 2 p b . 4 x1 x2 x3 x4 −3/2 0 0 1/2 1/2 x2 = 1/2 0 1 −1/2 1/2 x1 = 1 1 0 0 −1 Duality as a proof method 4.1 Farkas lemma Slide 10 Theorem: Exactly one of the following two alternatives hold: 1. ∃x ≥ 0 s.t. Ax = b. 2. ∃p s.t. p′ A ≥ 0′ and p′ b < 0. 4.1.1 Proof Slide 11 “ ⇒′′ If ∃x ≥ 0 s.t. Ax = b, and if p′ A ≥ 0′ , then p′ b = p′ Ax ≥ 0 “ ⇐′′ Assume there is no x ≥ 0 s.t. Ax = b (P ) max 0′ x s.t. Ax = b x ≥ 0 (D) min s.t. (P) infeasible ⇒ (D) either unbounded or infeasible Since p = 0 is feasible ⇒ (D) unbounded ⇒ ∃p : p′ A ≥ 0′ and p′ b < 0 4 p′ b p′ A ≥ 0 ′ MIT OpenCourseWare http://ocw.mit.edu 15.093J / 6.255J Optimization Methods Fall 2009 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.