1

Prove that any binary tree with $n$ nodes has at least $1+\log_2 n$ levels. I tried setting $n=8$ and plugging in $8\geq\log_2 8 = 8\geq 3$. But I'm not sure how I can prove this by induction.

Raphael
  • 72,336
  • 29
  • 179
  • 389
Av15
  • 11
  • 2

1 Answers1

1

Hint: A binary tree with $1+h$ levels contains at most $1+2+2^2+\cdots+2^h = 2^{h+1}-1$ vertices.

Yuval Filmus
  • 276,994
  • 27
  • 311
  • 503