Example of a directed acyclic graph In mathematics, particularly graph theory, and computer science, a directed acyclic graph (DAG) is a directed graph with no directed cycles. That is, it consists of vertices and edges (also called arcs), with each edge directed from one vertex to another, such that following those directions will never form a closed loop. A directed graph is a DAG if and only if
![Directed acyclic graph - Wikipedia](https://cdn-ak-scissors.b.st-hatena.com/image/square/e53c1089bf6494908e89d6b71e53dc29052adb44/height=288;version=1;width=512/https%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fcommons%2Fthumb%2Ff%2Ffe%2FTred-G.svg%2F1200px-Tred-G.svg.png)