👉 In mathematics, a rooted tree is a type of graph where each node has at least one child. This means that the root (or any other node with at least one child) can have up to two children, and each child is an ancestor of its parent. For example, in a binary tree, the root is the only leaf, and all other leaves are branches. Rooted trees are important in computer science for their ability to represent and analyze graphs efficiently. They are used in various applications