0% found this document useful (0 votes)
190 views75 pages

Chapter Two Part V Duality and Sensitivity Analysis

The document discusses duality in linear programming problems and the dual simplex method. It defines duality and how a primal problem can be converted to a dual problem by interchanging rows and columns. It provides examples of constructing dual problems and explains how the dual simplex method starts with an infeasible but optimal solution and works towards feasibility, unlike the regular simplex method. The dual simplex method is useful for sensitivity analysis and eliminating artificial variables.

Uploaded by

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

Chapter Two Part V Duality and Sensitivity Analysis

The document discusses duality in linear programming problems and the dual simplex method. It defines duality and how a primal problem can be converted to a dual problem by interchanging rows and columns. It provides examples of constructing dual problems and explains how the dual simplex method starts with an infeasible but optimal solution and works towards feasibility, unlike the regular simplex method. The dual simplex method is useful for sensitivity analysis and eliminating artificial variables.

Uploaded by

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

Duality, the Dual Simplex Method,

Sensitivity Analysis

1
Duality
• A given LPP can be re-written in another form which is similar in its

contents (data) with the original one.

• The given original programme is called primal programme and the

resulting programme is called dual programme.

• When the original primal programme contains a large number of

constraints and a smaller number of variables, it invoves large step to

arrive at optimal solution.

• By interchanging the rows and the columns of the original programme

we get the advantage of reducing the number of constraints that needs

fewer work and effort to solve.


2
Relationship that should exist between the primal and dual LPP.
1. If the primal contains n variables and m constraints, the dual will
contain m variables and n constraints.

2. The maximization problem in the primal becomes the minimization


problem in the dual and vice versa.

3. The maximization problem has ≤ constraints while the minimization


problem has ≥ constraints

4. Constraints of ≤ type in the primal become ≥ type in the dual and


vice versa.

5. The coefficient matrix of the constraints of the dual is the transpose


of the primal.
3
6. A new set of variables appear in the dual.
7. The constants C1, C2, ... , Cn in the objective
function of the primal appear as the RHS of the
dual.

8. The constants bl, b2, b3, ... , bm in the constraints of


the primal appear as the coefficients of the
objective - function of the dual.
9. The variables in both problems are non-negative.
4
5
6
Example 1
Construct the dual to the primal problem:

Maximize Z = 3x1 + 5x2

Subject to 2x1 + 6x2 ≤ 50

3x1 + 2x2 ≤ 35

5x1 - 3x2 ≤ 10

x2 ≤ 20

where x1, x2 ≥ 0

7
Solution

• Let y1, y2, y3 and y4 be the corresponding dual variables, then the
dual problem is given by:

Minimize W = 50y1 +35y2 +10y3 +20 y4

Subject to 2y1 + 3y2 + 5y3 ≥ 3

6y1 + 2y2 - 3y3 + y4 ≥ 5

Where, y1, y2, y3, y4 ≥ 0

• As this dual problem has lesser number of constraints than the


primal, it requires lesser work and effort to solve it.
• The computational difficulty in the LPP is mainly associated
with the number of constraints rather than number of variables.
8
Example 2 Construct the dual to the primal problem:

Maximize Z = 3x1 + 17x2 + 9x3

Subject to x1 -x2 + x3 ≥ 3

-3x1+2x3 ≤ 1 , where x1, x2, x3 ≥ 0

Solution - Firstly the ≥ sign of the first constraint is converted into ≤

constraint by multiplying both sides by -1, i.e.,

-x1+x2 - x3 ≤ -3. Now the dual of the given problem is:

9
Example 3 Construct the dual of the problem

Maximize Z = 3x1+10x2+2x3

Subject to 2x1+3x2+2x3≤ 7

3x1-2x2+4x3=3

where x1, x2, x3 ≥ 0


• As the given problem is of maximization, all constraints
should be of ≤ type. The equation 3x1-2x2+4x3=3 can be
expressed as a pair of inequalities
3x1 - 2x2 + 4x3 ≤ 3 and 3x1 - 2x2+4x3 ≥ 3 or

3x1-2x2+4x3 ≤ 3and -3x1+2x2-4x3 ≤ -3 10


Maximize Z = 3x1+10x2+2x3

Subject to 2x1+3x2+2x3 ≤ 7

3x1-2x2+4x3 ≤ 3

-3x1+2x2-4x3 ≤ -3

where x1, x2, x3 ≥ 0

Let y1, y’2 and y”2 be the associated non-negative dual

variables.

11
Then the dual of the problem is

Minimize W = 7y1 + 3(y’2 – y’’2)

Subject to 2y1 + 3(y’2 – y’’2) ≥ 3

3y1 - 2(y’2 – y’’2) ≥ 10

2y1 + 4(y’2 – y’’2) ≥ 2

Where y1, y’2, y’’2 ≥ 0

Substituting y’2 – y”2 = y2, where y2 is unrestricted in sign, the dual problem

becomes

12
Mathematical Explanation to the Dual
Consider the following example

Product types Time requirement on M1 and M2 Profit per


(Minutes per unit) unit

M1 M2

P1 1 3 6

P2 1 2 5

Total 5 12
availability per
day

13
The primal of the problem is

Maximize Z = 6x1+5x2

Subject to x1+x2 ≤ 5

3x1+2x2 ≤ 12

x 1, x2 ≥ 0

The dual of the problem is

Minimize W = 5y1+12y2

Subject to y1+3y2 ≥ 6

y1+2y2 ≥ 5

y1,y2 ≥ 0 14
The optimal table for the primal is

Cj 6 5 0 0

CB Basis x1 x2 s1 s2

5 x2 0 1 3 -1 3

6 x1 1 0 -2 1 2

Cj-zj 0 0 -3 -1 27

The optimal solution to the primal is x1 = 2, x2 = 3 and Z = 27

Solve the dual programme and check that the solution is


y1 = 3 and y2 = 1 and W = 27
15
• Now, let us add a small quantity δ (= delta) to
the RHS of the first constraint of the primal
such that the resources available now is 5+δ,

• Assuming that x1 and x2 will remain as basic

variables at the optimum and solving for x1 and

x2, we get

x1+x2 = 5+δ

3x1+2x2 = 12 16
Solving simultaneously we get,

x1 = 2-2δ

x2 = 3+3δ

Z = 27+3δ

• As we change the resource availability slightly, the values of the x1, x2


also change.

• We have to assume that x1 and x2 are still basic variables at the


optimum.
• How can we interpret 3δ in Z = 27+3δ?

• The number 3 is the same as y1 = 3 in the optimal solution to the dual


17
• For example if we make x1 + x2 = 5 – δ, then we get Z = 27-3δ

• Say, now we can change the second constraint as 3x1+2x2 =

12+δ, then Z = 27 +1δ provided that x1, x2 continue to be

basic variables at optimum.

• If the first resource (M1) is increased by δ, then the objective

function will increase by 3δ and if the second resource is

decreased by δ, then the objective function will decrease

accordingly by – δ

• The dual represents the extent to which (the rate of the change
18
• It can be viewed as the change in the
objective function for a unit change of the
resource at the optimum assuming that the
change is not significant enough to change
the set of basic variables themselves.

19
• Simplex method solves both the primal and the dual.
• We have said that the optimal solution of the primal is
Cj 6 5 0 0

CB Basis x1 x2 s1 s2

5 x2 0 1 3 -1 3

6 x1 1 0 -2 1 2

Cj-zj 0 0 -3 -1 27

• We can see from this calculation that at the optimal condition y1


= 3 and y2 = 1. Multiplying cj-zj by -1 gives the solution of the
dual under the non-basic variable (under the corresponding
slacks) 20
Dual Simplex Methods

• In this section we introduce a different simplex algorithm

that is motivated by the relationship between the primal

and dual problems.

• In this method the solution starts better than optimum but

infeasible and remains infeasible until the true optimum is

reached at which the solution becomes feasible.

• The regular simplex method starts with a basic feasible

but non-optimal solution and works towards optimality,

• The dual simplex method starts with a basic infeasible but

optimal solution and works towards feasibility. 21


• It is applicable to maximization as well as minimization
problems.
• The constraints are converted into ≤ type and slack
variables are added to set up the problem in the
standard form.

• The initial simplex table is constructed and if any b i is


negative and the optimality condition is satisfied, then
the given problem can be solved by the dual simplex
method.

22
• The dual simplex method is quite similar to the regular
simplex method and once they are started, the only difference
lies in the criterion used for selecting a variable to enter the
basis and to leave the basis.
• In the dual simplex method this criterion is for the dual while
in regular simplex method the criterion is for the primal.
• Further, in the dual simplex method we first determine the
variable to leave the basis and then the variable to enter the
basis, while reverse is done in the case of the simplex method.

23
Applications of the Dual Simplex Method

• In general it is not always easy to find a dual infeasible but optimal

solution basis.

• However, these are problems in which a dual infeasible but optimal

solution is readily available to start the dual simplex method.

• Sensitivity analysis when the right-hand side vector bi changes or when

new constraints are added. If the newly added constraint is not

satisfied by the optimal solution, the problem remains optimal but it

becomes infeasible. The dual simplex method can then be applied to

clear the infeasibility.

• It eliminates the introduction of artificial variables in the L.P.

problems. This is the advantage over the regular simplex method. 24


Steps
Step 1. Convert the problem into maximization (always) problem
if it is initially in the minimization form.
Step 2. Convert ≥ type constraints, if any, into ≤ type by
multiplying both sides of such constraints by - 1.
Step 3. Convert the inequality constrains into equalities by
addition of slack variables and obtain the initial solution.
Express the above information in the form of a table known as
the dual simplex table.

25
Step 4. Compute Cj-Zj for every column. Three
cases arise:

(a) If all cj - Zj are either negative or zero and all bi


are non-negative, the solution obtained above is
the optimal basic feasible solution.
(b) (b) If all cj - Zj are either negative or zero and at
least one bi is negative, then proceed to step 5.
(c) If any cj - Zj is positive, the method fails.

26
Step 5. Select the row that contains the most negative
bi,. This row is called the key row or the pivot row.
The corresponding basic variable leaves the basis.
Step 6. Look at the elements of the key row.
(a) If all elements are non-negative, the problem
does not have a feasible solution.

(b) If at least one element is negative, find the ratios


of the corresponding elements of cj - Zj to these
elements.
27
• Ignore the ratios associated with positive or zero elements of the key
row.
• Choose the smallest of these ratios.
• The corresponding column is the key column and the associated
variable is the entering variable.
• Mark the key element or the pivot element.
• Step 7. Make the key element unity. Perform the row operations as in
the regular simplex method and repeat iterations until either an
optimal feasible solution is obtained in a finite number of steps or
there is an indication of the non-existence of a feasible solution. This
technique will now be explained by considering a few examples.
28
Examples

Solve by dual simplex method


Minimize Z = 2x1 + 2x2 + 4x3
Subject to 2x1 + 3x2 +5x3 ≥ 2
3x1 + x2 + 7x3 ≤ 3
x1 + 4x2 +6x3 ≤ 5
x1, x2, x3 ≥0

29
Solution
Step 1
The given minimization problem is converted into maximization problem
Maximize G = -Z = -2x1 - 2x2 - 4x3
Step 2
The first constraint is of ≥ type. It is converted into ≤ type by
multiplying throughout by -1. thus the constrain become: -2x1 - 3x2 -5x3
≤ -2
Step 3
The problem is converted into standard for by adding slack variables s1,
s2, and s3 in the constraints. Thus the problem is expressed as
Maximize G = -Z = -2x1 - 2x2 - 4x3 + 0s1 + 0s2 + os3
Subject to -2x1 - 3x2 -5x3 + s1 = -2
3x1 + x2 + 7x3 + s2 = 3
x1 + 4x2 +6x3 + s3 = 5
x1, x2, x3, s1, s2, s3 ≥0
Putting x1 = x2 = x3 = 0, the initial basic solution is s1 = -2, s2 = 3, s3 = 5.
since s1 is negative, the solution is infeasible. The above information is
expressed in a table form, called starting dual simplex table.

30
cj -2 -2 -4 0 0 0

CB Basis X1 X2 X3 S1 S2 S3 b

0 S1 -2 ( -3 ) -5 1 0 0 -2

0 S2 3 1 7 0 1 0 3

0 S3 1 4 6 0 0 1 5

zj 0 0 0 0 0 0 0

Cj-zj -2 -2 -4 0 0 0

-2 / -2 -2 / -3 -4 / -5
= 1 = 2/3 = 4/5

Step 4
Compute cj – zj. As all cj – zj are either negative or zero and
bi is negative, the solution is optimal but infeasible. We
proceed to step 5.
Step 5
As bi = -2, the first row is the key row and s1 is the outgoing
variable.
31
• Finding the ratios of elements of Cj-Zj row to the
elements of key row.
• Neglect the ratios corresponding to positive or
zero elements of the key row. The desired ratios
are:
-2/-2 = 1,
-2/-3 = 2/3 and
-4/-5 = 4/5
since 2/3 is the smallest ratio, ‘x2” column is the
key column; x2 is the incoming variable and (-3) is
the key element.

32
As all cj-zj are negative or zero and all bi are positive, the solution
given by the above table is optimal. Thus the optimal solution is

33
Example 2

34
Solution

35
After an iteration, the optimal feasible
solution is
x1 = 4, x2 = 3, Zmax = -18 36
Exercise

37
Sensitivity Analysis
• During the formulation of a LPP, it is assumed that the
parameters such as market demand, equipment capacity,
resource consumption, resource availability, the relevant costs
or profits are all known with certainty and do not change over
time.

• In actual practice the markets fluctuate, material and labour


costs go up or down, production times change and equipment
availability varies from time to time.

• It is, therefore, desirable to study how the current optimal


solution changes when the parameters of the problem get
38
• The study of the effect of discrete changes in parameters on the
optimal solution is called the sensitivity analysis or the post
optimality analysis.

• One way to determine the effects of parameter changes is to


solve the problem anew, which may be computationally
inefficient.

• Alternatively, the current optimal solution may be investigated,


making use of the properties of the simplex criterion. The
second method reduces additional computations considerably
and hence forms the subject of the present discussion.

39
• The changes in the parameters of a linear programming problem
include:

Changes in the coefficient of the objective function

• Change in the objective function coefficient of non-basic variables

• Change in the objective function coefficient of basic variables

Change in the RHS values

Change in the constraint coefficient corresponding to non-basic


variables

Changing constraint coefficients for basic variables

Addition of a new variable

Adding constraints
40
Changes in the Coefficients of Objective Function cj

• Changes in the coefficients of the objective function


may take place due to a change in cost or profit of
either basic variables or non-basic variables.
• Each of these two cases will first be considered
separately.
• The discussion will then be followed by a combined
case.
41
Example
• A company wants to produce three products, A, B and C.
The unit profits on these products are Birr 4, Birr. 6 and
Birr 2 respectively. These products require two types of
resources – manpower and material. The following L.P.
model is formulated for determining the optimal product
mix:

Where x1, x2 and x3 are the number of products A, B and C


produced. 42
Find the optimal product mix-and the corresponding profit to the

company.

i. Find the range on the values of non-basic variable coefficient c3 such

that the current optimal product mix remains optimal.

ii. What happens if c3 is increased to birr 12? What is the new optimal

product mix in this case?

iii.Find the range on basic variable coefficient c1, such that the current

optimal product mix remains optimal.

iv.Find the effect when c1 = Birr 8 on the optimal product mix.

v. Find the effect of changing the objective function to Z = 2x1 + 8x2 +


43
Solution

• Putting x1 = x2 = x3 = 0 in the constraint equations, we get

x4 = 3 and x5 = 9 as the initial basic feasible solution


which can be expressed in the form of a simplex table as
shown below.
• Performing iterations we get the remaining tables.
44
45
Therefore, optimal solution is x1 = 1, x2 = 2, x3 = 0 and Zmax = 16
Birr 46
i. The coefficient c3 corresponds to the non-basic variable x3 for product C.

• In the optimal product mix shown in the above table, product C is not

produced because of the low associated profit of birr 2 per unit (c 3).

• Clearly, if c3 further decreases, it will have no effect on the current optimal

product mix.

• However, if c3 is increased beyond a certain value, it may become profitable

to produce the product C.

• When the value of c3 changes, the value of the net evaluation (relative

profit coefficient) of the non basic variable x3, i.e., c3 in the above table also

changes.

• The table will remain optimal as long as c3 remains non-positive.


47
• Therefore,
• For the above table to remain optimal, c3< 0.

48
• c3 become positive, the current product mix

given by the above table does not remain optimal.


• The optimal profit can be increased further by
producing product C.
• Non-basic variable x3 can enter the solution to
increase Z. This is shown in the following table.
49
New optimal product mix is x1 = 2, x2 = 0, x3 = 1 and Zmax = 20

50
iii. Find the range on basic variable coefficient c1, such that
the current optimal product mix remains optimal.

• Clearly, when c1 decreases below a certain level, it may no


longer remain profitable to produce product A.

• On the other hand, if C1 increases beyond a certain level, it


may becomes profitable that it is most paying to produce
only product A.
• In either case the optimum product mix will change and
hence there is lower as well as upper limit on c1 within
which the optimal product mix will not be affected.
51
• Any variation in c1 (and/or in c2 also) will not

change c1 and c2 (i.e., they remain zero, while c3, c4 ,

c5,will change.

• The earlier optimal table will remain optimal, c3,

c4, and c5 can be expressed as functions of c1 as


follows:

52
53
• Range on c1 for the optimal product mix to remain

optimal is 3/2 ≤ c1 ≤ 6.

• Thus so long as c1 lies within these limits, the optimal

solution in the former optimal solution table, x 1 = 1, x2

= 2, x3 = 0 remains optimal.

• However, within this range, as the value of c 1 is

changed, Zmax undergoes a change.

• For example, when c1 = 3, Zmax = Birr 15.


54
IV. Find the effect when c1 = Birr 8 on the optimal product mix.

• As c5 becomes positive, the solution given in the optimal


table no longer remains optimal.
• Slack variables x5 enters the solution. This is shown below.

55
56
v. Effect of changing the objective function
coefficients of basic as well as non-basic variables
Z = 2x1 + 8x2 + 4x3

57
• Hence the optimal solution does not change.
• The optimal product mix remains x1 = 1, x2 = 2,

x3 = 0 and zmax = 18.


• There is indication of an alternative optimal
solution since c4 = 0

58
Change in the RHS values of the constraints bi

• Suppose that an optimal solution to a LPP has already been


found and it is desired to find the effect of increasing or
decreasing some resource.
• Clearly, this will affect not only the objective function but
also the solution.
• Large changes in the limiting resources may even change
the variables in the solution since one or more current basic
variables become negative.
• Dual Simplex Method is used to remove infeasibility and to
get a feasible optimal solution. 59
60
62
63
64
• Since x2 becomes -ve, the current optimal solution
becomes infeasible.
• Dual simplex method may be used to clear
infeasibility of the problem.
• The following table shows the same.

65
66
• As the elements in cj row are negative or zero all the bi
are positive, the solution given by the above table is
optimal.

67
68
iv. Changes in the coefficients of the constraints aij
• When changes take place in the constraint coefficients of a
non - basic variable in the current optimal solution,
feasibility of the solution is not affected. The only effect, if
any, may be on the optimality of the solution.
• However, if the constraint coefficients of a basic variable get
changed, things become more complicated since the
feasibility of the current optimal solution may also be
affected (lost). The basic matrix is affected, which, in turn,
may affect all the quantities given in the current optimal
table. Under such circumstances, it may be better to solve the
problem all over again. 69
iv. Changes in the coefficients of the constraints aij
Example:

Consider the problem

Max Z = 45x1 + 100x2 + 30x3 + 50x4

Subject to 7x1 + 10x2 + 4x3 + 9x4 ≤ 1200

3x1 + 40x2 + x3 + x4 ≤ 800

x 1 , x2 . x3 , x 4 ≥ 0
Find the effect of the following changes in the optimal table of the
problem

70
Solution
The optimal table for this problem is given below:

cj 45 100 30 50 0 0
CB b

Basis x1 x2 x3 x4 x5 x6

30 x3 5/3 0 1 7/3 4/15 -1/15


800/3

100 x2 1/30 1 0 -1/30 -1/150 2/75 40/3

cj-zj -25/3 0 0 -50/3 -22/3 -2/3

71
72
P1 = B P1

73
Now we start with the original optimal table and incorporate the changes due
to variable x1.

x3

74
Optimal Table

75

You might also like