1
$\begingroup$

I need to prove a tight bound on the following recurrence using the Substitution method:

$T(n) = 2T(n/2) +\frac{n}{\log(n)}$

I have arrived to the "guess" part of the Substitution method and know that $T(n)$ is $O(n\log(\log(n)))$ by using recursion tree and iteration method. But I have trouble figuring out how to proceed from the inductive step both for big-$O$ and Omega:

Assume $T(n/2) <= cn\log(\log(n))$

$T(n) = 2T(n/2) + \frac{n}{\log(n)} \leq 2cn\log(\log(n)) + \frac{n}{\log(n)}$

Assume $T(n/2) \geq cn\log(\log(n))$

$T(n) = 2T(n/2) + n/\log(n)\geq 2cn\log(\log(n)) + \frac{n}{\log(n)}$

  • 0
    No. You should assume $T(k)\leq ck \log\log k$ for all $k$T(n)\leq cn \log\log n$ (where in this case, you will use the induction hypothesis (IH) for $k=\frac{n}{2}$). Here, your IH is wrong. – 2017-02-12

1 Answers 1

0

I won't get here in the usual details about this recurrence relations, and the fact that there are floors/ceilings implicitly assumed or to take care of for them to make sense. Your lecturer must have taken care of that.

To get you started, the upper bound. (I assumeyou will deal with the base cases, as one should in a proof by induction). In what follows, $c\geq \log_2 e$ is an absolute constant. I will also assume this is from a computer science setting, so $\log=\log_2$.

At step $n$, you have the following induction hypothesis: $$ \forall k < n,\qquad T(k) \leq ck\log\log k \tag{IH} $$ Then, using our recurrent relation: $$ \begin{align} T(n) &= 2T\left(\frac{n}{2}\right) + \frac{n}{\log n} \\ &\leq 2c\frac{n}{2}\log\log\frac{n}{2} + \frac{n}{\log n} \tag{by IH}\\ &= c n \log(\log n -1 )+ \frac{n}{\log n} \\ &= cn \log\left(\log n\left(1-\frac{1}{\log n}\right)\right)+ \frac{n}{\log n} \\ &= cn \log\log n + cn \log \left(1-\frac{1}{\log n}\right)+ \frac{n}{\log n} \\ &\leq cn \log\log n - cn \cdot \frac{1}{\log_2 e} \frac{1}{\log n}+ \frac{n}{\log n} \tag{$\ast$}\\ &= cn \log\log n - \frac{c}{\log_2 e}\frac{n}{\log n}+ \frac{n}{\log n} \\ &\leq cn \log\log n \end{align} $$ were for $(\ast)$ we used the inequality $\ln(1-x)\leq -x$, and in the end the fact that $c\geq \log_2 e$. This concludes the induction.

  • 0
    Erm. Before accepting, have you read it carefully and made sure you understood everything (and everything looked correct)?2017-02-12
  • 0
    Yes, thank you, this was indeed helpful. I was stuck on the third step, now it's clear. I had actually tried simplifying the logarithm of difference but couldn't proceed from there .2017-02-12
  • 0
    Glad that helped, then!2017-02-12