DFS discovery time 2026-10-14
The DFS discovery time of a vertex is its first-visit number in depth-first search, assigned by an increasing counter. Discovery edges form a rooted tree in each connected component of a graph. For the joined- example, starting at and visiting graph neighbours in lexicographic order gives first visits , numbered ; its discovery edges are . These numbers encode the chosen traversal, not an invariant of the graph.
DFS lowpoint 2026-10-14
For a finite simple graph that is an undirected graph, the DFS lowpoint of is the smallest DFS discovery time reachable by following zero or more discovery edges down its rooted tree, then at most one non-discovery edge to an ancestor. Staying at is allowed. Ignore the reverse traversal of the discovery edge to the parent in a rooted tree: it is the same edge, not an escape route. Start with . On returning from a child in a rooted tree , replace by . For a non-discovery edge from to an earlier ancestor , replace it by . This summarizes how far upward the explored branch can reconnect. [ref]
https://sites.cs.ucsb.edu/~gilbert/cs240a/notes/TarjanDFS.pdf. Tarjan (1972), §3, LOWPT recurrence, pp. 151–153
The cut vertex criterion has a separate case for each root of a tree in the discovery forest:
- A nonroot vertex is a cut vertex exactly when some child in a rooted tree satisfies .
- A root of a tree is a cut vertex exactly when it has at least two children in a rooted tree, counting discovery edges, rather than all graph neighbours.
- A discovery edge is a bridge in a graph exactly when . A non-discovery edge is never a bridge in a graph.
Why does equality matter? If , the branch below can reconnect to , so the discovery edge lies on a graph cycle and is not a bridge in a graph. Deleting the vertex destroys that reconnection too. If has a parent in a rooted tree, the branch is then separated from that parent in a rooted tree, explaining the non-strict cut vertex test. For a root of a tree, there is no earlier side to separate from; distinct discovery branches cannot have an edge between them, since depth-first search would have explored them as one branch. This gives the two-children in a rooted tree rule. These are proof outlines of the criteria. [ref]
https://algs4.cs.princeton.edu/41graph/Biconnected.java.html. Sedgewick and Wayne, Biconnected.java: discovery, lowpoint and root tests
[ref]In the joined- example with DFS discovery times , the DFS lowpoints in label order are . For and its child in a rooted tree , : is a bridge in a graph, and is a cut vertex. For and its child in a rooted tree , : is a cut vertex, although is not a bridge in a graph. The root of a tree has only one child in a rooted tree, , so it is not a cut vertex. In the shared- example, the root of a tree has two children in a rooted tree, and , and is a cut vertex, while every DFS lowpoint is and no edge passes the strict bridge in a graph test.
Restart depth-first search at every undiscovered vertex to cover a disconnected graph, applying the root of a tree rule separately in each connected component of a graph. With adjacency lists and constant-cost label operations, computing all DFS lowpoints, cut vertices and bridges in a graph has time complexity in Big O notation, because each vertex is discovered once and each edge is inspected twice. The simple parent-skipping rule assumes a simple graph. In a multigraph, skip only the actual parent edge, identified individually: a parallel edge to the same parent in a rooted tree is a valid reconnection and can prevent the first edge from being a bridge in a graph. The criteria here concern undirected graphs; a directed graph requires a different connectivity analysis.