How do I check if a directed graph is acyclic?

nes1983 picture nes1983 · Feb 24, 2009 · Viewed 79.6k times · Source

How do I check if a directed graph is acyclic? And how is the algorithm called? I would appreciate a reference.

Answer

FryGuy picture FryGuy · Feb 25, 2009

I would try to sort the graph topologically, and if you can't, then it has cycles.