Duality Theory w Every LP problem called the
Duality Theory w Every LP problem (called the ‘Primal’) has associated with another problem called the ‘Dual’. w The ‘Dual’ problem is an LP defined directly and systematically from the original (or Primal) LP model. w The optimal solution of one problem yields the optimal solution to the other. w Duality ease the calculations for the problems, whose number of variables is large.
Rules for converting Primal to Dual w If the Primal is to maximize, the dual is to minimize. w If the Primal is to minimize, the dual is to maximize. w For every constraint in the primal, there is a dual variable. w For every variable in the primal, there is a constraint in the dual.
Dual Problem Primal LP : Associated Dual LP : Max z = c 1 x 1 + c 2 x 2 +. . . + cnxn Min. z = b 1 y 1 + b 2 y 2 +. . . + bmym subject to: a 11 x 1 + a 12 x 2 +. . . + a 1 nxn ≤ b 1 a 11 y 1 + a 21 y 2 +. . . + am 1 ym ≥ c 1 a 21 x 1 + a 22 x 2 +. . . + a 2 nxn ≤ b 2 a 12 y 1 + a 22 y 2 +. . . + am 2 ym ≥ c 2 : : am 1 x 1 + am 2 x 2 +. . . + amnxn ≤ bm a 1 ny 1 + a 2 ny 2 +. . . + amnym ≥ cn x 1 ≥ 0, x 2 ≥ 0, ……. xj ≥ 0, ……. , xn ≥ 0. y 1 ≥ 0, y 2 ≥ 0, ……. yj ≥ 0, ……. , ym ≥ 0.
Example Primal Max. Z = 3 x 1+5 x 2 Subject to constraints: x 1 <4 2 x 2 < 12 3 x 1+2 x 2 < 18 x 1, x 2 > 0 y 1 y 2 y 3 We define one dual variable for each primal constraint. The Primal has: 2 variables and 3 constraints. So the Dual has: 3 variables and 2 constraints Dual Min. Z’ = 4 y 1+12 y 2 +18 y 3 Subject to constraints: y 1 + 3 y 3 > 3 2 y 2 +2 y 3 > 5 y 1, y 2, y 3 > 0
Example Primal Min. . Z = 10 x 1+15 x 2 Subject to constraints: 5 x 1 + 7 x 2 > 80 6 x 1 + 11 x 2 > 100 x 1, x 2 > 0
Solution Dual Max. . Z’ = 80 y 1+100 y 2 Subject to constraints: 5 y 1 + 6 y 2 < 10 7 y 1 + 11 y 2 < 15 y 1, y 2 > 0
Example Primal Max. Z = 12 x 1+ 4 x 2 Subject to constraints: 4 x 1 + 7 x 2 < 56 2 x 1 + 5 x 2 > 20 5 x 1 + 4 x 2 = 40 x 1, x 2 > 0
Solution v The second inequality 2 x 1 + 5 x 2 > 20 can be changed to the less-than-or-equal-to type by multiplying both sides of the inequality by -1 and reversing the direction of the inequality; that is, -2 x 1 - 5 x 2 < -20 v The equality constraint 5 x 1 + 4 x 2 = 40 can be replaced by the following two inequality constraints: 5 x 1 + 4 x 2 < 40 5 x 1 + 4 x 2 > 40 -5 x 1 - 4 x 2 < -40
Cont… The primal problem can now take the following standard form: Max. Z = 12 x 1+ 4 x 2 Subject to constraints: 4 x 1 + 7 x 2 < 56 -2 x 1 - 5 x 2 < -20 5 x 1 + 4 x 2 < 40 -5 x 1 - 4 x 2 < -40 x 1, x 2 > 0
Cont… The dual of this problem can now be obtained as follows: Min. Z’ = 56 y 1 -20 y 2 + 40 y 3 – 40 y 4 Subject to constraints: 4 y 1 – 2 y 2 + 5 y 3 – 5 y 4 > 12 7 y 1 - 5 y 2 + 4 y 3 – 4 y 4 > 4 y 1, y 2, y 3, y 4 > 0
Example Primal Min. . Z = 2 x 2 + 5 x 3 Subject to constraints: x 1 + x 2 >2 2 x 1 + x 2 +6 x 3 < 6 x 1 - x 2 +3 x 3 = 4 x 1, x 2, x 3 > 0
Solution Primal in standard form : Max. . Z = -2 x 2 - 5 x 3 Subject to constraints: -x 1 - x 2 < -2 2 x 1 + x 2 +6 x 3 < 6 x 1 - x 2 +3 x 3 < 4 - x 1 + x 2 - 3 x 3 < -4 x 1, x 2, x 3 > 0
Cont… Dual Min. Z’ = -2 y 1 + 6 y 2 + 4 y 3 – 4 y 4 Subject to constraints: -y 1 + 2 y 2 + y 3 – y 4 > 0 -y 1 + y 2 - y 3 + y 4 > -2 6 y 2 + 3 y 3 - 3 y 4 > -5 y 1, y 2, y 3, y 4 > 0
Introduction Suppose a “basic solution” satisfies the optimality condition but not feasible, then we apply dual simplex method. In regular Simplex method, we start with a Basic Feasible solution (which is not optimal) and move towards optimality always retaining feasibility. In the dual simplex method, the exact opposite occurs. We start with a “optimal” solution (which is not feasible) and move towards feasibility always retaining optimality condition. The algorithm ends once we obtain feasibility.
Dual Simplex Method To start the dual Simplex method, the following two conditions are to be met: 1. The objective function must satisfy the optimality conditions of the regular Simplex method. 2. All the constraints must be of the type .
Example Min. Z = 3 x 1 + 2 x 2 Subject to constraints: 3 x 1 + x 2 > 3 4 x 1 + 3 x 2 > 6 x 1 + x 2 < 3 x 1, x 2 > 0
Cont… Step I: The first two inequalities are multiplied by – 1 to convert them to < constraints and convert the objective function into maximization function. Max. Z’ = -3 x 1 - 2 x 2 Subject to constraints: -3 x 1 - x 2 < -3 -4 x 1 - 3 x 2 < -6 x 1 + x 2 < 3 x 1, x 2 > 0 where Z’= -Z
Cont… Let S 1, S 2 , S 3 be three slack variables Model can rewritten as: Z’ + 3 x 1 + 2 x 2 = 0 -3 x 1 - x 2 +S 1 = -3 -4 x 1 - 3 x 2 +S 2 = -6 x 1 + x 2 +S 3 = 3 Initial BS is : x 1= 0, x 2= 0, S 1= -3, S 2= -6, S 3= 3 and Z=0.
Cont… Basic Variable Z Coefficients of: Sol. x 1 x 2 S 1 S 2 S 3 Z 1 3 2 0 0 S 1 0 -3 -1 1 0 0 -3 S 2 0 -4 -3 0 1 0 -6 S 3 0 1 1 0 0 1 3 Ratio - 3/4 2/3 - - - • Initial Basic Solution is Optimal (as the optimality condition is satisfied) but infeasible. • Choose the most negative basic variable. Therefore, S 2 is the departing variable. • Calculate Ratio = |Z row / S 2 row| (S 2 < 0) • Choose minimum ratio. Therefore, x 2 is the entering variable.
Cont… Basic Variable Z Coefficients of: x 1 x 2 S 1 S 2 S 3 Z 1 1/3 0 0 2/3 0 S 1 0 -5/3 0 1 -1/3 0 -1 x 2 0 4/3 1 0 -1/3 0 2 S 3 0 -1/3 0 0 1/3 1 1 Ratio - 1/5 - 2 - - Sol. 4 Therefore, S 1 is the departing variable and x 1 is the entering variable.
Cont… Basic Variable Z Coefficients of: Sol. x 1 x 2 S 1 S 2 S 3 Z 1 0 0 1/5 3/5 0 21/5 x 1 0 -3/5 1/5 0 3/5 x 2 0 0 1 4/5 -3/5 0 6/5 S 3 0 0 0 -1/5 2/5 1 6/5 Optimal Solution is : x 1= 3/5, x 2= 6/5, Z= 21/5
Example Max. Z = -x 1 - x 2 Subject to constraints: x 1 + x 2 < 8 x 2 > 3 -x 1 + x 2 < 2 x 1, x 2 > 0
Cont… Let S 1, S 2 , S 3 be three slack variables Model can rewritten as: Z + x 1 + x 2 = 0 x 1 + x 2 + S 1 = 8 -x 2 + S 2 = -3 -x 1 + x 2 + S 3 = 2 x 1, x 2 > 0 Initial BS is : x 1= 0, x 2= 0, S 1= 8, S 2= -3, S 3= 2 and Z=0.
Cont… Basic Variable Z Coefficients of: Sol. x 1 x 2 S 1 S 2 S 3 Z 1 1 1 0 0 S 1 0 1 1 1 0 0 8 S 2 0 0 -1 0 -3 S 3 0 -1 1 0 0 1 2 Ratio - - 1 - - - Therefore, S 2 is the departing variable and x 2 is the entering variable.
Cont… Basic Variable Z Coefficients of: Sol. x 1 x 2 S 1 S 2 S 3 Z 1 1 0 0 1 0 -3 S 1 0 1 1 0 5 x 2 0 0 1 0 -1 0 3 S 3 0 -1 0 0 1 1 -1 Ratio - 1 - - Therefore, S 3 is the departing variable and x 1 is the entering variable.
Cont… Basic Variable Z Coefficients of: Sol. x 1 x 2 S 1 S 2 S 3 Z 1 0 0 0 2 1 -4 S 1 0 0 0 1 2 0 4 x 2 0 0 1 0 -1 0 3 x 1 0 0 -1 -1 1 Optimal Solution is : x 1= 1, x 2= 3, Z= -4
- Slides: 28