How does one solve recurrence relations involving subproblems of different sizes?

1.1k Views Asked by At

I just studied the Master Method for solving recurrences but found out that it is applicable only to the recurrence relations having same subproblem sizes, for instance in the following recurrence :

$T(n) = a * T(n/b) + O(n^d)$ all subproblems have size n/b, but if I want to solve the following recurrence $T(n) = T(n/3) + T(2n/3) + O(n*logn)$ how do I go about solving this.

1

There are 1 best solutions below

0
On

One thing about the Master Method is that it is just an extension of something called the recursion tree method. When I used to TA a CS algorithms course, we always presented a proof of the Master Method using it (you might have come across the proof too).

The recursion tree method doesn't require the same rigid format that the Master Method does, and can be applied to your recurrence ($T(n) = T(n/3) + T(2n/3) + O(n\log{n})$). I won't actually give the solution here so that you get a chance to work it out on your own.