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. Variations 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 rooted digraphs, or accessible rooted graphs (see ). 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. Applications Flow graphs In computer science, rooted graphs in which the root vertex can reach all other vertices are called flow graphs or flowgraphs. Sometimes an additional restriction is added specifying that a flow graph must have a single exit (sink) vertex as well. Flow graphs may be viewed as abstractions of flow charts, with the non-structural elements (node contents and types) removed. Perhaps the best known sub-class of flow graphs are control-flow graphs, used in compilers and program analysis. An arbitrary flow graph may be converted to a control-flow graph by performing an edge contraction on every edge that is the only outgoing