The University of Melbourne

advertisement
620-261
Introduction To Operations Research
2002
Solutions to selected Assignment Problems
Assignment # 1 (This is Problem 7 in the 2001 Exam)
1. (10%) (Adaptation of Hillier and Lieberman 1990, pp. 55-56) A certain corporation has three
branch plants with excess production capacity. All three plants have the capability for producing a
certain new product, and management has decided to use some of the excess capacity in this way.
This product can be made in three sizes - large, medium, and small - that yield a net unit profit of
$420, $360, and $300, respectively. Plants 1, 2, and 3 have excess capacity to produce 750, 900,
and 450 units per day of this product, respectively, regardless of the size or combination of sizes
involved.
The amount of available in-process storage space also imposes a limitation on the
production rates of the new product. Plant 1,2, and 3 have 13,000 , 12,000, and 5,000 square meters
of in-process storage space available for a day's production of this product. Each unit of the large,
medium and small sizes produced per day requires 20, 15, and 12 square meters, respectively. Sales
forecasts indicate that 900, 1,200 , and 750 units of the large, medium and small sizes respectively,
can be sold per day.
Management wishes to know how much of each of the sizes should be produced by each of
the plants to maximize profit.
(a)(12%) Formulate a model for this problem. (Do not compute the optimal production
levels).
(b)(3%) Suppose that to maintain a uniform workload among the plants and to obtain some
flexibility, management has decided that the plants must use the same percentage of their excess
capacity to produce the new product. Formulate this additional consideration in the context of the
model you developed in (a).
1. Solution.
Let
xp,s:= # of items per day of size s to be produced in plant p,
pP:={1,2,3}, sZ:={L,M,S}.
Then, clearly, the objective function is of the form:
f(x):= 420(x1,L + x2,L+ x3,L)+360(x1,M+x2,M+x3,M)+300(x1,S+x2,S+x3,S)
and opt=max.
As for the constraints, we have the following.
Page 1 out of 4
Demand:
x1,L + x2,L+ x3,L  900
x1,M+x2,M+x3,M  1200
x1,S+x2,S+x3,S  750
Storage:
20x1,L + 15 x1,M+ 12x1,S  13000
20x2,L+15x2,M+12x2,S  12000
20x3,L+15x3,M+12 x3,S  5000
Production:
x1,L + X1,M+ x1,S  750
x2,L+x2,M+x2,S  900
x3,L+x3,M+x3,S  450
Nonnegativity: x.0.
And perhaps : Integrality: xps{0,1,2,...}.
(b)(3%) The additional balance constraints:
900(x1,L+x1,M+x1,S)  750(x2,L+x2,M+x2,S)
900(x3,L+x3,M+x3,S)  450 (x2,L+x2,M+x2,S)
No need for the third restriction (450(x1,L+x1,M+x1,S) = 750(x3,L+x3,M+x3,S)), but it is not a
mistake to include it.
Note that these additional constraints make two of the production constraints superfluous.
Assignment 6 (This is Problem 6 in the 2001 Exam)
6. (15%) Consider the following initial Simplex tableau:
B.V.
?
?
?
W
Eq. #
1
2
3
W
x1
2
1
-1
?
x2
1
2
1
?
x3
0
-1
0
?
x4
0
0
-1
?
x5
?
?
?
0
x6
?
?
?
0
x7
?
?
?
0
R.H.S
?
?
?
?
where x5 , x6 and x7 are artificial variables and x3 and x4 are surplus variables associated with x6
and x7 respectively. The following is a simplex tableau obtained after a number of pivot operations.
Page 2 out of 4
B.V.
x3
x1
?
?
Eq. #
1
2
3
?
x1
?
?
?
?
x2
?
?
?
?
x3
?
?
?
?
x4
-1
1/3
-2/3
1/3
x5
1
1/3
1/3
7/3
x6
?
?
?
?
x7
?
?
?
?
R.H.S
7
?
16/3
67/3
In these tables ? represents missing values.
You are expected to compute the missing values (in both tables) using Revised Simplex
techniques rather than explicit (Primal Simplex) pivot operations.
6. Solution
Observation 1:
Utilising the fact that x3 and x1 are in the basis and x3 and x4 are the surplus variables associated
with x6 and x7 respectively, we obtain for the final tableau:
B.V.
x3
x1
?
?
Eq. #
1
2
3
?
x1
0
1
0
0
x2
?
?
?
?
x3
1
0
0
0
x4
-1
1/3
-2/3
1/3
x5
1
1/3
1/3
7/3
x6
-1
0
0
?
x7
1
-1/3
2/3
?
R.H.S
7
?
16/3
67/3
Observation 2:
Clearly, the third element of the basis must be x2. Thus, we can fill in the x2 column and
furthermore conclude that we are in Phase 2. We can thus fill in the reduced costs of x6 and x7.
This yields:
B.V.
x3
x1
x2
z
Eq. #
1
2
3
z
x1
0
1
0
0
x2
0
0
1
0
x3
1
0
0
0
x4
-1
1/3
-2/3
1/3
x5
1
1/3
1/3
7/3
x6
-1
0
0
0
x7
1
-1/3
2/3
-1/3
R.H.S
7
?
16/3
67/3
Observation 3:
Since x3 is a surplus variable, we know that c3=0. To compute the cost coeffcients for the other
two basic variables, (x2 and x1), we utilize the known values of the reduced costs, say r4 and r5
using the beloved
rj = cBB-1D.j-cj
Thus, for j=4 we obtain
r4 = (0,c1,c2)B-1D.4 - 0
1/3 = (0,c1,c2)(-1,1/3,-2/3)
thus
c1 - 2c2 = 1
For j=5 we obtain
r5 = (0,c1,c2)B-1D.5 - 0
7/3 = (0,c1,c2)(1,1/3,1/3)
Page 3 out of 4
thus
c1 +c2 = 7
Solving the two equations we obtain c1=5 and c2=2.
Observation 4:
Given c1, c2 and the value of the objective function (67/3) we can now compute the value of x1:
67/3 = CBRHS = (0,5,2)(7,?,16/3).
Solving for ? we obtain ?=7/3. Thus, we complete the final tableau:
B.V.
x3
x1
x2
z
Eq. #
1
2
3
z
x1
0
1
0
0
x2
0
0
1
0
x3
1
0
0
0
x4
-1
1/3
-2/3
1/3
x5
1
1/3
1/3
7/3
x6
-1
0
0
0
x7
1
-1/3
2/3
-1/3
R.H.S
7
7/3
16/3
67/3
Observation 5:
Since there are three artificial variables and three functional constraints, it follows that the initial
basis consists of the three artificial variables. Thus,
B.V.
x5
x6
x7
W
Eq. #
1
2
3
W
x1
2
1
-1
?
x2
1
2
1
?
x3
0
-1
0
?
x4
0
0
-1
?
x5
1
0
0
0
x6
0
1
0
0
x7
0
0
1
0
R.H.S
?
?
?
?
Observation 6.
Given the final basis and the final RHS values, we can compute b using the recipe b = B RHS. In
our case the basis is (x3,x1,x2) hence B consists of the third, first and second column of the initial
tableau. Thus,
0 2 1 
B  A.3 , A.1 , A.2  1 1 2 

0 1 1 

Hence,
0 2 1  7  10
b  B HHS  1 1 2 7 / 3  6 

0 1 1 

16 / 3
 
3 

Thus, we can fill-in the RHS column in the original tableau.
B.V.
x5
x6
x7
W
Eq. #
1
2
3
W
x1
2
1
-1
?
x2
1
2
1
?
x3
0
-1
0
?
x4
0
0
-1
?
Observation 7:
Page 4 out of 4
x5
1
0
0
0
x6
0
1
0
0
x7
0
0
1
0
R.H.S
10
6
3
?
To compute the missing entries in the initial tableau, we can reinitialise Phase 1, recalling that all
the basic variables are artificial variables in our case. Thus, the initial tableau at the pre-canonical
stage is as follows:
B.V.
x5
x6
x7
W
Eq. #
1
2
3
W
x1
2
1
-1
0
x2
1
2
1
0
x3
0
-1
0
0
x4
0
0
-1
0
x5
1
0
0
-1
x6
0
1
0
-1
x7
0
0
1
-1
R.H.S
10
6
3
0
x4
0
0
-1
-1
x5
1
0
0
0
x6
0
1
0
0
x7
0
0
1
0
R.H.S
10
6
3
19
Observation 8:
Restoring the canonical form we thus obtain
B.V.
x5
x6
x7
W
Eq. #
1
2
3
W
x1
2
1
-1
2
x2
1
2
1
4
x3
0
-1
0
-1
Assignment 7 (This is Problem 9 in the 2001 Exam)
9. (5%) Formulate the dual problems associated with the following LP problems:
LP # 1
max cu  dv
u,v
s.t.
Au  b
Dv  e
LP # 2
min 2x1  2x 2  x4
x
s.t.
3x1  x2  4x3  5
2x1  4x2
8
3x1  2x 2
x1 ,x 3 , x4  0
9.
LP #3
max (d  c)y
y
s.t.
 Ay  b
6
Solution
min
x
LP # 1
(b,e)x
LP # 2
max 5y1  8y 2  6y3
y
s.t.
[ A, D]t x  (c,d)
s.t.
3y1  2y2  yx3
LP #3
min  bx
x
s.t.
2
y1  4y2  2y3  2
4y1
0
0y1  0y2  0y3  1
A t x  (d  c)
x0
y1 , y2  0
Assignment 8 (This is Problem 3 in the 2001 Exam)
Page 5 out of 4
3.(15%) Consider the LP problem whose first and final simplex tableaus are as follows:
B.V.
x5
x6
x7
Z
Eq. #
1
2
3
Z
x1
2
2
3
-24
x2
3
1
7
-15
x3
3
0
3
-3
x4
1
4
-2
-24
x5
1
0
0
0
x6
0
1
0
0
x7
0
0
1
0
b
8
10
12
0
B.V.
x1
x4
x7
Z
Eq. #
1
2
3
Z
x1
1
0
0
0
x2
11/6
-2/3
1/6
13
x3
2
-1
-5
7
x4
0
1
0
0
x5
2/3
-1/3
-8/3
8
x6
-1/6
1/3
7/6
4
x7
0
0
1
0
R.H.S
11/3
2/3
7/3
104
3.1
Determine the optimal solution and the optimal value of the objective function of the dual
problem associated with this problem directly from the final tableau of the primal problem.
(2%).
3.2 Determine the range of values of c1, c3, and b1 for which the final basis does not change (one
range at a time!). (10%)
3.3 What will be the new basis if you increase the value c1 just a bit above the upper bound found
in 3.2? (3%)
2. Solution
2.1.
The optimal solution to the dual problem is equal to the reduced cost of the slack variables,
hence y*=(8,4,0). Thus, the optimal value of the dual objective function is equal to
y*b=(8*8 + 4*10 + 0*12)=104=Z*.
Range of c1: Since x1 is in the basis we have to canonize the final tableau after subtracting
 from the reduced cost of x1: Thus
2.2.
B.V.
x1
x4
x7
Z
Eq. #
1
2
3
Z
x1
1
0
0
-
x2
11/6
-2/3
1/6
13
x3
2
-1
-5
7
x2
11/6
-2/3
1/6
13+(11/6) 
x3
2
-1
-5
7+2
x4
0
1
0
0
x5
2/3
-1/3
-8/3
8
x6
-1/6
1/3
7/6
4
x7
0
0
1
0
R.H.S
11/3
2/3
7/3
104
yields
B.V. Eq. #
x1
1
x4
2
x7
3
Z
Z
x1
1
0
0
0
x4
0
1
0
0
x5
2/3
-1/3
-8/3
8+(2/3) 
x6
-1/6
1/3
7/6
4-(1/6) 
x7
0
0
1
0
R.H.S
11/3
2/3
7/3
104 +
(11/3) 
To ensure that all the reduced costs are non-negative, we require:
13+(11/6)  >= 0 ; 7+2 >= 0 ; 8+(2/3)  >= 0; 4-(1/6)  >= 0.
which in turn yields:
 >= -78/11 ;  >= -7/2 ;  >= - 12 ;  <= 24.
Hence the permissible range of  is [-7/2, 24] and consequently the permissible range of c1 is
[41/2,48].
Page 6 out of 4
Range of c3: Since x3 is not in the basis, the final reduced cost of c3 will be 7-. Hence, for the
reduced cost of c3 to remain non-negative, we require 7- >=0, namely  <=7. This means that the
range of permissible values of c3 is [0,].
Range of b1: The final RHS values are obtained by multiplying the original RHS values by B-1.
Thus, if we increase b1 by , the final RHS values will be
 2 / 3 1/ 6 08   
RHS'  B RHS  1/ 3 1/ 3 0 10 

8 / 3 7/ 6 1

 12 

1
11/ 3  2 / 3 1/ 6 0  
 2 / 3  1/ 3 1/ 3 0 0 

7 / 3 
 
8/ 3 7 / 6 1 

0 

11/ 3  (2 / 3)  (11/ 3)  (2/ 3) 
 2 / 3  (1/ 3)   (2/ 3)  (1/ 3) 

7 / 3 
 
(8/ 3) 
 
(7 / 3)  (8/ 3) 

For the final RHS values to be non-negative we require:
(11/3) + (2/3) >= 0 ; (2/3) - (1/3) >= 0 ; (7/3) -(8/3) >= 0
thus
 >= - 11/2 ;  <= 2 ;  <= 7/8.
Thus, the range of permissible values of d is [-11/2 , 7/8] and the range of permissible values of b1
is [5/2, 71/8].
3.3 If we increase c1 above the upper bound found in 3.2, then the reduced cost of x6 will become
negative and therefore x6 will enter the basis. The ratio test indicates that either x4 or x7 will
leave the basis (there is a tie in the ratio test). Thus, the new basis will be either (x1,x6,x7) or
(x1,x4,x6).
Assignment # 9 (This is Problem 1 in the 2001 Exam)
1. (15%) Write down the generic dynamic programming functional equation for the standard
knapsack problem (3%). Then solve it for the following specific knapsack problem:
z* : max 7x1  15x2  10x3
x
s.t.
4x1  8x 2  6x3  13
x1 ,x 2 , x 3 {0,1,2,...}
You are expected to determine the value of z* (5%) as well as the optimal values of the decision
variables x1 , x2 and x3 .(3%). What would be the functional equation if the functional constraint is
changed to 4x1  8x 2  6x3 13 and max is changed to min ?
Page 7 out of 4
1. Solution.
The generic dynamic programming functional equation for the knapsack problem is
f (s)  max {v j  f (s  w j )},w  s  W
1 j k
with f(0) = 0, s<w
where w is the weight of the lightest item and W is the total (weight) capacity of the knapsack, and
f(s) is the maximum value of a knapsack of total weight capacity of s.
Solving this functional equation for the problem under consideration yields the following results:
s
0
1
2
3
4
5
6
7
8
9
10
11
12
13
f(s)
0
0
0
0
7
7
10
10
15
15
17
17
22
22
D*(s)
{1}
{1}
{3}
{3}
{2}
{2}
{1,3}
{1,3}
{1,2}
{1,2}
For example, consider s=13:
f(13) = max {v1 + f(13-w1), v2 + f(13-w2) , v3 + f(13-w3) }
= max {7+f(13-4),15+f(13-8),10+f(13-6)}
= max{7 + 15, 15 + 7 , 10 + 10}
= 22 , D*(13) = {1,2}
If we start with s=W=13, and select say item 1 as an optimal solution from D*(13), we shall be left
with s'=13-4=9 units of weight. If we then select one item of type 2 from D*(9) we are left with
s''=0 units of weight. According to this, the optimal solution is equal to x*=(1,1,0,0). This solution
is consistent with the value of f(13)=22 as v1+v2 = 7+15=22.
If we change the constraint to an equality constraint and max to min, the functional equation will
be as follows:
f (s)  min {vj  f (s  w j )},w  s  W
1 j k
f(s) = M, s<w (where M is a large positive number.)
Assignment # 10 (Part 1 is Problem 4 in the 2001 Exam)
Page 8 out of 4
4. (10%) Write down the generic functional equation of dynamic programming for the Towers of
Hanoi problem (3%). Then use it to show that the solution it yields requires 2n-1 moves (where n is
the number of discs).
4.
Solution
The generic DP functional equation of the Tower of Hanoi problems is as follows:
S(n,x,y) = S(n-1,x,xy), S(1,x,y), S(n-1,xy,y)
, (xy := neither x nor y).
Thus, if we let f(n):= number of moves required for the solution of a problem with n discs, we have
f(n) = f(n-1)+ 1 + f(n-1) = 1 + 2f(n-1)
(1)
Since f(1) =1, it follows that f(2) = 3, and therefore f(3) = 1+6 = 7. We can show, by induction on j
that f(j) = 2j-1.
Clearly, the inductive hypothesis is true for j=1 and j=2. So suppose that it is true for j=1,2,…,k.
In particular, assume that f(k) = 2k-1. Then it follows from (1) and the inductive hypothesis that
f(k+1) = 1 + 2(2k-1) = 1 + 2k+1 - 2 = 2k+1 - 1. Hence, the inductive hypothesis holds for j=k+1 as
well and therefore it holds for all j=1,2,….
Assignment 11 (This is Problem 2 in the 2001 Exam)
2. (15%) Write down the generic dynamic programming functional equation for the travelling
salesman problem (5%) and then solve it for the problem whose travel times are as follows (10%):
City
City
City
City
City 1
--3
4
5
1
2
3
4
City 2
2
--4
3
City 3
4
2
--1
City 4
3
4
1
---
2. Solution.
The generic DP functional equation for the travelling salesman problem is as follows:
f (i,  )  d(i,1),   empty set
f (i,s)  min d(i, j)  f (j,s \ {j}), s  
j S
s \ A : {k s,k  A}.
where i denotes the current city, s denotes the set of cities yet to be visited, f(i,s) is the shortest
distance from city i to the home city given that we still have to visit the cities in s,  denotes the
empty set and d(i,j) denotes the travel time from city i to city j (along the direct route).
Solving this problem yields the following results (using 1 as the home city):
f(2,{}) = 3 ; f(3,{}) = 4 ; f(4,{}) = 5
Page 9 out of 4
f(2,{3}) = min { d(2,x) + f(x,{3}\{x}): x in {3}}
= min { d(2,3) + f(3,{}) }
= min { 2 + 4 }
=6
f(2,{4}) = min { d(2,x) + f(x,{4}\{x}): x in {4}}
= min { d(2,4) + f(4,{}) }
= min { 4 + 5 }
=9
f(3,{2}) = min { d(3,x) + f(x,{2}\{x}): x in {2}}
= min { d(3,2) + f(2,{}) }
= min { 4 + 3 }
=7
f(3,{4}) = min { d(3,x) + f(x,{4}\{x}): x in {4}}
= min { d(3,4) + f(4,{}) }
= min { 1 + 5 }
=6
f(4,{2}) = min { d(4,x) + f(x,{2}\{x}): x in {2}}
= min { d(4,2) + f(2,{}) }
= min { 3 + 3 }
=6
f(4,{3}) = min { d(4,x) + f(x,{3}\{x}): x in {3}}
= min { d(4,3) + f(3,{}) }
= min { 1 + 4 }
=5
f(2,{3,4}) = min { d(2,x) + f(x,{3,4}\{x}): x in {3,4}}
= min { d(2,3) + f(3,{4}) , d(2,4) + f(4,{3}) }
= min { 2 + 6 , 4 + 5 }
=8
f(3,{2,4}) = min { d(3,x) + f(x,{2,4}\{x}): x in {2,4}}
= min { d(3,2) + f(2,{4}) , d(3,4) + f(4,{2}) }
= min { 4 + 9 , 1 + 6 }
=7
f(4,{2,3}) = min { d(4,x) + f(x,{2,3}\{x}): x in {2,3}}
= min { d(4,2) + f(2,{3}) , d(4,3) + f(3,{2}) }
= min { 3 + 6 , 1 + 7 }
=8
f(1,{2,3,4}) = min { d(1,2) + f(2,{,3,4}) , d(1,3) + f(3,{2,4}) , d(1,4) + f(4,{2,3}) }
= min { 2 + 8 , 4 + 7 , 3 + 8 }
= min { 10,11,11 }
= 10
so the shortest tour takes 10 units of time.
Page 10 out of 4
Recovering the optimal decisions we obtain the optimal tour (1,2,3,4,1). Checking the length of
this tour yields 2 + 2 + 1 + 5 =10 which is consistent with the value of f(1,{2,3,4})=10.
Page 11 out of 4
Download