CH II or Duality and SA
CH II or Duality and SA
1
Chapter contents
Duality
A comparison of the Primal and Dual
Formulating the Dual
Comparison of the Primal and Dual Simplex Solutions
Advantages of Duality
Post-optimality Analysis
A change in the RHS of a Constraint (Range of
Feasibility)
A change in the objective function coefficient
Range of insignificance
Range of optimality
2
Duality
With every linear programming problem, there is associated
another linear programming problem which is called the
dual of the original (or the primal) problem.
Dual - the flip flop version of the primal.
For example, consider the problem of production planning.
Primal LP problem - the production manager attempts to
optimize resource allocation by determining quantities
for each product to be produced that will maximize profit.
Dual LP problem - achieve production plan that
optimizes resource allocation so that each product is
produced at that quantity such that its marginal
opportunity cost equals its marginal return.
3
Cont’d
The main focus of dual - finding for each resource its
best marginal value or shadow price.
If resource is not completely used, i.e., there is slack,
then its marginal value is zero.
Shadow price - the rate of change in the optimal
objective function value with the respect to the unit
change in the availability of a resource.
5
A comparison of the Primal and Dual
1. If the primal objective is to minimize, the dual objective
will become to maximize and vice versa.
2. The coefficients of the primal’s objective function become
the RHS values for the dual’s constraints.
3. The primal’s RHS values become the coefficients of the
dual’s objective function.
4. If the primal has m- constraints on n- variables, the dual
will have n-constraint on m- variables.
5. The constraint coefficients of the primal become the
constraint coefficients of the dual in such a way that the
coefficients of the first row of the primal will become the
coefficients of the first column of the dual, the coefficients
of the second row of the primal will become the
6
coefficients of the second column of the dual, and so on.
The primal-Dual Relationship
7
Formulating the Dual
Consider this Primal problem:
Minimize 40x1 + 44x2 + 48x3
Subject to: 1x1 + 2x2 + 3x3 > 20
4x1 + 4x2 + 4x3 > 30
x1, x2, x3 > 0
The dual of this problem is:
Maximise Z = 20y1 + 30y2
Subject to:
1y1 + 4y2 < 40
2y1 + 4y2 < 44
3y1 + 4y2 < 48
y1, y2 > 0
8
Formulating the Dual when the Primal has Mixed Constraints
Consider the following primal problem:
9
Cont’d
10
reversing the direction of the inequality yields:
The primal problem can now take the following standard form:
11
Exercise
Formulate the dual of this LP model.
Maximize z = 50x1 + 80x2
Subject to:
C1 3x1 + 5x2 ≤ 45
C2 4x1 + 2x2 ≥16
C3 6x1 + 6x2 = 30
x1 ,x2 ≥ 0
12
Comparison of the Primal and Dual Simplex Solutions
13
Example:
The first table contains the final tableau for the dual and the
second one contains the final tableau for the primal.
Final tableau of Dual solution to the Microcomputer problem
14
The primary concern with a simplex solution is often three fold:
1. Which variables are in solution?
2. How much of each variable is in the optimal solution?
15
3. What are the shadow prices for the constraints?
Cont’d
Solution quantities of the dual = shadow prices of the primal
(i.e. 40/3 and 10).
Solution quantities of the primal (i.e., 24, 9, and 4) can be
found in the bottom row of the dual.
In the primal, s1 = 24, In the dual, 24 appears in the y1
column. In the primal, x1 = 9 & x2 = 4; in the dual, s1 = 9 & s2=
4.
In the first three columns of the dual, which equate to slack
variables of the primal, we can see that the fist slack equals 24
and the other two are zero.
Under the dual’s slack columns, we can read the primal values
of the decision variables. then, the variables of the primal
16
problem become the constraints of the dual problem, and vice
versa.
Exercise
Develop the dual of the following LP model and
Compare the Primal and Dual Simplex Solutions
Max Z=40x1 + 35x2
S. to 2x1 + 3x2 ≤ 60
4x1 + 3x2 ≤ 96
x1,x2 ≥ 0
17
Advantages of Duality
It is advantageous to solve the dual of a primal having less
number of constraints, because the number of constraints
usually equals the number of iterations required to solve
the problem.
It avoids the necessity of adding surplus or artificial
variables and solve the problem quickly.
The dual variables provide an important economic
interpretation of the final solution of an LP problem.
It is quite useful when investigating change in the
parameters of an LP problem ( called Sensitivity analysis).
The dual variables provide the decision maker a basis for
deciding how much to pay for additional unit of resources.
18
Post-optimality Analysis
(Sensitivity Analysis)
19
Sensitivity analysis is analysis of the parameter changes
and their effects on the model solution.
Involves
An examination of the potential impact of changes in any of the
parameters of a problem (e.g., a change in the amount of scarce
resource available).
When LP models are formulated, the input data of the model (also
called parameters) implicitly assumed constant and known with
certainty during a planning period. In reality the model parameters
are simply estimates that are subject to change.
Instead of resolving the entire problem as a new problem with
new parameters, we may consider the original optimal solution as
an initial solution for the purpose of knowing the ranges, within
which a parameter may assume a value.
20
For instance, a manager may want to consider obtaining an
additional amount of scarce resource that might be available, in
which case the manager would want to know the answers to
questions such as:
Will an increase in the right hand side of this constraint affect the
objective function? If so, how much of the resource can be used?
Given the answer to the preceding question, what will be the
revised optimal solution?
To demonstrate sensitivity analysis, the microcomputer example will
again be used.
Maximize Z: 60x1 + 50x2
Subject to: Assembly time 4x1 + 10x2 ≤ 100
Inspection time 2x1 + 1x2 ≤ 22
Storage space 3x1 + 3x2 ≤ 39
21
X1 , X 2 ≥ 0
1. A change in the RHS of a Constraint
Our analysis in RHS change begins with the shadow prices.
Shadow prices are the values in the Z-row of slack columns.
The final tableau for the microcomputer is shown in the
following table since sensitivity analysis starts from final
tableau.
22
An increase in the amount of assembly time would
have no effect on profit; if inspection time is increased
by one hour, it will increase the profit by $10, and if
storage space is increased by 1 cubic foot, profit would
increase by $40/3. The reverse also holds. If we
decrease them by such respective amounts, the decrease
in profit will take the same figure.
Shadow prices do not tell us the extents to which the
level of a scarce resource can be changed and still have
the same impact per unit
Range of feasibility, or the right hand side range: The
range over which we can change the right hand side
23 quantities and still have the same shadow price.
Range of Feasibility (Right hand side range)
Feasibility Ratio =
For a less than or equal to constraint,
The allowable decrease = smallest positive ratio of quantity to
substitution rate.
The allowable increase = the negative ratio closest to zero for
quantity divided by substitution rate.
For a greater than or equal to constraint, the opposite is true.
For example, for the storage column values, the resulting ratios
are:
24 = -4.5 9 = -27 4= +6
-16/3 -⅓ ⅔
Then,
27
2. A change in the objective function coefficient
There are two cases: Changes for a variable that is not
currently in the solution, and Changes for a variable that is
currently in the solution mix.
Range of insignificance : The range over which a non-
basic variable’s objective function coefficient can change
without causing that variable to enter the solution mix
In a maximization problem
If a variable is not currently in solution its objective function
coefficient would have to increase by an amount that exceeds the
Cj-Z value for that variable in the final tableau in order for it to
enter as a basic variable in the optimal solution.
Any lesser value of its objective function coefficient would keep
28
it out of solution.
Cont’d
In a minimization problem if a variable is not in solution, its
objective function coefficient would have to decrease by an
amount that exceeds the Cj-Z value for that variable in the
final tableau in order for it to end up as a basic variable in
the optimal solution.
Example
Maximize 3x1 + 2x2 + 5x3
Subject to:
C1 x + 2x + 2x ≤ 18
C2 3x + 2x + 6x ≤ 12
C3 2x + 3x + 4x ≤ 12
x ,x x , ≥ 0
29
Cont’d
32
Cont’d
The smallest positive ratio is +40. Therefore, the coefficient
of X1 can be increased by Birr 40 without changing the
optimal solution.
The upper end of its range of optimality is this amount
added to its current (original) value. Thus, its upper end is
(Birr 60 +Birr 40) = Birr 100.
The smallest negative ratio is -10; therefore, the x1
coefficient can be decreased by as much as Birr10 from its
current value, making the lower end of the range equal to
(Birr 60 - Birr10 )= Birr 50.
33
Cont’d
The smallest positive ration is +10. This tells us that the x 2 coefficient in
the objective function could be increased by Birr10 to (Birr50 + Birr10)
= Birr 60. The smallest negative ratio is -20, which tells us that the x 2
coefficient could be decreased by Birr20 to (Birr50 - Birr20) = Birr30.
Hence, the range of optimality for the objective function coefficient of
x2 is Birr30 to Birr 60.
The alternative method can also be done in the same way by using the
concept of change starting from the final tableau.
Consider a ∆ change for c1. This will change the c1 value from c1=60 to
c1=60+ ∆ .
34
Cont’d
The solution becomes optimal as long as the Cj –Zj row values
remain negative. If Cj-Zj becomes positive, the product mix will
change, if it becomes zero, there will be an alternative solution.
Thus, for the solution to remain uniquely optimal, -10- ∆ < 0 and (-
40+ ∆ )/3 < 0
- 10- ∆ < 0 ------------ ∆ > -10
(-40+ ∆ )/3 < 0------- ∆ < 40
Now recall that c1=60+ ∆ ; therefore ∆ = c1-60. Now substituting c1-
60 for ∆ in the above inequalities, we get:
C1-60 > -10-------- C1> 50
C1-60 < 40--------- C1<100
Therefore, the range of values for C 1 over which the solution basis
remain optimal (although) the value of the objective function may
35
change) is: 50<C1<100
Exercise
Max z = 5x1+10x2+8x3
Subject to:
3x1+5x2+2x3 ≤ 60
4x1+4x2+4x3 ≤ 72
2x1+4x2+5x2 ≤ 100
Based on the optimal solution obtained above;
Determine the range of insignificance.
Determine the range of optimality using both
methods
36
Any Question?
37