HW5 Sol
HW5 Sol
Homework #5
Reading Assignment:
Chapter 14 from your textbook, primarily Sections 1-4
From Prof. Errera’s notes that have been posted at the course Web site, pages 6-14, 43-
46, 51-53, 60-67, 70-72
The PowerPoint presentation on Transportation posted at the course Web site.
http://www.isye.gatech.edu/~spyros/courses/IE3103/course_materials.html
1. Modes like rail and water are best suited for large / bulky and low-value shipments. Both of
these modes are better utilized while shipping large capacities (full containers) and are charging
some of the lowest rates. The security and (time-related) performance / responsiveness of these
modes is not as good as that provided by some other modes like air or even truck, but this might
not be a significant concern for low-value freight.
2. In order to handle small and frequent shipments from the DC to retail outlets, Wal-Mart can
use a combination of cross-docking (which reduces inventory costs at DC) and milk-runs (which
reduce transportation cost through consolidation of many small shipments). Notice, however, that
the effective deployment of a cross-dock operation typically implies a substantial increase in cost
and effort with respect to coordination and management of the supply chain.
3. Home Depot has to deal with the transportation cost of replenishing all its retail stores, which
is spared by an e-business like Amazon. On the other hand, products related to home
improvement tend to get large and heavy. Therefore an e-business like Amazon.com will have
quite large transportation costs because it uses package carriers like UPS and FedEx. The
eventual viability of such a model will significantly depend to the company’s ability to pass (part
of) this cost to the customer. In general, Home Depot should be more cost effective while
supplying such material.
5. Inventory aggregation can help companies like Dell and Amazon by reducing the variability
and hence the safety stock required. This leads to lower inventory costs, as compared to
companies that need to maintain inventory at many different locations (and hence require higher
safety stock).
The impact of this inventory aggregation on the transportation costs experienced by these two
companies will depend on the way in which they are charged for their various shipments with
respect to the distance traveled. In general, it is expected that the smaller size of the Amazon
shipments will result in flatter rates with respect to distance, compared to the corresponding rates
experienced by Dell, since most of the cost for these small shipments is due mainly to handling
rather than to the physical transport of the material.
Problem set:
Discussion Questions at the end of Chapter 14: 1, 2, 3, 5. (Solutions are at the end of
the document)
Problems
1. Use one of the algorithms presented in class in order to find the shortest path from
node 1 to node 5 in the following network.
Next, we demonstrate the application of Dijkstra’s algorithm on this problem. Notice that a
necessary condition for the application of this algorithm is that all arc costs are non-negative.
Perm(0) = empty
Node 1 2 3 4 5
U(j) 0 inf inf inf Inf
Pred(j) 1 nill nill nill Nill
DIJKSTRA’S ALGORITHM:
Perm(0) = empty
Node 1 2 3 4
U(j) 0 Inf inf inf
Pred(j) 1 nill nill nill
This gives the shortest path as 1-3-2-4 with length 0. This is a wrong answer as shown next,
during the application of Bellman-Ford algorithm.
List(0) = <1>
Node 1 2 3 4
U(j) 0 Inf inf inf
Pred(j) 1 nill nill nill
Pop 1, List(1) = <2, 3>
Node 1 2 3 4
U(j) 0 2 1 inf
Pred(j) 1 1 1 nill
As you can see the algorithm has started to cycle between nodes 2 and 3. This is because going
from node 2 to node 3 and back creates a cycle of negative cost, and therefore, by cycling
between these two nodes we can drive the cost of the corresponding path arbitrarily low. In other
words, the presence of the undirected edge with a negative cost between nodes 2 and 3 implies
that the shortest path between nodes 1 and 4 will have a total cost of -! This shows that the
solution produced by Dijkstra’s algorithm was wrong. The Bellman-Ford algorithm realizes this
complication and it reacts to it by failing to terminate (looping indefinitely as indicated above,
each time driving the labels of nodes 2, 3 and 4 to lower and lower values). Finally, notice that
things would have been different, and the Bellman-Ford algorithm would have terminated
successfully in finite time, if the edge between nodes 2 and 3 was directed (i.e., it could be
traversed only in one direction).
3. The distances (in miles) between five cities A, B, C, D and E are as follows:
B C D E
A 132 217 164 58
B 290 201 79
C 113 303
D 196
It is necessary to build a road system that connects all these cities. Assume that for
certain reasons, no road can connect directly cities A and B, or cities C and E. What
is the minimum length of road required?
This problem can be solved using any algorithm to build the minimum spanning tree
(MST), which will be the network of roads with least cost. The constraints can be
incorporated directly in the algorithm by assuming that edges A-B and C-E do not
exist. Hence, using Kruskal’s algorithm, we can list the remaining edges in non-
decreasing order with respect to their length, as follows:
AE(58), BE(79), CD(113), AD(164), DE(196), BD(201), AC(217), BC(290).
The first four edges from this list that do not contain any cycle are:
AE, BE, CD and AD, and they constitute the required MST (you can check the lack
of cycles by plotting the corresponding sub-graph).
4. A cyclist is going to cycle between cities A and E of problem 3. She could cycle on
the newly built road system that you suggested in problem 3, but, since she rides a
mountain bike, she does not mind riding (maybe part of the route) through unpaved
territory. However, she would like to plan her route so that she minimizes the
distance traveled between any two consecutive cities that she will be visiting on her
way. Suggest the best route for her.
This is supposed to be a min-max path problem: the cyclist would like to go from A
to E in a way that minimizes the longest distance between any two cities she travels.
This problem can be solved by: (i) constructing a minimum spanning tree (MST) for
the considered graph, and (ii) tracing the path form A to E on this MST. Performing
these two steps you can show that the cyclist should simply go directly from A to E.
(Rem: Notice that, since in this problem the cyclist can use also unpaved territory,
the construction of the MST in step (i) should consider also the edges AB and CE
that were ignored in the solution of problem 3.)
5. A soda delivery truck starts at location 1 and must deliver soda to locations 2, 3, 4
and 5 before returning to location 1. The distances of the road segments connecting
any pair of these locations are as follows:
2 3 4 5
Location 1 20 17 10 25
Location 2 15 20 10
Location 3 16 16
Location 4 20
a. The network satisfies the triangle inequality. This can be verified by simply checking
all the 3-combinations of the locations. For the provided numbers, you can simply
notice that the only pair of numbers that has a total sum less than the length of any
single edge is the lengths of edges (1,4) and (2,5): 10+10 = 20 < 25 which is the
length of edge (1,5). But this does not violate the requirements of the Delta
inequality.
Another way to verify the satisfaction of the Delta inequality is to observe that the
arc-length between any two locations is same as the shortest path between those two
locations. When this condition is met, the triangle inequality is always satisfied.
b. A lower bound can be obtained by constructing the minimum spanning tree and
joining the any two closest nodes on it. The length of such a network will be the
lower bound. In this case, the minimum spanning tree is constructed by selecting the
edges 1-4, 2-5, 2-3, 3-4. The length of this MST is 51. The lower bound on tour can
be obtained by adding the length of 3-5 (i.e., the minimum-length edge not on the
computed MST). Thus lower bound is 67.
c. Under the MST heuristic, we first need to generate an Eulerian walk. Using the MST
developed in part (b), the most obvious walk is to start at location 1, visit all the
locations along the MST till we reach location 5 and then retrace our steps. Thus the
walk is 1-4-3-2-5-2-3-4-1. When we travel along this walk, and we hit location 5 for
the first time, we find that we have to travel along previously traversed arcs. So we
try to construct a shortcut by visiting the next unvisited location. But there are no
unvisited locations left. Thus we return to location 1. Thus, our tour is 1-4-3-2-5-1.
The total length of this tour is 76. Since, according to part (b), 67 is a lower bound for
the length of the optimal tour T *, an upper bound for the difference C(T MST)-C(T*) is
76-67=9.
d. We start with an arbitrary partial tour by taking the longest arc. Thus the partial tour
is 1-5-1.
To avoid the high maintenance cost associated with an older vehicle, the company may
trade in the vehicle and purchase a new one. The price received in the trade-in depends
on the age of the vehicle at the time of the trade-in, according to the following Table:
Assuming that the price of a new vehicle will be stable over the next five years, develop a
“shortest-path” formulation for identifying a vehicle replacement plan that minimizes the
total cost (i.e., total purchasing cost + total maintenance cost – total money received from
any trade-ins) for the company.
This problem can be modeled as a shortest path problem by imagining each year as a
node on the network. The network will have 6 nodes (1,2,3,4,5, and 6). Node i is the
beginning of year i. For i < j, there will be a directed arc (i,j) corresponding to
purchasing a new car at the beginning of the year i and selling it at the beginning of
the year j. The cost Cij associated with this arc will be the maintenance cost during
years i, i+1,…,j-1, plus the cost of purchasing the car at the beginning of year i,
minus the trade-in value of the car at the beginning of year j. (In the more general
case, one could consider Net Present Values rather than nominal values, by
appropriately discounting the relevant costs and salvage values with the applying
interest/discount rate).
The actual network is quite dense with quite a few arcs (15 to be exact) and is not
drawn for sake of brevity. Any directed path from node 1 to node 6 defines a
potential plan. E.g., the path 1-3-5-6 indicates a plan where the vehicle is replaced at
the beginning of the 1st, 3rd and 5th year. The corresponding cost is 12+12+7=31. The
quest is for the plan wit the minimum possible cost, which corresponds to a shortest
path on this graph.