Question: 1.Suppose that, in a divide-and-conquer algorithm, we always divide an instance of size n of a problem into 3 subinstances of size n/2, and the
1.Suppose that, in a divide-and-conquer algorithm, we always divide an instance of size n of a problem into 3 subinstances of size n/2, and the dividing and combining steps take linear time. Write a recurrence equation for the running time T (n), and solve this recurrence equation for T (n). Show your solution in order notation.
2. Implement both algorithms of Fibonacci Sequence (i.e., the Divide and Conquer algorithm and the dynamic algorithm). Determine the largest number that the Divide and Conquer algorithm can accept as its argument and still compute the answer within 60 seconds. Report how long it takes the dynamic algorithm to compute this answer.
Use java or C++ to compile the code.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
