directed graph cycle tester
Check if a graph is acyclic
acyclic [graph.dot]
Remove edges to make graph acyclic (print result)
acyclic -n [graph.dot]
Reverse edges to make graph acyclic (in place)
acyclic -r [graph.dot]
acyclic [-nrv] [file]
acyclic is a Graphviz utility that tests whether a directed graph is acyclic (contains no cycles). If cycles exist, it can either report them or modify the graph to break cycles by reversing or removing edges.
This tool is useful for preprocessing graphs before layout algorithms that require acyclic input, or for verifying dependency graphs where cycles would indicate errors.
-n
Remove edges to make the graph acyclic (print reversed edges)
-r
Reverse edges to make the graph acyclic
-v
Verbose mode; print cycle-breaking information
Only works with directed graphs in DOT format. Edge removal or reversal modifies the graph structure, which may not preserve intended relationships. For large graphs with many cycles, the output may significantly differ from the input.
acyclic is part of the Graphviz project, developed at AT&T Labs Research starting in 1991. The tool was included to support preprocessing of graphs for hierarchical layout algorithms like dot, which require acyclic input graphs.