0

we know that in worst case S(h)=S(h-1)+S(h-2)+1,I've also seen Evan Bechtol's answer,but there's no obvious deduction there. How to get the formula fromS(h)=S(h-1)+S(h-2)+1?

Community
  • 1
  • 1
  • Hint: the S(h) formula looks almost like the formula for Fibonacci numbers. Perhaps you know how to derive Fibonacci numbers from matrix equations, and can adapt the proof? – n. m. could be an AI Apr 05 '17 at 06:00

1 Answers1

0

Since this is a modification of the Fibonacci sequence, you might want to look at Binet's formula that refers to the Golden ratio. The deductive proof can be found here.

dangiankit
  • 119
  • 4