COS 226 PROBLEM SET 10

1. Show, in the style of Figure 27.24, the DFS forests and the contents of the auxiliary vertex-indexed arrays when using Kosaraju's algorithm to compute the strong components of the digraph
     0-1 1-2 1-7 2-0 2-4 3-2 3-4 4-5 4-6 4-7 5-3 5-6 7-8 8-6 8-7
assuming use of a standard adjacency lists representation. Also, draw the kernel DAG.







2. Label the following points in the plane 0 through 8, respectively:

 (1, 3) (2, 1) (2, 6) (1, 6) (6, 6) (3, 4) (3, 6) (5, 2) (5, 7)
Taking edge lengths to be weights, consider the weighted graph defined by the edges
     0-1 0-2 2-6 5-6 1-5 1-4 1-7 1-3 3-7 4-8 6-8 4-5 4-7
Give the order in which the edges of the MST are discovered by Kruskal's algorithm.



3. Answer question 2 for Prim's algorithm (adjacency matrix representation).



4. Answer question 2 for priority-first search, assuming a standard adjacency-lists representation, starting the search at 0.



5. Answer question 2 for Bourvka's algorithm.



6. Give the all-shortest-paths matrix that is produced by Floyd's algorithm for the graph in question 2.





Due: in precept on May 3 or 4.

Do your work on this page (use the back if you must)