Directed acyclic graphs (DAG)

An acyclic graph is a graph without a cycle or loop. If we want to visit other nodes from a particular node, we will not visit any of the nodes twice. A directed acyclic graph, popularly known as a DAG, is a directed graph that is acyclic. A directed acyclic graph has many usages in graph algorithms. A directed acyclic graph has a topological ordering, where the ordering of the vertices is such that the starting endpoint of every edge occurs earlier in the ordering than the ending endpoints of the edges. The following diagram represents a DAG:

From the first look, it seems that B, C, E, and D form a cycle, but close observation shows that they do not form a cycle, whereas, the example we have used in the directed graph section is a perfect example of a cyclic graph.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset