The directed graph whose vertices are the spreadsheet cells and whose directed edges mean that the spreadsheet formula in references . Input spreadsheet cells have no prerequisites in this model. Retain both incoming references and outgoing consumers: depth-first search for evaluation follows incoming references backwards, whereas downstream invalidation follows outgoing consumers forwards. A directed path then expresses indirect dependence, and a directed cycle expresses a spreadsheet circular reference.
Strong connectivity Created 2026-09-24 Updated 2026-10-03
A directed graph is strongly connected when every vertex is reachable from every other vertex by a directed path.
Strong orientation 2026-10-14
A strong orientation is an orientation of a graph with strong connectivity: for every ordered pair of vertices, there is a directed path from to . A length-zero directed path permits . Ordinary connectivity of the underlying undirected graph is necessary, but does not ensure this two-way reachability after directions are chosen. The acyclic is not a strong orientation; the cyclic is, since a journey can continue around its directed cycle.
Attach a new vertex to that triangle in a graph by the single edge . This edge is a bridge in a graph. If oriented , no directed path leaves for the triangle in a graph; if oriented , no directed path from the triangle in a graph reaches . Neither choice gives a strong orientation, even when the triangle in a graph itself is cyclically oriented. By contrast, the four-vertex cycle graph has the strong orientation
Following this directed cycle reaches any requested vertex in at most three steps. Removing any one of its undirected edges leaves a graph path through all four vertices, so it has no bridge in a graph.
For more than one vertex, a strong orientation cannot also be an acyclic orientation: directed paths from to and back give a nonempty closed directed walk, from which removing repeated portions leaves a directed cycle. A directed graph containing one directed cycle need not have strong connectivity, as the attached shows.
Tentative distance 2026-10-14
A tentative distance is the cheapest cost so far recorded by a shortest path problem algorithm. For the single-source convention, initialize and elsewhere. Every finite label is the cost of a discovered route from to , so
It is an upper bound supplied by an actual route, not a guess that might be too low. The loop invariant follows directly from edge relaxation: extending a discovered route to by supplies another discovered route. The usual label initialization and this safety property are stated and proved in the authored MIT notes.[ref]
In the trace under edge relaxation, first records the direct directed path . Later records , and finally records . Each label is a usable route cost, but the first two are not shortest. An infinite tentative distance means no route has yet been discovered; only a completed search establishes unreachability. The isolated vertex in that example remains at .
In a directed graph, the discovered route is formally a directed walk, which may repeat vertices; in the pictured acyclic graph it is always a directed path. Negative-cost directed cycles can keep supplying cheaper directed walks without a finite optimum. In the all-to-one convention, the same meaning applies to discovered routes from to . Do not confuse either version with the lower bounds supplied by feasible potentials in the Bellman inequalities: one records something achievable, the other rules out anything cheaper.
Topological order 2026-10-14
A topological order of a finite directed graph is a sequence containing every vertex exactly once, with
Thus every directed edge points forward in the list. Equivalently, a bijection assigning positions satisfies for every directed edge . A topological ordering names the same kind of list. [ref]
The toy Directed acyclic graph has exactly five topological orders: , , , , and . These lists were checked by enumerating all permutations and retaining precisely those satisfying all five directed edge inequalities. Every list ends with , since all other tasks have a directed path to publication. A topological order need not put adjacent entries next to one another in the directed graph: and are consecutive in without a directed edge between them.
A directed cycle would force the impossible chain of position inequalities . In the toy example, adding requires review before publication and publication before review, so there are no topological orders. Together with the construction in topological sorting, this proves that a finite directed graph admits a topological order if and only if it is a Directed acyclic graph. The empty directed graph has the empty sequence as its topological order.
There is also a useful connection to partial orders: define when or there is a directed path from to . For a Directed acyclic graph, this reachability relation is a partial order, and its linear extensions are exactly the topological orders. The Directed acyclic graph specifies which pairs must be ordered; a topological order chooses positions for all the remaining pairs.
Topological ordering Created 2026-09-24 Updated 2026-10-14
A topological ordering is a topological order: a list containing every vertex once and placing the source of every directed edge before its destination. In the parent-and-child language of a Directed acyclic graph, every parent precedes every child, and hence every ancestor precedes every descendant along a directed path. This is an ordering of the vertices, whereas topological sorting is the task of finding it. See topological order for the precise position condition and Kahn's algorithm for a construction.
Topological sorting 2026-10-14
A topological sorting is the task of constructing a topological order of a finite directed graph, or reporting that a directed cycle makes one impossible. Kahn's algorithm repeatedly takes a vertex with no unfinished prerequisites. This is useful whenever an operation consumes results produced by earlier operations: once a vertex is reached in a topological order, every prerequisite along a directed path has already been processed. [ref]
The reason a choice is always available in a nonempty finite Directed acyclic graph is simple. If every vertex had an incoming directed edge, repeatedly following predecessors would eventually revisit a vertex, giving a directed cycle. Removing a vertex and its incident directed edges cannot create a directed cycle, so the argument repeats until every vertex is listed. This proves existence of a topological order and explains why finiteness matters to this procedure.
// Target: combinatorics.bigb