Big Theta表示法中常量的值

时间:2012-09-08 04:50:48

标签: algorithm asymptotic-complexity

在Big Theta表示法中,常量c1c2n的每个值都有所不同吗?

定义:

Theta(g(n)) = {f(n): there exist c1 >= 0, c2 > 0 and n0 > 0
                     such that for all n >= n0,
                     0 <= c1, g(n) <= f(n) <= c2 * g(n)}

2 个答案:

答案 0 :(得分:4)

c1c2对于n的每个值都没有区别。如果是,他们将依赖于n,并且不会是常数。

答案 1 :(得分:1)

Theta(g(n)) = {f(n): for all n >= n0, there exist c1 >= 0, c2 > 0 and n0 > 0
                 such that 0 <= c1, g(n) <= f(n) <= c2 * g(n)}

我不认为你定义中的量词是正确的。它应该是

Theta(g(n)) = {f(n): there exist c1 >= 0, c2 > 0 and n0 > 0
                 such that for all n >= n0, c1 * g(n) <= f(n) <= c2 * g(n)}