0% found this document useful (0 votes)
30 views10 pages

XEQ206-Duality and Sensitivity Analysis

The document discusses duality in linear programming problems (LPP). It defines the primal and dual problems, provides examples of dual problems and their solutions, and explains how to obtain the dual solution from the optimal primal table using the simplex method. It also gives examples of solving LPPs, finding their duals, and determining the dual solution. Finally, it provides an overview of sensitivity analysis in LPPs to determine how changes to coefficients affect the optimal solution.

Uploaded by

maruia
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views10 pages

XEQ206-Duality and Sensitivity Analysis

The document discusses duality in linear programming problems (LPP). It defines the primal and dual problems, provides examples of dual problems and their solutions, and explains how to obtain the dual solution from the optimal primal table using the simplex method. It also gives examples of solving LPPs, finding their duals, and determining the dual solution. Finally, it provides an overview of sensitivity analysis in LPPs to determine how changes to coefficients affect the optimal solution.

Uploaded by

maruia
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

2.

4 Duality
For each LPP there is another LPP associated with it such that the two LPP’s have some relationship.
The first LPP is called the primal and the second associated with it is the dual. The two can be
represented as:
Primal
Max z = c1 x1 + c2 x2 + ... + cn xn
Subject to a11 x1 + a12 x2 + ... + a1n xn ≤ b1
a21 x1 + a22 x2 + ... + a2n xn ≤ b2
.
.
.
am1 x1 + am2 x2 + ... + amn xn ≤ bm
With x1 , x2 , ..., xn ≥ 0
Dual
Min ω = b1 y1 + b2 y2 + ... + bm ym
Subject to a11 y1 + a21 y2 + ... + am1 ym ≥ c1
a12 y1 + a22 y2 + ... + am2 ym ≥ c2
.
.
.
a1n y1 + a2n y2 + ... + amn ym ≥ cn
With y1 , y2 , ..., ym ≥ 0
NOTE:

Primal Dual
1.Normal Maximization problem i.e has all constraints Normal Minimization problem i.e has all constraint
of type ≤ and the variables are non-negative of type ≥ and the variables are non-negative
2. Maximization problem Minimization problem
3. Has z, x1 , x2 , ..., xn variables Has ω, y1 , y2 , ..., ym variables
4. Has constraints and variables of type ≤ Has constraints and variables of type ≥
5. Has constraints and variables of type ≥ Has constraints and variables of type ≤
6. Has unrestricted variables Has constraints of type =
Also if the primal has an optimal solution then z = ω.

Examples
Find the dual of the following LPs
1.
Max z = 60x1 + 30x2 + 20x3
Subject to 8x1 + 6x2 + x3 ≤ 48
4x1 + 2x2 + 1.5x3 ≤ 20
2x1 + 1.5x2 + 0.5x3 ≤ 8
With x1 , x2 , x3 ≥ 0

1
2.

Max z = 2x1 + x2
Subject to x1 + x2 = 2
2x1 − x2 ≥ 3
x1 − x2 ≤ 1
With x1 ≥ 0, x2 urs

3.

min ω = 2y1 + 4y2 + 6y3


Subject to y1 + 2y2 + y3 ≥ 2
y1 − y3 ≥ 1
y2 + y3 = 1
2y1 + y2 ≤ 3
With y1 urs, y2 , y3 ≥ 0

Solution
The dual of the LPs will be;

1.

min ω = 48y1 + 20y2 + 8y3


Subject to 8y1 + 4y2 + 2y3 ≥ 60
6y1 + 2y2 + 1.5y3 ≥ 30
y1 + 1.5y2 + 0.5y3 ≥ 20
With y1 , y2 , y3 ≥ 0

2.

min ω = 2y1 + 3y2 + y3


Subject to y1 + 2y2 + y3 ≥ 2
y1 − y2 − y3 = 1 ;since x2 is unrestricted
With y1 urs, y2 ≤ 0, y3 ≥ 0 ;since 1st constraint is = and 2nd constraint is ≥

3.

Max z = 2x1 + x2 + x3 + x4
Subject to x1 + x2 + 2x4 = 2 ;since y1 is unrestricted
2x1 + x3 + x4 ≤ 4
x1 − x2 + x3 ≤ 6
With x1 , x2 ≥ 0, x3 urs, x4 ≤ 0 ;since 3rd constraint is = and 4th constraint is ≤

Exercise
Find the dual of the following LPs

2
1.
Max z = 6x1 + 7x2
Subject to 2x1 + 3x2 ≤ 12
2x1 + x2 ≤ 8
With x1 , x2 ≥ 0

2.
min ω = y1 − y2
Subject to 2y1 + y2 ≥ 4
y1 + y2 ≥ 1
y1 + 2y2 ≥ 3
With y1 , y2 ≥ 0

3.
Max z = 4x1 − x2 + 2x3
Subject to x1 + x2 ≤ 5
2x1 + x2 ≤ 7
2x2 + x3 ≥ 6
x1 + x3 = 4
With x1 ≥ 0, x2 , x3 urs

Solution of a dual problem


The dual solution is obtained from the optimal primal table.

Example
From the example
max z = 6x1 + 7x2
Subject to 2x1 + 3x2 ≤ 12
2x1 + x2 ≤ 8
With x1 , x2 ≥ 0
In standard form;
max z = 6x1 + 7x2
Subject to 2x1 + 3x2 + s1 = 12
2x1 + x2 + s2 = 8
With x1 , x2 , s1 , s2 ≥ 0
The dual becomes;
min ω = 12y1 + 8y2
Subject to 2y1 + 2y2 ≥ 6
3y1 + y2 ≥ 7
With y1 , y2 ≥ 0

3
The optimal table for the primal problem was

x1 x2 s1 s2 RHS BV Ratio
R1 − 23 N.R2 0 1 1
2 − 21 2 x2 = 2
N.R2 = 34 R2 1 0 − 14 3
4 3 x1 = 3
R3 + 43 N.R2 0 0 2 1 32 z=32
Using this we obtain the dual solution as

Primal variables to use: x1 x2


Z equation coefficients: 0 0
Associated dual constraints: 2y1 + 2y2 ≥ 6 3y1 + y2 ≥ 7
Equating the last two we obtain

2y1 + 2y2 − 6 = 0
3y1 + y2 − 7 = 0
solve the two simultaneously to obtain
y1 = 2
y2 = 1
and thus
z = 32

Exercise
Find the solution of the LP using the simplex method, obtain the dual and hence obtain the solution
of the dual.

Max z = 60x1 + 30x2 + 20x3


Subject to 8x1 + 6x2 + x3 ≤ 48
4x1 + 2x2 + 1.5x3 ≤ 20
2x1 + 1.5x2 + 0.5x3 ≤ 8
With x1 , x2 , x3 ≥ 0

2.5 Sensitivity Analysis


Changes in the LPP parameters affect the optimal solution. Sensitivity analysis determines which
coefficients in the LPP are crucial and determines the effect of mis-estimation. Sensitivity analysis
can be done graphically ( for cases where the LP has only two descision variables) or from the optimal
table of the simplex method.
The goal of sensitivity analysis is to determine whether changes in the model coefficients will leave
the current solution unchanged and if not how a new optimum( assuming one exists) can be obtained
efficiently. The changes we shall consider are;

1. Cost changes i.e changes in objective function coefficients.

2. Changes in the RHS i.e changes in availability of materials

4
3. Adding a new activity.

To carry out sensitivity analysis we shall use the Linear programming problem below. The optimal
solution is first obtained before carrying out sensitivity analysis.Given the LPP

Max z = 60x1 + 30x2 + 20x3


Subject to 8x1 + 6x2 + x3 ≤ 48
4x1 + 2x2 + 1.5x3 ≤ 20
2x1 + 1.5x2 + 0.5x3 ≤ 8
With x1 , x2 , x3 ≥ 0

We solve using the simplex method. In standard form it becomes

Max z = 60x1 + 30x2 + 20x3


Subject to 8x1 + 6x2 + x3 + s1 = 48
4x1 + 2x2 + 1.5x3 + s2 = 20
2x1 + 1.5x2 + 0.5x3 + s3 = 8
With x1 , x2 , x3 , s1 , s2 , s3 ≥ 0

We transfer to the table and follow the simplex method algorithm.

x1 x2 x3 s1 s2 s3 RHS BV Ratio
48
R1 8 6 1 1 0 0 48 s1 = 48 8 = 6
R2 4 2 1.5 0 1 0 20 s2 = 20 20 4 =5
8
R3 2 1.5 0.5 0 0 1 8 s3 = 8 2 =4
R0 = z j − c j -60 -30 -20 0 0 0 0 z=0
x1 x2 x3 s1 s2 s3 RHS BV Ratio
R1 − 8N.R3 0 0 -1 1 0 -4 16 s1 = 16 −
4
R2 − 4N.R3 0 -1 0.5 0 1 -2 4 s2 = 4 0.5 = 8
R3 4
N.R3 = 2 1 0.75 0.25 0 0 0.5 4 x1 = 4 0.25 = 16
R0 + 60N.R3 0 15 -5 0 0 30 240 z=240
x1 x2 x3 s1 s2 s3 RHS BV Ratio
R1 + N.R2 0 -2 0 1 2 -8 24 s1 = 24
N.R2 = 2R2 0 -2 1 0 2 -4 8 x3 = 8
R3 − 0.25N.R2 1 1.25 0 0 -0.5 1.5 2 x1 = 2
R0 + 5N.R2 0 5 0 0 10 10 280 z=280

Changing the objective function coefficient


This is same as changing the cost. The coefficient may be of a basic variable or a non-basic variable.

Coefficient of non-basic variable


From the above problem the non-basic variable is x2 and its objective function coefficient is c2 = 30.
We need to find for what values of c2 will this solution remain optimal?

Let c2 = 30 + ∆ where ∆ is the change.In the first table R0 = −30 − ∆ under x2

5
In the second table R0 = −30 − ∆ + 60(0.75) = 15 − ∆ under x2
In the third table R0 = −15 − ∆ + 5(−2) = 5 − ∆ under x2
But for the solution to be optimal all the values in R0 should be positive or 0. Therefore 5 − ∆ ≥ 0
which implies that 0 ≤ ∆ ≤ 5

This implies that if the price of x2 is increased or decreased by 5 or less,the solution remains op-
timal.i.e the solution remains optimal for 30 ≤ c2 ≤ 35 and z-value remains z=280.

Coefficient of basic variable


From the above problem the basic variables are x1 and x3 and their objective function coefficients are
c1 = 60 and c3 = 20. We need to find for what values of e.g c1 will this solution remain optimal?

Let c1 = 60 + ∆ where ∆ is the change.In the first table R0 will change to

R0 = z j − c j -60-∆ -30 -20 0 0 0 0 z=0

The pivot column is under x1 . In the second table R0 will change to

R0 + (60 + ∆)N.R3 0 15 + 0.75∆ −5 + 1.25∆ 0 0 30 + 0.5∆ 240 + 4∆ z=240 + 4∆

In the third table R0 will change to

R0 + (5 − 0.25∆)N.R2 0 5 + 1.25∆ 0 0 10 − 0.5∆ 10 + 1.5∆ 280 + 2∆ z=280 + 2∆

But for the solution to be optimal all the values in R0 should be positive or 0. Therefore

5 + 1.25∆ ≥ 0
1.25∆ ≥ −5
∆ ≥ −4
10 − 0.5∆ ≥ 0
0.5∆ ≤ 10
∆ ≤ 20
10 + 1.5∆ ≥ 0
1.5∆ ≥ −10
20
∆≥−
3
The solution remains optimal IFF the change −4 ≤ ∆ ≤ 20 i.e the solution remains optimal for 56 ≤
c1 ≤ 80 but the z-value changes to z=280 + 2∆.

Changing the RHS


Changing the RHS affects feasibility of the solution and thus optimality.For the solution to remain
feasible, the RHS must be non-negative.
Suppose in the example above the RHS of constraint 2 changes from 20 to 20 + ∆. This will affect s2
which is the slack variable associated with constraint 2. Therefore to determine its effect on the RHS
coefficient we use the coefficients for s2 in the optimal table and hence the new RHS will be

6
RHS
24 + 2∆
8 + 2∆
2 − 0.5∆
For it to be non-negative then

24 + 2∆ ≥ 0
∆ ≥ −12
8 + 2∆ ≥ 0
∆ ≥ −4
2 − 0.5∆ ≥ 0
∆≤4

The solution remains optimal IFF the change −4 ≤ ∆ ≤ 4 The objective function also changes to
280 + 10∆
i.e the solution remains optimal for 16 ≤ b2 ≤ 24 and the z-value changes to z=280 + 10∆. NOTE:
Shadow price is the amount by which the z value is improved if we increase constraint i by 1. If the
RHS of a constraint i changes by ∆ in the original formulation, the optimal objective value changes
by λi∗ ∆. λ1∗ = 0 can be found in R0 of the optimal table corresponding to s1 , λ2∗ = 10 can be found
in R0 of the optimal table corresponding to s2 and λ3∗ = 10 can be found in R0 of the optimal table
corresponding to s3 .

Adding a new activity


Shadow prices can be used to determine the effects of introducing a new variable. In the above
example suppose we introduce a new activity such that the problem becomes

Max z = 60x1 + 30x2 + 20x3 + 15x4


Subject to 8x1 + 6x2 + x3 + x4 ≤ 48
4x1 + 2x2 + 1.5x3 + x4 ≤ 20
2x1 + 1.5x2 + 0.5x3 + x4 ≤ 8
With x1 , x2 , x3 , x4 ≥ 0

The only variable in R0 that can have a negative coefficient is x4 . To make x4 in the objective function
positive in the optimal table we reduce RHS of constraint 1 by x4 , constraint 2 by x4 and constraint 3
by x4 thus making s1 = x4 , s2 = x4 and s3 = x4 . The overall effect is to reduce the objective function
by
λ1∗ (x4 ) + λ2∗ (x4 ) + λ3∗ (x4 ) = 20(x4 )
The new objective function thus becomes 15x4 − 20x4 = −5x4 which is negative and thus not optimal.
This means that introducing a new variable x4 decreases revenue by 5.

Example
Using the LPP in the example above,

1. Show that the current solution remains optimal if c3 , satisfies 15 ≤ c3 ≤ 22.5. If c3 = 21, find
the new optimal solution.

7
2. Show that the current solution remains optimal if b1 ≥ 24. If b1 = 30, find the new optimal
solution.

3. Suppose a new activity is added with a profit of $36 and coefficient 6,2,and 2 in the 1st, 2nd
and 3rd constraints respectively. Should this new activity be added?

Solution
1. c3 is the cost coefficient of a basic variable x3 . To find for what values of c3 the solution will
remain optimal, let c3 = 20 + ∆ where ∆ is the change. The R0 changes in the tables as follows;
In the initial table

R0 = z j − c j -60 -30 −20 − ∆ 0 0 0 0 z=0

R0 + 60N.R3 0 15 −5 − ∆ 0 0 30 240 z=240

R0 + (5 + ∆)N.R2 0 5 − 2∆ 0 0 10 + 2∆ 10 − 4∆ 280 + 8∆ z=280 + 8∆

But for the solution to remain optimal all values in R0 should be positive or 0. Therefore

5 − 2∆ ≥ 0
∆ ≤ 2.5
10 + 2∆ ≥ 0
∆ ≥ −5
10 − 4∆ ≥ 0
∆ ≤ 2.5

The solution remains optimal IFF the change −5 ≤ ∆ ≤ 2.5 i.e. the solution remains optimal
for 15 ≤ c3 ≤ 22.5
For c3 = 21 then ∆ = 21 − 20 = 1, thus the new solution is still x1 = 2, x2 = 0, x3 = 8 but z
changes to z = 280 + 8 = 288

2. For the constraint 1 b1 then we use the column for s1 in the optimal table.The RHS becomes

RHS
24 + ∆
8 + 0∆
2 + 0∆

For it to be non-negative then

24 + ∆ ≥ 0
∆ ≥ −24

The solution remains optimal IFF the change ∆ ≥ −24 The objective function also changes to
280 + 0∆
i.e the solution remains optimal for b1 ≥ 24 and the z-value remains z=280.
For b1 = 30 then ∆ = 30 − 48 = −18 which satisfies ∆ ≥ −24 , thus the new solution is still

8
x1 = 2, x2 = 0, x3 = 8 and z=280.

3. Adding the new activity changes the LPP to

Max z = 60x1 + 30x2 + 20x3 + 36x4


Subject to 8x1 + 6x2 + x3 + 6x4 ≤ 48
4x1 + 2x2 + 1.5x3 + 2x4 ≤ 20
2x1 + 1.5x2 + 0.5x3 + 2x4 ≤ 8
With x1 , x2 , x3 , x4 ≥ 0

The only variable in R0 that can have a negative coefficient is x4 . To make x4 in the objective
function positive in the optimal table we reduce RHS of constraint 1 by 6x4 , constraint 2 by 2x4
and constraint 3 by 2x4 thus making s1 = 6x4 , s2 = 2x4 and s3 = 2x4 . The overall effect is to
reduce the objective function by

λ1∗ (6x4 ) + λ2∗ (2x4 ) + λ3∗ (2x4 ) = 40(x4 )

The new objective function thus becomes 36x4 − 40x4 = −4x4 which is negative and thus not
optimal. This means that introducing a new variable x4 decreases revenue by 4 and thus x4
should not be produced.

Exercise
1. From the example in sensitivity analysis

i Find and interprete the shadow prices

ii If b2 = 18 what is the total revenue?

iii If b3 = 9 what is the total revenue?

iv If b1 = 30 what is the total revenue?

2. Consider the LPP

Max z = 4A + 6B + 10C + 9D
Subject to 3A + 4B + 8C + 6D ≤ 400
6A + 2B + 5C + 8D ≤ 400
With A, B,C, D ≥ 0

A B C D s1 s2 RHS
R1 0.75 1 2 1.5 0.25 0 100
The optimal table is given as
R2 4.5 0 1 5 -0.5 1 200
R0 0.5 0 2 0 1.5 0 600
i How many units of A, B, C, D should be produced in order to maximize profit?

9
ii Assume that 20 units of C have been produced by mistake, what is the resulting decrease
in profit?

iii What is the reduced cost of changing the RHS of the first constraint?

iv In what range can the RHS of the first constraint vary without changing the optimality?

v Management is considering the production of a new product E that would require 2 units
in the first constraint and 10 units in the second constraint. What is the minimum profit
margin needed on this new product to make it worth producing?

10

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy