1

Wikipedia says that the equation cannot be solved using Master's Method.
The equation matches with Master's Theorem except for $\frac {n}{\log(n)}$.

A youTube tutor (seek time 11:42) solves this using Master's Method as :

$T(n)=2T(\frac{n}{2})+\frac{n}{\log(n)}$
$T(n)=2T(\frac{n}{2})+n \log^{-1}n$

$a=2,b=2,k=1,p=-1$

Therefore,
$T(n)=\theta(n^{\log_ab}\log(\log(n)))$
$T(n)=\theta(n\log\log(n))$

Is it correct? because I don't think $\frac{n}{\log(n)}$ can be transformed into $n\log^{-1}n$.

A 3rd source has solved it using a completely different approach currently beyond my understanding but the answer matches with the one solved in the youTube video.

Is the approach by the guy in the youtube video correct? Can logarithms be solved that way? If not, then how would you solve the problem?

Siddharth Thevaril
  • 875
  • 4
  • 15
  • 27
  • Neither have I seen the youtube version of Master's theorem before, nor I think it is correct! One thing that comes in my mind now for solving it is to substitute $n$ by $2^k$ and continue decreasing the power. – Ehsan M. Kermani Dec 19 '14 at 19:12
  • "because I don't think $\frac{n}{\log(n)}$ can be transformed into $n\log^{-1}n$." Actually this is (trivially) true since $\log^{-1}n$ here does not mean the reciprocal function of $\log$ evaluated at $n$ but $(\log n)^{-1}=1/\log n$. – Did Dec 19 '14 at 19:18
  • @Did:So by conditions $a=b^k$ is it safe to assign $p=−1$ and use $T(n)=\theta(n^{\log_ab}\log(\log(n)))$ as given in the question(as solved in the video)? – Siddharth Thevaril Dec 19 '14 at 19:53
  • This recurrence was examined at this MSE link. – Marko Riedel Dec 19 '14 at 22:48
  • Got something from the answer? – Did Jan 04 '15 at 15:29

1 Answers1

1

My first impulse would be to note that $$\frac{T(n)}n=\frac{T(n/2)}{n/2}+\frac1{\log n},$$ and that to be able to iterate this requires to look at the powers of $2$, since the new sequence $$S(k)=\frac{T(2^k)}{2^k}$$ solves the recursion $$S(k)=S(k-1)+\frac1{k\log 2},$$ from which I readily see that $$S(k)=S(0)+\frac1{\log 2}\sum_{i=1}^k\frac1i=S(0)+\frac{H_k}{\log2},$$ where $H_k$ denotes the $k$th harmonic number. Coming back to $T$ and using the asymptotics of $H_k$ yields $$T(2^k)=2^k\left(T(1)+\frac{H_k}{\log2}\right)=\Theta(2^k\log k).$$ All this is rigorous but now comes the nonrigorous part, which is to declare (although this is not true without some further hypothesis) that, since $\log k=\log\log 2^k-\log\log2\in\Theta(\log\log n)$, this implies $$T(n)\in\Theta(n\log\log n).$$

Did
  • 279,727
  • 2
    I found this difficult to understand. – Siddharth Thevaril Dec 19 '14 at 19:55
  • I find difficult to understand what you found difficult to understand in this as long as you only declare that you find "this" difficult to understand instead of explaining what precisely in this you find difficult to understand. Understood? – Did Dec 20 '14 at 08:09
  • Your approach of solving. It is currently above my understanding. Why did you write the equation after "My first impulse would be to note that" – Siddharth Thevaril Dec 20 '14 at 18:55
  • Because it is equivalent to the recursion in your post (do you see why?) and much more suggestive (as the rest of the answer shows). – Did Dec 20 '14 at 20:19
  • Interesting downvote--purely for mathematical reasons, to be sure. – Did Jan 15 '15 at 12:23