Download presentation
Presentation is loading. Please wait.
Published byGary Day Modified over 8 years ago
1
Strongly Connected Components for Directed Graphs Kelley Louie Credits: graphs by /demo/graphwin/graphwin
2
Overview zThe following algorithm will determine if a directed graph contains strongly connected components: z1. perform depth first search and label vertices in post fix order z2. compute reversed directed graph z3. perform depth first search on reversed graph z4. components of this forest are strongly connected components
3
Depth First Search and Post Fix Order zPerform depth first search on the graph black - tree edge blue - cross edge orange - back edge zLabel nodes in post fix order znote: start dfs at node 4 then node 9
4
Reverse Directed Graph z Compute reversed directed graph (copy the graph but reverse the arrows)
5
Depth First Search on Reversed Graph z Perform depth first search on reversed graph starting as highest post fix order vertex z continue until finished
6
Strongly Connected Components z Components from the depth first search of the reversed graph compose the strongly connected components of the original graph
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.