TERMINOLOGY
- A tree is an abstract model of hierarchical structure.
- It consists of a finite set of elements, called nodes, and a finite set of directed lines, called branches, that connect the nodes.
- The number of branches associated with a node is the degree of the node. When the branch is directed towards the node, it is an indegree branch; when the branch is directed away from the node, it is an outdegree branch.
- If the tree is not empty, then the first node is called the root.
- A leaf is any node with an outdegree of zero.
- Nodes that are not a root or a leaf are known as internal nodes.
- A node is a parent if it has successor nodes.
- A node with a predecessor is a child.
- Two or more nodes with the same parent are siblings.
- Ancestor is any node in the path from the root to the node.
- A descendant is any node in the path below the parent node.
- A path is a sequence of nodes in which each node is adjacent to the next one.
- The level of a node is its distance from the root.
- The height (depth) of the tree is the level of the leaf in the longest path from the root plus one.
- A subtree is any connected structure below the root.
0 comments:
Post a Comment