Presentation is loading. Please wait.

Presentation is loading. Please wait.

Algorithm for obtaining the connected components of a graph Samia Qader 252a-az HW # 6 all examples obtained from LEDA software in directory: 252a/handout/demo/graphwin/graphwin.

Similar presentations


Presentation on theme: "Algorithm for obtaining the connected components of a graph Samia Qader 252a-az HW # 6 all examples obtained from LEDA software in directory: 252a/handout/demo/graphwin/graphwin."— Presentation transcript:

1 Algorithm for obtaining the connected components of a graph Samia Qader 252a-az HW # 6 all examples obtained from LEDA software in directory: 252a/handout/demo/graphwin/graphwin

2 Step 1 Do a DFS search on the graph and label in vertices in postfix order

3 Step 1 continued Graph after labeling in postfix order with edges marked

4 Step 2 Compute the reverse directed graph

5 Step 3 Perform a DFS on the reversed graph starting at the highest numbered vertex. If the search does not visit all the vertices, start again at the highest remaining vertex. Continue until all vertices have been visited.

6 Result Components of this forest give the strongly connected components of the graph.


Download ppt "Algorithm for obtaining the connected components of a graph Samia Qader 252a-az HW # 6 all examples obtained from LEDA software in directory: 252a/handout/demo/graphwin/graphwin."

Similar presentations


Ads by Google