Directed Acyclic Graph (DAG)

A directed acyclic graph or DAG is a structure that is built out in one single direction and in such a way that it never repeats.

Here a “graph” is simply a structure of units. “Directed” describes the connection between each unit in the structure, and that they all flow the same way. And “acyclic” means describing something that is not circular or repeating.

A good example of a directed acyclic graph is a checklist. In order to do step 10, you must have done step 9, and before you can do step 8, you must have done step 7 and so on. If you were to list out these steps on a graph, you would see the flow from 1-10 and that it never repeats itself going back to 1. If it did repeat, it would not be a directed acyclic graph.

Another example of a DAG is a family tree. Your grandparents had your mom and her brother. Your mom met your dad and had you. Your mom’s brother met his wife and had their kids. In no way does your grandpa or grandma ever show up again beneath you.