June 2020
Intermediate to advanced
364 pages
13h 56m
English
A DAG is a type of directed graph that doesn't have cycles in it. What this means is that there are no closed loops; that is, three or more nodes in a similar direction. So, suppose we have the following adjacency matrix:

We can see, in the preceding adjacency matrix, that we have an edge from node 1 to node 3, an edge from node 3 to node 4, and an edge from node 4 to node 1. This creates a cycle within the graph.
Visually, you can think of a DAG as having a hierarchy where nodes can flow downward or upward through subsequent levels. So, if our edges are all directed upwards, none of the nodes will ever point from ...