28

Duality Theory Every LP problem (called the ‘Primal’) has associated with another problem called the ‘Dual’. The ‘Dual’ problem is an LP defined directly

Embed Size (px)

Citation preview

Page 1: Duality Theory  Every LP problem (called the ‘Primal’) has associated with another problem called the ‘Dual’.  The ‘Dual’ problem is an LP defined directly
Page 2: Duality Theory  Every LP problem (called the ‘Primal’) has associated with another problem called the ‘Dual’.  The ‘Dual’ problem is an LP defined directly

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.

Page 3: Duality Theory  Every LP problem (called the ‘Primal’) has associated with another problem called the ‘Dual’.  The ‘Dual’ problem is an LP defined directly

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.

Page 4: Duality Theory  Every LP problem (called the ‘Primal’) has associated with another problem called the ‘Dual’.  The ‘Dual’ problem is an LP defined directly

Dual Problem

Primal LP Primal LP ::

Max Max z = cz = c11xx11 + c + c22xx22 + ... + c + ... + cnnxxnn

subject to:subject to:

aa1111xx11 + a + a1212xx22 + ... + a + ... + a1n1nxxnn ≤ b ≤ b11

aa2121xx11 + a + a2222xx22 + ... + a + ... + a2n2nxxnn ≤ b ≤ b22

::

aam1m1xx11 + a + am2m2xx22 + ... + a + ... + amnmnxxnn ≤ b ≤ bm m

xx1 1 ≥ 0, x≥ 0, x22 ≥ 0,…….x ≥ 0,…….xjj ≥ 0,……., x ≥ 0,……., xnn ≥ 0. ≥ 0.

Associated Dual LP Associated Dual LP ::

Min. z = bMin. z = b11yy11 + b + b22yy22 + ... + b + ... + bmmyymm

subject to:subject to:

aa1111yy11 + a + a2121yy22 + ... + a + ... + am1m1yymm ≥ c ≥ c11

aa1212yy11 + a + a2222yy22 + ... + a + ... + am2m2yymm ≥ c ≥ c22

::

aa1n1nyy11 + a + a2n2nyy22 + ... + a + ... + amnmnyymm ≥ c ≥ cnn

yy1 1 ≥ 0, y≥ 0, y22 ≥ 0,…….y ≥ 0,…….yjj ≥ 0,……., y ≥ 0,……., ymm ≥ 0. ≥ 0.

Page 5: Duality Theory  Every LP problem (called the ‘Primal’) has associated with another problem called the ‘Dual’.  The ‘Dual’ problem is an LP defined directly

Example

Primal

Max. Z = 3x1+5x2

Subject to constraints:

x1 << 4 y 4 y11

2x2x2 2 << 12 y 12 y22

3x3x11+2x+2x2 2 << 18 y 18 y33

xx11, x, x2 2 > 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 3

2y2y2 2 +2y+2y3 3 > 5 5

yy11, y, y22, y, y3 3 > 0

We define one dual variable for each primal constraint.

Page 6: Duality Theory  Every LP problem (called the ‘Primal’) has associated with another problem called the ‘Dual’.  The ‘Dual’ problem is an LP defined directly

Example

Primal

Min.. Z = 10x1+15x2

Subject to constraints:

5x1 + 7x2 > 80 80

6x6x1 1 + 11x+ 11x2 2 > 100 100

xx11, x, x2 2 > 0

Page 7: Duality Theory  Every LP problem (called the ‘Primal’) has associated with another problem called the ‘Dual’.  The ‘Dual’ problem is an LP defined directly

Solution

Dual

Max.. Z’ = 80y1+100y2

Subject to constraints:

5y1 + 6y2 << 10 10

7y7y1 1 + 11y+ 11y2 2 << 15 15

yy11, y, y2 2 > 0

Page 8: Duality Theory  Every LP problem (called the ‘Primal’) has associated with another problem called the ‘Dual’.  The ‘Dual’ problem is an LP defined directly

Example

Primal

Max. Z = 12x1+ 4x2

Subject to constraints:

4x1 + 7x2 << 56 56

2x2x11 + 5x + 5x2 2 > 20 20

5x5x1 1 + 4x+ 4x2 2 = 40 = 40

xx11, x, x2 2 > 0

Page 9: Duality Theory  Every LP problem (called the ‘Primal’) has associated with another problem called the ‘Dual’.  The ‘Dual’ problem is an LP defined directly

Solution

The equality constraint 5x5x1 1 + 4x+ 4x2 2 = 40= 40 can be replaced by

the following two inequality constraints:

5x5x1 1 + 4x+ 4x2 2 << 40 40

5x5x1 1 + 4x+ 4x2 2 > 40 -5x 40 -5x1 1 - 4x- 4x2 2 << -40 -40

The second inequality 2x2x11 + 5x + 5x2 2 > 20 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,

-2x-2x11 - 5x - 5x2 2 << -20 -20

Page 10: Duality Theory  Every LP problem (called the ‘Primal’) has associated with another problem called the ‘Dual’.  The ‘Dual’ problem is an LP defined directly

Cont…

The primal problem can now take the following standard form:

Max. Z = 12x1+ 4x2

Subject to constraints:

4x1 + 7x2 << 56 56

-2x-2x11 - 5x - 5x2 2 << -20 -20

5x5x1 1 + 4x+ 4x2 2 << 40 40

-5x-5x1 1 - 4x- 4x2 2 << -40 -40

xx11, x, x2 2 > 0

Page 11: Duality Theory  Every LP problem (called the ‘Primal’) has associated with another problem called the ‘Dual’.  The ‘Dual’ problem is an LP defined directly

Cont…

Min. Z’ = 56y1 -20y2 + 40y3 – 40y4

Subject to constraints:

4y1 – 2y2 + 5y3 – 5y4 > 12 12

7y7y11 - 5y - 5y2 2 + 4y+ 4y3 3 – 4y– 4y4 4 > 4 4

yy11, y, y22, y, y33, y, y4 4 > 0

The dual of this problem can now be obtained as follows:

Page 12: Duality Theory  Every LP problem (called the ‘Primal’) has associated with another problem called the ‘Dual’.  The ‘Dual’ problem is an LP defined directly

Example

Primal

Min.. Z = 2x2 + 5x3

Subject to constraints:

x1 + x2 > 2 2

2x2x11 + x + x2 2 +6x+6x3 3 << 6 6

xx1 1 - x- x2 2 +3x+3x3 3 = 4 = 4

xx11, x, x22, x, x3 3 > 0

Page 13: Duality Theory  Every LP problem (called the ‘Primal’) has associated with another problem called the ‘Dual’.  The ‘Dual’ problem is an LP defined directly

Solution

Primal in standard form :

Max.. Z = -2x2 - 5x3

Subject to constraints:

-x1 - x2 << -2 -2

2x2x11 + x + x2 2 +6x+6x3 3 << 6 6

xx1 1 - x- x2 2 +3x+3x3 3 << 4 4

- x- x1 1 + x+ x2 2 - 3x - 3x3 3 << -4 -4

xx11, x, x22, x, x3 3 > 0

Page 14: Duality Theory  Every LP problem (called the ‘Primal’) has associated with another problem called the ‘Dual’.  The ‘Dual’ problem is an LP defined directly

Cont…

Dual

Min. Z’ = -2y1 + 6y2 + 4y3 – 4y4

Subject to constraints:

-y1 + 2y2 + y3 – y4 > 0 0

-y-y11 + y + y2 2 - y- y3 3 + y+ y4 4 > -2 -2

6y6y2 2 + 3y+ 3y3 3 - 3y- 3y4 4 > -5 -5

yy11, y, y22, y, y33, y, y4 4 > 0

Page 15: Duality Theory  Every LP problem (called the ‘Primal’) has associated with another problem called the ‘Dual’.  The ‘Dual’ problem is an LP defined directly
Page 16: Duality Theory  Every LP problem (called the ‘Primal’) has associated with another problem called the ‘Dual’.  The ‘Dual’ problem is an LP defined directly

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.

Page 17: Duality Theory  Every LP problem (called the ‘Primal’) has associated with another problem called the ‘Dual’.  The ‘Dual’ problem is an LP defined directly

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 .

Page 18: Duality Theory  Every LP problem (called the ‘Primal’) has associated with another problem called the ‘Dual’.  The ‘Dual’ problem is an LP defined directly

Example

Min. Z = 3x1 + 2x2

Subject to constraints:

3x1 + x2 > 3 3

4x4x1 1 + 3x+ 3x2 2 > 6 6

xx1 1 + x+ x2 2 << 3 3

xx11, x, x2 2 > 0

Page 19: Duality Theory  Every LP problem (called the ‘Primal’) has associated with another problem called the ‘Dual’.  The ‘Dual’ problem is an LP defined directly

Cont…

Step I: The first two inequalities are multiplied by –1 to convert them to << constraints and convert the constraints and convert the objective function into maximization function.objective function into maximization function.

Max. Z’ = -3x1 - 2x2 where Z’= -Z

Subject to constraints:

-3x1 - x2 << -3 -3

-4x-4x1 1 - 3x- 3x2 2 << -6 -6

xx1 1 + x+ x2 2 << 3 3

xx11, x, x2 2 > 0

Page 20: Duality Theory  Every LP problem (called the ‘Primal’) has associated with another problem called the ‘Dual’.  The ‘Dual’ problem is an LP defined directly

Cont…

Let S1, S2 , S3 be three slack variables

Model can rewritten as:

Z’ + 3x1 + 2x2 = 0

-3x1 - x2 +S1 = -3 -3

-4x-4x1 1 - 3x- 3x2 2 +S+S22 = -6 = -6

xx1 1 + x+ x2 2 +S+S33 = 3 = 3

Initial BS is : x1= 0, x2= 0, S1= -3,

S2= -6, S3= 3 and Z=0.

Page 21: Duality Theory  Every LP problem (called the ‘Primal’) has associated with another problem called the ‘Dual’.  The ‘Dual’ problem is an LP defined directly

Cont…

Basic Variable

Coefficients of: Sol.

Z x1 x2 S1 S2 S3

Z 1 3 2 0 0 0 0

S1 0 -3 -1 1 0 0 -3

S2 0 -4 -3 0 1 0 -6

S3 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, S2 is the departing variable.•Calculate Ratio = |Z row / S2 row| (S2 < 0)•Choose minimum ratio. Therefore, x2 is the entering variable.

Page 22: Duality Theory  Every LP problem (called the ‘Primal’) has associated with another problem called the ‘Dual’.  The ‘Dual’ problem is an LP defined directly

Cont…

Basic Variable

Coefficients of: Sol.

Z x1 x2 S1 S2 S3

Z 1 1/3 0 0 2/3 0 4

S1 0 -5/3 0 1 -1/3 0 -1

x2 0 4/3 1 0 -1/3 0 2

S3 0 -1/3 0 0 1/3 1 1

Ratio - 1/5 - - 2 -

Therefore, S1 is the departing variable and x1 is the entering variable.

Page 23: Duality Theory  Every LP problem (called the ‘Primal’) has associated with another problem called the ‘Dual’.  The ‘Dual’ problem is an LP defined directly

Cont…

Basic Variable

Coefficients of: Sol.

Z x1 x2 S1 S2 S3

Z 1 0 0 1/5 3/5 0 21/5

x1 0 1 0 -3/5 1/5 0 3/5

x2 0 0 1 4/5 -3/5 0 6/5

S3 0 0 0 -1/5 2/5 1 6/5

Optimal Solution is : x1= 3/5, x2= 6/5, Z= 21/5

Page 24: Duality Theory  Every LP problem (called the ‘Primal’) has associated with another problem called the ‘Dual’.  The ‘Dual’ problem is an LP defined directly

Example

Max. Z = -x1 - x2

Subject to constraints:

x1 + x2 << 8 8

xx2 2 > 3 3

-x-x1 1 + x+ x2 2 << 2 2

xx11, x, x2 2 > 0

Page 25: Duality Theory  Every LP problem (called the ‘Primal’) has associated with another problem called the ‘Dual’.  The ‘Dual’ problem is an LP defined directly

Cont…

Let S1, S2 , S3 be three slack variables

Model can rewritten as: Z + x1 + x2 = 0

x1 + x2 + S1 = 8 8

-x-x2 2 + S+ S2 2 = -3= -3

-x-x1 1 + x+ x2 2 + S+ S33 = 2 = 2

xx11, x, x2 2 > 0Initial BS is : x1= 0, x2= 0, S1= 8,

S2= -3, S3= 2 and Z=0.

Page 26: Duality Theory  Every LP problem (called the ‘Primal’) has associated with another problem called the ‘Dual’.  The ‘Dual’ problem is an LP defined directly

Cont…

Basic Variable

Coefficients of: Sol.

Z x1 x2 S1 S2 S3

Z 1 1 1 0 0 0 0

S1 0 1 1 1 0 0 8

S2 0 0 -1 0 1 0 -3

S3 0 -1 1 0 0 1 2

Ratio - - 1 - - -

Therefore, S2 is the departing variable and x2 is the entering variable.

Page 27: Duality Theory  Every LP problem (called the ‘Primal’) has associated with another problem called the ‘Dual’.  The ‘Dual’ problem is an LP defined directly

Cont…

Basic Variable

Coefficients of: Sol.

Z x1 x2 S1 S2 S3

Z 1 1 0 0 1 0 -3

S1 0 1 0 1 1 0 5

x2 0 0 1 0 -1 0 3

S3 0 -1 0 0 1 1 -1

Ratio - 1 - - - -

Therefore, S3 is the departing variable and x1 is the entering variable.

Page 28: Duality Theory  Every LP problem (called the ‘Primal’) has associated with another problem called the ‘Dual’.  The ‘Dual’ problem is an LP defined directly

Cont…

Basic Variable

Coefficients of: Sol.

Z x1 x2 S1 S2 S3

Z 1 0 0 0 2 1 -4

S1 0 0 0 1 2 0 4

x2 0 0 1 0 -1 0 3

x1 0 1 0 0 -1 -1 1

Optimal Solution is : x1= 1, x2= 3, Z= -4