Duality π Maximize Primal: Subject to π=1 ππ π₯π π π=1 πππ π₯π β€ ππ π = 1,2, β¦ , π. π₯π β₯ 0 π = 1,2, β¦ , π. π Minimize Dual: Subject to π=1 ππ π¦π π π=1 πππ π¦π β₯ ππ π = 1,2, β¦ , π. π¦π β₯ 0 π = 1,2, β¦ , π. Duality Primal: Dual: Maximize πβΊπ₯ Subject to π΄π₯ β€ π π₯β₯0 Minimize πβΊπ¦ Subject to π΄βΊ π¦ β₯ π π¦β₯0 The Duality Theorem Primal P: Dual D: Maximize π βΊ π₯ subject to π΄π₯ β€ π, π₯ β₯ 0. Minimize π βΊ π¦ subject to π΄βΊ π¦ β₯ π, π¦ β₯ 0. Weak Duality Theorem: If π₯ is feasible for P and π¦ is feasible for D, then: π βΊ π₯ β€ πβΊ π¦ (Strong) Dualiy Theorem: If π₯ β is optimal for P and π¦ β is optimal for D, then: π βΊπ₯ β = πβΊ π¦β Finding Optimal Dual Solution from Otimal Primal Dictionary Primal P: Maximize π βΊ π₯ subject to π΄π₯ β€ π, π₯ β₯ 0. Solve P using the two phase Simplex method, obtaining optimal solution π₯ β . First row of final dictionary: π§ = π§β + π π=1 ππβ π₯π + π π=1 Let π¦πβ = βππβ , for π = 1,2, β¦ , π. Then: 1. π¦ β is a feasible solution to dual D. 2. πβΊ π¦ β = π§ β ππβ π₯π+π Explaining the magic Primal Dual Maximize 5π₯1 + 4π₯2 + 3π₯3 Subject to 2π₯1 + 3π₯2 + π₯3 4π₯1 + π₯2 + 2π₯3 3π₯1 + 4π₯2 + 2π₯3 π₯1 , π₯2 , π₯3 Minimize 5π¦1 + 11π¦2 + 8π¦3 Subject to 2π¦1 + 4π¦2 + 3π¦3 3π¦1 + π¦2 + 4π₯3 π¦1 + 2π¦2 + 2π¦3 π₯1 , π₯2 , π₯3 β€ 5 β€ 11 β€8 β₯0 β₯ 5 β₯4 β₯3 β₯0 Pivoting primal and dual dictionary Primal: 4π₯2 3π₯2 π₯2 4π₯2 + β β β 3π₯3 π₯3 2π₯3 2π₯3 π€ = β 5π¦1 β 11π¦2 (not feasible!) π¦4 = β5 + 2π¦1 + 4π¦2 π¦5 = β4 + 3π¦1 + π¦2 π¦6 = β3 + π¦1 + 2π¦2 β + + + 8π¦3 3π¦3 4π¦3 2π¦3 Dual: π§ = π₯4 = 5 β π₯5 = 11 β π₯6 = 8 β 5π₯1 2π₯1 4π₯1 3π₯1 + β β β Pivoting π₯1 and π₯4 (and π¦4 and π¦1 ) Primal: π§ = π₯1 = π₯5 = π₯6 = 25 2 5 2 1 1 2 25 2 7 2 1 β 2 5 2 β β + + Dual: π€ = β β (still not feasible!) π¦5 = + π₯6 = π¦1 = + + 7 π₯2 + 2 3 π₯ β 2 2 5π₯2 1 π₯2 β 2 5 π¦4 β 2 3 π¦4 β 2 1 π¦ 2 4 1 π¦4 β 2 1 π₯ 2 3 1 π₯ 2 3 β β + 1 π₯ 2 3 + π¦2 β 5π¦2 β + 2π¦2 β 5 π₯ 2 4 1 π₯ 2 4 2π₯4 3 π₯ 2 4 1 π¦ 2 3 1 π¦ 2 3 1 π¦ 2 3 3 π¦ 2 3 Pivoting π₯3 and π₯6 (and π¦6 and π¦3 ) Primal: optimal! Dual: Feasible! (and optimal) π§ = 13 β 3π₯2 π₯1 = 2 β 2π₯2 π₯5 = 1 + 5π₯2 π₯3 = 1 + π₯2 π€ = β13 β π¦5 = 3 + π¦1 = 1 + π¦3 = 1 β β β + + π₯4 β 2π₯4 + 2π₯4 3π₯4 β 2π¦4 β π¦2 2π¦4 β 5π¦2 2π¦4 β 2π¦2 π¦4 π₯6 π₯6 2π₯6 β π¦6 β π¦6 β 3π¦6 + 2π¦6 Consequence of Strong duality β’ Software solving LP programs to optimality can easily be checked. β’ Give the software the primal program as well as the dual program. The solution to the dual problem is a certificate that the solution to the primal program is optimal. Linear Inequalities Problem Input: π΄ β π π×π , π β π π Output: If π₯ β π π β£ π΄π₯ β€ π is empty, report Infeasible, otherwise output π₯ such that π΄π₯ β€ b . Linear Programming Input: π΄ β π π×π , π β π π , π β π π Output: π₯ β πΉ maximizing π βΊ π₯, where πΉ = π₯ β π π β£ π΄π₯ β€ Consequence of Strong duality β’ Solving linear programs to optimality is as easy as solving a system of linear inequalities: 1. Given LP P, check if P is feasible using LI algorithm. Otherwise report Infeasible. 2. Construct dual D of P. Use LI algorithm to find (π₯, π¦) so that π΄π₯ β€ π, π₯ β₯ 0, π΄βΊ π¦ β₯ π, π¦ β₯ 0, and π βΊ π₯ = π βΊ π¦. If no such (π₯, π¦) exist, report Unbounded. Otherwise return π₯. Complementary Slackness Primal P: Dual D: Maximize π βΊ π₯ subject to π΄π₯ β€ π, π₯ β₯ 0. Minimize π βΊ π¦ subject to π΄βΊ π¦ β₯ π, π¦ β₯ 0. Suppose π₯ β and π¦ β are a pair of optimal solutions to P and D. By strong duality: π βΊ π₯ β = πβΊ yβ Consider the proof of weak duality: π βΊ π₯ β€ π¦ βΊ π΄ π₯ = π¦ βΊ π΄π₯ β€ π¦ βΊ π For π₯ β and π¦ β the inequalities must be equalities. π π π π ππ π₯π = π=1 π π πππ π¦π π₯π = π=1 π=1 πππ π₯π π¦π = π=1 π=1 ππ π¦π π=1 Consider last part: π π π πππ π₯π π¦π = π=1 π=1 ππ π¦π π=1 Rewrite as: π π ππ β π=1 πππ π₯π π¦π = 0 π=1 This is a sum of non-negative numbers (Why?) summing to 0. π π ππ β π=1 πππ π₯π π¦π = 0 π=1 β’ All terms must be 0. β’ Hence, for all π = 1,2, β¦ , π (at least) one of the following must hold: a) ππ β b) π¦π = 0 π π=1 πππ π₯π = 0 (i.e. slack π₯π+π = 0). The Complementary Slackness Property Primal P: Dual D: Maximize π βΊ π₯ subject to π΄π₯ β€ π, π₯ β₯ 0. Minimize π βΊ π¦ subject to π΄βΊ π¦ β₯ π, π¦ β₯ 0. Solutions π₯ and π¦ are said to satisfy Complementary Slackness if and only if: β’ for all π = 1,2, β¦ , π (at least) one of the following holds: π a) π=1 πππ π₯π = ππ (πth primal constraint has slack 0) b) π¦π = 0 (πth dual variable is 0) β’ for all j= 1,2, β¦ , π (at least) one of the following holds: π a) π=1 πππ π¦π = ππ (πth dual constraint has slack 0) b) π₯π = 0 (πth primal variable is 0) Complementary Slackness Theorem Primal P: Dual D: Maximize π βΊ π₯ subject to π΄π₯ β€ π, π₯ β₯ 0. Minimize π βΊ π¦ subject to π΄βΊ π¦ β₯ π, π¦ β₯ 0. Theorem Let π₯ and π¦ be feasible solutions to P and D. Then: π₯ and π¦ are both optimal if and only if π₯ and π¦ satisfy complementary slackness. The Dual Simplex Method β’ Simple idea: Instead of running the Simplex Algorithm on the primal problem, run it on the dual problem. β’ Can be usuful as βempiricβ number of pivoting steps of the Simplex Algorithm is roughly βΌ π log 2 π. β’ We can even run the Dual Simplex algorithm on the primal dictionary. Dual-Based Phase I Algorithm β’ If we change the objective function to max 0 the dual program is origo feasible! β’ The optimal dual solution is feasible in the primal β this may serve as a replacement for Phase I. β’ We may now proceed as usual in the twophase Simplex algorithm. We often have feasible origo in dual program in practice In many situations the linear program we formulate is about minimizing cost, π min ππ π₯π π=1 which turns into the objective function, π max βππ π₯π π=1 If ππ β₯ 0 for all π, then the dual is origo feasible! Generalized Duality Primal: Maximize π1 π₯1 + π2 π₯2 + π3 π₯3 Subject to π¦1 : π11 π₯1 + π12 π₯2 + π13 π₯3 β€ π1 Dual: Manimize π1 π¦1 + π2 π¦2 + π3 π¦3 Subject to π₯1 : π11 π¦1 + π21 π¦2 + π31 π¦3 β₯ π1 π¦2 : π21 π₯1 + π22 π₯2 + π23 π₯3 β₯ π2 π¦3 : π31 π₯1 + π32 π₯2 + π33 π₯3 = π3 π₯1 β₯ 0, π₯2 β€ 0, π₯3 free π₯2 : π12 π¦1 + π22 π¦2 + π32 π¦3 β€ π2 π₯3 : π13 π¦1 + π23 π¦2 + π33 π¦3 = π3 π¦1 β₯ 0, π¦2 β€ 0, π¦3 free Rules for Taking the Dual β’ Constraints in primal corresponds to variables in dual (and vice versa). β’ Coefficients of objective function in primal corresponds to constants in dual (and vice versa). Primal (Maximization) Dual (Minimization) β€ for constraint β₯0 for variable β₯ for constraint β€0 for variable = for constraint free for variable β₯0 for variable β₯ for constraint β€0 for variable β€ for constraint free for variable = for constraint
© Copyright 2026 Paperzz