This preview shows pages 1–4. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: I 1 2 C 1 2 S I 3 1 I 2 3 C 1 2 S Sample Output: no yes There are 2 components. yes The network is connected. Note: Must use unionbysize and path compression. p.337 9.2 If a stack is used instead of a queue for the topological sort algorithm in Section 9.1, does a different ordering result? Why mi g p.337 9.5 a. Find the shortest path from A to all other vertices for the graph in Figure 9.80. b. Find the shortest unweighted path from B to all other vertices for the graph in Figure 9.80. Sheet1 Page 2 p.338 9.10 a. Explain how to modify Dijkstra's algorithm to produce a count of the number of different minimum paths from v to w. b. Explain how to modify Dijkstra's algorithm so that if there is more than one minimum path from v to w, a path with the fewes Sheet1 Page 3 or or or "There are k components." where k is the number of connected components in this network. Sheet1 Page 4...
View
Full
Document
This note was uploaded on 02/16/2011 for the course CS 136 taught by Professor Yuechen during the Winter '08 term at Zhejiang University.
 Winter '08
 YueChen

Click to edit the document details