In mathematics, and, in particular, in graph theory, a rooted graph is a graph in which one vertex has been distinguished as the root. Both directed and undirected versions of rooted graphs have been studied, and there are also variant definitions that allow multiple roots.
Rooted graphs may also be known (depending on their application) as pointed graphs or flow graphs. In some of the applications of these graphs, there is an additional requirement that the whole graph be reachable from the root vertex.
In topological graph theory, the notion of a rooted graph may be extended to consider multiple vertices or multiple edges as roots. The former are sometimes called vertex-rooted graphs in order to distinguish them from edge-rooted graphs in this context. Graphs with multiple nodes designated as roots are also of some interest in combinatorics, in the area of random graphs. These graphs are also called multiply rooted graphs.
The terms rooted directed graph or rooted digraph also see variation in definitions. The obvious transplant is to consider a digraph rooted by identifying a particular node as root. However, in computer science, these terms commonly refer to a narrower notion, namely a rooted directed graph is a digraph with a distinguished node r, such that there is a directed path from r to any node other than r. Authors which give the more general definition, may refer to these as connected (or 1-connected) rooted digraphs.
The Art of Computer Programming defines rooted digraphs slightly more broadly, namely a directed graph is called rooted if it has at least one node that can reach all the other nodes; Knuth notes that the notion thus defined is a sort of intermediate between the notions of strongly connected and connected digraph.