Trees
Tree
A tree is simple connected graph without any circuit.
Basics
There are three levels in a tree and some more basics
Root of tree
If a directed tree has exactly one node or vertex called root whose incoming
degrees is 0 and all other vertices have incoming degree one, then the tree is called
root tree.
Degree of node
Trees 1
, In an undirected graph the number of nodes incident on a node is the degree of the
node.
Path of tree
Path refers to the sequence of nodes along the edges of a tree.
Parent node
A node having a left child or right child or both are called the parent of the nodes.
Child node
A node having a parent which is one level above is called as child node
Siblings
Two nodes having the same parent are called siblings
Leaf node
A node with no children is called a leaf. The number of leaves in a binary tree can
vary from one (minimum) to half the number of vertices (maximum) in a tree.
Internal node
The nodes which have outdegree greater than or equal to one are called internal
node.
External node
The node which has outdegree 0 is called an external node or a terminal node or a
leaf.
Level of tree
In a tree, each step from top to bottom is called as level of a tree.
Depth of node
The depth of a node is the number of edges present in path from the root node of a
tree to that node.
Height of a tree
The depth or height of a tree is defined as the maximum number of nodes in a
branch of a tree.
Forest
Trees 2
Trees
Tree
A tree is simple connected graph without any circuit.
Basics
There are three levels in a tree and some more basics
Root of tree
If a directed tree has exactly one node or vertex called root whose incoming
degrees is 0 and all other vertices have incoming degree one, then the tree is called
root tree.
Degree of node
Trees 1
, In an undirected graph the number of nodes incident on a node is the degree of the
node.
Path of tree
Path refers to the sequence of nodes along the edges of a tree.
Parent node
A node having a left child or right child or both are called the parent of the nodes.
Child node
A node having a parent which is one level above is called as child node
Siblings
Two nodes having the same parent are called siblings
Leaf node
A node with no children is called a leaf. The number of leaves in a binary tree can
vary from one (minimum) to half the number of vertices (maximum) in a tree.
Internal node
The nodes which have outdegree greater than or equal to one are called internal
node.
External node
The node which has outdegree 0 is called an external node or a terminal node or a
leaf.
Level of tree
In a tree, each step from top to bottom is called as level of a tree.
Depth of node
The depth of a node is the number of edges present in path from the root node of a
tree to that node.
Height of a tree
The depth or height of a tree is defined as the maximum number of nodes in a
branch of a tree.
Forest
Trees 2