👉 In mathematics, a rooted tree or rooted graph is a type of graph that consists of nodes connected by edges in such a way that each node is connected to exactly one other node and all the edges are directed from the root to all other nodes. This means that every vertex has at least two children (or ancestors) and there are no cycles in the tree. Rooted trees can be visualized as having a hierarchical structure, with leaves being the only vertices without descendants, while the parent of each