I am trying to analyze the complexity of the function call to PEL(A[1..n]) where n is a certain power of 3 and PEL is defined by the following algorithm:
function PEL(A[m..n]){
if(n - m <= 1) return 1;
else {
p := [(n - m + 1)/3];
MAKE(A[m..n]);
PEL(A[m..n + p - 1]); PEL(A[m + p .. m + 3p - 1]);
}
}
The complexity of MAKE(A[m..n]) is theta( (n-m)log(n-m) ).
From what I have gathered so far, we are dealing with the following recurrence relation:
C(N) = C(N/3) + C(2*N/3) + theta( (n-m)log(n-m) )
Where
C(1) = C(2) = 1
I understand that we need to apply the master theorem here, but in the master theorem we have recurrence relations of the form:
C(N) = a * C(N/b) + f(n)
And I have no idea how to get rid of the second recurrent call to C() in my recurrence relation, so how do I do it? I don't know how to derive the values of a and b.