87.4k views
2 votes
Solve the following recurrence using Master's theorem: t(n) = 16t(n/4) + n?

1 Answer

6 votes

Final answer:

The recurrence t(n) = 16t(n/4) + n solves to t(n) = O(n^2) by applying the Master's theorem, as the function n is of smaller order than n^2.

Step-by-step explanation:

To solve the recurrence t(n) = 16t(n/4) + n using the Master's theorem, we must first identify the variables a, b, and f(n). Here, a represents the number of subproblems, b is the factor by which the subproblem size is reduced, and f(n) is the cost of dividing the problem and combining the results of subproblems.

In our case, a = 16, b = 4, and f(n) = n. According to Master's theorem, we compare f(n) with nlogba, which equates to nlog416 = n2.

Since f(n) = n has a smaller order of growth than n2 (f(n) is O(n) and n2 is O(n2)), we are in case 1 of the Master's theorem, which states that if f(n) = O(nc) where c < logba, then t(n) = O(nlogba) = O(n2). Therefore, the solution to the recurrence is t(n) = O(n2).

User Stewart Alan
by
8.2k points