0 votes
How do we solve this recurrence relation generically?

For example, we can say something like: if f(n) = omega(n^1+epsilon), then T(n) = f(n).  etc?
in Divide & Conquer by AlgoMeister (1.6k points)

2 Answers

+2 votes

Using Master's Theorem:

1.) nlog  b a   = n log  2 2    = n   ||  For instance, f(n) is n*logkn . Then the Time Complexity of the recurrence relation would be Theta( n*logk+1n). 

2.)  nlog  b a   = n log  2 2    = n  ||   For instance, f(n) is O(n1-e). Then the Time Complexity for the recurrence relation would be Theta(n). 

3.)  nlog  b a   = n log  2 2    = n  ||  For instance, f(n) is omega(n1+e). Then the Time Complexity for the recurrence relation would be Theta(f(n)). 

by (196 points)
+1 vote

Because of the format of the problem, you could use master theorem to find a generic solution for any given f(n). In the format T(n) = a*T(n/b) + c*f(n), we can assign k = logba such that:

If f(n) = omega(nk), T(n) = theta (f(n))

If f(n) = o(nk) then T(n) = theta(nk)

If f(n) = theta(nk) then T(n) = theta(f(n) * log n)

by Active (288 points)
The Book: Analysis and Design of Algorithms | Presentations on Slideshare | Lecture Notes, etc
...