CXXGraph icon indicating copy to clipboard operation
CXXGraph copied to clipboard

Add Tarjan's algorithm

Open ZigRazor opened this issue 3 years ago • 0 comments

Tarjan's algorithm for finding strongly connected components in a directed graph Uses two main attributes of each node to track reachability, the index of that node within a component(index), and the lowest index reachable from that node(lowlink). We then perform a dfs of the each component making sure to update these parameters for each node and saving the nodes we visit on the way. If ever we find that the lowest reachable node from a current node is equal to the index of the current node then it must be the root of a strongly connected component and so we save it and it's equireachable vertices as a strongly connected component.

ZigRazor avatar Oct 15 '21 09:10 ZigRazor