Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Fibonacci numbers. There is an alternative way of computing Fibonacci numbers involving matrices. Note that we have: Fn Fn + 1 = 0 1 1

Fibonacci numbers. There is an alternative way of computing Fibonacci numbers involving
matrices. Note that we have: Fn
Fn+1
=
01
11
Fn1
Fn
.
If we write the latter equation recursively, we can get
Fn
Fn+1
=
01
11
n F0
F1
. Let X =
01
11
.
(a) Show that two 2\times 2 matrices can be multiplied using 4 additions and 8 multiplications.
(b) Show that for all i < n, all entries of Xi have O(n) bits. (Hint: Consider the effect of each matrix
multiplication on the bit count).
(c) The following recursive algorithm can be used to efficiently compute Xn.
Show that the running time of this algorithm is O(M(n) log n), where M(n) is the time it takes to
multiply two n-bit numbers. (Hint: first show that there are O(log n) recursive calls, and then show
each call takes at most O(M(n)), you may use the results of parts (a) and (b) to show the latter).Algorithm 4 matrix(X,n)
Input: X , n
if n =1 then
return X
end if
if n is even then
Z = matrix(X, n
2)
return Z Z
end if
if n is odd then
Z = matrix(X, n1
2)
return Z Z X
end if
Output: matrix(X,n)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing Fundamentals, Design, and Implementation

Authors: David M. Kroenke, David J. Auer

14th edition

133876705, 9781292107639, 1292107634, 978-0133876703

More Books

Students also viewed these Databases questions

Question

Q.No.1 Explain Large scale map ? Q.No.2 Explain small scale map ?

Answered: 1 week ago

Question

1. Signs and symbols of the map Briefly by box ?

Answered: 1 week ago