Question: ( a ) Describe your algorithm clearly in English. ( b ) Give pseudocode. ( c ) Argue correctness, even if you don t give
a Describe your algorithm clearly in English.
b Give pseudocode.
c Argue correctness, even if you dont give a formal proof and give a convincing
argument instead.
d Give with explanation the best upper bound that you can for the running time
ii points Give a nonrecursive algorithm that asymptotically performs fewer addi
tions than the recursive algorithm. Discuss the running time of the new algorithm.
iii points Give an algorithm to compute in time using only integer
additions and multiplications.
Hint: Observe that
Can you use this observation to compute
iv points The Fibonacci Plus numbers are defined below a and are all inte
gers
Give an algorithm to compute in time.
Hint: Similarly to part iii find a suitable matrix to apply to the initial vector
so that is an entry of the resulting vector. Other choices of
initial vectorand accordingly, matrixmay work too. Then show how to compute
b points Now assume that adding two bit integers requires time and that
multiplying two bit integers requires time. Analyze the running time of the first
three algorithms in part a under this more reasonable cost measure for the elementary
arithmetic operations.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
