Answered step by step
Verified Expert Solution
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
Fn
Fn
If we write the latter equation recursively, we can get
Fn
Fn
n F
F
Let X
a Show that two times matrices can be multiplied using additions and multiplications.
b Show that for all i n all entries of Xi have On 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 OMn log n where Mn is the time it takes to
multiply two nbit numbers. Hint: first show that there are Olog n recursive calls, and then show
each call takes at most OMn you may use the results of parts a and b to show the latterAlgorithm matrixXn
Input: X n
if n then
return X
end if
if n is even then
Z matrixX n
return Z Z
end if
if n is odd then
Z matrixX n
return Z Z X
end if
Output: matrixXn
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started