DAGs Longin Jan Latecki latecki@temple.edu
DAGs In mathematics and computer science, a directed acyclic graph (DAG), is a directed graph with no directed cycles. That is, it is formed by a collection of vertices and directed edges, each edge connecting one vertex to another, such that there is no way to start at some vertex v and follow a sequence of edges that eventually loops back to v again. DAGs may be used to model many different kinds of information. The reachability relation in a DAG forms a partial order, and any finite partial order may be represented by a DAG using reachability.
Topological Sorting A total ordering is said to be compatible with the partial ordering R if a b whenever a R b. Constructing a total ordering from a partial ordering is called topological sorting.
Topological Sorting
If there is an edge from v to w, then v precedes w in the sequential listing. 1 2 3 4 5 6 7 8 9 9 6 3 4 8 2 5 1 7