I'm going through the MIT Online Course Videos on Intro. to Algorithms at here at around 38:00.
So we have a recursion formula
$\qquad T(n) = T(n/10) + T(9n/10) + O(n)$
If we build a recursion tree it looks like
T(n) -- Level 1 = c*n
/ \
T(n/10) T(9n/10) -- Level 2 = c*n
/ \ / \
T(n/100) T(9n/100) T(9n/100) T(81n/100) -- Level 3 = c*n
/ \ <= c*n
. .
. .
0(1) 0(1)
where $c$ is a constant larger than $0$.
Shortest path from the root to the leaf is $\log_{10}(n)$.
Longest path from the root to the leaf is $\log_{10/9}(n)$
Therefore, the cost could be calculated as Cost = Cost of each level * number of levels.
With the shortest path cost, we get a lower bound of $cn\log_{10}(n)$, and with the longest path cost an upper bound of $cn\log_{10/9}(n)$.
And now I have to add the costs of leaf nodes, which leads to my problem. In the video it says the total number of leaves is in $\Theta(n)$. I have trouble figuring out how he got to $\Theta(n)$.
The video further says $T(n)$ is bounded by
$\qquad cn\log_{10}(n) + O(n) \leq T(n) \leq cn\log_{10/9}(n) + O(n)$
Wouldn't it make more sense to say it's
$\qquad cn\log_{10}(n) + O(n^{\log_{10}(2)}) \leq T(n) \leq cn\log_{10/9}(n) + O(n^{\log_{10/9}(2)})$
where $\Theta(n^{log_{10}(2)})$ represents the leaves on the left and $\Theta(n^{\log_{10/9}(2)})$ represents the leaves on the right.
Or is there a way to simplify these terms to $\Theta(n)$?