Title: AED Economics 702: Computational Economics
1AED Economics 702 Computational
Economics Sensitivity Analysis and
Duality Winston Venkataramanan Chapters 5 6
2A Graphical Approach to Sensitivity Analysis
- Sensitivity analysis is concerned with how
changes in an LPs parameters affect the optimal
solution.
max z 3x1 2x2 2 x1 x2 100 (finishing
constraint) x1 x2 80 (carpentry
constraint) x1 40 (demand
constraint) x1,x2 0 (sign
restriction)
- Back to the Giapetto problem from Chapter 3 shown
to the right
Where x1 number of soldiers (Guns) produced
each week x2 number of trains (Butter)
produced each week.
3A Graphical Approach to Sensitivity Analysis
The optimal solution for this LP is z 180, x1
20, x2 60 (point B in the figure to the right)
and it has x1, x2, and s3 (the slack variable for
the demand constraint) as basic variables. How
would changes in the problems objective function
coefficients or right-hand side values change
this optimal solution?
4Objective Function Coefficients
By inspection, we can see that making the slope
of the isoprofit line more negative than the
finishing constraint (slope -2) will cause the
optimal point to switch from point B to point C.
X1 is relatively more valuable than
X2 Likewise, making the slope of the isoprofit
line less negative than the carpentry constraint
(slope -1) will cause the optimal point to
switch from point B to point A. X1 becomes
relatively less valuable than X2 Clearly, the
slope of the isoprofit line must be between -2
and -1 for the current bfs to remain optimal.
5How does the Value of the Objective Function
Change?
- The values of the contribution to profit for
soldiers (x1) for which the current optimal basis
(x1,x2,s3) will remain optimal can be determined
as follows - Let c1 be the contribution (3 per soldier) to
the profit. For what values of c1 does the
current basis remain optimal?
At present c1 3 and each isoprofit line has the
form
3x1 2x2 constant
Rearranging
Since -2 lt slope lt -1
Note the profit will change in this range of c1
Solving for c1 yields
6One More or One less Resource Available
- Graphical Analysis of the Effect of a Change in
RHS on the LPs Optimal Solution (using the
Giapetto problem).
A graphical analysis can also be used to
determine whether a change in the rhs of a
constraint will make the current basis no longer
optimal. For example, let b1 number of
available finishing hours. The current optimal
solution (point B) is where the carpentry and
finishing constraints are binding. If the value
of b1 is changed, then as long as the carpentry
and finishing constraints remain binding, the
optimal solution will still occur at their point
of intersection. (read WV section 5.1 carefully)
7The range of feasibility for a RHS
In the Giapetto problem, we see that if b1 gt 120,
x1 will be greater than 40 and will violate the
demand constraint. Also, if b1 lt 80, x1 will be
less than 0 and the nonnegativity constraint for
x1 will be violated. Therefore 80 b1 120 The
current basis remains optimal for 80 b1 120,
but the decision variable values and z-value will
change.
8Shadow Price as the Opportunity Price / Cost
- Shadow Prices (using the Giapetto problem)
- It is often important to determine how a change
in a constraints rhs changes the LPs optimal
z-value (Why?).
The shadow price for the i th constraint of an LP
is the amount by which the optimal z-value is
improved (increased in a max problem or decreased
in a min problem) if the rhs of the i th
constraint is increased by one unit. This
definition applies only if the change in the rhs
of the altered constraint leaves the current
basis optimal.
9Shadow Price as the Opportunity Price / Cost
- Shadow Prices (using the Giapetto problem)
For the finishing constraint, 100 D finishing
hours are available (assuming the current basis
remains optimal). The LPs optimal solution is
then x1 20 D and x2 60 D with z 3x1
2x2 3(20 D) 2(60 - D) 180 D. Thus, as
long as the current basis remains optimal, a
one-unit increase in the number of finishing
hours will increase the optimal z-value by 1.
So, the shadow price for the first (finishing
hours) constraint is 1.
10Why bother with Sensitivity Analysis?
- Sensitivity analysis is important for several
reasons - Values of LP parameters might change. If a
parameter changes, sensitivity analysis shows it
is unnecessary to solve the problem again. For
example in the Giapetto problem, if the profit
contribution of a soldier changes to 3.50,
sensitivity analysis shows the current solution
remains optimal.
11Why bother with Sensitivity Analysis?
- Sensitivity analysis is important for several
reasons - Uncertainty about LP parameters. In the Giapetto
problem for example, if the weekly demand for
soldiers is at least 20, the optimal solution
remains 20 soldiers and 60 trains. Thus, even if
demand for soldiers is uncertain, the company can
be fairly confident that it is still optimal to
produce 20 soldiers and 60 trains.
12Why bother with Sensitivity Analysis?
- Sensitivity analysis is important for several
reasons - Sensitivity analysis can tell us quite a bit
about the inherent dynamics implied in moving
from one model structure to another, where model
structure is defined by model parameters.
13The Computer and Sensitivity Analysis
- If an LP has more than two decision variables,
the range of values for a rhs (or objective
function coefficients) for which the basis
remains optimal becomes difficult to show
graphically. - These ranges can be computed by hand but this is
often tedious, so they are usually determined by
a packaged computer program. LINGO will be used
and the interpretation of its sensitivity
analysis discussed.
14The Computer and Sensitivity Analysis
- Consider the following maximization problem.
Winco sells four types of products. The
resources needed to produce one unit of each are
To meet customer demand, exactly 950 total units
must be produced. Customers demand that at least
400 units of product 4 be produced. Formulate an
LP to maximize profit. Let xi number of units
of product i produced by Winco.
15The Computer and Sensitivity Analysis
max z 4x1 6x2 7x3 8x4 s.t. x1 x2
x3 x4 950 x4 400
2x1 3x2 4x3 7x4 4600 3x1 4x2
5x3 6x4 5000 x1,x2,x3,x4
0
16The Computer and Sensitivity Analysis
MAX 4 X1 6 X2 7 X3 8 X4 SUBJECT TO
2) X1 X2 X3 X4 950 3)
X4 gt 400 4) 2 X1 3 X2 4 X3
7 X4 lt 4600 5) 3 X1 4 X2 5 X3
6 X4 lt 5000 END LP OPTIMUM FOUND AT STEP
4 OBJECTIVE FUNCTION VALUE 1)
6650.000 VARIABLE VALUE
REDUCED COST X1
0.000000 1.000000 X2
400.000000 0.000000 X3
150.000000 0.000000 X4
400.000000 0.000000 ROW
SLACK OR SURPLUS DUAL PRICES
2) 0.000000 3.000000
3) 0.000000 -2.000000
4) 0.000000 1.000000
5) 250.000000 0.000000 NO.
ITERATIONS 4
LINGO output and sensitivity analysis example(s).
Reduced cost is the amount the objective
function coefficient for variable i would have to
be increased for there to be an alternative
optimal solution.
17The Computer and Sensitivity Analysis
RANGES IN WHICH THE BASIS IS UNCHANGED
OBJ COEFFICIENT RANGES
VARIABLE CURRENT ALLOWABLE
ALLOWABLE COEF
INCREASE DECREASE
X1 4.000000 1.000000
INFINITY X2 6.000000
0.666667 0.500000
X3 7.000000 1.000000
0.500000 X4 8.000000
2.000000 INFINITY
RIGHTHAND SIDE RANGES ROW
CURRENT ALLOWABLE
ALLOWABLE RHS
INCREASE DECREASE
2 950.000000 50.000000
100.000000 3 400.000000
37.500000 125.000000
4 4600.000000 250.000000
150.000000 5
5000.000000 INFINITY
250.000000
LINGO sensitivity analysis example(s).
Allowable range (w/o changing basis) for the x2
coefficient (c2) is 5.50 c2 6.667
Allowable range (w/o changing basis) for the rhs
(b1) of the first constraint is 850 b1 1000
18The Computer and Sensitivity Analysis
MAX 4 X1 6 X2 7 X3 8 X4 SUBJECT TO
2) X1 X2 X3 X4 950 3)
X4 gt 400 4) 2 X1 3 X2 4 X3
7 X4 lt 4600 5) 3 X1 4 X2 5 X3
6 X4 lt 5000 END LP OPTIMUM FOUND AT STEP
4 OBJECTIVE FUNCTION VALUE 1)
6650.000 VARIABLE VALUE
REDUCED COST X1
0.000000 1.000000 X2
400.000000 0.000000 X3
150.000000 0.000000 X4
400.000000 0.000000 ROW
SLACK OR SURPLUS DUAL PRICES
2) 0.000000 3.000000
3) 0.000000 -2.000000
4) 0.000000 1.000000
5) 250.000000 0.000000 NO.
ITERATIONS 4
Shadow prices are shown in the Dual Prices
section of LINGO output.
Shadow prices are the amount the optimal z-value
improves if the rhs of a constraint is increased
by one unit (assuming no change in basis).
19The Computer and Sensitivity Analysis
- Interpretation of shadow prices for the Winco LP
ROW SLACK OR SURPLUS DUAL PRICES
2) 0.000000
3.000000 (overall demand) 3)
0.000000 -2.000000
(product 4 demand) 4) 0.000000
1.000000 (raw material
availability) 5) 250.000000
0.000000 (labor availability)
Assuming the allowable range of the rhs is not
violated, shadow (Dual) prices show 3 for
constraint 1 implies that each one-unit increase
in total demand will increase net sales by 3.
The -2 for constraint 2 implies that each unit
increase in the requirement for product 4 will
decrease revenue by 2. The 1 shadow price for
constraint 3 implies an additional unit of raw
material (at no cost) increases total revenue by
1. Finally, constraint 4 implies any additional
labor (at no cost) will not improve total revenue.
20The Computer and Sensitivity Analysis
- Constraints with ³ symbols will always have
nonpositive shadow prices. - Constraints with will always have nonnegative
shadow prices. - Equality constraints may have a positive, a
negative, or a zero shadow price.
21The Computer and Sensitivity Analysis
- Sensitivity Analysis and Slack / Excess Variables
For any inequality constraint, the product of the
values of the constraints slack/excess variable
and the constraints shadow price must equal
zero. This implies that any constraint whose
slack or excess variable gt 0 will have a zero
shadow price. Similarly, any constraint with a
nonzero shadow price must be binding (have slack
or excess equaling zero). For constraints with
nonzero slack or excess, relationships are
detailed in the table below
22The Computer and Sensitivity Analysis
- Degeneracy and Sensitivity Analysis
When the optimal solution is degenerate (a bfs is
degenerate if at least one basic variable in the
optimal solution equals 0), caution must be used
when interpreting the LINGO output. (Why??)
For an LP with m constraints, if the optimal
LINGO output indicates less than m variables are
positive, then the optimal solution is degenerate
bfs. Consider the LINDO LP formulation shown to
the right and the LINDO output on the next slide.
MAX 6 X1 4 X2 3 X3 2 X4 SUBJECT TO
2) 2 X1 3 X2 X3 2 X4 lt 400
3) X1 X2 2 X3 X4 lt 150 4)
2 X1 X2 X3 0.5 X4 lt 200 5)
3 X1 X2 X4 lt 250
23The Computer and Sensitivity Analysis
Since the LP has four constraints and in the
optimal solution only two variables are positive,
the optimal solution is a degenerate bfs.
LP OPTIMUM FOUND AT STEP 3
OBJECTIVE FUNCTION VALUE 1)
700.0000 VARIABLE VALUE
REDUCED COST X1 50.000000
0.000000 X2 100.000000
0.000000 X3 0.000000
0.000000 X4 0.000000
1.500000 ROW SLACK OR SURPLUS DUAL
PRICES 2) 0.000000
0.500000 3) 0.000000
1.250000 4) 0.000000
0.000000 5) 0.000000
1.250000
24The Computer and Sensitivity Analysis
RANGES IN WHICH THE BASIS IS UNCHANGED
OBJ COEFFICIENT
RANGES VARIABLE CURRENT ALLOWABLE
ALLOWABLE COEF
INCREASE DECREASE X1
6.000000 3.000000
3.000000 X2 4.000000
5.000000 1.000000 X3
3.000000 3.000000
2.142857 X4 2.000000
1.500000 INFINITY
RIGHTHAND SIDE RANGES
ROW CURRENT ALLOWABLE
ALLOWABLE RHS
INCREASE DECREASE
2 400.000000 0.000000
200.000000 3
150.000000 0.000000
0.000000 4 200.000000
INFINITY 0.000000
5 250.000000 0.000000
120.000000
25The Computer and Sensitivity Analysis
- Oddities that may occur when the optimal solution
found by LINGO is degenerate are - In the RANGE IN WHICH THE BASIS IS UNCHANGED at
least one constraint will have a 0 A.I. or A.D..
This means that for at least one constraint the
DUAL PRICE can tell us about the new z-value for
either an increase or decrease in the rhs, but
not both. - For a nonbasic variable to become positive, a
nonbasic variables objective function
coefficient may have to be improved by more than
its RECDUCED COST. - Increasing a variables objective function
coefficient by more than its AI or decreasing it
by more than its AD may leave the optimal
solution the same.
26Economic / Managerial Use of Shadow Prices
The significance of shadow prices is that they
can often be used to determine the maximum amount
a manger should be willing to pay for an
additional unit of a resource. Reconsider the
Winco to the right. What is the most Winco
should be willing to pay for additional units of
raw material or labor?
MAX 4 X1 6 X2 7 X3 8 X4 SUBJECT TO
2) X1 X2 X3 X4 950 3)
X4 gt 400 4) 2 X1 3 X2 4 X3
7 X4 lt 4600 5) 3 X1 4 X2 5 X3
6 X4 lt 5000 END LP OPTIMUM FOUND AT STEP
4 OBJECTIVE FUNCTION VALUE 1)
6650.000 VARIABLE VALUE
REDUCED COST X1
0.000000 1.000000 X2
400.000000 0.000000 X3
150.000000 0.000000 X4
400.000000 0.000000 ROW
SLACK OR SURPLUS DUAL PRICES
2) 0.000000 3.000000
3) 0.000000 -2.000000
4) 0.000000 1.000000
5) 250.000000 0.000000 NO.
ITERATIONS 4
raw material
labor
27Economic / Managerial Use of Shadow Prices
MAX 4 X1 6 X2 7 X3 8 X4 SUBJECT TO
2) X1 X2 X3 X4 950 3)
X4 gt 400 4) 2 X1 3 X2 4 X3
7 X4 lt 4600 5) 3 X1 4 X2 5 X3
6 X4 lt 5000 END LP OPTIMUM FOUND AT STEP
4 OBJECTIVE FUNCTION VALUE 1)
6650.000 VARIABLE VALUE
REDUCED COST X1
0.000000 1.000000 X2
400.000000 0.000000 X3
150.000000 0.000000 X4
400.000000 0.000000 ROW
SLACK OR SURPLUS DUAL PRICES
2) 0.000000 3.000000
3) 0.000000 -2.000000
4) 0.000000 1.000000
5) 250.000000 0.000000 NO.
ITERATIONS 4
The shadow price for raw material constraint (row
4) shows an extra unit of raw material would
increase revenue 1. Winco could pay up to 1 for
an extra unit of raw material and be as well off
as it is now. Labor constraints (row 5) shadow
price is 0 meaning that an extra hour of labor
will not increase revenue. So, Winco should not
be willing to pay anything for an extra hour of
labor.
28What happens to the Optimal z-Value if the
Current Basis Is No Longer Optimal?
- For any LP, the graph of the optimal objective
function value as a function a rhs will be a
piecewise linear function. The slope of each
straight line segment is the constraints shadow
price. - For lt constraints in a maximization LP, the
slope of each segment must be nonnegative and the
slopes of successive line segments will be
nonincreasing. - For a gt constraint, in a maximization problem,
the graph of the optimal function will again be
piecewise linear function. The slope of each
line segment will be nonpositive and the slopes
of successive segments will be nonincreasing
29What happens to the Optimal z-Value if the
Current Basis Is No Longer Optimal?
- Effect of change in Objective Function
Coefficient on Optimal z-value
A graph of the optimal objective function value
as a function of a variables objective function
coefficient can be created. Consider again the
Giapetto LP shown to the right.
max z 3x1 2x2 2 x1 x2 100 (finishing
constraint) x1 x2 80 (carpentry
constraint) x1 40 (demand
constraint) x1,x2 0 (sign
restriction)
Let c1 objective coefficient of x1. Currently,
c1 3 and we want to determine how the optimal
z-value depend upon c1..
30What happens to the Optimal z-Value if the
Current Basis Is No Longer Optimal?
- Recall from the Giapetto problem, if the
isoprofit line is flatter than the carpentry
constraint, Point A(0,80) is optimal. Point
B(20,60) is optimal if the isoprofit line is
steeper than the carpentry constraint but flatter
than the finishing constraint. Finally, Point
C(40,20) is optimal if the slope of the isoprofit
line is steeper than the slope of the finishing
constraint. Since a typical isoprofit line is
c1x1 2x2 k, we know the slope of the
isoprofit line is just -c1/2. This implies - Point A is optimal if -c1/2 -1 or 0 c1 2 (
-1 is the carpentry constraint slope). - Point B is optimal if -2 -c1/2 -1 or 2 c1
4 (between the slopes of the carpentry and
finishing constraint slopes). - Point C is optimal if -c1/2 -2 or c1 4 ( -2
is the finishing constraint slope). - This piecewise function is shown on the next page.
31What happens to the Optimal z-Value if the
Current Basis Is No Longer Optimal?
In a maximization LP, the slope of the graph of
the optimal z-value as a function of an objective
function coefficient will be nondecreasing. In a
minimization LP, the slope of the graph of the
optimal z-value as a function of an objective
function coefficient will be nonincreasing.
32The 100 Rule(WV Section 6.4)
100 Rule for Changing Objective Function
Coefficients Depending on whether the objective
function coefficient of any variable with a zero
reduced cost in the optimal tableau is changed,
there are two cases to consider Case 1 All
variables whose objective function coefficients
are changed have nonzero reduced costs in the
optimal row 0. The current basis remains optimal
if and only if the objective function coefficient
for each variable remains within the allowable
range given on the LINDO printout. If the
current basis remains optimal, both the values of
the decision variables and objective function
remain unchanged. If the objective coefficient
for any variable is outside the allowable range,
the current basis is no longer optimal. Case 2
at least one variable whose objective function
coefficient is changed has a reduced cost of
zero.
33The 100 Rule(WV Section 6.4)
100 Rule for Changing Objective Function
Coefficients Depending on whether the objective
function coefficient of any variable with a zero
reduced cost in the optimal tableau is changed,
there are two cases to consider Case 1 All
variables whose objective function coefficients
are changed have nonzero reduced costs in the
optimal row 0. The current basis remains
optimal if and only if the objective function
coefficient for each variable remains within the
allowable range as shown on the LINDO printout.
If the current basis remains optimal, both the
values of the decision variables and objective
function remain unchanged. If the objective
coefficient for any variable is outside its
allowable range, the current basis is no longer
optimal.
34The 100 Rule(WV Section 6.4)
Case 2 at least one variable whose objective
function coefficient is changed has a reduced
cost of zero. In this case the 100 rule must be
applied
35The 100 Rule and RHSs
The 100 Rule for Changing Right-Hand Sides Case
1 All constraints whose rhs are being modified
are non-binding. The current basis remains
optimal if and only if each rhs remains within
its allowable range. Case 2 At least one of the
constraints whose right-hand side is being
modified is a binding constraint (that is, has
zero slack or excess). This case requires
application of the 100 rule to the changes in
the rhs coefficients. Same decision rule applies.
36Finding the Dual of an LP (WV Section 6.5 and
6.6)
- Associated with any LP is another LP called the
dual. Knowledge of the dual provides interesting
economic and sensitivity analysis insights. - When taking the dual of any LP, the given LP is
referred to as the primal. If the primal is a
max problem, the dual will be a min problem and
visa versa.
Define the variables for a max problem to be z,
x1, x2, ,xn and the variables for a min problem
to be w, y1, y2, , yn. Finding the dual to a
max problem in which all the variables are
required to be nonnegative and all the
constraints are constraints (called normal or
standard max problem) is shown on the next
slide.
37The Normal or Standard Form of the LP model
- A maximization linear program is said to be in
standard form if all constraints are "less than
or equal to" constraints and the decision
variables are non-negative. - A minimization linear program is said to be in
standard form if all constraints are "greater
than or equal to" constraints and the decision
variables are non-negative.
38Standard Form and Constraints
- Convert any linear program to a maximization
problem in standard form as follows - minimization objective function
- multiply it by -1
- "less than or equal to" constraint
- leave it alone
- "greater than or equal to" constraint
- multiply it by -1
- "equal to" constraint
- form two constraints, one "less than or equal
to", the other "greater or equal to" then
multiply this "greater than or equal to"
constraint by -1.
39Standard Form and the Primal and Dual Problem
- Reminder - Every linear program (called the
primal) has associated with it another linear
program called the dual. - The dual of a maximization problem in standard
form is a minimization problem in standard form.
- The rows and columns of the two programs are
interchanged and hence the objective function
coefficients of one are the right hand side
values of the other and vice versa. - The optimal value of the objective function of
the primal problem equals the optimal value of
the objective function of the dual problem. - Solving the dual might be computationally more
efficient when the primal has numerous
constraints and few variables.
40An Example
- Linear Programming Formulation
- Max 2x1 x2
3x3 - s.t. x1
2x2 3x3 lt 15 - 3x1
4x2 6x3 gt 24 - x1
x2 x3 10 - x1,
x2, x3 gt 0
41An Example
- Primal Model in Standard Form
- Constraint (1) is a "lt" constraint. Leave it
alone. - Constraint (2) is a "gt" constraint. Multiply it
by -1. - Constraint (3) is an "" constraint. Rewrite
this as two constraints, one a "lt", the other a
"gt" constraint. Then multiply the "gt" constraint
by -1.
42Finding the Dual of an LP
max z c1x1 c2x2 cnxn s.t. a11x1 a12x2
a1nxn b1 a21x1 a22x2 a2nxn
b2 am1x1
am2x2 amnxn bm xj 0 (j 1, 2, ,n)
Standard max problem Its dual
min w b1y1 b2y2 bmym s.t. a11y1
a12y2 am1ym c1 a21y1 a22y2
am2ym c2
a1ny1 a2ny2 amnym
cn yi 0 (i 1, 2, ,m)
Standard min problem Its dual
43Economic Interpretation of the Dual Problem
- Interpreting the Dual of a the Dakota (Max)
Problem
The primal is max z 60x1 30x2 20x3
s.t. 8x1 6x2 x3 48
(Lumber constraint) 4x1 2x2 1.5x3
20 (Finishing constraint)
2x1 1.5x2 0.5x3 8 (Carpentry
constraint)
x1, x2, x3 0
The dual is min w 48y1 20y2 8y3
s.t. 8y1 4y2 2y3 60 (Desk
constraint) 6y1 2y2 1.5y3
30 (Table constraint) y1 1.5y2 0.5y3
20 (Chair constraint) y1, y2, y3 0
44Economic Interpretation of the Dual Problem
The dual is min w 48 y1 20y2 8y3
s.t. 8y1 4y2 2y3 60 (Desk
constraint) 6y1 2y2 1.5y3
30 (Table constraint) y1 1.5y2 0.5y3
20 (Chair constraint) y1, y2, y3 0
Relevant information about the Dakota problem
dual is shown below.
45Economic Interpretation of the Dual Problem
The first dual constraint is associated with
desks, the second with tables, and the third with
chairs. Decision variable y1 is associated with
lumber, y2 with finishing hours, and y3 with
carpentry hours. Suppose an entrepreneur wants to
purchase all of Dakotas resources. The
entrepreneur must determine the price he or she
is willing to pay for a unit of each of Dakotas
resources.
To determine these prices we define y1 price
paid for 1 boards ft of lumber y2 price paid
for 1 finishing hour y3 price paid for 1
carpentry hour The resource prices y1, y2, and y3
should be determined by solving the Dakota dual.
46Economic Interpretation of the Dual Problem
The total price that should be paid for these
resources is 48 y1 20y2 8y3. Since the cost
of purchasing the resources is to minimized min
w 48y1 20y2 8y3 is the objective function
for the Dakota dual. In setting resource prices,
the prices must be high enough to induce Dakota
to sell. For example, the entrepreneur must
offer Dakota at least 60 for a combination of
resources that includes 8 board feet of lumber, 4
finishing hours, and 2 carpentry hours because
Dakota could, if it wished, use the resources to
produce a desk that could be sold for 60. Since
the entrepreneur is offering 8y1 4y2 2y3 for
the resources used to produce a desk, he or she
must chose y1, y2, and y3 to satisfy 8y1
4y2 2y3 60
47Economic Interpretation of the Dual Problem
Similar reasoning shows that at least 30 must be
paid for the resources used to produce a table.
Thus y1, y2, and y3 must satisfy 6y1 2y2
1.5y3 30 Likewise, at least 20 must be paid
for the combination of resources used to produce
one chair. Thus y1, y2, and y3 must satisfy y1
1.5y2 0.5y3 20 The solution to the Dakota
dual yields prices for lumber, finishing hours,
and carpentry hours.
In summary, when the primal is a standard max
problem, the dual variables are related to the
value of resources available to the decision
maker. For this reason, dual variables are often
referred to as resource shadow prices.
48Complementary Slackness
Complementary Slackness is a concept that relates
the primal and dual forms of the LP together.
Consider the model of Dakota problem 6.5
The primal is max z 60x1 30x2 20x3
s.t. 8x1 6x2 x3 48
(Lumber constraint) 4x1 2x2 1.5x3
20 (Finishing constraint)
2x1 1.5x2 0.5x3 8 (Carpentry
constraint)
x1, x2, x3 0
The dual is min w 48y1 20y2 8y3
s.t. 8y1 4y2 2y3 60 (Desk
constraint) 6y1 2y2 1.5y3
30 (Table constraint) y1 1.5y2 0.5y3
20 (Chair constraint) y1, y2, y3 0
49Complementary Slackness
- The optimal primal solution for the Dakota (Max)
Problem
The optimal dual solution for the Dakota (Min)
Problem
The Complementary Slackness Theorem Let X
x1, x2, , xn be a feasible primal solution
and y y1,y2,ym be a feasible dual
solution. Then X is primal optimal and Y is dual
optimal if and only if siyi 0 (I 1,2, ,
m) ejxj 0 (j 1,2, , n)
50Economic Interpretation of the CS Theorem
Complementary Slackness - If a constraint in
either the primal or the dual is non-binding then
the corresponding variable in the other
(complementary) problem must equal
0. Interpretation of the CS condition siyi 0
(i 1,2, , m)
Positive slack, si, in a primal constraint means
that the dual variable, yj in is zero and
therefore its shadow price must be zero. Slack
in the lumber constraint, sigt0, means that excess
lumber would not be used so an extra board foot
of lumber has a zero value. If a primal dual
variable, yj, is positive, then sj must be zero.
Recall that the yjs are the resource shadow
prices, then with y2 10, an extra finishing
hour has value and therefore its constraint is
binding and s2 in the primal optimal solution
must be zero.
51Economic Interpretation of the CS Theorem
Complementary Slackness - If a constraint in
either the primal or the dual is non-binding then
the corresponding variable in the other
(complementary) problem must equal
0. Interpretation of the CS condition ejxj 0
(j 1,2, , n)
Positive excess, ej, in a dual constraint means
that the primal variable, xj in is zero and
therefore optimal value must be zero. Excess in
the dual table constraint, ejgt0, means that value
of resources used to produce tables, x2, exceeds
the market price of a table and therefore zero
tables should be produced. If a primal variable,
xj, is positive, then ej must be zero. For any
xj in the optimal primal basis, the marginal
revenue from one unit of xj must equal the
marginal cost of the resources used to produce
one unit of xj. Yes, Virginia, Marginal Revenue
must equal Marginal Cost, especially in the LP
world. Lets check this out for Desks
52Dakota Furniture An Example of the Complementary
Slackness Theorem
- The optimal primal solution for the Dakota (Max)
Problem
The optimal dual solution for the Dakota (Min)
Problem
Marginal revenue from producing one desk, x1
60 Marginal Cost (at resource shadow prices) of
one desk 60 Lumber 8 x 0 0 Finishing
hours 4 x 10 40 Carpentry hours 2 x 10
20 Desk Marginal Revenue Desk Marginal Cost