Next: Planarity Testing
Up: Easy Graph Problems
Previous: Depth-First Search
Perform a depth-first-search. Label vertices in reverse order as they
are marked fully-explored. Consider the edge (u,v), encountered
during exploration of u. If v undiscovered DFS(v)
before continuing with marked fully-explored
before u. If v discovered, but not fully-explored
this can't happen because topological sorting can only be
performed on directed-acyclic-graphs(DAG). That is, a directed graph
without cycles. If v is fully-explored labeled
before before v in topological order.
Nitin Sharma
Wed Oct 8 17:46:14 PDT 1997