This preview shows page 1. Sign up to view the full content.
Unformatted text preview: b. Write a set of recurrence relations that characterize the complexity of the problem. c. Show that the complexity of the problem is O (3 n ). Greedy Even though greed pays oF in Dijkstras algorithm, greedy strategies may not nd the shortest path for a graph. a. Give an example to show that the following greedy strategy doesnt work in nding the shortest path: at each step, visit the unvisited vertex closest to the one just visited (In Dijkstras algorithm, the greedy strategy is to visit the unvisited vertex which is closest to the set of vertices that have already been visited ). b. One important reason that Dijkstras algorithm works is that the costs of edges are all positive. If it is not true, i.e., there exit edges with negative costs, will Dijkstras algorithm work for this particular type of graphs?...
View Full
Document
 Winter '08
 SURI
 Algorithms, Data Structures

Click to edit the document details