对数与幂的渐近复杂性

时间:2013-04-09 17:53:15

标签: big-o logarithm asymptotic-complexity

嘿伙计们,我正在研究Dasgupta的算法书中的一些重大问题,并且我被困在少数人身上。

1)f(n)= n ^ 0.1g(n)=(log n)^ 10

根据Asymptotic Complexity of Logarithms and Powers的最佳答案, “log(n)^ a总是O(n ^ b),对于任何正常数a,b。” 因此对于1),f =ω(g)

2) f(n)= n ^ 1.01g(n)= n log ^ 2 n 我的猜测是f = omega(g)。此示例是正确的还是不同的情况,因为log是平方的并乘以n?

请提供有关解决此类问题的步骤的任何说明

1 个答案:

答案 0 :(得分:1)

您对第一个问题的回答是正确的,正如您对该规则的应用一样。 这是对任何a>的log(n)= O(n ^ a)的证明。 0(显然等于上述规则):

The derivative of n^a is a*(n^(a-1))
The derivative of log(n) = 1/n
Therefore, for large enough n, the derivative of n^a is more than the derivative of log(n)
Therefore, for large enough n, n^a > log(n)
Therefore log(n) = O(n^a)

你对第二个问题的回答是正确的。这是一个证据:

g(n) = O(f(n)) if and only if log(log(n)) = O(n^0.01)
log(log(n)) = O(log(n)) so log(log(n)) = O(O(n^0.01)) = O(n^0.01)