CHAPTER 4
2
exist between linear programming and the theory of games.
(vi) Duality is not restricted to linear programming problems only but finds application in
economics, management and other fields. In economics it is used in the formulation of input
and output systems.
(vii) Economic interpretation of the dual helps the management in making future decisions.
(viii) Duality is used to solve L.P. problems (by the dual simplex method) in which the initial
solution is infeasible.
4.2 THE DUAL PROBLEM
The power generating problem was viewed in example 2.7 in Chapter 2 as a problem of
allocating scarce resources. Let us now look at this problem from an entirely different angle.
The county council, which is the largest customer of the power generating plant, is
considering making an offer to purchase the plant. In order to make such an offer, the council
needs to determine fair prices for the existing plant resources. For our purpose these resources
can be viewed as the available loading capacity, the available pulverizer capacity, and the
available capacity to emit smoke. (We shall neglect the "capacity" to emit sulfur for the
moment and reintroduce it later on.)
Theoretically, the prices of resources are not necessarily related to their average or marginal
costs, but rather to the revenues that they can produce. Economists tell us that as long as the
price offered for a resource is less than the marginal revenue product of the resource, i.e., the
revenue produced by the last unit of the resource employed, the firm has no incentive to sell
any of this resource. The marginal revenue products can also be viewed as the prices the firm
should be willing to pay for additional amounts of scarce resources. In linear programming,
these prices or marginal revenue products are called imputed values or shadow pricesimputed because they are not actual costs or prices, but the prices or values that can be
inferred from the particular productive system in question.
The problem of finding these prices turns out to be another linear program. In our example,
the resources are used to produce steam. Hence, rather than express the prices in monetary
units, we shall express them in terms of steam equivalents. Furthermore, since the original
resource allocation problem is on a per-hour basis, the prices of the resources will be on the
basis of per-hour use. Let
The objective of the problem is to find prices y 1 , y 2 and y 3 that minimize the council's total
cost of acquiring the resources presently owned by the firm. The cost of acquiring the smoke
capacity is 12 y1 (= quantity available price); the cost of the loading capacity is 20 y 2 and
the cost of the pulverizer capacity is 1y 3 . So the objective function is as follows:
Minimize 12 y1 + 20 y 2 + y 3
The prices that the firm will accept depend on what the resources can do for the firm. The
firm will insist on prices that give a return that is at least equal to the return produced by each
of the two activities in which the resources are used, namely, burning coal A and burning coal
B.
In burning 1 ton of coal A, the firm produces 24 units of steam. The resources required to
burn 1 ton of coal A are 0. 5,kg/hr of smoke emission capacity, 1 ton of loading capacity, and
1/16 hr of pulverizer capacity. At the prices y 1 , y 2 and y 3 , the council will pay
0.5y1 + y 2 +
1
y 3 , per hour for these resources. However, since the firm can already make 24
16
units of steam from 1 ton of coal A, the council must be willing to pay (per hour) at least 24
units of steam for these resources for the firm to find their offer acceptable, i.e.,
0.5y1 + y 2 +
1
y 3 24
16
1
y 3 20
24
y1 , y 2 and y 3 0
Let us write out this linear program again and compare it with problem (2.7) of Chapter 2
(without the sulfur constraint):
4
Original problem (allocation of resources):
subject to
12
0.5x 1 + x 2
1
1
1
x1 + x 2
( 4)
16
24
20
x1 + x 2
1200x 1 1800x 2 0
x1 , x 2 0
Minimize z =12 y1 + 20 y 2 + y 3
subject to
1
0.5y1 + y 2 + y 3 24
(4 B)
16
y1 + y 2 +
y 3 20
24
y1 , y 2 , y 3 0
Each problem is called the dual of the other problem. The relationship between them is twoway: what applies from problem (4-A) to problem (4-B) also applies from (4-B) to (4-A).
Some algebraic manipulations are needed to show this for property 4 of DRI. In the
terminology of linear programming, we call one problem the primal and the other the dual. It
does not matter which problem is called the primal and which is called the dual. Normally,
the problem we formulate first is referred to as the primal, the other becomes the dual. In this
case, problem (4-B) is the primal, and problem (4-A) is the dual. (Note our convention of
denoting the value of the dual objective function by a z/ and the value of the primal objective
function by a lowercase z.)
5
MORE ON DUALITY RELATIONS
subject to
12
0.5x 1 + x 2
1
1
1
x1 + x 2
(4 C)
16
24
20
x1 + x 2
1200x 1 1800x 2 0
x1 , x 2 0
This problem is not in standard form. The sulfur constraint is a inequality. However, the
problem can easily be converted to a standard form by multiplying the sulfur constraint
through by -1.
6
Standardized primal problem:
12 ( y1 )
x1 + x 2
20 ( y 3 )
1
1
x1 + x 2
1 ( y 2 )
16
24
1200x 1 + 1800x 2 0 ( y3 )
x1 , x 2 0
x2
Minimize z =12 y1 + 20 y 2 + y 3 0 y3
subject to
0.5y1 + y 2 +
1
y 3 1200 y 3 24
16
1
y 3 + 800 y3
24
y1 , y 2 , y 3 , y 3 0
y1 + y 2 +
20
Compare now the original primal with the standardized dual. Properties 2 and 3 of DR1 are
not satisfied for those coefficients associated with the sulfur constraint and y 3 . The
standardized dual is thus not the proper dual of the original problem. The proper dual can,
however, easily be obtained by reversing the standardization operation used to get the
standardized primal. We multiply the coefficients of y 3 through by -1 and define a new
variable w which is the negative of y 3 . This yields the following dual.
Dual of the original primal:
Minimize z =12 y1 + 20 y 2 + y 3 + 0 y 4
subject to
1
0.5y1 + y 2 + y 3 + 1200 y 4 24
16
(4 D)
1
20
y1 + y 2 +
y 3 800 y 4
24
y1 , y 2 , y 3 , 0
y4 0
We now see that properties 2 and 3 of DRI are satisfied. But we also note that the new dual
7
variable y 4 is restricted to be non-positive (since y 3 was nonnegative). There is no need to
go through the process of first standardizing, then finding the dual, and finally unscrambling
the dual. Instead, we can go directly to the dual by using the following duality relationship.
DUALITY RELATION 2 (DR2)
If the direction of the inequality constraint in one problem deviates from the standard
form, the corresponding variable in the other problem is restricted to be non-positive and
vice versa.
What is the nature of the dual if the primal has equality constraints? In order to find out, we
resort to the following trick for each such constraint. We replace the equality by two
inequalities of opposite direction, i.e., one is a inequality, the other a inequality. The
LHS coefficients and the RHS parameter are the same as in the original constraint. Since both
have to be satisfied simultaneously, the feasible region will be identical to the original
constraint. We have just seen how to handle a problem with mixed inequality constraints. The
dual will have two dual variables, say y i+ and y i , one of which is restricted to be nonnegative
and the other to be non-positive. Both variables have, however, exactly the same coefficients
in the dual. We now undo the trick of substituting two inequality constraints for the equality
constraint. We define a new variable y i that can assume both nonnegative and non-positive
values, i.e., one that is unrestricted in sign, where y i = ( y i+ - y i ). So y i replaces y i+ if y i
assumes a nonnegative value, and replaces y i if y i assumes a non-positive value. Again, we
can avoid actually using this trick by applying the next duality relation.
Max z = c1 x 1 + c 2 x 2 + c 3 x 3 + ... + c n x n
subject to
subject to
a 11 y1 + a 21 y 2 + a 31 y 3 + ... + a m1 y m c1
a 11 x 1 + a 12 x 2 + a 13 x 3 + ... + a 1n x n b1
a 12 y1 + a 22 y 2 + a 32 y 3 + ... + a m 2 y m c 2
a 21 x 1 + a 22 x 2 + a 23 x 3 + ... + a 2 n x n b 2
.................................
.................................
a 1n y1 + a 2 n y 2 + a 3n y 3 + ... + b mn y n c n
a m1 x 1 + a m 2 x 2 + a m 3 x 3 + ... + a mn x n b m
y1 , y 2 y 3 , ...y m 0
x 1 , x 2 , x 3 ,......x n 0
Table 4.1 demonstrates the duality relations DR I through DR3 in general terms.
TABLE 4.1. Primal and dual in general form
Primal
Dual
Maximize z = c j x j b i
Maximize z = b i y i
subject to
Subject to
ij
x j bi
Implies DR1
yi 0
ij
x j bi
Implies DR2
yi 0
ij
x j = bi
Implies DR3
y i unrestricted
x i unrestricted
Implies DR3
ij
y j = ci
xi 0
Implies DR2
ij
y j ci
xi 0
Implies DR1
ij
y j ci
subject to
9
2x 1 + x 2 x 3 2
x 1 + x 2 5x 3 6
4x 1 + x 2 + x 3 6
x1 , x 2 , x 3 0
Solution since the problem is not in the canonical form, we interchange the inequality of
second constraint.
Max z = x 1 + 2x 2 + x 3
subject to
2x 1 + x 2 x 3 2
x 1 x 2 + 5x 3 6
4x 1 + x 2 + x 3 6
x1 , x 2 , x 3 0
subject to
2 y1 + 2 y 2 + 2 y 3 1
y1 x 2 + y 3 2
y1 + 5 y 2 + y 3 1
y1 , y 2 y 3 0
subject to
4x 1 x 2 8
8x 1 + x 2 + 3x 3 12
5x 1 x 3 13
x1 , x 2 , x 3 0
Solution since the problem is not in the canonical form, we interchange the inequality of the
second constraint.
Max z = 3x 1 x 2 + x 3
subject to
10
4x 1 x 2
8x 1 x 2 3x 3 12
5x 1
x 3 13
x1 , x 2 , x 3 0
Max z = c T x
subject to
Ax B
x0
x1
8
z = (3 1 1) x 2 , b = 12
x
13
3
4 1 0
A = 8 1 3
5
0 6
subject to
4 8 5 y1 3
1 1 0 y 2 1
0 3 6 y 1
subject to
4 y1 8y 2 + 5y 3 3
y1 y 2 + 0 y 3 1
0 y 1 3y 2 + 6 y 3 1
y1 , y 2 y 3 0
subject to
11
x1 + x 2 2
2x1 + x 2 + 6x 3 6
x1 x 2
+ 3x 3 = 4
x1 , x 2 , x 3 0
Solution since the given primal problem is not in the canonical form, we interchange the
inequality of the constraint. also the third constraint is an equation. this equation can be
converted into two inequalities.
Min z = 0x 1 + 2x 2 + 5x 2
subject to
x 1 + x 2 + 0x 3 2
2 x 1 x 2 6x 3 6
x 1 x 2 + 3x 3 4
x 1 x 2 + 3x 3 4
x1 , x 2 , x 3 0
subject to
x 1 + x 2 + 0x 3 2
2 x 1 x 2 6x 3 6
x 1 x 2 + 3x 3 4
x 1 + x 2 3x 3 4
x1 , x 2 , x 3 0
Dual Problem: since there are four constraints in the primal, we have four dual variable
namely y1 , y 2 y 3
Max z = 2 y1 6 y 2 + 4 y 3/ 4 y 3//
subject to
y1 2 y 2 + y 3/ y 3// 0
y1 y 2 y 3/ + y 3// 2
0 y1 6 y 2 + 3y 3/ 3y 3// 5
y1 , 2 y 2 , y 3/ , y 3// 0
Let y 3 = y 3/ y 3//
12
Max z = 2 y1 6 y 2 + 4( y 3/ y 3// )
y1 2 y 2 + ( y 3/ y 3// ) 0
y1 y 2 ( y 3/ y 3// ) 2
0 y1 6 y 2 + 3( y 3/ y 3// ) 5
finally, we have,
Max z = 2 y1 6 y 2 + 4 y 3
subject to
y1 2 y 2 + y 3 0
y1 y 2 y 3 2
0 y 1 6 y 2 + 3y 3 5
y1 , y 2 0, y 3 is unrestricted
subject to
2x 1 + 3x 2 4
3x 1 + 4 x 2 = 5
x 1 0 and x 2 unrestricted.
subject to
2 x 1 3( x 2/ x 2// ) 4
3x 1 + 4( x 2/ x 2// ) 5
3x 1 + 4( x 2/ x 2// ) 5
x 1 , x 2/ , x 2// 0
subject to
13
2 x 1 3x 2/ + x 2// 4
3x 1 + 4x 2/ 4x 2// 5
3x 1 4 x 2/ + 4x 2// 5
x 1 , x 2/ , x 2// 0
Dual Problem: Since there are three variables and three constraints, in dual we have three
subject to
2 y1 + 3y 2/ y 2// 1
3y1 + 4 y 2/ 4 y 2// 2
3y1 4 y 2/ + 4 y 2// 2
y1 , y 2/ , y 2// 0
Let y 2 = y 2/ , y 2// , so that the dual variable y 2 is unrestricted in sign. finally the dual is
Min z = 4 y1 + 5( y 2/ y 2// )
subject to
2 y1 + 3( y 2/ y 2// ) 1
3y1 + 4( y 2/ y 2// ) 2
3y1 4( y 2/ 4 y 2// ) 2
i.e.,
Min z = 4 y1 + 5y 2
subject to
2 y 1 + 3y 2 1
3y 1 + 4 y 2 2
3y1 4 y 2 2
y1 0 and y 2 is unrestricted.
ie: Min z = 4 y1 + 5y 2
subject to
2 y 1 + 3y 2 1
3y 1 + 4 y 2 2
3y 1 + 4 y 2 2
14
ie: Min z = 4 y1 + 5y 2
subject to
2 y 1 + 3y 2 1
3y 1 + 4 y 2 = 2
y1 0 and y 2 is unrestricted.
EXAMPLE 4.5 Management analysts at a Apollo laboratory have developed the following
LP primal problem:
Minimize z = 23x 1 + 18x 2
subject to
8x 1 + 4x 2 120
4 x 1 + 6x 2 125
9x 1 + 4x 2 116
x1 , x 2 , x 3 0
This model represents a decision concerning number of hours spent by biochemists on certain
laboratory experiments (x1) and number of hours spent by biophysicists on the same series of
experiments (x2). A biochemist costs $23 per hour, while a biophysicist's salary averages $18
per hour. Both types of scientists can be used on three needed laboratory operations: test 1,
test 2, and test 3. The experiments and their times are as follows:
TABLE 4.2 Apollo laboratory data
Lab Experiment
Scientists Type
Biophysicist Biochemist
Test 1
120
Test 2
115
Test 3
116
This means that a biophysicist can complete 8,4 and 9 hours of tests 1, 2, and 3 per day.
Similarly, a biochemist can perform 4 hours of test 1, 6 hours of test 2, and 4 hours of test 3
per day.
SOLUTION I
15
TABLE 4.3 The optimal Simplex Table for the lab's primal problem is
x1
x2
s1
s2
s3
-1.19
0.13
12.13
s3
0.13
-0.25
13.75
x2
0.12
-0.19
8.13
x1
-2.06
-1.63
434.38
Basic Variable
Optimum number of hours of biophysicists and biochemist are costs $23 per hour, while a
biophysicist's salary x1 = 8.12 hours and x2 = 13.75 hours total cost = $434.37 per day
SOLUTION II Using the Dual Problem
subject to
8x 1 + 4x 2 120
4 x 1 + 6x 2 125
9x 1 + 4x 2 116
x1 , x 2 , x 3 0
The Dual problem of this will be
Maximize z = 120 y1 + 125y 2 + 116 y 3
subject to
8y1 + 4 y 2 + 9 y 3 23
4 y1 + 6 y 2 + 4 y 3 18
y1 , y 2 , y 3 0
TABLE 4.4 The optimal Simplex Table for the lab's Dual problem is
y1
y2
y3
s1
s2
1.19
0.19
-0.13
2.06
x1
0.12
-0.13
-0.13
1.63
x2
12.13
13.75
8.13
434.38
Basic Variable
16
The optimal solution to the dual problem is y1 = 2.07, y2 = 1.63, y3 =0 which is described
worth of Test 1 , Test 2 and Test 3 per hour.
Note that optimal values of x1 = 8.12 hours and x2 = 13.75 hours respectively i.e, optimal
number of working hours of biophysicists and biochemist per day together with associated
total cost is total cost = $434.37 per day
Similarly, optimal values of dual variables yl, y2, and y3 (y1 = 2.07, y2 = 1.63, y3 =0 from
Table 4.4) could be obtained from the optimal primal solution given by Table 4.3 either under
the slack variables s1, s2, and s3.
EXAMPLE 4.6
A company makes three products X, Y and Z out of three raw materials A, B and C. The
number of units of raw materials required to produce one unit of the product is as given in the
Table4.5
TABLE 4.5
Products
Raw materials
The unit profit contribution of the products X, Y and Z is Rs. 40, 25 and 50 respectively. The
number of units of raw materials available are 36, 60 and 45 respectively.
(i) Determine the product mix that will maximize the total profit.
(ii) From the final simplex table, write the solution to the dual and give the economic
interpretation.
Solution
(i) Let the company produce x1 x2 and x3 units of the products X, Y and Z respectively. Then
the problem can be expressed mathematically as
Max z = 40x 1 + 25x 2 + 50x 3
subject to
17
x1 + 2x 2 + x 3 36
2x1 + x 2 + 4x 3 60
2x1 + 5x 2 + x 3 45
x1 , x 2 , x 3 0
Adding slack variables s1 , s 2 and s 3 , we get
Max z = 40x 1 + 25x 2 + 50 x 3 + 0s1 + 0s 2 + 0s 3
subject to
x 1 + 2x 2 + x 3 + s1 = 36
2 x 1 + x 2 + x 3 + s 2 = 60
2 x 1 + 5x 2 + x 3 + s 3 = 45
x 1 , x 2 , x 3 , s1 , s 2 , s 3 0
x 1 = 0, x 2 = 0, x 3 = 0, s1 = 36, s 2 = 60, s 3 = 45 and z = 0.
This solution and further improved solutions are given in the following tables
TABLE 4.6
x3
s1
x1
x2
36
A1
60
s1
45
s2
-40
-25
-50
20
x1
x2
36
A1
60
s1
45
s2
-40
-25
-50
20
18
TABLE 4. 8 Second iteration of simplex tableau
x3
s1
s2
s3
b
B.V.
x1
x2
0.5
1.75
21
s1
0.5
0.25
0.25
15
x3
1.5
4.75
-0.25
30
s2
-15
-12.5
12.5
750
x1
B.V.
0.17
-0.17
-0.33
11
s1
-1.33
0.33
-0.33
x3
3.17
0.33
-0.67
20
x1
35
10
10
1050
Suppose the manager of the company wants to sell the three raw materials A, B and C instead
of using them for making products X, Y and Z and, then, by selling the products earn a profit
of Rs. 1,050. Suppose the selling prices were Rs. yl, Rs. y2 and Rs.y3 per unit of raw materials
A, B and C respectively. Then the cost to the purchaser of all the three raw materials will be
Rs. (36 y1 + 60 y 2 + 45y 3 ). Of course, the purchaser will like to set the selling prices of A, B
19
and C so that the total cost is minimum. So the objective function will be to minimize
(36 y1 + 60 y 2 + 45 y 3 ).
Table 4.9 indicates that the marginal values of raw materials, A, B and C are Rs. 0, Rs. 10 and
Rs. 10 per unit respectively. Thus if the manager sells the raw materials A, B and C at price
Rs. 0, Rs. 10 and Rs. 10 per unit respectively, he will get the same contribution of Rs. 1,050
which he is going to get if he uses these resources for producing products X, Y and Z and
then sells them.
EXERCISES
20
x 1 + 2x 2 + 2x 3 10
2x 1 x 2 + 2x 3 = 2
x1 , x 2 , x 3 0
(b) Maximize z = 4 x 1 + 2x 2 + 3x 3
subject to
x1 + x 2 + x 3 8
2x 1 x 2 + 3x 3 12
x1 , x 2 , x 3 0
(c) Minimize z = 2 x 1 + 9x 2 4x 3
subject to
2x 1 + 3x 2 + 4x 3 12
x 1 + 6x 2 4x 3 4
x 1 , x 2 0, x 3 unrerstricted in sign
(d) Maximize z = 3x 1 2 x 2
subject to
x1 + x 2 5
x1 x 2 1
x2 = 4
x1 , x 2 0
4 For each of the problems in exercise 3, find:
(a) The standard form primal.
(b) The standard form dual.
find the optimal primal solution. Use the quickest check you know to verify the optimality of
the primal solution.
4.7
For the problem in exercise 4.3(b), after making the changes necessary to solve
Ci
Basis Solution
X1
x2
x3
X4
x5
21
3
3
x3
18 'T 0
3'
14
0 X1
22
1+M
Zi Ci
(a) Using this tableau, write down (i) the optimal values of the variables and z, and (ii) the
optimal values of the dual variables.
(b) Interpret wl, the first dual variable.
4.9
subject to
Solve the following by the dual simplex method: minimize z = 3x1 + 2x2
X, + x2
10
2x1 + x2 14
X1,
X2
minimize z = 2x, + x2
subject to
X1 + X2
X1 - X2
15
2x, + x2 - x3 8
subject to
22
5x 1 + 2 x 2 20
x 1 + 2x 2 10
x1 , x 2 0
subject to
5y1 + y 2 6
2 y1 + y 2 8
y1 , y 2 0
we solve the dual problem using the big M method. since this method involves artificial
variables, the problem is reformulated and we have
Max z = 20 y1 10 y 2 + 0S1 + 0S 2 MA 1 MA 1
Subject to
5y1 + y 2 S1 + A 1 = 6
2 y1 + y 2 S 2 + A 2 = 8
y1 , y 2 , S1 , S 2 , A 1 , A 2 0
basic
Z
y1
y2
20-7M 10-3M
S1
S2
A1
A2
rhs
-M
-M
-14M
A1
-1
-1
A2
-1
basic
y1
y2
5/2
A1
-1/4
A2
Optimum tableau
S1
S2
A2
rhs
..
..
-45
1/8
..
1/2
-5/8
7/2
15/4
A1
23
Since the problem is not in the canonical form, we interchange the inequality of second
constraint.
Min z/ =-45 and therefore Max z = 45.
Example 6
subject to
x1 + x 2 1
x 1 + 2x 2 7
x 1 + 2x 2 10
x2 3
x 1 , x 2 0 by solving its dual problem
Solution The dual of the given primal problem is given below. As there are 4 constraints in
|S
Subject to
x 1 x 2 1
x 1 + 2x 2 7
x 1 + 2x 2 10
x2 3
x1 , x 2 0
Dual
Min z = y1 + 7 y 2 + 10 y 3 + 3y 4
Subject to
y1 + y 2 + y 3 + 0 y 4 3
y1 + y 2 + 2 y 3 + y 4 2
y1 , y 2 , y 3 , y 4 0
Apply Big M method to get the solution of the dual problem , as it involves artificial
variables, the problem is reformulated and we have
Max z = y1 7 y 2 10 y 3 3y 4 + 0S1 + 0S 2 MA 1 MA 2
24
Subject to
y1 + y 2 + y 3 + 0 y 4 S1 + A 1 = 3
y1 + y 2 + 2 y 3 + y 4 S 2 + A 2 = 2
y1 , y 2 , y 3 , y 4 , S1 , S 2 , A 1 , A 2 0