加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 大数据 > 正文

复杂度定义 The Definition of Complexity

发布时间:2020-12-14 04:29:35 所属栏目:大数据 来源:网络整理
导读:The upper bound? ?Big-O: Definition:?f(n) is in O(g(n)) if there are constants c 0 and N 0 such that f(n) c 0 *g(n) for all nN 0 .?We are only interested in large n,nN 0 . (Heuristics)计算方法:删掉低阶变量(包括零阶),只保留最高阶变量,

The upper bound? ?Big-O:

Definition:?f(n) is in O(g(n)) if there are constants c0 and N0 such that f(n) < c0*g(n) for all n>N0.?We are only interested in large n,n>N0.

(Heuristics)计算方法:删掉低阶变量(包括零阶),只保留最高阶变量,变量前的系数变为1。如15n2 + 33n + 17 is in O(n2),当然15n2?+ 33n + 17 is in O(n3)也是对的,但我们通常只关心cloest bound。

Dominance Relation:?n!?>>2n?>> n2?>> n3?>> nlogn >> n >> logn >> 1

在Dominance Relation中忽略log的底,可以通过换底公式换成相同的底,且因为系数忽略,所以底不重要。

(Arithmetic)计算方法:

(截自Comp20003,University of Melbourne)

The lower bound? ? Big-Omega(Ω):

Definition: f(n) is Ω(g(n)) if g(n) is O(f(n))

The tight bound / the growth rate? ?Big-Omega(Ω):

Definition: f(n) is θ(g(n)) is f(n) is O(g(n)) and f(n) is?Ω(g(n))

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读