# Finding tight bounds to $T(n)=2T(\frac n 2) +\frac{n}{\log n}$

Find tight bounds to $T(n)=2T(\frac n 2) +\frac{n}{\log n}$

The upper bound: $\displaystyle 2T(\frac n 2) +\frac{n}{\log n} \le T(\frac n 2) +n = \sum_{i=0}^{\log n}\frac n {2^i} \le n\sum_{i=0}^{\log n}\frac 1 {i}=\Theta (n\log \log n)$.

But I can't figure out how to do the lower bound, I either get stuck like this:

$\displaystyle T(n)\ge T(\frac n 2)+\frac 1 {\log n} = \sum_{i=0}^{\log n} \frac 1 {\log n - i}$

Or get an expression too small.

Note, I don't want to solve it, just find tight bounds.

• Note that $$2^{-k}T(2^k)=T(1)+\frac1{\ln2}\sum_{i=1}^k\frac1i\implies T(2^k)=2^k\log_2 k+O(2^k)$$ Although this is far from being mathematically guaranteed, you might be expected to deduce from this that, for some explicit $O(n)$ which can be quantified in terms of $T(1)$, $$T(n)=n\log_2\log_2n+O(n).$$ – Did Nov 16 '15 at 13:14
• I don't see how this is equal to $n\log \log n$... Also how did the $2^k$ get to the $\log k$? @did – shinzou Nov 16 '15 at 13:19
• $n=2^k\implies 2^k\log_2k=\ldots$ – Did Nov 16 '15 at 13:20
• @did When asked to find bounds, shouldn't we bound it from above and below seperatly? – shinzou Nov 16 '15 at 13:30
• And this is exactly what my comment shows how to find since there exists explicit bounds of the harmonic numbers in terms of logarithms, say $$\ln n<\ln(n+1)\leqslant\sum_{k=1}^n\frac1k\leqslant1+\ln n.$$ – Did Nov 16 '15 at 13:35

Set $n=2^k$ and $g(k) = T(n)$. We then have \begin{align} g(k) & = 2g(k-1) + \dfrac{2^k}k = 4g(k-2) + \dfrac{2^k}{k-1} + \dfrac{2^k}k = 2^k g(0) + \sum_{l=1}^k \dfrac{2^k}l = 2^kg(0) + 2^k H_k\\ & \sim ng(0) + n\log(k) + n\gamma = n(g(0)+\gamma) + n\log(\log(n)) \end{align}
• Why is it $g(k-1)$ and not $g(2^{k-1})$? also what is $H_k$? – shinzou Nov 17 '15 at 19:53