Minimum Number of Nodes for Full Binary Tree with Level $\lambda$

29.3k Views Asked by At

If the level ($\lambda$) of a full binary tree at zero is just a root node, than I know that I can get the maximum possible number of nodes (N) for a full binary tree using the following:

N = $2^{\lambda+1}$- 1

Is the minimum possible number of nodes the following?

N = 2*$\lambda$ + 1

2

There are 2 best solutions below

0
On

if I is the number of internal nodes, then total number of nodes is 2I+1 according to Full Binary Tree Theorem. You could try proving that the number of internal nodes I is equal to the number of levels, $\lambda$, but from an example

:
enter image description here

We see that it is not true in every case. (I = 3, $\lambda = 4$). However, it seems to be true that $I = \lambda -1$, from which you could get a strict number of nods $2\lambda -1$.

2
On

For a full binary tree $T$ of height $\lambda$, I believe that the maximum number of nodes is $N = 2^{\lambda + 1} - 1$ (not $+1$.)

It seems likely that you can prove the minimum number of nodes for a full binary tree of height $\lambda$ inductively. (We can readily verify that the minimum number of nodes for $\lambda = 1$ is $2\times 1 + 1 = 3$, showing the base case to be true.) Assuming (inductively) that for $\lambda = k$ we have a minimum of $N = 2k+1$ nodes, if we add a node, it must branch from one of the leaves. But in order to maintain a full binary tree, we must add an additional node; that is, adding an additional levels requires at minimum two more nodes. So, we will have $N+2$ nodes. Then, by our induction hypothesis $N+2 = (2k+1) + 2 = 2(k+1) + 1$, which is what we wanted.

Not exactly formal, but does that make sense?