330 likes | 601 Views
DUALITY. Duality Theory. Every LP problem (called the ‘Primal’) has associated with another problem called the ‘Dual’. The ‘Dual’ problem is an LP defined directly and systematically from the original (or Primal) LP model.
E N D
Duality Theory • Every LP problem (called the ‘Primal’) has associated with another problem called the ‘Dual’. • The ‘Dual’ problem is an LP defined directly and systematically from the original (or Primal) LP model. • The optimal solution of one problem yields the optimal solution to the other. • Duality ease the calculations for the problems, whose number of variables is large.
Rules for converting Primal to Dual • If the Primal is to maximize, the dual is to minimize. • If the Primal is to minimize, the dual is to maximize. • For every constraint in the primal, there is a dual variable. • For every variable in the primal, there is a constraint in the dual.
Dual Problem Primal LP : Max z = c1x1 + c2x2 + ... + cnxn subject to: a11x1 + a12x2 + ... + a1nxn ≤ b1 a21x1 + a22x2 + ... + a2nxn ≤ b2 : am1x1 + am2x2 + ... + amnxn ≤ bm x1 ≥ 0, x2 ≥ 0,…….xj ≥ 0,……., xn ≥ 0. Associated Dual LP : Min. z = b1y1 + b2y2 + ... + bmym subject to: a11y1 + a21y2 + ... + am1ym ≥ c1 a12y1 + a22y2 + ... + am2ym ≥ c2 : a1ny1 + a2ny2 + ... + amnym ≥ cn y1 ≥ 0, y2 ≥ 0,…….yj ≥ 0,……., ym ≥ 0.
Example Primal Max. Z = 3x1+5x2 Subject to constraints: x1 < 4 y1 2x2 < 12 y2 3x1+2x2 < 18 y3 x1, x2 > 0 The Primal has: 2 variables and 3 constraints. So the Dual has: 3 variables and 2 constraints Dual Min. Z’ = 4y1+12y2 +18y3 Subject to constraints: y1 + 3y3 > 3 2y2 +2y3 > 5 y1, y2, y3 > 0 We define one dual variable for each primal constraint.
Example Primal Min.. Z = 10x1+15x2 Subject to constraints: 5x1 + 7x2 > 80 6x1 + 11x2 > 100 x1, x2 > 0
Solution Dual Max.. Z’ = 80y1+100y2 Subject to constraints: 5y1 + 6y2 < 10 7y1 + 11y2 < 15 y1, y2 > 0
Example Primal Max. Z = 12x1+ 4x2 Subject to constraints: 4x1 + 7x2 < 56 2x1 + 5x2 > 20 5x1 + 4x2 = 40 x1, x2 > 0
Solution • The second inequality 2x1 + 5x2 > 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, -2x1 - 5x2 < -20 • The equality constraint 5x1 + 4x2 = 40 can be replaced by the following two inequality constraints: 5x1 + 4x2 < 40 5x1 + 4x2 > 40 -5x1 - 4x2 < -40
Cont… The primal problem can now take the following standard form: Max. Z = 12x1+ 4x2 Subject to constraints: 4x1 + 7x2 < 56 -2x1 - 5x2 < -20 5x1 + 4x2 < 40 -5x1 - 4x2 < -40 x1, x2 > 0
Cont… The dual of this problem can now be obtained as follows: Min. Z’ = 56y1 -20y2 + 40y3 – 40y4 Subject to constraints: 4y1 – 2y2 + 5y3 – 5y4> 12 7y1 - 5y2 + 4y3 – 4y4 > 4 y1, y2, y3, y4 > 0
Example Primal Min.. Z = 2x2 + 5x3 Subject to constraints: x1 + x2 > 2 2x1 + x2 +6x3 < 6 x1 - x2 +3x3 = 4 x1, x2, x3 > 0
Solution Primal in standard form : Max.. Z = -2x2 - 5x3 Subject to constraints: -x1 - x2 < -2 2x1 + x2 +6x3 < 6 x1 - x2 +3x3 < 4 - x1 + x2 - 3x3 < -4 x1, x2, x3 > 0
Cont… Dual Min. Z’ = -2y1 + 6y2 + 4y3 – 4y4 Subject to constraints: -y1 + 2y2 + y3 – y4> 0 -y1 + y2 - y3 + y4 > -2 6y2 + 3y3 - 3y4 > -5 y1, y2, y3, y4 > 0
DUAL SIMPLEX METHOD
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: • The objective function must satisfy the optimality conditions of the regular Simplex method. • All the constraints must be of the type .
Example Min. Z = 3x1 + 2x2 Subject to constraints: 3x1 + x2 > 3 4x1 + 3x2 > 6 x1 + x2 < 3 x1, x2 > 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’ = -3x1 - 2x2 where Z’= -Z Subject to constraints: -3x1 - x2 < -3 -4x1 - 3x2 < -6 x1 + x2 < 3 x1, x2 > 0
Cont… Let S1, S2 , S3 be three slack variables Model can rewritten as: Z’ + 3x1 + 2x2 = 0 -3x1 - x2 +S1 = -3 -4x1 - 3x2 +S2 = -6 x1 + x2 +S3 = 3 Initial BS is : x1= 0, x2= 0, S1= -3, S2= -6, S3= 3 and Z=0.
Cont… • Initial Basic Solution is Optimal (as the optimality condition is satisfied) but infeasible. • Choose the most negative basic variable. Therefore, S2 is the departing variable. • Calculate Ratio = |Z row / S2 row| (S2 < 0) • Choose minimum ratio. Therefore, x2 is the entering variable.
Cont… Therefore, S1 is the departing variable and x1 is the entering variable.
Cont… Optimal Solution is : x1= 3/5, x2= 6/5, Z= 21/5
Example Max. Z = -x1 - x2 Subject to constraints: x1 + x2 < 8 x2 > 3 -x1 + x2 < 2 x1, x2 > 0
Cont… Let S1, S2 , S3 be three slack variables Model can rewritten as: Z + x1 + x2 = 0 x1 + x2 + S1 = 8 -x2 + S2 = -3 -x1 + x2 + S3 = 2 x1, x2 > 0 Initial BS is : x1= 0, x2= 0, S1= 8, S2= -3, S3= 2 and Z=0.
Cont… Therefore, S2 is the departing variable and x2 is the entering variable.
Cont… Therefore, S3 is the departing variable and x1 is the entering variable.
Cont… Optimal Solution is : x1= 1, x2= 3, Z= -4