G
G
All depth-first search trees and all Hamiltonian paths are Trémaux trees. In finite graphs, every Trémaux tree is a depth-first search tree, but although depth-first search itself is inherently sequential, Trémaux trees can be constructed by a randomized parallel algorithm in the complexity class RNC. They can be used to define the tree-depth of a graph, and as part of the left-right planarity test for testing whether a graph is a planar graph. A characterization of Trémaux trees in the monadic second-order logic of graphs allows graph properties involving orientations to be recognized efficiently for graphs of bounded treewidth using Courcelle's theorem.
Not every infinite connected graph has a Trémaux tree, and not every infinite Trémaux tree is a depth-first search tree. The graphs that have Trémaux trees can be characterized by forbidden minors. An infinite Trémaux tree must have exactly one infinite path for each end of the graph, and the existence of a Trémaux tree characterizes the graphs whose topological completions, formed by adding a point at infinity for each end, are metric spaces.
A Trémaux tree, for a graph
G
T
uv
G
u
v
G
If a finite graph has a Hamiltonian path, then rooting that path at one of its two endpoints produces a Trémaux tree. For such a path, every pair of vertices is an ancestor–descendant pair.
In the graph shown below, the tree with edges 1–3, 2–3, and 3–4 is a Trémaux tree when it is rooted at vertex 1 or vertex 2: every edge of the graph belongs to the tree except for the edge 1–2, which (for these choices of root) connects an ancestor-descendant pair.However, rooting the same tree at vertex 3 or vertex 4 produces a rooted tree that is not a Trémaux tree, because with this root 1 and 2 are no longer an ancestor and descendant of each other.
Every finite connected undirected graph has at least one Trémaux tree. One can construct such a tree by performing a depth-first search and connecting each vertex (other than the starting vertex of the search) to the earlier vertex from which it was discovered. The tree constructed in this way is known as a depth-first search tree. If
uv
u
v
u
v
u
T
T
T
It is P-complete to find the Trémaux tree that would be found by a sequential depth-first search algorithm, in which the neighbors of each vertex are searched in order by their identities.[3] Nevertheless, it is possible to find a different Trémaux tree by a randomized parallel algorithm, showing that the construction of Trémaux trees belongs to the complexity class RNC. The algorithm is based on another randomized parallel algorithm, for finding minimum-weight perfect matchings in 0-1-weighted graphs.[4] As of 1997, it remained unknown whether Trémaux tree construction could be performed by a deterministic parallel algorithm, in the complexity class NC.[5] If matchings can be found in NC, then so can Trémaux trees.[4]
It is possible to express the property that a set
T
r
T
T
T
C
T
C
e
T
T
e
T
e
P
T
r
P
e
P
If a graph has a Hamiltonian path, then that path (rooted at one of its endpoints) is also a Trémaux tree. The undirected graphs for which every Trémaux tree has this form are the cycle graphs, complete graphs, and balanced complete bipartite graphs.[7]
Trémaux trees are closely related to the concept of tree-depth. The tree-depth of a graph
G
d
H
T
d
G
H
Trémaux trees also play a key role in the Fraysseix–Rosenstiehl planarity criterion for testing whether a given graph is planar. According to this criterion, a graph
G
T
G
Not every infinite graph has a normal spanning tree. For instance, a complete graph on an uncountable set of vertices does not have one: a normal spanning tree in a complete graph can only be a path, but a path has only a countable number of vertices. However, every connected graph on a countable set of vertices does have a normal spanning tree.[10]
Even in countable graphs, a depth-first search might not succeed in eventually exploring the entire graph,[10] and not every normal spanning tree can be generated by a depth-first search: to be a depth-first search tree, a countable normal spanning tree must have only one infinite path or one node with infinitely many children (and not both).
If an infinite graph
G
G
The details of this characterization depend on the choice of set-theoretic axiomatization used to formalize mathematics. In particular, in models of set theory for which Martin's axiom is true and the continuum hypothesis is false, the class of bipartite graphs in this characterization can be replaced by a single forbidden minor. However, for models in which the continuum hypothesis is true, this class contains graphs which are incomparable with each other in the minor ordering.
Normal spanning trees are also closely related to the ends of an infinite graph, equivalence classes of infinite paths that, intuitively, go to infinity in the same direction. If a graph has a normal spanning tree, this tree must have exactly one infinite path for each of the graph's ends.
An infinite graph can be used to form a topological space by viewing the graph itself as a simplicial complex and adding a point at infinity for each end of the graph. With this topology, a graph has a normal spanning tree if and only if its set of vertices can be decomposed into a countable union of closed sets. Additionally, this topological space can be represented by a metric space if and only if the graph has a normal spanning tree.[12]