30 likes | 113 Views
CSC 252: Algorithms. Homework 6 Hao Xi 252a-ak. Step 1: DFS traversal of the digraph with vertices labeled in postfix DFS order.
E N D
CSC 252: Algorithms Homework 6 Hao Xi252a-ak
Step 1: DFS traversal of the digraph with vertices labeled in postfix DFS order Note: The number after the colon is postfix DFS order. Heavy solid lines are tree edges. Thin solid lines are forward edges. Green dotted lines are cross edges. Blue dashed lines are backward edges.
Step 2-4: Perform DFS on reversed diagraph starting from the highest labeled vertex. If not all vertices are visited, resume DFS from the highest labeled unvisited vertex till all are visited. In the resulting forest, each tree contains the vertices of a strongly connected components.