UNIT 5
DUALITY AND SENSITIVITY ANALYSIS
Reading
Wayne L. Winston, Chapter 5, 6
Handy A. Taha, Chapter 4
Hillier and Lieberman, Chapter 5
4.0 DUALITY
The dual is an auxiliary LP problem defined directly and systematically from the
original or primal LP model. In most LP treatments, the dual is defined for
various forms of the primal depending on the types of the constraints, the signs of
the variables, and the sense of optimization.
The general standard form of the primal is defined as
Subject to
Note that the variables include the surplus and slacks. For the purpose of
constructing the dual, we arrange the coefficients of the primal schematically as
shown in Table 1.0.
The diagram shows that the dual is obtained symmetrically from the primal
according to the following rules:
Table 1.0
Primal Variables
44
. . . . . .
Right side of
dual constraint . . . . . .
a11 a . . . . . .
Left side a21 a . . .
coefficients of . . . . . Dual
dual constraint . . . . . Variable
. . . . .
. . . . .
+ +
jth dual Dual
constraint objective
The diagram shows that the dual is obtained symmetrically from the primal
according to the following rules:
1. For every primal constraint there is a dual variable.
2. For every primal variable there is a dual constraint.
3. The constraint coefficients of a primal variable form the left-side coefficients
of the corresponding dual constraint; and the objective coefficient of the
same variable becomes the right side of the dual constraint. (See, e.g., the
coloured column under
The rules indicate that the dual problem will have variables
and constraints
We now turn our attention to determining the remaining elements of the dual
problem, the sense of optimization, the type of constraints, and the sign of the
dual variables. This information is summarized in Table 1.2 for the maximization
and minimization types of the standard form. Recall again that the standard
primal form requires all constraints to be equations (with non-negative right side)
and all the variables to be non-negative. Thus the only difference in the two
primals occurs in the sense of optimization.
45
Table 1.2
Standard Primal Dual
objective Objective Constraint Variables
maximization minimization Unrestricted
minimization maximization Unrestricted
Example 1
Consider the following problem
Maximize
Subject to
Solution
Standard primal
Maximize
Subject to
Note that is a slack in the first constraint; hence it has zero coefficients in the
objective function and the second constraint.
Dual:
Minimize
Subject to:
46
Observe that “ unrestricted” is dominated by the dual constraint
associated with Thus, eliminating the redundancy; the dual problem should
read as
Minimize
Subject to:
Example 2
Find the dual from the following primal problem.
Minimize
Subject to
Solution:
Standard Primal
Minimize
Subject to
47
Dual
Maximize
Subject to
, Unrestricted (redundant).
Finding the Dual max
of a Normal Max
or Min problem
Min
x1 0 . . .
. . .
. . .
. . .
(
)
. . . . . .
. . . . . .
. . . . . .
ym 0 . . .
Primal – Dual Relationships
In this section we show the close relationship between the primal and dual problems.
Indeed, the optimal solution of one problem is immediately available (without any
48
computations) from the optimal simplex tableau of the other problems. Moreover, in
preparation for developing sensitivity analysis techniques, we present certain dual
computations that allow the detection of changes in the optimal primal solution as a result
of making changes in the original model.
We use Example 1.0 to demonstrate how the optimal dual solution can be obtained
directly from the optimal simplex tableau of the primal. We repeat the two problems here
for convenience.
Primal Dual
Maximize Minimize
Subject to Subject to
unrestricted
We now solve the two problems independently by the simplex method. A comparison of
the optimal primal and dual tableaus would show how the optimal solution of one
problem can be obtained directly from the other. Table 1 – 3 presents the simplex
iterations leading to the optimal primal solution. The iterations are presented in full for
later use in this section. The starting and optimal iterations of the dual are given in Table
1.4. The use of artificial variables is necessary to secure a starting solution. Also, the
unrestricted variable in the dual is substituted out as where and are
nonnegative.
The optimal dual solution obtained directly by the simplex method is given in Table 1.4
as . This information can be obtained
directly from the optimal primal tableau (Table 1-3) by using the following equation.
Table 1.3
Iteration Basic R Solution
0
(Starting) Z
enters 1 2 1 1 0 10
R leaves R 2 -1 3 0 1 8
49
1 Z 0 0
enters 0 1
leaves 1 0
2 Z 0 0
enters 1 0
leaves 0 1
3
(Optimal) Z 0 0
0 1
1 0
In Table 1.3, the starting solution variables are and their respective
coefficients in the optimal Z-equation are and The dual constraints
associated with
This information is organized in the following convenient form.
Starting Primal Variables
Optimal Z-equation coefficient
Left minus right sides of the dual constraint
associated with the starting primal variables
Application of the foregoing equation thus yields
We thus obtain which are the same values as those obtained
directly from the optimal dual tableau.
50
Table 1.4
Iteration Basic Solution
0 w
(Starting)
R1
R2
R3
4
(Optimal)
51
We now show that the optimal dual tableau (Table 1-4) also yields the optimal primal
solution directly and by using the equation stated above. Observe first that
are respectively associated with the first, second and third dual
constraints and hence with the artificials
Starting Dual Variables
Optimal w-equation coefficients
Left minus right sides of the primal constraint
associated with the starting dual variable
Thus we get
Which is the same solution obtained directly in the optimal primal tableau (Table 1.3)?
Why should we be interested in obtaining the optimal solution of the primal by solving
the dual? The answer is that it may be more advantageous computationally to solve the
dual rather than the primal. Recall that the computational effort in linear programming
depends more on the number of constraints than on the number of variables. Thus, if the
dual happens to have a smaller number of constraints than the primal, generally it will be
more efficient to solve the dual from which the optimal primal solution can then be
obtained.
Important Primal – Dual Computations
In carrying out sensitivity analysis, we are interested in only one result: will the changes
in the problem’s coefficients affect the feasibility or the optimality of the current
optimum solution?
The special arrangement of the starting simplex tableau is important in the development
of the primal – dual computations. Namely, the starting m basic variables are always
associated with the last m columns of the left side of the starting tableau; also, their
constraint coefficients are arranged in the form of an identity matrix.
Under this arrangement important information can be extracted from the simplex tableau.
Figure 1.1 gives a schematic representation of the simplex tableau at any iteration. The
top row represents the objective equation, and the columns are associated with the
constraints. The matrix under the starting variables is called the inverse and its position
will always be as shown in Figure 1.1.
52
Figure 1.1
Starting
basic
Variables
Objective =
Inverse
Constraint matrix =
Constraint columns
We can divide the computations of the simplex elements into two types. (See figure 1.1):
1. Constraint column computations and
2. Objective row computations.
Constraint column computations are made without the primal – dual relationships,
whereas the objective row computations are based on the dual properties.
1. Constraint Column Computations
At any simplex iteration (primal or dual), the elements of a left or a right column
of the constraints of the tableau are computed from:
To illustrate the use of this formula, consider the primal in Example (1). The
starting basic variables are In Table 1-3, the inverse matrix
associated with each iteration is shown by the shaded overlay. Consider iteration
1 and its constraints column
which is the same as given in iteration 1, Table 1.3.
Now, consider iteration 2 and its right column
53
2. Objective Row Computations
At any simplex iteration of the primal, the elements in the objective equation of
the variable is computed from
Applying this formula to the pair of primal and dual problems shown earlier, we
get the following equations (see the constraints of the dual):
To compute these coefficients numerically, we need numeric values of the dual
variables Since the objective coefficients vary with the iterations, we
expect the values of to change from one iteration to the next. The
following formula computes the dual variables at any iteration.
The original objective coefficients of primal basic variables are arranged in a row
vector whose elements are taken in the same order in which the basic variables
appear in the “basic” column of the simplex iteration. For example, in Table 1-3,
the successive row vectors associated with the formula above are (note the order
in each case):
Iteration 0: (coefficients of
1: (coefficients of
2: (coefficients of
3: (coefficients of
Next, we illustrate the use of the computation above by data mining the
coefficients in the Z-equation of iteration 3 (optimal) of Table 1-3.
Dual values = (objective coefficients of
54
You may already have noticed that the dual values associated with the optimal
primal iteration yield the optimal dual solution directly. At any iteration, the
associated dual values are sometimes referred to as the simplex multipliers. Thus
the simplex multipliers of the optimal iteration are the optimal values.
Economic Interpretation of Dual Variables
The equality of the primal and dual objective values can be written in terms of the general
definitions given as
We analyze this equation dimensionally. Since Z represents dollars (profit) and
represents the units (amount) of resource then dimensionally must represent dollars
per unit of resource because
The dual variables, then represent the worth per unit of resource (They are also
referred to as shadow prices).
The dual values can be used to rank the resources according to their contributions to the
value of the objective function. For instance, m the primal and dual problems used in this
section, Table 1-3 shows that Hence, to increase the optimum
value of Z, the first resource is the only one that can be increased. (In fact, the second
must be decreased in order to increase Z.) suppose that is the amount of increase in
the first resource. We can determine the maximum value of as follows:
55
The example shows that can be increased indefinitely, with each unit increase
contributing to the objective function. In general, there will be a limit on the amount
of increase, but this depends on the technology of the model.
Economic Interpretation of Dual Constraints
In any simplex iteration, the objective coefficient of primal variable is the difference
th
between the left and right sides of the j dual constraint. By using the general definitions
of the primal and dual problems given earlier, this result can be expressed mathematically
as:
Objective coefficient of
We analyze this information dimensionally. Note that is the profit per unit of the
output activity This means that has the dimension dollars/unit. For consistency,
also must have the dimension dollars/unit.
Now consider the equation. Since represents profit, , which appears with
opposite sign, must stand for “lost”. Also, since represents the amount of resource
used by 1 unit of activity , must represent the imputed cost per unit of resource and
we can think of as the imputed cost of all resources used to produce 1 unit of
activity . Dimensionally, this information leads to expressing the equation above as
K(profit or cost)/unit = K (cost)/unit - K (profit)/unit.
Observe that the left side may represent cost or profit, depending on whether the right
side is positive or negative.
UNIT 6
56
SENSITIVITY ANALYSIS
1.1 Dual Simplex Method
In the previous section we showed that at any primal iteration the
objective equation coefficient of equals the difference between the left and
right sides of the associated dual constraint. When, in the case of maximization,
the primal iteration is not optimal, for at least one variable. Only at the
optimum do we have for all
Looking at this condition from the standpoint of duality, we have
Thus, when , which means that the dual is infeasible
when the primal is non-optimal. On the other hand, when ,
which means that the dual becomes feasible when the primal
reaches optimality.
The result above suggest a new solution method for linear programs, which starts
infeasible but (better than) optimal. (Compare with the regular simplex method,
which starts feasible but non-optimal.) The new method, called the dual simplex,
will then maintain optimality and the successive iterations will work to clear the
infeasibility. When feasibility is reached, the process terminates since the
solution is both feasible and optimal. This type of problem is encountered in
certain LP models; but more important, it is used directly in carrying out
sensitivity analysis as we shall show in the following section.
Example 1
57
Minimize
Subject to
The initial step requires converting all the constraints to inequalities and then
augmenting the slack variables. Thus we get:
Minimize
Subject to:
If you try to express this problem as a starting simplex tableau, you will notice
that the slack variables do not provide a feasible starting solution.
Since this is a minimization problem and all the objective equation coefficients
are the starting basic solution is optimal but
infeasible. This problem is typical of the type that can be handled by the dual
simplex method.
The starting optimal but infeasible tableau is thus given as
Basic Solution
58
0
As in the regular simplex method, the method of solution is based on the
optimality and feasibility. The optimality condition guarantees that the solution
remains always optimal, where as the feasibility condition forks the basic solution
toward the feasible space.
Feasibility Condition
The leaving variable is the basic variable having the most negative value. (Break
ties arbitrarily.) If all the basic variables are nonnegative, the process ends and
the feasible (optimal) solution is reached.
Optimality Condition
The entering variable is selected from among the non basic variables as follows.
Take the ratios of the left-hand-side coefficients of the Z-equation to the
corresponding coefficients in the equation to the corresponding coefficients in the
equation associated with the leaving variable.
Ignore the ratios associated with positive zero denominators. The entering
variable is the one with the smallest ratio if the problem is minimization or the
smallest also rate value of the ratios if the problem is maximization. (Break ties
arbitrarily.) If all the denominators are zero or positive, the problem has no
feasible solution.
After selecting the entering and the leaving variables, row operations are applied
as usual to obtain the next iteration of the solution.
The leaving variable in the tableau is since it has the most negative
value. For the entering variable, the ratios are given by
Variable
- equation -2 -1 0 0 0
- equation -4 -3 0 1 0
Ratios - - -
The entering variable is since it corresponds to the smallest ratio By
applying row operations as usual, we find the new tableau:
59
Basic Solution
0 -1
1 2
0 -1
0 0 2
The new solution is still optimal but infeasible If is
arbitrarily selected to leave the solution, becomes the entering variable. This
gives:
Basic Solution
1 0
0 1
0 0 -1 1 0
0 0 0
This is now optimal and feasible. The application of the dual simplex method is
especially useful in sensitivity analysis. This occurs, for example, when a new
constraint is added to the problem after the optimal solution is obtained.
If this constraint is not satisfied by the optimal solution, the problem remains
optimal but it becomes infeasible. The dual simplex method is then used to clear
the infeasibility in the problem.
2. Sensitivity or Post-optimal Analysis
Sensitivity analysis is concerned with studying possible changes in the available
optimal solution as a result of making changes in the original model.
2.1 Changes Affecting Feasibility
60
There are two types of changes that could affect the feasibility of the current
solution: (1) changes in resources availability (or right side of the constraints),
and (2) addition of new constraints.
Changes in the Right Side of Constraints
Suppose in the example given below, the daily availability of raw material A is
changed to 7 tons instead of the current 6 tons. How is the current solution
affected?
Recall that primal and dual
Maximize minimize
Subject to subject to
Basic Solution
0 0 0 0
0 1 0 0
1 0 0 0
0 0 1 0
0 0 0 1
Thus, all we have to do is recomputed the new right side of the optimal tableau
using the computations given in the earlier section.
The new (basic) solution of the problem is
61
Since the right – side elements remain nonnegative; the current basic variables
remain unchanged. Only their new values become
The new value of
Let us now consider an example of what happens when the current basic variable
becomes infeasible. Suppose that the daily availabilities of materials A and B are
7 and 4 tons instead of 6 and 8 tons. The right side of the tableau is computed as
follows:
The changes will make and negative meaning that the current solution is
infeasible. We must thus use the dual simplex method to recover feasibility.
The following optimal tableau shows the new right side in a coloured column.
All the remaining elements are unchanged.
Basic Solution
0 1 0 0
1 0 0 0
0 0 1 0 -
0 0 0 1
0 0 0 0
62
Notice that the new value of Z is
The tableau above is optimal (all coefficients in the Z – equation are but
infeasible (at least one basic variable is negative). The application of the dual
simplex method shows that the leaving and entering variables are
This leads to the following tableau.
Basic Solution
0 1 0 0 2
1 0 0 0 1
0 0 1 1 2
0 0 0 0 0
0 0 0 0 7
This tableau is both optimal and feasible. The new solution is and
Addition of a New Constraint
The addition of a new constraint can result in one of two conditions:
1. The constraint is satisfied by the current solution, in which case the constraint
is either nonbinding or redundant and its addition will thus not change the
solution.
2. The constraint is not satisfied by the current solution. It will thus become
binding and the new solution is obtained by using the dual simplex method.
To illustrate these cases, suppose that the daily demand on exterior paint does not
exceed 4 tons. A new constraint of the form
Must be added to the model. Since the current obviously
satisfied the new constraint, it is labeled nonbinding and the current solution
remains unchanged.
63
Now suppose the maximum demand on exterior paint is 3 tons instead of 4 tons.
Then the new constraint becomes which is not satisfied by the current
solution
Here is what we do to recover feasibility. First, put the new constraint in the
standard form by augmenting a slack or a surplus variable if necessary. Then
substitute out any of the current basic variables in the constraint in terms of the
(current) non basic variables. The final step is to augment the “modified”
constraint to the current optimum tableau and apply the dual simplex to recover
feasibility.
Using as a slack, we find that the standard form of is
Now, in the current solution is a basic variable and we must substitute it out in
terms of the non basic variables. In the - equation of the current optimal
tableau, we have
Thus the new constraint expressed in terms of the current non-basic variables
becomes:
(The negative right side indicates infeasibility since, given
which violates the requirement
The modified constraint is now augmented to the current optimal tableau as given
below. The augmentation to the tableau is shown by coloured column. The
remaining elements are taken directly from the current optimum tableau.
Basic Solution
0 1 0 0 0
1 0 0 0 0
64
0 0 1 1 0
0 0 0 0 0
0 0 0 0 1
0 0 0 0 0 38
3
By the dual simplex, leaves the solution and enters. This yields the
following optimal feasible tableau:
Basic Solution
0 1 0 0 0
1 0 0 0 0 1 3
0 0 0 1 0 5
2
0 0 0 0 1
0 0 1 0 0 3
2
0 0 1 0 0 0 2 12
The new solution has a worse optimum value of than before the constraint is
augmented. This is always expected since the addition of a new binding
constraint can never improve the value of
Learning Objectives
After working through this Chapter, you should be able to:
construct and interpret the dual model,
Explain the effect of changes in objective function coefficients, constraint
quantity values, and additional of model parameters.
65