gpt4 book ai didi

algorithm - 为什么函数的复杂度是 f(n) = n^d, O(b^n),其中 b>1 且 d 为正数?

转载 作者:塔克拉玛干 更新时间:2023-11-03 06:15:15 24 4
gpt4 key购买 nike

所以,我在我的离散数学书中遇到了这个问题,它说,函数 f(n) = n^d 的复杂度是 O(b^n) ,其中 b>1d 为正数。但我似乎无法理解为什么。任何帮助将不胜感激。

最佳答案

L = lim{n->inf} (n^d/b^n)
=> ln(L) = lim{n->inf} (d*ln(n) / (n*ln(b)))
= (d/ln(b)) * lim{n->inf} (ln(n) / n) = (inf) / (inf)
= (d/ln(b)) * lim{n->inf} (d/dn(ln(n)) / d/dn(n))
(申请L-Hospital)

      = (d/ln(b)) * lim{n->inf} (1/n) / (1) = (d/ln(b)) * 0 = 0 

(自 b>1ln(b) > 0 )

=> L = exp(0) = 1 < inf

lim{n->inf} (n^d/b^n) < inf ,我们可以说 n^d=O(b^n)什么时候b>1 (请参阅此以了解 O 的替代定义:https://en.wikipedia.org/wiki/Big_O_notation)。

要点是 exponential函数增长速度快于 polynomials .

关于algorithm - 为什么函数的复杂度是 f(n) = n^d, O(b^n),其中 b>1 且 d 为正数?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42009901/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com