Warning: foreach() argument must be of type array|object, bool given in /var/www/html/web/app/themes/studypress-core-theme/template-parts/header/mobile-offcanvas.php on line 20

The Fibonacci numbers F0,F1,F2,... are defined by the rule

F0=0,F1=1,Fn=Fn1+Fn2.

In this problem we will confirm that this sequence grows exponentially fast and obtain some bounds on its growth.

(a) Use induction to prove that Fn20.5nfor n6.

(b) Find a constant c<1such thatFn2cn for all n0. Show that your answer is correct.

(c) What is the largestc you can find for which Fn=Ω(2cn)?

Short Answer

Expert verified
  1. It is proved that Fn20.5n for n6.
  2. The value of the constant is 1>c0.69.
  3. The largest value is c~0.69.

Step by step solution

01

Rules for Fibonacci

We are given that:

F0=0F1=1Fn=Fn1+Fn2

02

Step 2:Solution to part (a) 

We know that for n=6,the Fibonacci numberF6=8.

Also, for n=6, use induction to prove that Fn20.5n for n=6.

Find Fn20.5nfor n=6.

F(6)?20.568?2388

This is true. Or it can be said that F(6)20.56 is true.

So, let us assume this statementFn20.5n is true for all values of k, i.e., Fk20.5k.

Now, we will check fork=k+1.

So, we have the Fibonacci series as:

Fk+1=F(k+1)1+F(k+1)2=Fk+Fk120.5k+20.5(k1)20.5k+20.5k20.520.5k(1+20.5)

We know that1+20.520.5.

Hence,Fk+120.5(k+1)for all k.

So,Fn20.5nfor n6 is true.

Hence it is proved.

03

Step 3:Solution (b)

We are given that Fn2cn for n0.

Also from the Fibonacci series:FnFn1+Fn2.

Thus,

2cn2c(n1)+2c(n2)2c2c+22c22c2c+1

Let2c=x.

Then,

x2x+1x2x10

On solving the above quadratic equation:

x1±522c1±52

Take log on both sides; we have:

log2(2c)log21±52c0.69

So, the value must be 1>c0.69.

04

Step 4:Solution (c)

In the previous solution, the largest possible value of c would be 0.69.

Since Fn=Ω(2cn), this means it is the lowest bound.

Therefore,c=0.69 .

Unlock Step-by-Step Solutions & Ace Your Exams!

  • Full Textbook Solutions

    Get detailed explanations and key concepts

  • Unlimited Al creation

    Al flashcards, explanations, exams and more...

  • Ads-free access

    To over 500 millions flashcards

  • Money-back guarantee

    We refund you if you fail your exam.

Over 30 million students worldwide already upgrade their learning with Vaia!

One App. One Place for Learning.

All the tools & learning materials you need for study success - in one app.

Get started for free

Most popular questions from this chapter

Show that any array of integers x[1n] can be sorted in O (n + M) time, where

role="math" localid="1659938331794" M=maxxi-minxiii

For small M, this is linear time: why doesn’t the Ω(nlogn) lower bound apply in this case?

Is there a faster way to compute the nth Fibonacci number than by fib2 (page 4)? One idea involves matrices.

We start by writing the equations F1=F1 and F2=F0+F1 in matrix notation:


role="math" localid="1659767046297" (F1F2)=(0111).(F0F1).

Similarly,

F2F3=(0111).(F1F2)=(0111)2.(F0F1)

And in general

(FnFn+1)=(0111)n.(F0F1)

So, in order to compute Fn, it suffices to raise this 2×2 matrix, call it X, to the nth power.

a. Show that two 2×2matrices can be multiplied using 4additions and 8multiplications.

But how many matrix multiplications does it take to compute Xn?

b. Show that O(logn) matrix multiplications suffice for computing Xn. (Hint: Think about computing X8.)

Thus, the number of arithmetic operations needed by our matrix-based algorithm, call it fib3, is just O(logn), as compared to O(n)for fib2. Have we broken another exponential barrier? The catch is that our new algorithm involves multiplication, not just addition; and multiplications of large numbers are slower than additions. We have already seen that, when the complexity of arithmetic operations is taken into account, the running time offib2becomes O(n).

c. Show that all intermediate results of fib3 are O(n) bits long.


d. Let M(n)be the running time of an algorithm for multiplying n-bit numbers, and assume that M(n)=O(n2) (the school method for multiplication, recalled in Chapter 1, achieves this). Prove that the running time of fib3 is O(M(n)logn).


e. Can you prove that the running time of fib3 is O(M(n))? Assume M(n)=Θ(na)for some 1a2. (Hint: The lengths of the numbers being multiplied get doubled with every squaring.)


In conclusion, whether fib3 is faster than fib2 depends on whether we can multiply n-bit integers faster thanO(n2) . Do you think this is possible? (The answer is in Chapter 2.) Finally, there is a formula for the Fibonacci numbers:

role="math" localid="1659768125292" Fn=15(1+52)n15(152)n.

So, it would appear that we only need to raise a couple of numbers to the nth power in order to computeFn . The problem is that these numbers are irrational, and computing them to sufficient accuracy is nontrivial. In fact, our matrix method fib3 can be seen as a roundabout way of raising these irrational numbers to the nth power. If you know your linear algebra, you should see why. (Hint: What are the eigenvalues of the matrix X?)

There are many variants of Rudrata’s problem, depending on whether the graph is undirected or directed, and whether a cycle or path is sought. Reduce the DIRECTED RUDRATA PATH problem to each of the following.(a)The (undirected) RUDRATA PATH problem.(b) The undirected RUDRATA PATH problem, which is just like RUDRATA PATH except that the endpoints of the path are specified in the input.

Question: An Eulerian tourin an undirected graph is a cycle that is allowed to pass through each vertex multiple times, but must use each edge exactly once.

This simple concept was used by Euler in to solve the famous Konigsberg bridge problem, which launched the field of graph theory. The city of Konigsberg (now called Kaliningrad, in western Russia) is the meeting point of two rivers with a small island in the middle. There are seven bridges across the rivers, and a popular recreational question of the time was to determine whether it is possible to perform a tour in which each bridge is crossed exactly once. Euler formulated the relevant information as a graph with four nodes (denoting land masses) and seven edges (denoting bridges), as shown here.

Notice an unusual feature of this problem: multiple edges between certain pairs of nodes.

(a) Show that an undirected graph has an Eulerian tour if and only if all its vertices have even degree. Conclude that there is no Eulerian tour of the Konigsberg bridges.

(b) An Eulerian pathis a path which uses each edge exactly once. Can you give a similar if-and-only-if characterization of which undirected graphs have Eulerian paths?

(c) Can you give an analog of part (a) for directedgraphs?

The kSPANNING TREE problem is the following.Input: An undirected graph G=(V,E) Output: A spanning tree of G in which each node has degree k, if such a tree exists.Show that for any k2:

  1. k SPANNING TREE is a search problem.
  2. k SPANNING TREE is NP-complete. (Hint: Start with k=2 and consider the relation between this problem and RUDRATA PATH.)
See all solutions

Recommended explanations on Computer Science Textbooks

View all explanations

What do you think about this solution?

We value your feedback to improve our textbook solutions.

Study anywhere. Anytime. Across all devices.

Sign-up for free