Saturday, October 6, 2012

directed acyclic graph (DAG)



  • Directed Acyclic Graphs

A directed acyclic graph (DAG) is a directed graph that contains no cycles
http://www.csse.monash.edu/~lloyd/tildeAlgDS/Graph/DAG/

In mathematics and computer science, a directed acyclic graph is a directed graph with no directed cycles
it is formed by a collection of vertices and directed edges, each edge connecting one vertex to another, such that there is no way to start at some vertex v and follow a sequence of edges that eventually loops back to v again

A collection of tasks that must be ordered into a sequence, subject to constraints that certain tasks must be performed earlier than others, may be represented as a DAG with a vertex for each task and an edge for each constraint

algorithms for topological ordering may be used to generate a valid sequence.

http://en.wikipedia.org/wiki/Directed_acyclic_graph




  • A Model to Represent Directed Acyclic Graphs (DAG) on SQL Databases


In short, DAGs have the following properties:

A DAG has directed edges, i.e. the links that connect vertices (nodes) on the graph have a direction. The direction is denoted by an arrow head.
Starting from an arbitrary vertex, if we traverse the vertices in the direction of the arrows, it is not possible to return back to the originating vertex.

A notable and familiar structure that has the above properties is the inheritance hierarchy in Object-Oriented Programming
http://www.codeproject.com/Articles/22824/A-Model-to-Represent-Directed-Acyclic-Graphs-DAG-o

No comments:

Post a Comment