Applying Master Theorem

130 views Asked by At

I am trying to study for my exams by using looking at my midterm. One thing I do not understand fully is the Master Theorem. I understand that there are three cases, and can apply them when they are in this form

T(n) = 25T(n/5) + n^(2)

but my professor likes to give some in this form

T(n) = {n+2 if n=0,1,2,3
T(n) = {4T(n-1) - 6T(n-2) + 4T(n-3) - T(n-4) otherwise

So I am confused if there is a different way to do Master Theorem, or if I am meant to somehow change this into into the format I understand.

1

There are 1 answers

0
erfan30 On

n^lg25=n^2. and at the non recursive part we have this. So we should mult n^2 *log n. so the solution is o(n^2 log n)