0

After constructing the recursion tree i concluded a cost of $n^2\cdot log_2(n)-i\cdot n^2$ per level. So my total cost is:

$$\sum_{i=0}^{log_2(n)}n^2\cdot log_2(n)-i\cdot n^2$$

$$=(log_2(n)+1)\cdot n^2\cdot log_2(n)-\sum_{i=0}^{log_2(n)}i\cdot n^2$$ $$=n^2\cdot log_2^2(n)+n^2\cdot log_2(n)-\sum_{i=0}^{log_2(n)}i\cdot n^2$$

Because $n^2\cdot log_2(n)$ and $\sum_{i=0}^{log_2(n)}i\cdot n^2$ are lower order terms i concluded $T(n) \in \Theta (n^2\cdot log_2^2(n))$

I would appreciate if someone could tell me wether i'm wrong or right.

julian
  • 1
  • 1
    We discourage "please check whether my answer is correct" questions, as only "yes/no" answers are possible, which won't help you or future visitors. See here and here. Can you edit your post to ask about a specific conceptual issue you're uncertain about? As a rule of thumb, a good conceptual question should be useful even to someone who isn't looking at the problem you happen to be working on. If you just need someone to check your work, you might seek out a friend, classmate, or teacher. – D.W. May 26 '18 at 18:22
  • 1
    https://en.wikipedia.org/wiki/Master_theorem_(analysis_of_algorithms) – D.W. May 26 '18 at 18:24

0 Answers0