Loading...
Decomposition of a directed graph into maximal mutually reachable sets; condensation graph reveals high-level dependency DAG.
A strongly connected component (SCC) in a directed graph is a maximal set of vertices mutually reachable. Collapsing each SCC yields a DAG (condensation graph).
Linear time: each edge & vertex processed constant number of times.
Algorithm | Passes | Key Structure | When Preferred |
---|---|---|---|
Kosaraju | 2 DFS + transpose | Stack (finish order) | Clarity, teaching |
Tarjan | 1 DFS | Lowlink + stack | Performance simplicity |
Gabow | 1 DFS | Two stacks | Alternate lowlink avoidance |
Learn the two-pass Kosaraju process and lowlink intuition for Tarjan, then animate SCC discovery.