A DAG is a directed graph that contains no directed cycles.
Define G = (V, E) in which V is the set of all nodes as
{v1, v2, ..., vi ,
...vn} and E is the set of edges E = {ei,j =
(vi , vj ) | vi , vj ∈
V} .
A topological order of a directed graph G = (V, E) is an
ordering of its nodes as {v1, v2, ...,
vi , ...vn} so that...