 A topological ordering of a directed graph is an ordering of its vertices into a sequence , such that for every edge the start vertex of the edge occurs earlier in the sequence than the ending vertex of the edge . A graph that has a topological ordering cannot have any cycles , because the edge into the earliest vertex of a cycle would have to be oriented the wrong way . Therefore , every graph with a topological ordering is acyclic . Conversely , every directed acyclic graph has a topological ordering . Therefore , this property can be used as an alternative definition of the directed acyclic graphs : they are exactly the graphs that have topological orderings . 
 A topological ordering of a directed graph <a href='drop_aux' title='1'><mark>is</mark></a>an ordering of its vertices into a sequence , such <a href='null_relcl' title='2'><mark>that</mark></a>for every edge the start vertex of the edge <a href='uninflect' title='3'><mark>occurs</mark></a> earlier in the sequence than the ending vertex of the edge . A graph <a href='null_relcl' title='4'><mark>that</mark></a><a href='got' title='5'><mark>has</mark></a> a topological ordering cannot have <a href='None' title='6'><mark>any</mark></a><a href='negative_concord' title='7'><mark>cycles</mark></a> , because the edge into the earliest vertex of a cycle would have to be oriented the wrong way . Therefore , every graph with a topological ordering <a href='drop_aux' title='8'><mark>is</mark></a>acyclic . Conversely , every directed acyclic graph <a href='got' title='9'><mark>has</mark></a> a topological ordering . Therefore , this property can be used as an alternative definition of the directed acyclic graphs : they are exactly the graphs <a href='null_relcl' title='10'><mark>that</mark></a><a href='got' title='11'><mark>have</mark></a> topological orderings . 
A topological ordering of a directed graph an ordering of its vertices into a sequence , such for every edge da start vertex of tdaedge occur earlier in thdaequence than thedading vertex of the dae . A graph got a topological ordering cannot have no cycles , because the eda into the earliest vertex of a cycle would gotta be oriented the wrong way . Therefore , every graph with a topological ordering acyclic . Conversely , every directed acyclic graph got a topological ordering . Therefore , this property can be used as an alternative definition of the directed acyclic graphs : they are exactly the graphs got topological orderings .