Special Trees

A rooted tree is called an -ary tree if every internal vertex has no more than children.

A rooted tree is called a full -ary tree if every internal vertex has exactly children.

Binary Trees

A rooted tree is called a full binary tree if every internal vertex has exactly children: a left child and a right child

graph G {
	label="full binary tree"
	node[shape="point"]
	
	1--2,3
	2--4,5
	5--6,7
}

When we have a full binary tree of height :

  • the left and right subtrees of the root are both full binary trees of height
  • at least one of the left and right subtrees of the root is a full binary tree of height

Counting vertices and edges of trees

A full binary tree with internal vertices contains vertices altogether. Every vertex, except the root, is the child of an internal vertex. Because each of the internal vertices has children, there are vertices in the tree other than the root.

A full -ary tree with internal vertices contains vertices altogether. Every vertex, except the root, is the child of an internal vertex. Because each of the internal vertices has children, there are vertices in the tree other than the root.