Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Recursive sequences are sequences of numbers which can be represented by recursive formula. The most famous example continues is a Fibonacci Sequence. Considerthefollowingsequence { fn
Recursive sequences are sequences of numbers which can be represented by recursive formula. The most famous example continues is a Fibonacci Sequence.
Considerthefollowingsequencefn ndefinedas: fff and,for i define fi :fifi fi
a A common strategy with such recursive sequences is to view it as a matrix multiplication. Let Fi : fi fi fiT Then, the recurrence relation can be represented as: AFiFi
How does A need to be chosen in order to represent the recurrence equation from the beginning of the task? Also, for i derive an equation for Fi in terms of F A and i Justify your answers.
b Use part a to build an efficient algorithm that computes fn based on the divide and conquer strategy. Note that you are only asked to compute fn and none of the intermediate values. Your algorithm will derive inspiration from an algorithm discussed in lecture.
Let Mn be the number of times matrix multiplications performed to compute fn Derive a recurrence relation for Mn with an appropriate base case. You may assume that n m for integer m Solve it to compute the number of times matrix multiplications performed asymptotic is fine Finally, use this value to state an asymptotically tight bound for the running time, assuming that each arithmetic operation performed, ie addition and multiplication can be performed in constant time.
Hint: You may need a driver function so that only fn value is returned. Your driver function will invoke a recursive algorithm say AExp Let T n be the number of times matrix multiplications to compute AExpn First, formulate a recurrence relation for T n with appropriate bases Then, express Mn in terms of the function T with appropriate base case and solve for M n assuming n m for some integer m
c Prove by induction that, for some constant a fn Theta an Namely, prove by induction that for some constant c you have fn c an and for some constant c you have fn c an What is the right constant a and the best c and c you can find. The best c is the smallest possible value for c and the best c is the largest possible value for c
Based on your results what can you say about the number of bits needs to represent fn as n grows larger.
Hint: Pay attention to the base case n Also, you need to do two very similar inductive proofs.
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