[Math] Solving a recurrence relation using master method

computational complexityrecurrence-relationsrecursive algorithms

I know that the Master theorem is used for the recurrence relations of the form:
$$T(n) = aT(n/b) + f(n)$$
In my question, I am supposed to solve the following recurrence relation by using Master theorem:
$$T(n) = 2T(n/7) + 5T(n/8) + n$$
Can I take $f(n)=n$ and since $f(n)=\Theta(n^{\log_ba})$, can I say $T(n)$ is $O(n\log n)$? But if I do this, I neglect the fact that the relation must be of the form $T(n) = aT(n/b) + f(n)$. What should I do? Thanks.

Best Answer

Hint: Check that $T(n)\geqslant n$ and that each property $T(n)\leqslant cn$ is hereditary if $c\geqslant56/5$.

Choosing $c$ large enough, one gets $n\leqslant T(n)\leqslant cn$ for every $n$, in particular, $T(n)=\Theta(n)$.

Related Question