0

According to this http://en.wikipedia.org/wiki/Introduction_to_Algorithms
$T(n)=2T(n/2)+n\log n$ is not case 3 of Master Theorem, can someone explain me why?

And which case of master theorem it is?

1 Answers1

0

It is unimportant to know if something is a case of Master Theorem or not. What is important, though, is solving the problem at hand. In your case, set $n=2^k$. We then get $$T(2^k) = 2T(2^{k-1}) + k2^k \log(2)$$ Defining $T(2^k)$ as $g(k)$, we get \begin{align} g(k) & = 2g(k-1) + k2^{k-1} \log(2) = 2(2g(k-2) +(k-1)2^{k-1}\log(2))+ k2^{k-1} \log(2)\\ & = 4g(k-2) + (k-1)2^k \log(2) + k 2^k \log(2)\\ & = 4(2g(k-3) + (k-2)2^{k-2}\log(2)) + (k-1)2^k \log(2) + k 2^k \log(2)\\ & = 8g(k-3) + (k-2)2^{k}\log(2) + (k-1)2^k \log(2) + k 2^k \log(2)\\ & = 2^k g(0) + \sum_{l=0}^kl \cdot 2^k \log(2)\\ & = 2^k g(0) + k(k-1)2^{k-1} \log(2)\\ & = ng(0) + \dfrac{n \log(n) (\log(n)-1)}{2} \log(2) \end{align}

user141421
  • 2,538
  • But sometimes it could be important. Otherwise we all will have to reinvent the wheel. – mathse Apr 13 '14 at 12:09
  • @mathse At the same time, we do not want to be computers just doing data search from a text book and vomiting out the answers. In this case, it is redundant to know if this is a case of Mistress theorem from page 492, second paragraph of the book. – user141421 Apr 13 '14 at 12:11
  • Why not? Maybe the mistress theorem from page 492 implies the finest consequences that we would be unable to find ourselves within our earthly time constraints? – mathse Apr 13 '14 at 12:14
  • @mathse Probably, It depends on which skill the person is better and faster at: the ability to access data or the ability to think and perform computations. – user141421 Apr 13 '14 at 12:21
  • None of us can repeat 2000 years (or much more) of math history. Current theorems and results wouldn't exist if Euler, Lagrange, Riemann, Lesbegue etc. hadn't provided us with a rich fund of knowledge. – mathse Apr 13 '14 at 12:25
  • @mathse In future, when you list the mathematicians, do not be Western centric. Most of the Western mathematics, is a product of ancient Greek, Indian mathematics. So kindly add, "Ramanujan, Bhaskara, Madhava, Pythagoras, Diophantine, Aryabhatta, Brahmagupta, Shridhara, ..." to the list of mathematicians in future. – user141421 Apr 13 '14 at 12:27
  • Hahaha. I heard Ramanujan would have done much better had he been exposed to the fund of math results earlier. Pythagoras and Diophantine are probably not so important anymore these days and the other guys I don't know :) – mathse Apr 13 '14 at 12:35
  • @mathse Your comment reveals ignorance. Ramanujan, in fact, felt that Hardy's style of rigorous mathematics was too constrained for him restricting his ideas. And I cannot argue with a person who says the mathematics of "Pythagoras and Diophantine" are not so important. – user141421 Apr 13 '14 at 12:39
  • Hardy, in turn, said,about R., precisely what I have relayed to you. What exactly is the contribution of Pythagoras to current mathematical research? – mathse Apr 13 '14 at 12:43