You are on page 1of 6

ESI 6314: Deterministic Methods in Operations Research

Solutions to Homework 7
December 11, 2015

Chapter 8: Section 2

Problem 5. There will be 7 nodes, Node 1 represents the beginning of year 1, and Node 7 is the
end of year 6 (or beginning of year 7). Then, arc (i, j) (for i < j), corresponds to purchasing a new
car at the beginning of year i and keeping it until the beginning of year j. The costs of each arc
could be calculated as:
cij = maintenance cost incurred during years i, i + 1, ..., j 1 + cost of purchasing car at the
beginning of year i trade-in value received at the beginning of year j.

c12 = 300 + 10,000 - 7,000 = 3,300


c13 = (300 + 500) + 10,000 - 6,000=4,800
c14 = (300 + 500 + 800) + 10,000 - 4,000 = 7,600
c15 = (300 + 500 + 800 + 1200) + 10,000 - 3,000 = 9,800
c16 = (300 + 500 + 800 + 1200 + 1600) + 10,000 - 2,000 = 12,400
Similarly,
c17 = 15,600
c23 = 3,300, c24 = 4,800, c25 = 7,600, c26 = 9,800, c27 = 12,400
c34 = 3,300, c35 = 4,800, c36 = 7,600, c37 = 9,800
c45 = 3,300, c46 = 4,800, c47 = 7,600
c56 = 3,300, c57 = 4,800
c67 = 3,300
We begin by giving Node 1 a permanent label:
[ 0

3300

4800

7600

9800

Next, we give Node 2 a permanent label:


3300
4800
7600
9800
[ 0

12400
12400

15600
15600

]
]

Node
3
4
5
6
7

Temporary label ( denotes next assigned permanent label)


min {4800, 3300 + 3300} = 4800
min {7600, 4800 + 3300} = 7600
min {9800, 7600 + 3300} = 9800
min {12400, 9800 + 3300} = 12400
min {15600, 12400 + 3300} = 15600

We now make node 3s label permanent and obtain:


3300
4800
7600
9800
12400
15600
[ 0
Node
4
5
6
7

Temporary label ( denotes next assigned permanent label)


min {7600, 4800 + 3300} = 7600
min {9800, 4800 + 4800} = 9600
min {12400, 4800 + 7600} = 12400
min {15600, 4800 + 9800} = 14600

We now make node 4s label permanent and obtain:


3300
4800
7600
9600
12400
[ 0
Node
5
6
7

14600 ]

Temporary label ( denotes next assigned permanent label)


min {9600, 7600 + 3300} = 9600
min {12400, 7600 + 4800} = 12400
min {14600, 7600 + 7600} = 14600

We next give node 5 a permanent label and obtain:


3300
4800
7600
9600
12400
[ 0
Node
6
7

14600 ]

Temporary label ( denotes next assigned permanent label)


min {12400, 9600 + 3300} = 12400
min {14600, 9600 + 4800} = 14400

We next give node 6 a permanent label and obtain:


3300
4800
7600
9600
12400
[ 0
Node
7

14400 ]

Temporary label ( denotes next assigned permanent label)


min {14400, 12400 + 3300} = 14400

We now make node 7s label permanent obtaining:


3300
4800
7600
9600
12400
[ 0

14400 ]

Since 14400 9600 = c57 , 9600 4800 = c35 and 4800 0 = c13 , we find the shortest path from
node 1 to node 7 to be 1 3 5 7. Thus car should be kept for a two year period and then sold.

Chapter 8: Review Problems

Problem 2.
a. Assume, City 1 =N.Y.,..., City 6 =L.A.:

Then,
max z

x0
s.t. x12 + x13 = x0

(Node 1)

x12 = x24 + x25

(Node 2)

x13 = x34 + x35

(Node 3)

x24 + x34 = x46

(Node 4)

x25 + x35 = x56

(Node 5)

x46 + x56 = x0

(Node 6)

x12 500, x13 400


x24 300, x25 250
x34 200, x35 150
x46 400, x56 350
All variables 0

b. Begin by labeling sink via chain (1, 2) (2, 4) (4, 6) and add a flow of 300 to each of these
arcs. Then label sink by path (1, 3)(3, 5)(5, 6) and add a flow of 150 to each of these arcs. Then
label sink by chain (1, 2) (2, 5) (5, 6) and add a flow of 200 to each arc on this path. Finally
label the sink by (1, 3) (3, 4) (4, 6) adding a flow of 100 to each arc on this path. This yields
the following (maximum) flow:
Arc
NYChicago
NYMemphis
ChicagoDenver
ChicagoDallas
MemphisDenver
MemphisDallas
DenverLA
DallasLA
Into Sink

Flow
500
250
300
200
100
150
400
350
750

Chapter 8: Section 7
Find a minimum cost flow for the network shown in Figure 62.

Initial bfs:

In this bfs, x12 = 25 and x56 = 25 are non-basic variables at their upper bound, and x23 =
x24 = x34 = 0 are non-basic variables at their lower bound. In order to check the optimality of this
bfs, we have:
y1 = 0
y1 y3
y3 y5
y2 y5
y5 y4
y4 y6

= c13
= c35
= c25
= c54
= c46

= 12
=3
=8
=5
=7

y3 = 12
y5 = 15
y2 = 7
y4 = 20
y6 = 27

Now, for the non-basic variables we calculate:


c12
c56
c23
c24
c34

= y1 y2 c12
= y5 y6 c56
= y2 y3 c23
= y2 y4 c24
= y3 y4 c34

= 0 (7) 10 = 3 < 0
= 15 (27) 6 = 6
= 7 (12) 7 = 2
= 7 (20) 11 = 2 > 0
= 12 (20) 5 = 3 > 0

x12 , x24 and x34 violate the optimality conditions. We choose x12 to enter the basis:

Since 15 + 25, we choose = 10. Then, the new bfs will be:

In this bfs, x13 = 25 and x56 = 25 are non-basic variables at their upper bound, and x23 =
x24 = x34 = 0 are non-basic variables at their lower bound. In order to check the optimality of this
bfs, we have:
y1 = 0
y1 y2
y2 y5
y3 y5
y5 y4
y4 y6

= c12
= c25
= c35
= c54
= c46

= 10
=8
=3
=5
=7

y2 = 10
y5 = 18
y3 = 15
y4 = 23
y6 = 30

Now, for the non-basic variables we calculate:


c13
c56
c23
c24
c34

= y1 y3 c13
= y5 y6 c56
= y2 y3 c23
= y2 y4 c24
= y3 y4 c34

= 0 (15) 12 = 3
= 18 (30) 6 = 6
= 10 (15) 7 = 2
= 10 (23) 11 = 2 > 0
= 15 (23) 5 = 3 > 0

We choose x34 to enter the basis:

Since 15 0, we choose = 15. Then, the new bfs will be:

In order to check the optimality of this bfs, we have:


y1 = 0
y1 y2
y2 y5
y3 y5
y3 y4
y4 y6

= c12
= c25
= c35
= c34
= c46

= 10
=8
=3
=5
=7

y2 = 10
y5 = 18
y3 = 15
y4 = 20
y6 = 27

Now, for the non-basic variables we calculate:


c13
c56
c23
c24
c54

= y1 y3 c13
= y5 y6 c56
= y2 y3 c23
= y2 y4 c24
= y5 y4 c54

= 0 (15) 12 = 3
= 18 (27) 6 = 3
= 10 (15) 7 = 2
= 10 (20) 11 = 1
= 18 (20) 5 = 3

Since for all the non-basic variables at their lower bound we have cij 0 and for all the nonbasic variables at their upper bound we have cij 0, this solution is an optimal solution with cost
equal to:
z = 15 10 + 25 12 + 15 8 + 15 5 + 10 3 + 15 7 + 25 6 = 930.

You might also like