这个求和的渐近复杂性?

时间:2017-08-05 10:09:44

标签: math time-complexity asymptotic-complexity

刚刚开始一个新课程(数据结构)并且在问题上遇到了一些问题:

F(n)函数是真的吗?

Picture

我的方向是当N指数为1或更小时应该发生,因为这将与thetha的定义相匹配,因为函数将更接近C1 * F(n)和C2 * F(n),但我不确定。谢谢!

2 个答案:

答案 0 :(得分:2)

请注意

  

0n + 1n + 2n + ... + n·n

     

= n(0 + 1 + 2 + ... + n)

     

= n(n(n + 1)/ 2)

从高斯的总和开始的最后一步。因此,求和是Θ(n 3 )。

答案 1 :(得分:-1)

I'm studying the same course right now, and I think that if you apply the next rule it might work out.

lim n->inf    f(x) / g(x) = c ,