Skip to main content

Strict Binary Tree

A Strict Binary Tree (also called a full binary tree) is a binary tree in which every internal node has exactly two children. This means:

  • No node has only one child.
  • Every node is either a leaf node or has two children.

Structure of a Strict Binary Tree

Types of Strict Binary Tree

  • Perfect Strict Binary Tree – All internal nodes have two children and all leaves are at the same depth.
  • Complete Strict Binary Tree – All levels are full except possibly the last, which is filled left-to-right, but still must follow the strict property at every internal node.
  • Strict but Skewed Tree – Not possible, since strictness requires every internal node to have two children.

Catalan Number and Strict Binary Trees

The Catalan number formula applies for counting the number of possible structures of strict binary trees with n internal nodes:

Cn=(2n)!(n+1)!n!C_n = \frac{(2n)!}{(n+1)! \cdot n!}

where nn is the number of internal nodes, and total nodes = 2n+12n + 1.

Example: n=3n = 3 internal nodes → Total nodes = 23+1=72 \cdot 3 + 1 = 7

C3=6!4!3!=5C_3 = \frac{6!}{4! \cdot 3!} = 5

Number of Labelled Strict Binary Trees

If we have nn internal nodes (thus 2n+12n+1 total labelled nodes), the number of labelled strict binary trees is:

Count=Cn(2n+1)!\text{Count} = C_n \cdot (2n+1)!

Example: For n=3n = 3 internal nodes → Total nodes = 7

C3=5,(2n+1)!=7!=5040C_3 = 5, \quad (2n+1)! = 7! = 5040

Total labelled strict binary trees:

55040=252005 \cdot 5040 = 25200

Max and Min Number of Nodes Given Height

For a strict binary tree of height hh (number of edges from root to leaf):

  • Max Nodes (Perfect Strict Binary Tree):
Nmax=2h+11N_{\text{max}} = 2^{h+1} - 1
  • Min Nodes: A strict binary tree must have at least 2h+12h + 1 nodes.
Nmin=2h+1N_{\text{min}} = 2h + 1

Example: h=3h = 3

Max nodes:

23+11=152^{3+1} - 1 = 15

Min nodes:

23+1=72 \cdot 3 + 1 = 7

Max and Min Height Given Number of Nodes

Let nn = total nodes in a strict binary tree.

  • Min Height (Perfect Strict Binary Tree):
hmin=log2(n)h_{\text{min}} = \lfloor \log_2(n) \rfloor
  • Max Height: In a strict binary tree, the longest possible height occurs when the tree is minimally filled but still strict:
hmax=n12h_{\text{max}} = \frac{n - 1}{2}

Example: For n=9n = 9

Min height:

log2(9)=3\lfloor \log_2(9) \rfloor = 3

Max height:

912=4\frac{9 - 1}{2} = 4

Internal and External Nodes

In a strict binary tree:

E=I+1E = I + 1

where:

  • EE = number of external (leaf) nodes
  • II = number of internal nodes

Also:

Total Nodes=2I+1\text{Total Nodes} = 2I + 1

Example: I=4I = 4E=5E = 5, total nodes = 24+1=92 \cdot 4 + 1 = 9.

Summary Table for Strict Binary Tree

ConceptFormulaNotes
Catalan Number (n internal nodes)(2n)!(n+1)!n!\frac{(2n)!}{(n+1)!n!}Counts structures only
Labelled strict binary treesCn(2n+1)!C_n \cdot (2n+1)!Labels permuted across all nodes
Max nodes for height hh2h+112^{h+1} - 1Perfect case
Min nodes for height hh2h+12h + 1Minimal strict shape
Min height for nn nodeslog2(n)\lfloor \log_2(n) \rfloorPerfect case
Max height for nn nodesn12\frac{n - 1}{2}Minimal strict shape
Full Binary Tree relationE=I+1E = I + 1Applies to all strict trees