证明或反驳以下含义(Big O Notation)

时间:2016-04-27 10:29:37

标签: algorithm big-o implication

我无法证明这一点:

f(n) = O(g(n))暗示f(n)^k = O(g(n)^k)

where k is element of the natural, positiv numbers

我在互联网上找到了类似的例子。但我不确定为这个例子实现这些解决方案是否正确。

1 个答案:

答案 0 :(得分:1)

返回definition of big-o

f(n) = O(g(n)) <=> \exists M \in R+,
                   \exists n_0 \in N,
                   such that:
                   \forall n > n_0
                   |f(n)| < M.|g(n)|

很明显,如果k > 0然后|f(n)|^k < (M.|g(n)|)^k

如果k < 0,则关系反转。

相关问题