Question: Problem 2. Your goal in this problem is to analyze the runtime of the following (imaginary) recursive algorithms for some (even more imaginary) problem: (A)

Problem 2. Your goal in this problem is to analyze the runtime of the following (imaginary) recursive algorithms for some (even more imaginary) problem: (A) Algorithm A divides an instance of size n in to 3 subproblems of size n1 each, recursively solves each one, and then takes O(1) time to combine the solutions and output the answer. (B) Nlgorithm B divides an instance of size n into 2 subproblems, one with size n/4 and one with size n/5, recursively solves each one, and then takes O(n) time to combine the solutions and output the answer. (C) Algorithm C divides an instance of size n into 5 subproblems of size n/5 each, recursively solves each one, and then takes O(n) time to combine the solutions and output the answer. (D) Algorithm D divides an instance of size n into 5 subproblems of size n/2 each, recursively solves each one, and then takes O(n2) time to combine the solutions and output the answer. For each algorithm, write a recurrence for its runtime and use the recursion tree method of Lecture 5 to solve this recurrence and find the tightest asymptotic upper bound on runtime of the algorithm. (25 points)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
