New to this topic?
We recommend reading these guides first to get the most out of this one:
Directed
Edges Have Direction
Acyclic
No Circular Loops
Topo
Sort → Valid Sequence
Applications in Ops

What Is a DAG?

A Directed Acyclic Graph (DAG) is a graph where edges (arrows) have direction and there are no cycles — you can never follow arrows and end up back where you started. This is exactly the structure of every project schedule: tasks flow in one direction (from start to finish) and no task can be its own prerequisite.

Every time you draw a project network diagram, create a precedence chart, map a value stream, or build a production routing, you are working with a DAG — whether you know it or not. Understanding the underlying math gives you powerful tools for analyzing and optimizing these structures.

Why "Acyclic" Matters

If your dependency graph had a cycle (A depends on B, B depends on C, C depends on A), nothing could ever start — it is a deadlock. The "acyclic" property guarantees that a valid execution order exists. If you ever find a cycle in your project plan, it means your dependency logic is wrong and must be fixed before scheduling.

DAG Terminology for Operations

TermGraph DefinitionScheduling Meaning
Node (Vertex)A point in the graphA task, activity, or work package
Edge (Arc)A directed connection between two nodesA dependency: "Task A must finish before Task B starts"
SourceA node with no incoming edgesA task with no prerequisites — can start immediately
SinkA node with no outgoing edgesA final deliverable — nothing depends on it
PathA sequence of nodes connected by edgesA chain of dependent tasks from start to finish
Longest PathThe path with the greatest total weightThe critical path — minimum project duration
In-degreeNumber of incoming edges to a nodeNumber of prerequisites for a task
Out-degreeNumber of outgoing edges from a nodeNumber of tasks that depend on this one
Topological SortA linear ordering where every edge goes left-to-rightA valid execution sequence respecting all dependencies

Topological Sorting: Finding a Valid Order

Topological sorting answers the question: in what order can I execute these tasks so that every task's prerequisites are completed before it starts?

Find all source nodesIdentify tasks with in-degree = 0 (no prerequisites). These can start immediately.
Execute and removeExecute any source node. Remove it and its outgoing edges from the graph. This may create new source nodes (tasks whose prerequisites are now all completed).
Repeat until emptyContinue selecting and removing source nodes. If the graph empties, you have a valid topological sort. If nodes remain but none have in-degree 0, you have a cycle (a bug in your dependency logic).
Task Graph: A → B, A → C, B → D, C → D
Valid Order 1: A, B, C, D
Valid Order 2: A, C, B, D
Invalid: B, A, C, D (B requires A — violated)
A DAG may have multiple valid topological sorts. Both orders above respect all dependencies. The choice between them depends on resource availability and priorities.

DAG Properties That Matter for Scheduling

Longest Path = Minimum Duration

In a weighted DAG (where each node has a duration), the longest path from any source to any sink is the minimum time to complete all work. This is exactly the critical path. The longest-path algorithm on a DAG runs in linear time — it is computationally efficient even for massive project networks.

Parallelism = Width of the DAG

The "width" of a DAG (maximum number of nodes that can execute simultaneously at any point) tells you the maximum parallelism available. If your DAG has a width of 8, you could theoretically use 8 teams working in parallel. If your DAG is a straight chain (width = 1), nothing can happen in parallel — your only option is faster sequential execution.

Merge Points = Risk Concentrators

Nodes with high in-degree (many predecessors) are merge points where multiple parallel paths converge. These are schedule risk concentrators: the merge point cannot start until all predecessors finish, and the slowest predecessor determines the delay. PERT's merge bias problem is rooted in this DAG property.

DAGs in Manufacturing & Operations

ApplicationWhat the DAG RepresentsKey Insight
Project scheduling (CPM/PERT)Tasks and their dependenciesLongest path = minimum project duration
Bill of Materials (BOM)Components and assembliesTopological sort = build order. You cannot assemble before parts exist.
MRP explosionMaterial requirements cascading through BOM levelsDAG traversal determines when to order each component
Production routingOperations in sequence on the shop floorThe routing defines the process DAG for a single product
Value stream mapsProcess steps and material/information flowThe VSM is a DAG. Flow optimization is path optimization.
Build/deploy pipelinesCompilation, testing, and deployment stepsCI/CD pipelines are DAGs executed by build systems
Data pipelines / ETLData transformations and their dependenciesTools like Airflow, dbt, and Prefect all use DAGs
Supply chain networksSuppliers, factories, and distribution centersMaterial flow through the network follows DAG logic

Detecting and Breaking Cycles

A cycle in your dependency graph means deadlock — nothing can proceed. Common causes and fixes:

CauseExampleFix
Circular approval loopsEngineering approves manufacturing plan, manufacturing plan requires engineering sign-offIdentify which approval is truly first. Often one is a review, not a hard prerequisite.
Mutual information needsTeam A needs Team B's output, Team B needs Team A's outputBreak the cycle with an intermediate milestone or preliminary version exchange.
Over-specified dependenciesToo many "must finish before" links added for safetyChallenge each dependency: is it a hard physical constraint or just a preference?
✅ Good DAG Design
  • Only include true dependencies — physical, logical, or contractual
  • Minimize unnecessary sequential constraints to maximize parallelism
  • Identify and manage high-in-degree merge points as risk areas
  • Use topological sort to validate execution feasibility
  • Keep the graph structure visible — draw it, review it with the team
❌ Common Mistakes
  • Adding dependencies "just in case" — each unnecessary edge reduces parallelism
  • Missing dependencies — leading to work starting before prerequisites are met
  • Circular dependencies that create deadlocks
  • Treating preference-based sequences as hard constraints
  • Ignoring merge points as risk concentrators

🎯 Key Takeaway

Every project schedule, BOM, production routing, and value stream is a directed acyclic graph. Understanding DAG properties — topological sort for valid ordering, longest path for critical path, width for parallelism, and merge points for risk — gives you a deeper and more precise way to analyze and optimize schedules. You do not need to be a graph theorist, but knowing that you are always working with a DAG (and what that implies) will make you a sharper planner.

Interactive Demo

Build a dependency graph by connecting nodes. See the topological sort order and identify the critical path.

⚑
Try It Yourself
Interactive DAG Builder
β–Ό
Click a node to start an edge, then click another node to complete it. The system validates no cycles exist. Click an existing connection to remove it. Nodes show task durations β€” the critical path is highlighted.
A3dRequirementsB5dDesignC4dProcurementD6dBuildE3dTestF2dDeploy
Topological Sort Order
A→B→C→D→E→F
Critical Path
Add edges to see critical path
0
Edges
0 days
Critical Path
Valid
Valid DAG
0 / 6
Nodes on CP
Ready for the full knowledge check? Test your understanding with guided scenarios and data export.
PROTake the Pro Knowledge Check β†’
🏭
Free Process Modeler
Map your production flow, find bottlenecks & optimize staffing. No login required.
Try It Free →
Free forever · No credit card

Stop reading, start doing

Model your process flow, optimize staffing with Theory of Constraints, and track every shift — all in one platform. Set up in under 5 minutes.

Start Free → Try Process Modeler