0
$\begingroup$

Original question: Why does an AVL tree of height h has a min number of node $= F_{h+2} - 1$, where $F_h$ is the $h$th Fibonacci number?

If $N_h$ is the min number of nodes in an AVL tree with height $h$, then a recurrence relation can be written as: $N_h = N_{h-1} + N_{h-2} + 1$, with $N_0 = 0, \ N_1 = 1$

I would like to know why $N_h = F_{h+2} - 1$. Do I have to solve both recurrences explicitly and plug in the numbers, or is there any other way of seeing it, since the form of $N_h = N_{h-1} + N_{h-2} + 1$ is extremely similar to that of the Fibonacci sequence, so I assume there would be another way of doing it directly from from the Fibonacci sequence.

  • 0
    Why can't you prove it by induction?2017-01-27

1 Answers 1

2

Note that $$N_h = N_{h-1} + N_{h-2} + 1$$ can be written as $$N_h+1=(N_{h-1}+1)+(N_{h-2}+1)$$