Question

In: Computer Science

Fibonacci Sequence: F(0) = 1, F(1) = 2, F(n) = F(n − 1) + F(n −...

Fibonacci Sequence:

F(0) = 1, F(1) = 2, F(n) = F(n − 1) + F(n − 2) for n ≥ 2


(a) Use strong induction to show that F(n) ≤ 2^n for all n ≥ 0.


(b) The answer for (a) shows that F(n) is O(2^n). If we could also show that F(n) is Ω(2^n), that would mean that F(n) is Θ(2^n), and our order of growth would be F(n). This doesn’t turn out to be the case because F(n) is not Ω(2^n), and thus not Θ(2^n). But it is true that F(n) ≥ (3/2)^n for all n ≥ 0. Use induction (or strong induction) to prove this.

Solutions

Expert Solution

a) Answer:

Base case: We know that,

F(1) = 1 < 2 ^ 1= 2

F(2) = 1 < 2 ^ 2 = 4

Induction step: In strong induction method, if n is a positive integer such that F(1), F(2) , ……..F(n) are all true, then F(n+1) is also true.

   Now suppose that F(n) < 2^ n for all n >= 0

Given, F(n) = F(n – 1) + F(n -2)

Then, F(n+1) = F(n) + F(n-1) <= 2.F(n)

<= 2. 2 ^ n

<= 2 ^ (n+1)

Hence, F(n) <= 2 ^ n for all n>=0

b) Answer:

From the above proof it is clear that F(n) <= 2 ^ n. That is F(n) is O(2 ^n)

Since, F(n) is not Ω(2 ^ n) and thus not Ѳ(2 ^ n)

Now we will prove by strong induction method F(n) >= (3/2) ^ n for all n>=0

Base case:

                F(1) = 1 < 2 ^ 1=2

F(2) = 1 < 2 ^ 2= 4

                                Induction step:

                                                Suppose that F(n) >= (3/2) ^ n for all n>=0

                                                Then, F(n+1) = F(n) + F(n-1) >= (3/2) ^ n + (3/2) ^ (n -1)

                                                                                                      >= (3/2) ^ (n + 1)

                                                Hence, proved that F(n) >= (3/2) ^ n


Related Solutions

For the Fibonacci sequence, prove the formula u2n+1 = un un+2 + (-1)n
For the Fibonacci sequence, prove the formula u2n+1 = un un+2 + (-1)n
The Fibonacci sequence is the series of numbers 0, 1, 1, 2, 3, 5, 8,.... Formally,...
The Fibonacci sequence is the series of numbers 0, 1, 1, 2, 3, 5, 8,.... Formally, it can be expressed as: fib0 = 0 fib1 = 1 fibn = fibn-1 + fibn-2 Write a multithreaded C++ program that generates the Fibonacci series using the pthread library. This program should work as follows: The user will enter on the command line the number of Fibonacci numbers that the program will generate. The program will then create a separate thread that will...
The Fibonacci sequence is the series of integers 0, 1, 1, 2, 3, 5, 8, 13,...
The Fibonacci sequence is the series of integers 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89 . . . See the pattern? Each element in the series is the sum of the preceding two elements. Here is a recursive formula for calculating the nth number of the sequence: Fib(N) = {N, if N = 0 or 1 Fib(N - 2) + Fib(N - 1), if N > 1 a) Write a recursive method fibonacci that returns...
(a) The Fibonacci numbers are the numbers in the following integer sequence, called the Fibonacci sequence,...
(a) The Fibonacci numbers are the numbers in the following integer sequence, called the Fibonacci sequence, and are characterised by the fact that every number after the first two is the sum of the two preceding ones: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 114, … etc. By definition, the first two numbers in the Fibonacci sequence are 0 and 1, and each subsequent number is the sum of the previous two. We define Fib(0)=0,...
Find the pointwise limit f(x) of the sequence of functions fn(x) = x^n/(n+x^n) on [0, ∞)....
Find the pointwise limit f(x) of the sequence of functions fn(x) = x^n/(n+x^n) on [0, ∞). Explain why this sequence does not converge to f uniformly on [0,∞). Given a > 1, show that this sequence converges uniformly on the intervals [0, 1] and [a,∞) for any a > 1.
Suppose f : N→N satisestherecurrencerelation f(n + 1) (f(n) 2 if f(n)iseven 3f(n)+ 1 if f(n)isodd...
Suppose f : N→N satisestherecurrencerelation f(n + 1) (f(n) 2 if f(n)iseven 3f(n)+ 1 if f(n)isodd . Notethatwiththeinitialcondition f(0) 1,thevaluesofthefunction are: f(1) 4, f(2) 2, f(3) 1, f(4) 4, and so on, the images cyclingthroughthosethreenumbers. Thus f isNOTinjective(andalso certainlynotsurjective). Mightitbeunderotherinitialconditions?3 (a) If f satisestheinitialcondition f(0) 5,is f injective? Explain whyorgiveaspecicexampleoftwoelementsfromthedomain withthesameimage. (b) If f satisestheinitialcondition f(0) 3,is f injective? Explain whyorgiveaspecicexampleoftwoelementsfromthedomain withthesameimage. (c) If f satisestheinitialcondition f(0) 27,thenitturnsoutthat f(105) 10 and no two numbers less than 105 have the same...
Let f(x, y) be a function such that f(0, 0) = 1, f(0, 1) = 2,...
Let f(x, y) be a function such that f(0, 0) = 1, f(0, 1) = 2, f(1, 0) = 3, f(1, 1) = 5, f(2, 0) = 5, f(2, 1) = 10. Determine the Lagrange interpolation F(x, y) that interpolates the above data. Use Lagrangian bi-variate interpolation to solve this and also show the working steps.
Write a c++ program of the Fibonacci Sequence. Have the user enter a positive integer n...
Write a c++ program of the Fibonacci Sequence. Have the user enter a positive integer n and compute the nth Fibonacci number. The program should end when the user enters a number less than or equal to zero
how to find arithmetic sequence, geometric sequence, and fibonacci sequence on excel?
how to find arithmetic sequence, geometric sequence, and fibonacci sequence on excel?
Let function F(n, m) outputs n if m = 0 and F(n, m − 1) +...
Let function F(n, m) outputs n if m = 0 and F(n, m − 1) + 1 otherwise. 1. Evaluate F(10, 6). 2. Write a recursion of the running time and solve it . 3. What does F(n, m) compute? Express it in terms of n and m.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT