Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • 1
    $\begingroup$ damn I made super stupid mistake in asking question. Now corrected. However now am not able to get how the stuff cancel each other in the series: $2^0\log_2\frac{n}{2^0}+2^1\log_2\frac{n}{2^1}+2^2\log_2\frac{n}{2^2}+...+2^{ \log_2{n}}\log_2\frac{n}{2^{ \log_2{n}}}=\log_2{n}+2\log_2{\frac{n}{2}}+4\log_2{\frac{n}{4}}+...+n\log_2{1}$.. This is the series that you come up with right? Trying with $n=8$, I got $\log_2{8}+2\log_2{4}+4\log_2{2}+8\log_2{1}=3+4+4=11$. Whats wrong here? $\endgroup$ Commented May 14, 2016 at 12:05
  • $\begingroup$ @anir - Use equality $\log_2(\frac{n}{2^k}) = \log_2 n - k$ $\endgroup$ Commented May 14, 2016 at 15:36
  • 1
    $\begingroup$ I still didn't get how that series collapses to $\Theta(n)$ :'¬( Math-noob-here... $\endgroup$ Commented May 19, 2016 at 18:42
  • $\begingroup$ @anir - I'll expand my answer $\endgroup$ Commented May 19, 2016 at 22:43
  • $\begingroup$ @HEKTO If you solve above equ of comment, you still get nlog(n) ?? I have tried a lot. would you please help me here ? $\endgroup$ Commented Jul 15, 2017 at 17:15