Full binary tree with $L$ leaves has $2L - 1$ total nodes

Definition of Full Binary Tree 

    A Binary Tree is full if and only if every node has 0 or 2 children.

Proof by Induction

Inductive Hypothesis

The full binary tree with $L$ leaves has $N = 2L - 1$ total nodes.

Base Case

We can easily think of two base cases.
Note that the shape of the tree at each base case is unique (Draw by yourself).

If L = 1, then N = 1.
If L = 2, then N = 3.

Inductive Step

We want to show that the full binary tree with $L + 1$ leaves has $2(L + 1) - 1$ total leaves $\forall n \gt 2, n \in \mathbb{N}$.

Suppose that $\exists n \gt 2, n \in \mathbb{N} $ the full binary tree with $L$ leaves has $2L - 1$ total leaves.

$T$ : the full binary tree with $L$ leaves.
$v$ : a leaf node of $T$

If we want to append a new node in $T$, two nodes must be inserted on the left and right side of some leaf node of $T$. Which implies that every node insertion increases $N$ by $2$ and $L$ by $1$.

$2L - 1 + 2 = 2(L + 1) - 1$

Hence, the inductive hypothesis is proved.

- Please mail or comment to me if this proof has any erroneous part.

     
     
        

댓글

이 블로그의 인기 게시물

Linux에서 특정한 디렉토리가 차지하는 용량을 효율적이고, 빠르게 계산하는 법(Fast, efficient way to calculate directory size recursively on linux)

Proof of well-known 'Intersection Of Three Planes' formula.

영화 'Call me by your name'의 OST 중 'Visions of Gideons' 번역 및 해석