Acyclic orientation Created 2026-10-14 Updated 2026-11-05
An acyclic orientation is an orientation of a graph whose resulting directed graph has no directed cycle, hence is a directed acyclic graph. A directed cycle must follow every arrow around its closed route. A cycle in a graph in the skeleton of a directed graph only requires the corresponding undirected edges; their arrows need not agree around the route.
For the same triangle in a graph with vertex set and edges , compare
Both have an undirected cycle in a graph in their skeleton of a directed graph. Only has a directed cycle. In , has no outgoing directed edge, so a route cannot continue from back to .
Thus an acyclic orientation does not require its underlying undirected graph to be a forest. Every orientation of a graph of a forest is acyclic, because a directed cycle would give an undirected cycle in a graph. Conversely, every finite simple graph, including one with many cycles in a graph, admits at least one acyclic orientation by the following ordering construction. On this triangle in a graph, six of the eight orientations of a graph are acyclic; the other two follow the directed cycle in opposite senses.
Arithmetic circuit Created 2026-10-18 Updated 2026-11-05
An arithmetic circuit is a directed acyclic graph whose input nodes are variables or constants in a field, and whose internal gates perform addition, subtraction, or multiplication. Gates may reuse earlier outputs, so the circuit can represent a polynomial without listing all its monomials.
Bayesian network Created 2026-10-05 Updated 2026-11-05
A Bayesian network consists of a directed acyclic graph whose nodes are random variables, together with conditional distributions satisfying . Its directed acyclic graph encodes conditional independence constraints. For unrestricted binary variables it has free conditional probabilities. A directed acyclic graph used this way need not have a causal interpretation.
Binary decision diagram Created 2026-10-31 Updated 2026-11-05
A directed acyclic graph representing a Boolean function. A decision node tests a Boolean variable and has zero and one successors; evaluation follows the corresponding arrows until a terminal node returns a Boolean value. Sharing subgraphs can make a binary decision diagram much smaller than a binary decision tree.
Binary path-counting gadget Created 2026-09-28 Updated 2026-11-05
A binary path-counting gadget constructs a directed acyclic graph with exactly directed paths from entrance to exit , using vertices for a nonnegative integer .
For , read its binary expansion after the leading one. Begin with one edge . For each following bit , add fresh vertices and edges , , , . If , also add . Replace by . The path count changes from to . Finally add . For , the bits give counts . For , leave disconnected.
To replace a weighted edge inside a cycle cover of a directed graph, identify and give each fresh internal vertex a unit-weight self-loop. If the replacement is unused, all fresh vertices use their self-loops, in one way. If it is used, the selected internal edges form one -to- path, giving possibilities; all unused vertices use their self-loops. The internal graph is acyclic apart from these self-loops, so there are no other internal directed cycles. Thus the substitution preserves the weighted permanent of a matrix.
Box nesting Created 2026-10-24 Updated 2026-11-05
Represent a -dimensional box by its side-length vector and allow axis permutations. A box fits another when its permuted dimensions are all strictly smaller. Sorting each vector reduces containment to coordinatewise strict comparison, by the sorted-coordinate criterion for box containment. For an input-order-preserving subsequence, the longest chain ending at position has one plus the greatest chain length at an earlier fitting position. This last-box decomposition proves the dynamic programming recurrence. Sorting all dimensions and testing all ordered index pairs takes running time. Arbitrary reordering is a different convention, handled by the containment directed acyclic graph.
Causal minimality Created 2026-10-06 Updated 2026-11-05
A probability distribution is causally minimal for a directed acyclic graph when it satisfies the global Markov property for a directed acyclic graph for that graph and for no proper subgraph obtained by deleting edges on the same vertex set. It excludes redundant edges without excluding every extra conditional independence.
Commit graph 2026-11-05
A commit graph represents version-control commits as vertices and their parent relationships as directed edges. In Git, taking an edge from a child to each parent gives a directed acyclic graph: an existing version-control commit has fixed parents, and a newly created child cannot become its own ancestor.[ref]
For example, if and both descend directly from , and merge records parents , its edges are , , and . The merge retains both lines of ancestry. A version-control branch labels a selected tip; deleting that label does not by itself remove every reachable vertex. This graph supports ancestry tests and finding common bases for version-control merging.
Condensation graph Created 2026-10-25 Updated 2026-11-05
Contract each strongly connected component of a directed graph to one vertex, retaining edges between different components. A directed cycle between contracted vertices would make those components mutually reachable, contradicting their distinctness; thus the condensation graph is a directed acyclic graph. Parallel edges can be retained by algorithms that count them consistently.
Critical path method Created 2026-10-14 Updated 2026-11-05
The critical path method calculates an earliest schedule, a latest schedule for a chosen finish time, and each activity's task float. A critical path is a start-to-finish graph path whose total duration is greatest. There can be several such graph paths, and every one constrains completion. In the six-activity project scheduling example, the critical graph path is A-C-D-F, of duration .
Add a zero-duration source before every initial activity and a zero-duration sink after every terminal activity. Give each edge weight , including zero weight on edges leaving . This produces a weighted graph in which a graph path's weight counts every activity on it exactly once. The possible source-to-sink graph paths in our example, omitting the dummy endpoints, are A-B-D-F with weight 8, A-C-D-F with weight 10, and E-F with weight 4.
Every feasible schedule must accommodate each of these sequential chains. Consequently,
This bound applies to all source-to-sink graph paths, not just the one we happen to inspect. The critical path method attains the bound by setting each activity's earliest start to the maximum of its predecessors' earliest finish times:
Evaluate this recurrence in a topological order, obtained by topological sorting. Each satisfies every incoming optimization constraint, so these times form a feasible solution. The same recurrence calculates the greatest weight of a graph path from to ; hence the feasible finish matches the lower bound. This is dynamic programming on a directed acyclic graph, rather than an enumeration of all graph paths. See Paul Johnson, Scheduling and longest paths, longest-path algorithm. The linear programming formulation and its certificate are developed in project scheduling duality and unit-flow certificate for project duration.
For our project scheduling example, , , and the two merges give
F finishes at 10. All six activities are completed, even though E is absent from the critical graph path. Recording which predecessor attains each maximum lets us trace a critical graph path backward from the sink; retaining tied choices exposes multiple critical graph paths.
Now fix the project start at zero and the finish at . The latest starts come from a backward pass in reverse topological order:
Every activity must finish by the earliest of its successors' latest starts, explaining the minimum here. This gives , , , , , and . These latest times themselves form a feasible solution finishing at 10. The backward calculation depends on the chosen finish time; a later deadline would give different latest times and task floats. The forward and backward passes are described in Olivier de Weck, MIT ESD.36 Lecture 2, slides 22–29.
ActivityEarliest start Earliest finish Latest start Latest finish Task float
A03030
B35572
C37370
D79790
E03696
F9109100
Figure 1.
Earliest solid and latest hollow activity bars for the critical path method, with task floats of 2 for B and 6 for E
. Details.
Changing a duration can change which graph paths are critical. If B's duration becomes 4, A-B-D-F and A-C-D-F both take 10: there are two critical graph paths. Shortening C alone then cannot reduce the finish time, because the chain through B still takes 10. If B's duration instead becomes 5, the earliest starts of D and F become 8 and 10, and the finish becomes 11. A-B-D-F is now the unique critical graph path; C has task float 1 relative to that new optimal finish. These calculations show why the critical path method is useful for understanding where a duration change matters, even in a project containing many parallel activities.
A vertex is a descendant of in a directed graph when a directed path leads from to . Under the reflexive convention, a length-zero path makes its own descendant; a strict-descendant convention excludes that case and must be stated. An ancestor reverses this reachability relation.
For , the descendants of are under the reflexive convention, while is not a descendant of . In a directed cycle, distinct vertices can each be descendants of the other. Thus descendant reachability is transitive and reflexive but need not be antisymmetric.
In a directed acyclic graph, mutual reachability forces equality, so reachability defines a partial order. This makes descendant sets useful in dependency and causal graphs, while the graph alone still needs a specified interpretation before an arrow denotes causation.
Directed acyclic graph Created 2026-09-24 Updated 2026-11-05
A directed acyclic graph is a directed graph with no directed cycle: following its directed edges can never return to the starting vertex. A directed edge can represent the requirement that task finish before task starts. A directed path then records a chain of prerequisites. The essential prerequisite for topological sorting is that these requirements contain no circular dependency. For finite directed graphs, this is equivalent to the existence of a topological order. [ref]
Consider an invented publishing workflow with five tasks: drafts the text, draws a figure, reviews the text, lays out the text and figure, and publishes the result. Its directed edges are , , , , and . Reviewing needs the draft; layout needs both the draft and figure; publication needs both review and layout. The drawing below encodes only these prerequisites, with no measured durations or resource constraints.
Figure 1.
Five toy publishing tasks and all five valid topological orders
. Details.
The directed acyclic graph leaves room for choice: and can occur in either order, and after both are complete, and can occur in either order. Task may even precede , since the review does not need the figure. A topological order turns these local prerequisites into a complete executable list while retaining this freedom. It supplies a feasible sequential plan; task durations, available workers, and earliest finishing times require additional information.
Directed acyclic graph factorization Created 2026-09-28 Updated 2026-11-05
A distribution factorizes according to a directed acyclic graph when its joint density is the product of the conditional density of each variable given its graphical parents. This factorization implies the graph's global Markov property of a directed acyclic graph.
D-separation Created 2026-09-24 Updated 2026-11-05
Let be pairwise disjoint sets of vertices in a directed acyclic graph. A graph path, traversed without requiring its edges to point in the direction of travel, is active given precisely when every interior noncollider lies outside and every collider either belongs to or has a descendant in a directed graph in . The sets are D-separated by when no active graph path connects them.[ref]
In the three-vertex chain and fork , conditioning on blocks the only graph path. In , the collider blocks the graph path before conditioning; conditioning on or its descendant in a directed graph activates it. Other vertices can still block a longer graph path.
Dynamic programming Created 2026-09-24 Updated 2026-11-05
Dynamic programming solves a mathematical optimization problem by choosing reusable subproblems, recording their value functions, and combining already solved cases through a recurrence relation. Its attraction is that many possible decision histories can share one continuation calculation. A dynamic programming state must retain everything needed to determine the allowed future choices and their rewards. The 0-1 knapsack problem, for example, needs both the available capacity and which items remain available; capacity alone would lose the restriction that each item can be used at most once.
Two ideas explain when this works. Optimal substructure makes an optimal continuation valid inside a larger optimal solution. When subproblems overlap, storing each answer avoids repeated work: memoization computes entries as needed, while a table fills them in dependency order. Start from known base cases. For a problem indexed by increasing size, compute smaller cases first; for a finite sequence of future decisions, work backwards from the terminal reward, as in the Bellman equation. See Bertsekas, MIT lecture 2: optimality and state augmentation.
Consider a 0-1 knapsack problem with item weights , item values , and capacity . Define the value function to be the largest total item value obtainable from the first items with total weight at most . Here and specify the dynamic programming state. All weights and capacities are nonnegative integers. The empty selection supplies the base case . The recurrence relation is
The two candidates skip or take item . Both use the previous row, so taking item cannot take that same item again. The condition prevents a negative remaining capacity; no entry with is needed. The optimal substructure is concrete: after taking item , its companions must solve the smaller 0-1 knapsack problem on the first items with capacity . Otherwise replacing them by a better feasible selection would improve the whole selection. Compare [ref]; those notes index the remaining items in the opposite direction.
The full computation is small enough to see at once:
For example, and . Choosing the feasible item with largest individual value takes weight , earns , and leaves capacity , which cannot fit another item. This greedy algorithm misses the two-item selection of weights and , whose value is . This example tests the largest-individual-value rule; choosing by value divided by weight happens to find the optimum here.
Figure 1.
A knapsack table builds the optimal value from smaller subproblems
. The value function of this 0-1 knapsack problem is computed row by row. Outlined entries show the reconstruction of an optimal selection: skip weight 4, take weight 3, then take weight 2. The total weight is 5 and total value is 7. Details.
The number is the optimal value, while the choices attaining it form a control policy. To reconstruct one optimal selection, start at . Equality with allows skipping item . At , taking item gives , so continue to . Take item and finish at . In a tie, either maximizing choice suffices to recover one optimum. Recording choices during the calculation or comparing stored entries afterwards recovers the control policy; a final optimal value alone does not describe the selection.
Figure 2.
Knapsack dependencies and one optimal reconstruction
. Each node is a dynamic programming state labeled by its value function. Arrows point to the earlier-row entries used in the recurrence relation, forming a directed acyclic graph. Dashed arrows skip an item; blue arrows take it. The orange graph path reconstructs the optimal selection with value 7. Compute in the opposite direction to the arrows, beginning at the zero base row. Details.
For items and integer capacity , the table uses time complexity and space complexity , counting arithmetic operations and stored numbers using Big O notation. This is pseudo-polynomial time: when weights and capacity use the binary numeral system, the capacity needs only digits. A capacity near creates about columns despite needing only about digits. Thus this algorithm is practical for moderate capacities but does not establish polynomial time in the encoded input length. See MIT 6.006 recitation 19: knapsack and input size. For the optimal value alone, one array reduces space complexity to : for each item, update capacities in descending order, from down to . Ascending order would read entries already updated for that item and could reuse it. Reconstruction then requires extra information or recomputation.
The link between the knapsack problem and dynamic programming is already explicit in a 1957 paper by Richard Bellman at RAND: its abstract discusses an exact knapsack problem solution using functional equations and cites his 1957 book. See Bellman, Comment on Dantzig's Paper on Discrete Variable Extremum Problems (1957).
Failure of uniform edge shifts to preserve shortest paths Created 2026-10-31 Updated 2026-11-05
Adding the same constant to every edge weight adds times the number of edges to each path's cost. Routes with different edge counts need not retain their order. For example, edges , , of weights make the two-edge path optimal with cost zero. Adding three changes the direct cost to four and the two-edge cost to six. The graph is a directed acyclic graph and all shifted weights are positive, yet the minimizing path changes.
Faithfulness of a directed acyclic graph Created 2026-09-28 Updated 2026-11-05
A distribution is faithful to a directed acyclic graph when, for all disjoint vertex sets , holds if and only if and are D-separated by . This includes the graph's global Markov property of a directed acyclic graph and excludes additional independences caused by parameter cancellations. If faithfulness is used to name only the reverse implication, the Markov property must be assumed separately.
Fixing operation 2026-11-05
The fixing operation in a nested Markov model turns a random vertex of a conditional acyclic directed mixed graph into a fixed input and transforms its probability kernel. A vertex is fixable if no other vertex in its bidirected-connected district of an acyclic directed mixed graph is a descendant of . Graphically, fixing removes edges with an arrowhead at and moves from the random to the fixed vertex set.[ref]
For a positive Markov kernel , the transformation divides by the conditional factor for given its district's other vertices and the parents of that district. Fixed arguments are retained as kernel inputs. Fixability is what permits the resulting object to be a normalized kernel over the remaining random variables. Valid fixing sequences must check this condition again after each step.
For the directed acyclic graph , write . Fixing gives
Ordinary conditioning instead gives . If is a fair binary variable and , , then conditioning on makes , whereas fixing leaves it . The operation is algebraically defined even without interpreting a graph causally.
Global Markov property for a directed acyclic graph Created 2026-10-03 Updated 2026-11-05
A distribution has the global Markov property for a directed acyclic graph when every D-separation of vertex sets by a conditioning set implies the corresponding conditional independence of their random variables.
Global Markov property of a directed acyclic graph Created 2026-09-28 Updated 2026-11-05
The global Markov property of a directed acyclic graph says that d-separation of vertex sets and by implies conditional independence of the corresponding random vectors given the variables at .