I am facing the most curious situation with [my current information of] transitive closure algorithms. Specifically, is what follows not an algorithm for finding the transitive closure of a graph G(V, E)
and is the time complexity not O(|V|+|E|)
:
Use Kosaraju's to compute SCCs (strongly connected components) -- O(|V| + |E|)
Create a DAG from the SCCs as (super)nodes -- O(|V| + |E|)
In a single supernode, reachability of all nodes is the same and equal to the union of the nodes in the containing supernode plus the reachable supernodes in the DAG -- O(|V| + |E|) to compute reachability in the DAG and O(|V| * |V|) total to compute reachability sets for all nodes
These reachability sets do constitute the transitive closure of the graph wholly, right?
But there aren't any O(|V| + |E|)
transitive closure algorithms around.
What am I missing?