Sunteți pe pagina 1din 15

MATH 341 2002/2003

Assignment 5
1. 9.7-1 Without using your OR Courseware, consider the minimum cost
flow problem shown below, where the bi values (net lows generated) are
given by the nodes, the cij values (costs per unit flow) are given by the
arcs, and the uij vlalues (arc capacities) are given to the right of the
network.

[20]
A

[0]
C
3

5
2

B
[10]

Arc capacities

[-30]
E

A C: 10
B C: 25
Others:

4
5

D
[0]

(a) Obtain an initial BF solution by solving the feasible spanning tree


with basic arcs A B, C E, D E, and C A (a reverse
arc), where one of the nonbasic arcs (C B) also is a reverse
arc. Show the resulting network (including bi , cij, and uij ) in the
same format as the above one (except use dashed lines to draw
the nonbasic arcs), and add the flows in parentheses next to the
basic arcs.
(b) Use the optimality test to verify that this initial BF solution is
optimal and that there are multiple optimal solutions. Apply one
iteration of the network simplex method to find the other optimal BF solution, and then use these results to identify the other
optimal solutions that are not BF solutions.

(c) Now consider the following BF solution.


Basic Arc
AD
BC
CE
DE

Flow
20
10
10
20

Nonbasic Arc
AB
AC
BD

Starting from this BF solution, apply one iteration of the network


simplex method. Identify the entering basic arc, the leaving basic
arc, and the next BF solution, but do not proceed further.
Solution:
(a)

[10]
A
(15)
2

B
[-15]

-6 (5)

[35]
C

(30)
[-30]
E

3
D
[0]

(0)

Arc capacities
C A: 10
C B: 25
Others:

(b)
Nonbasic arc
unique cycle
CB
CB BA AC
AD
AD DE EC CA
BD
BD DE EC CA AB

Z when = 1
3 2 (6) = 7 > 0
5+436 =0
5+436+2= 2> 0

Since all Z 0, the current solution is optimal. Because the


arc AD had Z = 0, we let AD be the entering BV to find
another optimal solution. To send a flow of unit along the cycle
AD DE EC CA, we need
<
<
30
10 5 = 5

AD
DE
EC
CA

The new diagram is

[20]
A
(15)
2

B
[-15]

(c)

[25]
C

6
5
(5)

3
5

D
[0]

(25)
[-30]
E

(5)

Arc capacities
A C: 10
C B: 25
Others:

All the other optimal solutions that are not BF solutions can be
obtained by sending a flow of unit along the cycle AD DE
EC CA for some 0 < < 5. That is, xAC = 5 , xAD = ,
xAB = 15, xBC = 25, xBD = 0, xCE = 30 , xDE = .
Nonbasic arc
unique cycle
AB
AB BC CE ED CB
AC
AC CE ED DA
BD
BD DE EC CB

Z when = 1
2 + 3 + 3 4 5 = 1 < 0
6+345 =0
5+433 =3 >0

AB is the entering BV. To send a flow of unit along the cycle


AB BC CE ED CB, we need
AB
BC
CE
ED
DA

<
15

20
20

The minimum is 10. Therefore BC is the the leaving BV (it be-

comes a reversed arc) and the next BF solution is

[20]
A

[25]
C

6
5

(15)
2

(5)

B
[-15]

(25)
[-30]
E

(5)

Arc capacities
A C: 10
B C: 25
Others:

D
[0]

2. 9.7-7 Consider the transportation problem having the following cost


and requirements table:
Destination
1 2 3 Supply
Source
1 6 7 4 40
2 5 8 6 60
Demand
30 40 30
Formulate the network representation of this problem as a minimum
cost flow problem. Use the northwest corner rule to obtain an initial BF
soluton. Then use the network simplex method to solve the problem.
Solution: The minimum cost flow problem:

[40]
S1

6
7
4

D2 [40]

5
S2

[60]

D1 [30]

8
6
4

D3 [30]

The initial BF solution corresponding to the solution obtained by using


the northwest corner rule is

[40]
6 (30)
S1
7 (10)
4
5

D1 [30]

D2 [40]

8 (30)

S2

[60]

6 (30)

D3 [30]

For S1 D3 , Z = 4 6 + 8 7 = 1. For S2 D1 , Z =
5 6 + 7 8 = 2. S2 D1 is the entering BV, S1 D1 is the
leaving BV. = 30. The new BF solution is

[40]
6
S1

D1 [30]
7 (40)
4

(30)
5
S2

[60]

D2 [40]

8 (0)
6 (30)

D3 [30]

For S1 D1 , Z = 6 5 + 8 7 = 2. For S1 D3 , Z =
4 6 + 8 7 = 1. S1 D3 is the entering BV and S2 D3 is the

leaving BV. = 30. The new BF solution is

[40]
6
S1

D1 [30]
7 (10)
4

(30)
5
S2

[60]

D2 [40]

(30)
8 (30)
D3 [30]

This solution is optima with a total cost of 580.

3. 9.7-8 Consider the minimum cost flow problem shown below, where the
bi values are given by the nodes, the cij values are given by the arcs,
and the finite uij values are given in parentheses by the arcs. Obtian
an initial BF solution by solving the feasible spanning tree with basic
arcs A C, B A, C D, and C E, where one of the nonbasic
arc (D A) is a reverse arc. Then use the network simplex method
to solve this problem.

[50]
A

(uAD=40)

[0]
C

1
2
B
[80]

[-70]
D
3
5

(uBE=40)

E
[-60]

Solution: The initial BF solution is

[10]
A

-6
4

(90)

[0]
C

1 (80)
2
B
[80]

[-30]
D

(uDA=40)

(30)

(60)

3
5
E
[-60]

(uBE=40)

Nonbasic arc
unique cycle
DA
DA AC CD
BC
BC CA AB
BE
BE EC CA AB

Z when = 1
6 + 4 + 3 = 1
2 4 1 = 3
5 5 4 1 = 5

BE is the entering BV. It is the leaving BV as well (reversed). The


next BF solution is

[10]
A

-6
4

(50)

[0]
C

1 (40)
2
B
[40]

-5

[-30]
D

(uDA=40)

(30)

(20)
(uEB=40)

Nonbasic arc
unique cycle
DA
DA AC CD
BC
BC CA AB
EB
EB BA AC CE

3
5
E
[-20]
Z when = 1
6 + 4 + 3 = 1
2 4 1 = 3
5 + 1 + 4 + 5 = 5

BC is the entering BV. BA is the leaving BV. The next BF solution is

[10]
A

-6
4

(10)

[0]
C

1
2
B
[40]

(30)

3
5

(20)

(40)

-5

[-30]
D

(uDA=40)

E
[-20]

(uEB=40)

Nonbasic arc
unique cycle
DA
DA AC CD
BA
BA AC CB
EB
EB BC CE

Z when = 1
6 + 4 + 3 = 1
1+42=3
5 + 2 + 5 = 2

The current solution is optimal. It corresponds to the real flows with


a cost of 750.

[50]
A

6
4

(uDA=40)

(10)

[0]
C

1
2
B
[80]

(30)

(20)

(40)
(uEB=40)

[-70]
D

(40)

(40)

3
5
E
[-60]

4. 10.3-12 Consider the following integer nonlinear programming problem.


M aximize Z = 18x1 x21 + 20x2 + 10x3
subject to
2x1 + 4x2 + 3x3 11
8

and
x1 , x2 , x3 are nonnegative integers.
Use dynamic programming to solve this problem.
Solution: Number of stages = 3. For n = 1, 2, 3, at stage n, we determine the value of xn . Let sn be the remaining slack in the functional
constraint, i.e.,

11
n=1

sn =
s 2x1
n=2
1
s2 4x2
n=3
We have

f3 (s3 ) =

max

x3 =0,1,...,bs3 /3c

s3 f3 (s3 )
0
0
1
0
2
0
3
10
4
10
5
10
6
20
7
20
8
20
9
30
10
30
11
30
f2 (s2 ) =

max

x2 =0,1,...,bs2 /4c

10x3

x3
0
0
0
1
1
1
2
2
2
3
3
3

20x2 + f3 (s2 4x2 )

s2
0
1
2
3
4
5
6
7
8
9
10
11
f1 (s1 ) =

0
0
0
0
10
10
10
20
20
20
30
30
30

x2
1

20
20
20
30
30
30
50
50

40
40
40
50

max

x1 =0,1,...,5

f2 (s2 )
0
0
0
10
20
20
20
30
40
40
50
50

x2
0
0
0
0
1
1
1
2
2
2
1
1, 2

18x1 x21 + f2 (11 2x1 )

x1
s1 0
11 50

1
57

2 3 4 5
62 65 66 65

f1 (s1 ) x1
66
4

The optimal solution is (x1 , x2 , x3 ) = (4, 0, 1) with Z = 66.

5. 10.3-21 Consider the following nonlinear programming problem.


M aximize Z = x1 (1 x2 ) x3 ,
subject to
and

x1 x2 + x3 1
x1 0, x2 0, x3 0.

Use dynamic programming to solve this problem.


Solution: (Based on the work of Sarah Jones) In stage i we will determine the value of xi . The state of stage i is Si where Si is the slack in
the constraint.
S1 = 1
S2 = 1 x1
S3 = S2 + x2
10

At stage 3 we
max f3 (S3 , x3 ) = x3
s.t.
x3 S3

The optimal solution is x3 = S3 and f3 (S3 ) = S3 .


At stage 2 we
max f2 (S2 , x2 ) = (1 x2 ) f3 (S2 + x2 )
= (1 x2 ) (S2 + x2 )
s.t.
x2 S2 and x2 0.

2
Since f2 = S2 S2 x2 +x2 x22 , f20 = S2 +12x2 . f20 = 0 = x2 = 1S
.
2
1S2
Now we consider the constraints. S2 = 1 x1 1, therefore 2 0
is always true. The other constraint is x2 S2 or x2 S2 .

1 S2
< S2 = S2 < 1
2
So in the case of S2 < 1 we will take the left endpoint (which is closer
2
to 1S
) S2 .
2
1S2
if S2 1;

2
x2 =
S2
if S2 < 1
and

f2

(S2 ) =

1
4

(1 + S2 )2
0

At stage 1 we

if S2 1;
if S2 < 1

max f1 (x1 ) = x1 f2 (1 x1 )
s.t.
x1 0
Note here that it is not necessary for x1 to be less than or equal to 1
for x2 is negative in the original constraint. S1 = 1 is not used. Since
S2 = 1 x1 , S2 1 x1 2.

(2x1 )2
x
if 0 x1 2
1
4
f1 (x1 ) =
0
if x1 > 2
11

For
(2 x1 )2
1
f1 (x1 ) = x1
= x1 x21 + x31
4
4
3
1
f10 (x1 ) = 1 2x1 + x21 = (3x1 2) (x1 2)
4
4
2
or x1 = 2
3
It is easy to check (just check x1 = 0, 23 and 2) that x1 = 23 and f1 =
8
2
z = 27
. Since S2 = 13 > 1, x2 = 1S
= 13 and x3 = S3 = S2 + x2 = 23 .
2

f10 = 0 = x1 =

6. 12.2-2 The research and development division of a company has been


developing four possible new product lines. Management must now
make a decision as to ahich of these four products actually will be
produced and at what levels. Therefore, they have asked the OR department to formulate a mathematical programming model to find the
most profitable product mix.
A substantial cost is associated with beginning the production of any
product, as given in the first row of the following table. The marginal
net revenue from each unit produced is given in the second row of the
table.
Product
1
2
3
4
Start-up cost, $
50,000 40,000 70,000 60,000
Marginal revenue, $
70
60
90
80
Let the continuous decision variables x1 , x2, x3 and x4 be the production
levels of products 1, 2, 3, and 4, respectively. Management has imposed
the following policy constraints on these variables:
1. No more than two of the products can be produced.
2. Either product 3 or 4 can be produced only if either product 1 or 2
is produced.
3. Either 5x1 + 3x2 + 6x3 + 4x4 6000
or 4x1 + 6x2 + 3x3 + 5x4 6000.
12

Introduce auxiliary binary variables to formulate an MIP model for this


problem.
Solution: For i = 1, 2, 3, 4 let

1
if product i is produced
yi =
0
otherwise
Let M be a very large number. The problem can be formulated as
follows:
M aximize Z = 70x1 + 60x2 + 90x3 + 80x4
50000y1 40000y2 70000y3 60000y4
subject to
(1)

4
X
i=1

yi 2
xi M yi i = 1, 2, 3, 4

(2) y3 + y4 y1 + y2
(3) 5x1 + 3x2 + 6x3 + 4x4 6000 + wM
4x1 + 6x2 + 3x3 + 5x4 6000 + (1 w)M
xi 0 i = 1, 2, 3, 4. yi is binary for i = 1, 2, 3, 4. w is binary.
7. 12.2-4 Consider the following mathematical model.
M aximize Z = 3x1 + 2f (x2 ) + 2x3 + 3g (x4 ) ,
subject to the restrictions
1. 2x1 x2 + x3 + 3x4 15.

2. At least one of the following two inequalities holds:


x1 + x2 + x3 + x4 4
3x1 x2 x3 + x4 3.
13

3. At least two of the following four inequalities holds:


5x1 + 3x2 + 3x3 x4
2x1 + 5x2 x3 + 3x4
x1 + 3x2 + 5x3 + 3x4
3x1 x2 + 3x3 + 5x4

10
10
10
10.

4. x3 = 1, or 2, or 3.
5. xj 0 (j = 1, 2, 3, 4),
where

f (x2 ) =

5 + 3x2
0

if x2 > 0,
if x2 = 0,

g (x4 ) =

3 + 5x4
0

if x4 > 0,
if x4 = 0.

and

Formulate this problem as an MIP problem.


Solution:
M aximize 3x1 10y1 + 6x2 + 2x3 9y2 + 15x4
subject to
x1 M y1
x4 M y2
(1) 2x1 x2 + x3 + 3x4 15
(2) x1 + x2 + x3 + x4 4 + My3
3x1 x2 x3 + x4 3 + M(1 y3 )
(3) 5x1 + 3x2 + 3x3 x4
2x1 + 5x2 x3 + 3x4
x1 + 3x2 + 5x3 + 3x4
3x1 x2 + 3x3 + 5x4
y4 + y5 + y6 + y7
14

10 + M y4
10 + M y5
10 + M y6
10 + M y7
2

(4) x3 = y8 + 2y9 + 3y10


y8 + y9 + y10 = 1
(5) xi 0 i = 1, 2, 3, 4 and yj binary j = 1, 2, ..., 10.

15

S-ar putea să vă placă și