An algorithm solves problems of size $n$ by recursively solving two subproblems of size $n - 1$ and then combining the solutions in constant time.
What is the algorithms running time?
Assume $ T(1)\in O(1)$
So far I have:
$$T(n) \le 2T(n - 1) + c$$
After a recursion:
$$T(n) \le 2(2T(n - 2) + c) + c$$
$$= 4T(n - 2) + 3c$$
After every recursion:
$$T(n) \le 2^{n - 1} + 2(n - 1)c + c$$
$$= 2^{n - 1} + 2nc - c$$
As the algorithm can recurse a total of $n - 1$ times.
Hence: $$T(n) \in O(2^{n - 1})$$
$$ \in O(2^{n})$$
This question is from Algorithms; Dasgupta, Papadimitriou, Vazirani; 1st Edition. Question 2.4
Thank you.