SICP Exercise 1.13

Question

Prove that Fib(n) is the closest integer to ϕn/5, where ϕ=(1+5)/2. Hint: Let ψ=(15)/2. Use induction and the definition of the Fibonacci numbers (see section 1.2.2) to prove that Fib(n)=(ϕnψn)/5.

Answer

As instructed in the question, we are proving Fib(n)=(ϕnψn)/5 first.

First, assume a simple base case of n=0. Let us prove that the theorem holds:

Fib(0)=ϕ0ψ05

Of course, Fib(0)=0:

0=ϕ0ψ05 0=115 0=05 0=0

Having proven the base case of n=0, we should prove the base case n=1 as well, since these two numbers are not themselves the result of a Fibonacci operation.

Fib(1)=ϕ1ψ15 1=ϕψ5 1=1+521525 1=1+51+525 1=2525 1=55 1=1

We can now move on to proving the case n=k+1.

Remember the definition of the Fibonacci sequence: Fib(n)=Fib(n1)+Fib(n2). Let us replace n with k+1:

Fib(k+1)=Fib(k)+Fib(k1)

We will use this definition to carry out the proof. Remember the equation Fib(n)=(ϕnψn)/5 which we are trying to prove. From this follows:

Fib(k+1)=ϕkψk5+ϕk1ψk15 Fib(k+1)=ϕk+ϕk1ψkψk15 Fib(k+1)=ϕk1(ϕ+1)ψk1(ψ+1)5

Remember that ϕ+1=ϕ2 and ψ+1=ψ2:

Fib(k+1)=ϕk1ϕ2ψk1ψ25 Fib(k+1)=ϕk+1ψk+15

This, of course, is equivalent to the function definition. The equation is proven by induction.

Now, let’s prove that Fib(n) is always the closest integer to ϕn5. A mathematical way to phrase this would be as follows:

|Fib(n)ϕn5|<12

As we just proved, Fib(n) is equivalent to ϕnψn5. So let us rewrite the above equation accordingly:

|ϕnψn5ϕn5|<12 |ϕnψnϕn5|<12 |ψn5|<12 |ψn5|<12

The actual value of ψ is 0.6180. So, taking the n-th power of ψ (n being a positive integer), the value of ψn will approach 0. This means that the maximum value that ψn can hold is ψ0 which is 1.

From this follows that the maximum value of the left side of our equation is 15. This equates to 0.4472, which is less than 12. Since the result of the left side will only get smaller than this, the statement is proven.