graph algorithms figure directed graph figure depth-first search of previous graph one use of depth-first search is to test whether or not directed graph is acyclic the rule is that directed graph is acyclic if and only if it has no back edges (the graph above has back edgesand thus is not acyclic the reader may remember that topological sort can also be used to determine whether graph is acyclic another way to perform topological sorting is to assign the vertices topological numbers nn by postorder traversal of the depth-first spanning forest as long as the graph is acyclicthis ordering will be consistent