Asymptotic tight bound for $T(n) = T(\sqrt{n}) + T\left(\frac{n}{3}\right) + 2n$

150 Views Asked by At

I am trying to figure out the tight upper bound for $T(n) = T(\sqrt{n}) + T\left(\frac{n}{3}\right) + 2n$, but to no success. I don't think the master theorem works here, nor does using a recurrence tree, so I've resorted to using the substitution method. Here's how far I'm getting:


First, I guess that $T(n) \in O(n \log{(\log{(n)})})$ (not sure if this guess is correct). I must now prove that $T(n) \leq cn \log{(\log{(n)})}$ for some constant $c$.

Assume that $T(m) \leq cm \log{(\log{(m)})}$ for all positive $m$ less than $n$. Thus, $T(\sqrt{n}) \leq c\sqrt{n} \log{(\log {(\sqrt{n})})}$ and $T(\frac{n}{3}) \leq c\frac{n}{3} \log{(\log{(\frac{n}{3})})}$, and

$$ \begin{align*} T(n) &= T(\sqrt{n}) + T\left(\frac{n}{3}\right) + 2n \\ &\leq c\sqrt{n} \log{(\log{(\sqrt{n})})} + c\frac{n}{3} \log{(\log{(\frac{n}{3})})} + 2n \\ &= c(\sqrt{n} \log{(\log{(\sqrt{n})})} + \frac{n}{3} \log{(\log{(\frac{n}{3})})}) + 2n \\ &= c(\log{(\log{(\sqrt{n})}^{\sqrt{n}})} + \log{(\log{(\frac{n}{3})}^{\frac{n}{3}})}) + 2n \\ &= c\log{(\log{(\sqrt{n})}^{\sqrt{n}} \times \log{(\frac{n}{3})}^{\frac{n}{3}})} + 2n \\ \end{align*} $$


...and it doesn't seem to get any better from here.

Is there something I'm fundametally getting wrong about the substitution method, or am I simply making the wrong guess? Thanks!