UMBC CMSC441, Design & Analysis of Algorithms, Fall 2014
Due Thursday, November 13, 2014
- Negative cost edges.
Suppose that we have a graph with negative cost edges, but no negative
cost cycles. Does this algorithm work to find the shortest path? First
find the edge with the most negative weight. Call this weight W.
Modify the original graph G by adding W to every edge's
weight. Call the new graph G'.
Since there are no negative weight edges in G', we can use
Dijkstra's algorithm on
G' and report the shortest path found as the shortest path in
G. Explain whether this algorithm works or does not work.
- "Short" shortest paths.
Suppose that you are guaranteed that the shortest paths in a
weighted, directed graph
G are actually "short". In particular, you know that the shortest
path (by weight) between any two
G has no more than k
Describe an algorithm that finds a shortest path between two
in G in O( k E ) time. Briefly justify the
correctness and running time of your algorithm.
- Arbitrage. Problem 24-3, page 679.
12 Nov 2014 13:11:31 EST
to Fall 2014 CMSC 441 Section 2 Homepage