Unit content
Directed graphs and directed acyclic graphs
In a directed graph, each edge has an orientation. A directed edge from $u$ to $v$ is written
$$u\to v.$$
The direction matters: $u\to v$ does not imply $v\to u$.
A directed path follows edges in their allowed direction. A directed cycle returns to its starting vertex while respecting every edge orientation.
A directed acyclic graph or DAG is a directed graph containing no directed cycles.
DAGs naturally represent precedence and dependency: if an edge means “must happen before” or “depends on”, a directed cycle would represent a circular requirement.
Sources, sinks and directed reachability describe how influence or dependency can flow through such a graph. Algorithms can later exploit acyclicity to process a DAG in dependency-respecting order.