Tarjan's strongly connected components algorithm | Hello World
The SCC is defined as the area where each vertex can reach every other vertex in the component in a directed graph. The Tarjan's SCC algorithm goes as follows:
First run a DFS to cover all the list starting from arbitrary point. mark the finishing time. Then reverse all the edge to form a new graph, then run DFS by the reverse order of the previous recorded finishing time. And everything we can reach is in the same SCC.
Read full article from Tarjan's strongly connected components algorithm | Hello World
No comments:
Post a Comment