Question: Let's consider the following divide-and-conquer algorithm. To solve a problem of size n, the algorithm T(n) recursively solves two sub-problems, each of size n
Let's consider the following divide-and-conquer algorithm. To solve a problem of size n, the algorithm T(n) recursively solves two sub-problems, each of size n - 1, while the combining of the two sub-problems takes 1 (one unit time). It also takes one unit time to process one element. (a) Write the recurrence for the algorithm. (b) Use the recursion tree method to determine a good asymptotic upper bound on the recurrence. (c) Use the substitution method to verify your answer.
Step by Step Solution
3.40 Rating (153 Votes )
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
