2. In LP, the parameters (input data) of the model can
change within certain limits without causing the
optimum solution to change. This is referred to as
sensitivity analysis.
Dual analysis deals with determining the new
optimum solution resulting from making targeted
changes in the input data.
3.1 – Sensitivity Analysis
2
3. In this section two cases will be considered.
1. Sensitivity of the optimum solution to changes in the
availability of the resources (right-hand side of the
constraints).
2. Sensitivity of the optimum solution to changes in
unit profit or unit cost (coefficients of the objective
function).
3
3.1.1 – Graphical Sensitivity Analysis
4. Example 3.1 (Changes in the right hand side)
JOBCO produces two products on two machines. A unit of
product 1 requires 2 hours on machine 1 and 1 hour on
machine 2. For product 2, a unit requires 1 hour on
machine 1 and 3 hours on machine 2. The revenues per
unit of products 1 and 2 are $30 and $20, respectively. The
total daily processing time available for each machine is 8
hours.
Let X1 and X2 represent the daily number of units of
products 1 and 2, respectively.
4
3.1.1 – Graphical Sensitivity Analysis
5. Solution:
The LP model is given as
Maximize z = 30X1 + 20X2
s.t.
2X1 + X2 ≤ 8 (Machine 1)
X1 + 3X2 ≤ 8 (Machine 2)
X1 , X2 ≥ 0 -----
Figure 3.1 illustrates the change in the optimum
solution when changes are made in the capacity of
machine 1.
5
3.1.1 – Graphical Sensitivity Analysis
6. If the daily
capacity is
increased from
8 hours to 9
hours, the new
optimum will
occur at point
G.
6
3.1.1 – Graphical Sensitivity Analysis
Figure 3.1
7. The rate of change in optimum z resulting from changing
machine 1 capacity from 8 hours to 9 hours can be
computed as follows:
The computed rate provides a direct link between the model
input (resources) and its output (total revenue). It says that a
unit increase (decrease) in machine 1 capacity will increase
(decrease) revenue by $14.
7
3.1.1 – Graphical Sensitivity Analysis
Rate of revenue change
resulting from incresing
machine 1 capacity by 1 hr
(point C to point G)
=
𝑧𝐺 − 𝑧𝐶
(capacity change)
=
142 − 128
9 − 8
= $14 /hr
8. The name unit worth of a resource is an apt
description of the rate of change of the objective
function per unit change of a resource. Now it is
called dual (or shadow) price.
In Fig. 3.1 it can be seen that the dual price of
$14.00/hr remains valid for changes (increases or
decreases) in machine 1 capacity that move its
constraint parallel to itself to any point on the line
segment BF. This means that the range of applicability
of the given dual price can be computed as follows:
8
3.1.1 – Graphical Sensitivity Analysis
9. Minimum machine 1 capacity [at B = (0, 2.67)]
= 2 × 0 + 1 × 2.67 = 2.67 hr
Maximum machine 1 capacity [at F = (8, 0)]
= 2 × 8 + 1 × 0 = 16 hr
The conclusion is that the dual price of $14/hr will remain
valid for the range
2.67 hr ≤ Machine 1 capacity ≤ 16 hr
Changes outside this range will produce a different dual
price (worth per unit).
9
3.1.1 – Graphical Sensitivity Analysis
11. By using similar computations, the dual price for machine 2
capacity is $2.00/hr and it remains valid for changes (increases
or decreases) that move its constraint parallel to itself to any
point on the line segment DE, which yields the following
limits:
11
3.1.1 – Graphical Sensitivity Analysis
Capacity of M2
𝒙𝟏 + 𝟑𝒙𝟐
Z-value
𝟑𝟎𝒙𝟏 + 𝟐𝟎𝒙𝟐
D = (4, 0) 4 + 3 0 = 4 30 4 + 20 0 = 120
E = (0, 8) 0 + 3 8 = 24 30 0 + 20 8 = 160
Dual price =
∆ 𝑧_value
∆ capacity 𝑀2
=
160 − 120
24 − 4
= $2/ℎ𝑟
feasibility range: 4 ≤ capacity of 𝑀2 ≤ 24
12. The conclusion is that the dual price of $2.00/hr for
machine 2 will remain applicable for the range
4 hr ≤ Machine 2 capacity ≤ 24 hr
The computed limits for machine 1 and 2 are referred
to as the feasibility ranges.
The dual prices allow making economic decisions
about the LP problem, as the following questions
demonstrate:
12
3.1.1 – Graphical Sensitivity Analysis
13. Question 1. If JOBCO can increase the capacity of both
machines, which machine should receive priority?
Question 2. A suggestion is made to increase the
capacities of machines 1 and 2 at the additional cost of
$10/hr. Is this advisable?
13
3.1.1 – Graphical Sensitivity Analysis
14. Question 3. If the capacity of machine 1 is increased
from the present 8 hours to 13 hours, how will this
increase impact the optimum revenue?
14
3.1.1 – Graphical Sensitivity Analysis
15. Question 4. Suppose that the capacity of machine 1 is
increased to 20 hours, how will this increase impact the
optimum revenue?
Remember that falling outside the feasibility range does
not mean that the problem has no solution. It only means
that available information is not sufficient to make a
complete decision.
15
3.1.1 – Graphical Sensitivity Analysis
16. Question 5. The change in the optimum objective value
equals (dual price × change in resource) so long as the
change in the resource is within the feasibility range. How
can we determine the new optimum values of the variables
associated with a change in a resource?
16
3.1.1 – Graphical Sensitivity Analysis
17. Example 3.2 (Changes in the objective coefficient)
Fig. 3.2 shows the graphical solution space of the
JOBCO problem in Example 3.1. The optimum occurs
at point C (X1 = 3.2, X2 = 1.6, Z = 128). Changes in
revenue units (i.e., objective-function coefficients)
will change the slope of z. However, as can be seen
from the figure, the optimum solution at point C
remains unchanged as long as the objective function
lies between lines BF and DE, the two constraints that
define the optimum point.
17
3.1.1 – Graphical Sensitivity Analysis
18. This means that
there is a range
for the
coefficients of the
objective function
that will keep the
optimum solution
unchanged at C.
18
3.1.1 – Graphical Sensitivity Analysis
Figure 3.2
19. To determine ranges for the coefficients of the
objective function that keep the optimum solution
unchanged at point C , first write the objective
function can in the general format
Maximize z = c1 X1 + c2 X2
Imagine now that the line z is pivoted at C and that it
can rotate clockwise and counterclockwise.
The optimum solution will remain at point C so long
as z = c1 X1 + c2 X2 lies between the two lines X1 +
3X2 =8 and 2X1 + X2 = 8.
19
3.1.1 – Graphical Sensitivity Analysis
20. This means that the ratio c1/c2 can vary between 1/3
and 2/1 , which yields the following optimality
range.
This information can provide immediate answers
regarding the optimum solution as the following
questions demonstrate:
20
3.1.1 – Graphical Sensitivity Analysis
1
3
≤
𝑐1
𝑐2
≤
2
1
or 0.333 ≤
𝑐1
𝑐2
≤ 2
21. Question 1. Suppose that the unit revenues for
products 1 and 2 are changed to $35 and $25,
respectively. Will the current optimum remain the
same?
21
3.1.1 – Graphical Sensitivity Analysis
22. Question 2. Suppose that the unit revenue of product
2 is fixed at its current value c2 = $20. What is the
associated optimality range for the unit revenue for
product 1, c1 , that will keep the optimum unchanged?
22
3.1.1 – Graphical Sensitivity Analysis
23. Exercise 3.1:
Wild West produces two types of cowboy hats. A Type 1
hat requires twice as much labor time as a Type 2. If all
the available labor time is dedicated to Type 2 alone, the
company can produce a total of 400 Type 2 hats a day. The
respective market limits for the two types are 150 and 200
hats per day. The revenue is $8 per Type 1 hat and $5 per
Type 2 hat.
a) Use the graphical solution to determine the number of
hats of each type that maximizes revenue.
23
3.1.1 – Graphical Sensitivity Analysis
24. b) Determine the dual price of the production capacity (in terms
of the Type 2 hat) and the range for which it is applicable.
c) If the daily demand limit on the Type 1 hat is decreased to
120, use the dual price to determine the corresponding effect
on the optimal revenue.
d) What is the dual price of the market share of the Type 2 hat?
By how much can the market share be increased while
yielding the computed worth per unit?
e) Determine the optimality range for the unit revenue ratio of
the two types of hats that will keep the current optimum
unchanged.
f) Using the information in (e), will the optimal solution change
if the revenue per unit is the same for both types?
24
3.1.1 – Graphical Sensitivity Analysis
27. This section extends the sensitivity analysis to
the general LP model to determine the dual
price by using algebraic calculation.
A numeric example (the TOYCO model) will
be used to facilitate the presentation.
27
3.1.2 – Algebraic Sensitivity Analysis
28. Example 3.3 (TOYCO Model)
TOYCO uses three operations to assemble three types of
toys-trains, trucks, and cars. The daily available times for
the three operations are 430, 460, and 420 minutes,
respectively, and the revenues per unit of toy train, truck,
and car are $3, $2, and $5, respectively. The assembly
times per train at the three operations are 1, 3, and 1
minutes, respectively. The corresponding times per train
and per car are (2,0,4) and (1,2,0) minutes (a zero time
indicates that the operation is not used).
28
3.1.2 – Algebraic Sensitivity Analysis
29. Solution:
Letting X1 , X2 , and X3 represent the daily number of units
assembled of trains, trucks, and cars, respectively, the
associated LP model is given as:
Maximize z = 3X1 + 2X2 + 5X3
s.t.
X1 + 2X2 + X3 ≤ 430 (operation 1)
3X1 + 2X3 ≤ 460 (operation 2)
X1 + 4X2 ≤ 420 (operation 3)
X1 , X2 , X3 ≥ 0 (operation 1)
Using X4 , X5 , and X6 as the slack variables
29
3.1.2 – Algebraic Sensitivity Analysis
30. The optimal tableau is
The solution recommends manufacturing 100 trucks and
230 cars but no trains. The associated revenue is $1350.
30
3.1.2 – Algebraic Sensitivity Analysis
Basic X1 X2 X3 X4 X5 X6 Solution
z 4 0 0 1 2 0 1350
X2 -1/4 1 0 ½ -1/4 0 100
X3 3/2 0 1 0 ½ 0 230
X6 2 0 0 -2 1 1 20
31. Determination of Dual Prices and feasibility
ranges
Recognizing that the dual prices and their feasibility
ranges are rooted in making changes in the right-hand
side of the constraints, suppose that D1 , D2 , and D3
are the (positive or negative) changes made in the
allotted daily manufacturing time of operations 1, 2,
and 3, respectively.
The original TOYCO model can then be changed to
31
3.1.2 – Algebraic Sensitivity Analysis
33. The two shaded areas are identical. Hence, if we repeat the
same simplex iterations as in the original model, the
columns in the two groups will also be identical in the
optimal tableau.
33
3.1.2 – Algebraic Sensitivity Analysis
Solution
Basic X1 X2 X3 X4 X5 X6 RHS D1 D2 D3
z -3 -2 -5 0 0 0 0 0 0 0
X4 1 2 1 1 0 0 430 1 0 0
X5 3 0 2 0 1 0 460 0 1 0
X6 1 4 0 0 0 1 420 0 0 1
34. That is
34
3.1.2 – Algebraic Sensitivity Analysis
Solution
Basic X1 X2 X3 X4 X5 X6 RHS D1 D2 D3
z 4 0 0 1 2 0 1350 1 2 0
X2 -1/4 1 0 ½ -1/4 0 100 ½ -1/4 0
X3 3/2 0 1 0 ½ 0 230 0 ½ 0
X6 2 0 0 -2 1 1 20 -2 1 1
35. The new optimum tableau provides the following
optimal solution:
z = 1350 + D1 + 2D2
X2 = 100 + 1/2D1 – 1/4D2
X3 = 230 + 1/2D2
X6 = 20 - 2D1 + D2 + D3
Now use this solution to determine the dual prices and
the feasibility ranges.
35
3.1.2 – Algebraic Sensitivity Analysis
36. Dual prices:
The value of the objective function can be written as
z = 1350 + 1D1 + 2D2 + 0D3
This means that, by definition, the corresponding dual
prices are 1, 2, and 0 ($/min) for operations 1, 2, and 3,
respectively.
The coefficients of D1 , D2 , and D3 in the optimal z-row
are exactly those of the slack variables X4 , X5 , and X6.
This means that the dual prices equal the coefficients of
the slack variables in the optimal z-row.
36
3.1.2 – Algebraic Sensitivity Analysis
37. Feasibility range:
The current solution remains feasible if all the basic
variables remain nonnegative:
X2 = 100 + 1/2D1 – 1/4D2 ≥ 0
X3 = 230 + 1/2D2 ≥ 0
X6 = 20 - 2D1 + D2 + D3 ≥ 0
Simultaneous changes D1 , D2 , and D3 that satisfy
these inequalities will keep the solution feasible
37
3.1.2 – Algebraic Sensitivity Analysis
38. Suppose that the manufacturing time available for
operations 1, 2, and 3 are 480, 440, and 400 minutes
respectively. Then
D1 =480–430= 50, D2=440 –460=-20, D3=400–420= -20
Substituting in the feasibility conditions
X2 = 100 + ½(50)– ¼(-20)= 130 > 0 Feasible
X3 = 230 + ½(-20)= 220 > 0 Feasible
X6 = 20 – 2(50) + (-20) + (-20)= -120 < 0 Infeasible
38
3.1.2 – Algebraic Sensitivity Analysis
39. If D1 = -30, D2= –12, D3= 10 , then
X2 = 100 + ½(-30)– ¼(-12)= 88 > 0 Feasible
X3 = 230 + ½(-12)= 224 > 0 Feasible
X6 = 20 – 2(-30) + (-12) + (10)= 78 < 0 Feasible
The new optimal solution is X2 = 88, X3 = 224, X6 = 78
with
z = 1350 + 1(-30) + 2(-12) + 0(10) = $1296.
The given conditions can produce the individual feasibility
ranges associated with changing the resources one at a
time.
39
3.1.2 – Algebraic Sensitivity Analysis
40. For example, a change of time only for operation 1 means
that D2 = D3 = 0. So,
X2 = 100 + 1/2D1 ≥ 0
X3 = 230 ≥ 0 -200 ≤ D1 ≤ 10
X6 = 20 - 2D1 ≥ 0
Similarly, -20 ≤ D2 ≤ 400 and -20 ≤ D3 < ∞
40
3.1.2 – Algebraic Sensitivity Analysis
Resource amount (minutes)
Resource Dual price ($) Feasibility range Minimum Current Maximum
Operation 1 1 -200 ≤ D1 ≤ 10 230 430 440
Operation 2 2 -20 ≤ D2 ≤ 400 440 460 860
Operation 3 0 -20 ≤ D3 < ∞ 400 420 ∞
41. Exercise 3.2:
For problem in exercise 1 find dual price and
feasibility ranges.
Maximize z = 8X1 + 5X2
s.t.
2X1 + X2 ≤ 400 + D1
X1 ≤ 150 + D2
X2 ≤ 200 + D3
X1 , X2 ≥ 0
41
3.1.2 – Algebraic Sensitivity Analysis
43. Determination of the optimality ranges -
Changes in objective coefficients
In the TOYCO model, let d1 , d2 , and d3 represent the
change in unit revenues for toy trucks, trains, and cars,
respectively.
Maximize z = 3X1 + 2X2 + 5X3
s.t.
X1 + 2X2 + X3 ≤ 430 (operation 1)
3X1 + 2X3 ≤ 460 (operation 2)
X1 + 4X2 ≤ 420 (operation 3)
X1 , X2 , X3 ≥ 0 (operation 1)
43
3.1.2 – Algebraic Sensitivity Analysis
44. The objective function then becomes
Maximize z = (3+ d1)X1 + (2+ d2)X2 + (5+ d3)X3
With the simultaneous changes, the z-row in the starting
tableau appears as:
44
3.1.2 – Algebraic Sensitivity Analysis
Basic X1 X2 X3 X4 X5 X6 Solution
z -3- d1 -2- d2 -5- d3 0 0 0 0
X4 1 2 1 1 0 0 430
X5 3 0 2 0 1 0 460
X6 1 4 0 0 0 1 420
45. When we generate the simplex tableaus using the
same sequence of entering and leaving variables in the
original model (before the changes dj are introduced),
the optimal iteration will appear as follows
45
3.1.2 – Algebraic Sensitivity Analysis
Basic X1 X2 X3 X4 X5 X6 Solution
z 4-1/4d2 +3/2d3-d1 0 0 1+1/2d2 2-1/4d2 +1/2d3 0
1350+100d2
+230d3
X2 -1/4 1 0 ½ -1/4 0 100
X3 3/2 0 1 0 ½ 0 230
X6 2 0 0 -2 1 1 20
46. The new optimal tableau is the same as in the original
optimal tableau except for the z-equation coefficients. This
means that changes in the objective-function coefficients
can affect the optimality of the problem only.
( Changes in the right-hand side affect feasibility only)
An examination of the new z-row shows that the
coefficients of dj are taken directly from the constraint
coefficients of the optimum tableau. A convenient way for
computing is to add a new top row and a new leftmost
column to the optimum tableau, as shown by the shaded
areas below.
46
3.1.2 – Algebraic Sensitivity Analysis
47. The entries in the top row are the change dj associated
with variable Xj. For the leftmost column, the top element
is 1 in the z-row followed by change dj for basic variable
Xj. Keep in mind that dj = 0 for the slack variables.
z = (3+ d1)X1 + (2+ d2)X2 + (5+ d3)X3
47
3.1.2 – Algebraic Sensitivity Analysis
d1 d2 d3 0 0 0
Basic X1 X2 X3 X4 X5 X6 Solution
1 z 4 0 0 1 2 0 1350
d2 X2 -1/4 1 0 ½ -1/4 0 100
d3 X3 3/2 0 1 0 ½ 0 230
0 X6 2 0 0 -2 1 1 20
48. To compute the new objective coefficients of nonbasic
variables (or the value of z), multiply the elements of
its column by the corresponding elements in the
leftmost column, add them up, and subtract the top-
row element from the sum. For example, for X1 , we
have
Objective coefficient of X1
= [4 × 1 + (-1/4) × d2 + (3/2) × d3 + 2 × 0] – d1
= 4 – 1/4 d2 + 3/2 d3 - d1
48
3.1.2 – Algebraic Sensitivity Analysis
49. The current solution remains optimal so long as the new z-
equation coefficients remain nonnegative (maximization
case). We thus have the following simultaneous
optimality conditions corresponding to nonbasic X1 , X4 ,
and X5 :
4 – 1/4 d2 + 3/2 d3 - d1 ≥ 0
1 + 1/2 d2 ≥ 0
2 – 1/4 d2 + 1/2 d3 ≥ 0
Remember that the z-equation coefficient for a basic
variable is always zero.
49
3.1.2 – Algebraic Sensitivity Analysis
50. To illustrate the use of these conditions, suppose that the
objective function of TOYCO is changed from
z = 3X1 + 2X2 + 5X3 to z = 2X1 + X2 + 6X3 . Then,
d1 = 2 – 3 = -$1 , d2 = 1 – 2 = -$1 and d3 = 6 – 5 = $1
substitution in the given conditions yields
4 – 1/4 d2 + 3/2 d3 - d1 = 4 –1/4 (-1)+3/2 (1)- (-1)= 6.75 >
0
1 + 1/2 d2 = 1 + ½ (-1) = 0.5 > 0
2 – 1/4 d2 + 1/2 d3 = 2 – ¼ (-1) + ½ (1) = 2.75 > 0
all are satisfied.
50
3.1.2 – Algebraic Sensitivity Analysis
51. The results show that the proposed changes will keep the
current solution (X1 = 0, X2 = 100, X3 = 230) optimal
(with a new value of
z = 1350 + 100d2 + 230d3 = 1350 + 100(-1)+ 230(1)
= $1480
If any of the conditions is not satisfied, a new solution
must be determined.
The only difference in the minimization case is that the z-
equations coefficients must be ≤ 0 to maintain optimality.
51
3.1.2 – Algebraic Sensitivity Analysis
52. The optimality ranges dealing with changing dj one at a
time can be developed from the simultaneous optimality
conditions. For example, suppose that the objective
coefficient of X2 only is changed to 2 + d2 meaning that d1
= d3 = 0. the simultaneous optimality conditions thus
reduce to
4 – 1/4 d2 ≥ 0 d2 ≤ 16
1 + 1/2 d2 ≥ 0 d2 ≥ -2 -2 ≤ d2 ≤ 8
2 – 1/4 d2 ≥ 0 d2 ≤ 8
Also, d1 < 4 and d3 ≥ -8/3
52
3.1.2 – Algebraic Sensitivity Analysis
53. The given individual conditions can be translated to
total unit revenue ranges. For example, for toy trucks
(variable X2), the total unit revenue is 2 + d2 and its
optimality range -2 ≤ d2 ≤ 8 translates to
2 -2 ≤ 2+d2 ≤ 2+8
$0 ≤ c2 (unit revenue of toy truck) ≤ $10
It assumes that the unit revenues for toy trains and toy
cars remain fixed at $3 and $5, respectively.
53
3.1.2 – Algebraic Sensitivity Analysis
54. It is important to notice that the changes d1 , d2 , and d3
may be within their allowable individual ranges without
satisfying the simultaneous conditions, and vice versa. For
example, consider z = 6X1 + 8X2 + 3X3 .
Here, d1 = 6-3= 3, d2 = 8-2= 6, and d3 = 3-5= -2
(-∞ < d1 < 4 , -2 ≤ d2 ≤ 8 , and -8/3 ≤ d3 < ∞)
However, the corresponding simultaneous conditions yield
4 – 1/4 d2 + 3/2 d3 - d1 = 4 –1/4 (6)+3/2 (-2)- 3= -3.5 < 0
1 + 1/2 d2 = 1 + ½ (6) = 4 > 0
2 – 1/4 d2 + 1/2 d3 = 2 – ¼ (6) + ½ (-2) = -0.5 < 0
54
3.1.2 – Algebraic Sensitivity Analysis
55. Exercise 3.3:
HiDec produces two models of electronic gadgets that use
resistors, capacitors, and chips. The following table
summarizes the data of the situation:
55
3.1.2 – Algebraic Sensitivity Analysis
Unit resource requirements
Resource
Model 1
(units)
Model 2
(units)
Maximum availability
(units)
Resistor 2 3 1200
Capacitor 2 1 1000
Chips 0 4 800
Unit price ($) 3 4
56. a) Determine the status of each resource.
b) In terms of the optimal revenue, determine the dual
prices for the resistors, capacitors, and chips.
c) Determine the feasibility ranges for the dual prices
obtained in (b).
d) If the available number of resistors is increased to
1300 units, find the new optimum solution.
e) If the available number of chips is reduced to 350
units, will you be able to determine the new
optimum solution directly from the given
information? Explain.
56
3.1.2 – Algebraic Sensitivity Analysis
57. f) If the availability of capacitors is limited by the
feasibility range computed in (c), determine the
corresponding range of the optimal revenue and the
corresponding ranges for the numbers of units to be
produced of Models 1 and 2.
g) A new contractor is offering to sell HiDec additional
resistors at 40 cents each, but only if HiDec would
purchase at least 500 units. Should HiDec accept the
offer?
57
3.1.2 – Algebraic Sensitivity Analysis
60. Exercise 3.4:
The Bank of Elkins is allocating a maximum of $200,000 for
personal and car loans during the next month. The bank
charges 14% for personal loans and 12% for car loans. Both
types of loans are repaid at the end of a 1-year period.
Experience shows that about 3% of personal loans and 2% of
car loans are not repaid. The bank usually allocates at least
twice as much to car loans as to personal loans.
a) Determine the optimal allocation of funds between the two
loans and the net rate of return on all the loans.
b) If the percentages of personal and car loans are changed to
4% and 3%, respectively, use sensitivity analysis to
determine jf the optimum solution in (a) will change.
60
3.1.2 – Algebraic Sensitivity Analysis
63. The dual problem is defined systematically from the
primal (or original) LP model. The two problems are
closely related, in the sense that the optimal solution of
one problem automatically provides the optimal solution
to the other.
In most LP treatments, the dual is defined for various
forms of the primal depending on the sense of
optimization (maximization or minimization), types of
constraints (≤, ≥, or =), and sign of the variables
(nonnegative or unrestricted).
63
3.2 – Duality
64. The present definition of the dual problem requires
expressing the primal problem in the equation form
(all the constraints are equations with nonnegative
right-hand side and all the variables are nonnegative).
This requirement is consistent with the format of the
simplex starting tableau. Hence, any results obtained
from the primal optimal solution will apply directly to
the associated dual problem.
64
3.2 – Duality
65. Steps for constructing the dual from the primal are :
1) Assign a dual variable for each primal (equality)
constraint.
2) Construct a dual constraint for each primal variable.
3) The column (constraint) coefficients and the objective
coefficient of the jth primal variable respectively define
the left-hand and the right-hand sides of the jth dual
constraint.
4) The dual objective coefficients equal the right-hand
sides of the primal constraint equations.
65
3.2 – Duality
66. The sense of optimization, direction of inequalities,
and the signs of the variables in the dual are in
following table.
66
3.2 – Duality
Dual problem
Primal problem
objective
Objective Constrains type Variable sign
Maximization Minimization ≥ Unrestricted
Minimization Maximization ≤ Unrestricted
73. The first and second constraints are replaced by an
equation. The general rule in this case is that an
unrestricted primal variable always corresponds to an
equality dual constraint. Conversely, a primal equation
produces an unrestricted dual variable, as the first
primal constraint demonstrates.
Note: No provision is made for including artificial
variables in the primal, because artificial variables
would not change the definition of the dual problem.
73
3.2 – Duality
74. The following table summarizes the primal-dual rules:
74
3.2 – Duality
Maximization problem Minimization problem
Constraints Variables
≥ ≤ 0
≤ ≥ 0
= Unrestricted
Variables Constraints
≥ 0 ≥
≤ 0 ≤
Unrestricted =
75. 3.2.1 - Primal-Dual Relationships
Changes made in the original LP model can affect the
optimality and/or the feasibility of the current
solution. This section introduces a number of primal-
dual relationships that can be used to recompute the
elements of the optimal simplex tableau.
75
3.2 – Duality
78. Figure 3.4 gives a schematic representation of the
starting and general simplex tableaus. In the starting
tableau, the constraint coefficients under the starting
variables form an identity matrix (all main-diagonal
elements equal 1 and all off-diagonal elements equal
zero). With this arrangement, subsequent iterations of
the simplex tableau generated by the Gauss-Jordan
row operations will modify the elements of the
identity matrix to produce what is known as the
inverse matrix. The inverse matrix is key to
computing all the elements of the associated simplex
tableau.
78
3.2.2 – Simplex Tableau Layout
79. 3.2.3 – Optimal Dual Solution
The primal and dual solutions are closely related that
the optimal solution of either problem directly yields
the optimal solution to the other. Thus, in an LP model
in which the number of variables is considerably
smaller than the number of constraints, computational
savings may be realized by solving the dual because
the amount of simplex computation depends largely
(though not totally) on the number of constraints.
79
3.2 – Duality
80. This section provides two methods for determining the
dual values.
Method 1.
Method 2.
80
3.2.3 – Optimal Dual Solution
Optimal values
of 𝑑𝑢𝑎𝑙 variables
=
Row vector of
original objective coefficients
of optimal 𝑝𝑟𝑖𝑚𝑎𝑙 basic variables
×
Optimal 𝑝𝑟𝑖𝑚𝑎𝑙
inverse
Optimal value of
dual variable yi
=
Optimal primal z-coefficient of starting variable xi
+
original objective coefficient of xi
81. The elements of the row vector must appear in the
same order the basic variables are listed in the Basic
column of the simplex tableau.
81
3.2.3 – Optimal Dual Solution
84. Optimal tableau of the primal
In this table the starting primal variables X4 and R
uniquely correspond to the dual variables yl and y2 ,
respectively. Thus, we determine the optimum dual
solution as follows:
84
3.2.3 – Optimal Dual Solution
Basic X1 X2 X3 X4 R Solution
z 0 0 3/5 29/5 -2/5+ M 274/5
X2 0 1 -1/5 2/5 -1/5 12/5
X1 1 0 7/5 1/5 2/5 26/5
86. Method 2.
The optimal inverse matrix, highlighted in the table under
the starting variables X4 and R, is
The order of the optimal primal basic variables in the
Basic column is X2 followed by X1. The elements of the
original objective coefficients for the two variables must
appear in the same order-namely,
86
3.2.3 – Optimal Dual Solution
optimal inverse =
2/5 −1/5
1/5 2/5
88. Primal-Dual objective values:
For any pair of feasible primal and dual solutions,
At the optimum, the relationship holds as a strict equation. The
relationship does not specify which problem is primal and
which is dual. Only the sense of optimization (maximization or
minimization) is important in this case.
88
3.2.3 – Optimal Dual Solution
Objective value in the
𝑚𝑎𝑥𝑖𝑚𝑖𝑧𝑎𝑡𝑖𝑜𝑛 problem
≤
Objective value in the
𝑚𝑖𝑛𝑖𝑚𝑖𝑧𝑎𝑡𝑖𝑜𝑛 problem
Figure 3.5
89. Example 3.8
In Example 3.7, (X1 = 0, X2 = 0, X3 = 8/3) and ( y1 =
6, y2 = 0) are (arbitrary) feasible primal and dual
solutions. The associated values of the objective
functions are
z = 5X1 + 12X2 + 4X3 = 5(0) + 12(0) + 4(8/3) = 32/3
w = 10y1 + 8y2 = 10(6) + 8(0) = 60
Thus, z (=32/3) for the maximization problem
(primal) is less than w (=60) for the minimization
problem (dual). The optimum value of z (= 274/5)
falls within the range (32/3, 60).
89
3.2.3 – Optimal Dual Solution
90. Exercise 3.5:
Estimate a range for the optimal objective value for the
following LP:
Minimize z = 5X1 + 2X2
S.t.
X1 - X2 ≥ 3
2X1 + 3X2 ≥ 5
X1 , X2 ≥ 0
90
3.2.3 – Optimal Dual Solution
92. 3.2.4 - Simplex Tableau Computations
This section shows how any iteration of the entire
simplex tableau can be generated from the original
data of the problem, the inverse associated with the
iteration, and the dual problem. Using the layout of
the simplex tableau in Figure 3.4, we can divide the
computations into two types:
1) Constraint columns (left- and right-hand sides).
2) Objective z-row.
92
3.2 – Duality
94. Formula 1: Constraint Column Computations.
In any simplex iteration, a left-hand or a right-hand side
column is computed as follows:
Formula 2: Objective z-row Computations.
In any simplex iteration, the objective equation coefficient
of xi is computed as follows:
94
3.2.4 – Simplex Tableau Computations
Constraint column
in iteration 𝑖
=
Inverse in
iteration 𝑖
×
Original
constraint column
Primal z-equation
coefficient of variable xi
=
Left-hand side of
jth dual constraint
–
Right-hand side of
jth dual constraint
.
95. Example 3.9
Consider the LP in Example 3.7, use the formulas 1 and 2
and find the coefficient of X1 in optimum tableau.
Maximize z = 5X1 + 12X2 + 4X3
S.t.
X1 + 2X2 + X3 ≤ 10
2X1 – X2 + 3X3 = 8
X1 , X2 , X3 ≥ 0
95
3.2.4 – Simplex Tableau Computations
96. Solution:
From the table
96
3.2.4 – Simplex Tableau Computations
Basic X1 X2 X3 X4 R Solution
z 0 0 3/5 29/5 -2/5+ M 274/5
X2 0 1 -1/5 2/5 -1/5 12/5
X1 1 0 7/5 1/5 2/5 26/5
optimal inverse =
2/5 −1/5
1/5 2/5
97. Formula 1:
Similar computation can be used to generate the
optimal columns for X2, X3, X4, and R.
97
3.2.4 – Simplex Tableau Computations
𝑥1column in
optimal iteration
=
Inverse in
optimal iteration
×
Original
x1column
=
2/5 −1/5
1/5 2/5
×
1
2
=
0
1
98. Formula 2:
The optimal values of the dual variables, (y1, y2)= (29/5, -
2/5), are used in formula 2 to compute all the z-
coefficients.
z-coefficient of X1 = LHS of constraint 1 – RHS
z-coefficient of X1 = y1 + 2y2 – 5 = 29/5+ 2(-2/5)- 5 = 0
z-coefficient of R = y2 – (-M) = -2/5 – (-M) = -2/5 +M
Similar computation can be used to determine the
z-coefficients for X2, X3, and X4 .
98
3.2.4 – Simplex Tableau Computations
102. This section presents two additional algorithms: The
dual simplex and the generalized simplex. The dual
simplex starts infeasible (but better than optimal) and
remains infeasible until feasibility is restored at the
last iteration.
The generalized simplex combines both the primal
and dual simplex methods, starting both nonoptimal
and infeasible. At the final iteration, the solution
becomes optimal and feasible (assuming that one
exists).
102
3.3 – Additional Simplex Algorithm
103. When we use the simplex method to solve a max problem,
we begin with an initial solution that is primal feasible
(nonnegative rhs) but dual infeasible (at least one variable
in the z-row has a negative coefficient). Eventually, we
will obtain an optimal solution that is both primal feasible
and dual feasible (nonnegative z-row).
When we use the dual simplex method to solve a max
problem, we begin with an initial solution that is dual
feasible (nonnegative z-row) but primal infeasible (at least
one constraint has a negative rhs). Eventually, we will
obtain an optimal solution that is both dual feasible and
primal feasible (nonnegative rhs).
103
3.3.1 – Dual Simplex Algorithm
104. Dual feasibility condition. The leaving variable, xr is
the basic variable having the most negative value (ties are
broken arbitrarily). If all the basic variables are
nonnegative, the algorithm ends.
Dual optimality condition. Given that xr is the leaving
variable, let be the objective coefficient of nonbasic
variable xj and αrj the constraint coefficient in the xr-row
and xj-column of the tableau. The entering variable is the
nonbasic variable with αrj < 0 that corresponds to
104
3.3.1 – Dual Simplex Algorithm
𝑐𝑗
min
Nonbasic 𝑥𝑗
𝑐𝑗
𝛼𝑟𝑗
, 𝛼𝑟𝑗 < 0
105. (Ties are broken arbitrarily.) If αrj ≥ 0 for all nonbasic xj ,
the problem has no feasible solution.
To start the LP optimal and infeasible, two requirements
must be met:
1. The objective function must satisfy the optimality
condition of the regular simplex method.
2. All the constraints must be of the type (≤).
Inequalities of the type (≥) are converted to (≤) by
multiplying both sides of the inequality by -1. If the LP
includes (=) constraints, the equation can be replaced by
two inequalities.
105
3.3.1 – Dual Simplex Algorithm
106. Example 3.10
Minimize z = 3x1 + 2x2 + x3
subject to
3x1 + 2x2 + x3 ≥ 3
-3x1 + 3x2 + x3 ≥ 6
x1 + x2 + x3 ≤ 3
x1 , x2 , x3 ≥ 0
In the present example, the first two inequalities are
multiplied by -1 to convert them to (≤) constraints.
106
3.3.1 – Dual Simplex Algorithm
107. The starting tableau is thus given as:
The tableau is optimal because all the objective
coefficients in the z-row are nonnegative. It is also
infeasible because at least one of the basic variables is
negative (x4 = -3, x5 = -6, x6 = 3).
107
3.3.1 – Dual Simplex Algorithm
Basic x1 x2 x3 x4 x5 x6 Solution
z -3 -2 -1 0 0 0 0
x4 -3 -2 -1 1 0 0 -3
x5 3 -3 -1 0 1 0 -6
x6 1 1 1 0 0 1 3
108. According to the dual feasibility condition, x5 (= -6) is
the leaving variable. The next table shows how the
dual optimality condition is used to determine the
entering variable.
The ratios show that x2 is the entering variable.
108
3.3.1 – Dual Simplex Algorithm
j = 1 j = 2 j = 3
Nonbasic variable x1 x2 x3
z-row -3 -2 -1
x5-row, α5j 3 -3 -1
Ratio, | / α5j |, α5j <0 - 2/3 1
𝑐𝑗
𝑐𝑗
109. The next tableau is obtained by using the familiar row
operations, which gives:
Which is both optimal and feasible.
109
3.3.1 – Dual Simplex Algorithm
Basic x1 x2 x3 x4 x5 x6 Solution
z -5 0 -1/3 0 -2/3 0 4
x4 -5 0 -1/3 1 -2/3 0 1
x2 -1 1 1/3 0 -1/3 0 2
x6 2 0 2/3 0 1/3 1 1
110. Notice how the dual simplex works. In all the
iterations, optimality is maintained (all coefficients are
≤o).At the same time, each new iteration moves the
solution toward feasibility.
110
3.3.1 – Dual Simplex Algorithm
111. Exercise 3.7
Solve the following problem by using the dual simplex
algorithm.
Minimize z = 4x1 + 2x2
subject to
x1 + x2 = 10
3x1 - x2 ≥ 20
x1 , x2 ≥ 0
111
3.3.1 – Dual Simplex Algorithm
113. The (primal) simplex algorithm starts feasible but
nonoptimal. The dual simplex starts better than
optimal but infeasible.
What if an LP model starts both nonoptimal and
infeasible? Of course we can use artificial variables
and artificial constraints to secure a starting solution.
This is not mandatory, however, because the key idea
of both the primal and dual simplex methods is that
the optimum feasible solution, when finite, always
occurs at a corner point (or a basic solution).
113
3.3.2 – Generalized Simplex Algorithm
114. This suggests that a new simplex algorithm can be
developed based on tandem use of the dual simplex
and primal simplex methods. First, use the dual
algorithm to get rid of infeasibility (without worrying
about optimality). Once feasibility is restored, the
primal simplex can be used to find the optimum.
Alternatively, we can first apply the primal simplex to
secure optimality (without worrying about feasibility)
and then use the dual simplex to seek feasibility.
114
3.3.2 – Generalized Simplex Algorithm
115. Exercise 3.8
Solve the following problem by using the generalized
simplex algorithm.
Maximize z = 2x3
subject to
-x1 + 2x2 - 2x3 ≥ 8
- x1 + x2 + x3 ≤ 4
2x1 - x2 + 4x3 ≤ 10
x1 , x2 , x3 ≥ 0
115
3.3.2 – Generalized Simplex Algorithm
117. In the sensitivity analysis section, we dealt with the
sensitivity of the optimum solution by determining
the ranges for the different parameters that would
keep the optimum basic solution unchanged.
In this section, we deal with making changes in the
parameters of the model and finding the new
optimum solution.
117
3.4 – Post-Optimal Analysis
118. The following table lists the cases that can arise in
post-optimal analysis and the actions needed to obtain
the new solution (assuming one exists):
118
3.4 – Post-Optimal Analysis
Condition after parameters change Recommended action
Current solution remains optimal and
feasible.
No further action is necessary.
Current solution becomes infeasible. Use dual simplex to recover feasibility.
Current solution becomes nonoptimal.
Use primal simplex to recover
optimality.
Current solution becomes both
nonoptimal and infeasible.
Use the generalized simplex method to
obtain new solution.
119. The TOYCO model of Example 3.3 will be used to
explain the different procedures. Recall that the TOYCO
model deals with the assembly of three types of. toys:
trains, trucks, and cars. Three operations are involved in
the assembly.
119
3.4 – Post-Optimal Analysis
TOYCO primal TOYCO dual
Max 𝑧 = 3𝑥1 + 2𝑥2 + 5𝑥3 Min 𝑤 = 430𝑦1 + 460𝑦2 + 420𝑦3
subject to subject to
𝑥1 + 2𝑥2 + 𝑥3 ≤ 430 (Operation 1) 𝑦1 + 3𝑦2 + 𝑦3 ≥ 3
3𝑥1 + 2𝑥3 ≤ 460 (Operation 2) 2𝑦1 + 4𝑦3 ≥ 2
𝑥1 + 4𝑥2 ≤ 420 (Operation 3) 𝑦1 + 2𝑦2 ≥ 5
𝑥1, 𝑥2, 𝑥3 ≥ 0 𝑦1, 𝑦2, 𝑦3 ≥ 0
Optimum solution: Optimum solution:
𝑥1 = 0, 𝑥2 = 100, 𝑥3 = 230, 𝑧 = $1350 𝑦1 = 1, 𝑦2 = 2, 𝑦3 = 0, 𝑤 = $1350
120. The associated optimum tableau for the primal is
given as
120
3.4 – Post-Optimal Analysis
Basic X1 X2 X3 X4 X5 X6 Solution
z 4 0 0 1 2 0 1350
X2 -1/4 1 0 ½ -1/4 0 100
X3 3/2 0 1 0 ½ 0 230
X6 2 0 0 -2 1 1 20
121. The feasibility of the current optimum solution may
be affected only if (1) the right-hand side of the
constraints is changed, or (2) a new constraint is
added to the model.
In both cases, infeasibility occurs when at least one
element of the right-hand side of the optimal tableau
becomes negative-that is, one or more of the current
basic variables become negative.
121
3.4.1 – Changes Affecting Feasibility
122. Changes in the right-hand side.
This change requires recomputing the right-hand side
of the tableau using Formula 1 in previous section:
Recall that the right-hand side of the tableau gives the
values of the basic variables.
122
3.4.1 – Changes Affecting Feasibility
New RHS of
tableau in iteration 𝑖
=
Inverse in
iteration 𝑖
×
New RHS
of constraint
123. Example 3.11
Situation 1. Suppose that TOYCO is increasing the daily
capacity of operations 1, 2, and 3 to 600, 640, and 590
minutes, respectively. How would this change affect the
total revenue?
Situation 2. Although the new solution is appealing from
the standpoint of increased revenue, TOYCO recognizes
that its implementation may take time. Another proposal
was thus made to shift the slack capacity of operation 3 (x6
= 20 minutes) to the capacity of operation 1. How would
this change impact the optimum solution?
123
3.4.1 – Changes Affecting Feasibility
124. Solution: Situation 1.
With these increases, the only change that will take place
in the optimum tableau is the right-hand side of the
constraints (and the optimum objective value). Thus, the
new basic solution is computed as follows:
Thus, the current basic variables, x2, x3, and x6, remain
feasible at the new values 140, 320, and 30 units. The
associated optimum revenue is $1880.
124
3.4.1 – Changes Affecting Feasibility
𝑥2
𝑥3
𝑥6
=
1/2 −1/4 0
0 1/2 0
−2 1 1
600
640
590
=
140
320
30
125. Situation 2.
The capacity mix of the three operations changes to
450,460, and 400 minutes, respectively. The resulting
solution is:
The resulting solution is infeasible because x6 = -40,
which requires applying the dual simplex method to
recover feasibility.
125
3.4.1 – Changes Affecting Feasibility
𝑥2
𝑥3
𝑥6
=
1/2 −1/4 0
0 1/2 0
−2 1 1
450
460
400
=
110
230
−40
126. First, we modify the right-hand side of the tableau as
shown by the shaded column. Notice that the associated
value of z = 3 × 0 + 2 × 110 + 5 × 230 = $1370.
126
3.4.1 – Changes Affecting Feasibility
Basic X1 X2 X3 X4 X5 X6 Solution
z 4 0 0 1 2 0 1370
X2 -1/4 1 0 ½ -1/4 0 110
X3 3/2 0 1 0 ½ 0 230
X6 2 0 0 -2 1 1 -40
127. From the dual simplex, x6 leaves and x4 enters, which
yields the following optimal feasible tableau.
127
3.4.1 – Changes Affecting Feasibility
Basic X1 X2 X3 X4 X5 X6 Solution
z 5 0 0 0 5/2 1/2 1350
X2 1/4 1 0 0 0 1/4 100
X3 3/2 0 1 0 1/2 0 230
X4 -1 0 0 1 -1/2 -1/2 20
128. The optimum solution (in terms of x1 , x2 , and x3)
remains the same as in the original model. This means
that the proposed shift in capacity allocation is not
advantageous because it simply shifts the surplus
capacity in operation 3 to a surplus capacity in
operation 1. The conclusion is that operation 2 is the
bottleneck and it may be advantageous to shift the
surplus to operation 2 instead. The selection of
operation 2 over operation 1 is also reinforced by the
fact that the dual price for operation 2 ($2/min) is
higher than that for operation 1 ( $l/min).
128
3.4.1 – Changes Affecting Feasibility
129. This section considers two particular situations that
could affect the optimality of the current solution:
1. Changes in the original objective coefficients.
2. Addition of a new economic activity (variable) to
the model.
129
3.4.2 – Changes Affecting Optimality
130. Changes in the Objective Function Coefficients.
These changes affect only the optimality of the
solution and requires recomputing the z-row
coefficients according to the following procedure:
1. Compute the dual values using Method 2 in
previous section.
2. Use the new dual values in Formula 2, to determine
the new z-row coefficients.
130
3.4.2 – Changes Affecting Optimality
131. Two cases will result:
1. New z-row satisfies the optimality condition. The
solution remains unchanged (the optimum objective
value may change, however).
2. The optimality condition is not satisfied. Apply the
primal simplex method to recover optimality.
131
3.4.2 – Changes Affecting Optimality
132. Example 3.13
Situation 1. In the TOYCO model, suppose that the
company has a new pricing policy to meet the
competition. The unit revenues under the new policy
are $2, $3, and $4 for train, truck, and car toys,
respectively. How is the optimal solution affected?
132
3.4.2 – Changes Affecting Optimality
133. Solution:
The new objective function is
Maximize z = 2x1 + 3x2 + 4x3
Thus,
(New objective coefficients of x2, x3, and x6) = (3, 4, 0)
Using Method 2, the dual variables are computed as
133
3.4.2 – Changes Affecting Optimality
(𝑦1 𝑦2 𝑦3) = (3 4 0)
1/2 −1/4 0
0 1/2 0
−2 1 1
= (3/2 5/4 0)
134. The z-row coefficients are determined as the
difference between the left- and right-hand sides of
the dual constraints (Fonnula 2). It is not necessary to
recompute the objective-row coefficients of the basic
variables x2, x3, and x6 because they always equal zero
regardless of any changes made in the objective
coefficients.
134
3.4.2 – Changes Affecting Optimality
Obj. coeff. of 𝑥1 = 𝑦1 + 3𝑦2 + 𝑦3 − 𝟐 = 13/4
Obj. coeff. of 𝑥4 = 𝑦1 − 0 = 3/2
Obj. coeff. of 𝑥5 = 𝑦2 − 0 = 5/4
135. Note that the right-hand side of the first dual
constraint is 2, the new coefficient in the modified
objective function.
The computations show that the current solution,
x1 = 0 train, x2 = 100 trucks, and x3 = 230 cars,
remains optimal. The corresponding new revenue is
computed as 2 × 0 + 3 × 100 + 4 × 230 = $1220. The
new pricing policy is not advantageous because it
leads to lower revenue.
135
3.4.2 – Changes Affecting Optimality
136. Situation 2. Suppose now that the TOYCO objective
function is changed to
Maximize z = 6x1 + 3x2 + 4x3
We have
136
3.4.2 – Changes Affecting Optimality
(𝑦1 𝑦2 𝑦3) = (3 4 0)
1/2 −1/4 0
0 1/2 0
−2 1 1
= (3/2 5/4 0)
Obj. coeff. of 𝑥1 = 𝑦1 + 3𝑦2 + 𝑦3 − 𝟔 = −3/4
Obj. coeff. of 𝑥4 = 𝑦1 − 0 = 3/2
Obj. coeff. of 𝑥5 = 𝑦2 − 0 = 5/4
137. The new reduced cost of x1 shows that the current solution
is not optimum.
To determine the new solution, the z-row is changed as
highlighted in the following tableau:
137
3.4.2 – Changes Affecting Optimality
Basic X1 X2 X3 X4 X5 X6 Solution
z -3/4 0 0 3/2 5/4 0 1220
X2 -1/4 1 0 ½ -1/4 0 100
X3 3/2 0 1 0 ½ 0 230
X6 2 0 0 -2 1 1 20
138. The highlighted elements are the new objective
coefficients and new objective value. All the
remaining elements are the same as in the original
optimal tableau. The new optimum solution is then
determined by letting x1 enter and x6 leave, which
yields
x1 = 10, x2 = 102.5, x3 = 215, and z = $1227.50.
Although the new solution recommends the
production of all three toys, the optimum revenue is
less than when two toys only are manufactured.
138
3.4.2 – Changes Affecting Optimality
139. Exercise 3.9:
Consider the following LP:
a) Compute the entire simplex tableau associated with
139
.
0
,
,
3
2
1
.
.
2
max
3
2
1
2
1
3
2
3
1
3
2
1
x
x
x
x
x
x
x
x
x
t
s
x
x
x
z
Basic variables = (𝑥1 , 𝑥2 , 𝑥3) and Inverse =
1
2
−
1
2
1
2
−
1
2
1
2
1
2
1
2
1
2
−
1
2
140. b) check for feasibility and optimality of solution from
part (a).
c) Find the range of values of c1 (the contribution to
profit of x1) for which the current basis remains
optimal, assuming that all other parameters remain
unchanged.
d) Find the range of values of b3 (the right hand side of
constraint 1) for which the current basis remains
optimal, assuming that all other parameters remain
unchanged.
140