Problem Solving

Directed Acyclic Graph

A student follows arrows running forward through colored nodes.

Directed Acyclic Graph definition

A directed acyclic graph is a directed graph with no directed cycle.

In Spanish
grafo dirigido acíclico
Topic
Graph algorithms and networks

Directed Acyclic Graph in a picture

Directed Acyclic Graph diagramThe arrows A → B, A → C, and B → C all move forward through A, B, C.Set the direction of each edgeA points to B and CB also points to CC has no outgoing edge hereNo path returns to its startThe graph is a DAG
The arrows A → B, A → C, and B → C all move forward through A, B, C.

How it works

Each edge has an orientation. Following arrows can never return to the starting vertex along a directed cycle. A directed acyclic graph, or DAG, can model dependencies because its vertices have at least one topological order.

Worked examples

Do edges A → B and B → A form a DAG?

No. They form a directed two-edge cycle.

Does A → B → C with A → C form a DAG?

Yes. All arrows go forward in the order A, B, C.

Can the underlying undirected graph have a cycle?

Yes. In the previous example the undirected edges make a triangle.

Common mistake

Follow arrow direction when looking for cycles. A loop in the undirected drawing may fail to be a directed cycle.

Quick check

Which property defines a DAG?

What is its common abbreviation?

Show answer

DAG.

What vertex ordering exists for every DAG?

Show answer

A topological order.

Sources

Flashcard

Directed Acyclic Graph

Reveal the definition

A directed acyclic graph is a directed graph with no directed cycle.

Effortless Math. “Directed Acyclic Graph.” Math Dictionary.