算法分析基础---渐进复杂度

Notation Name[13] Description Formal Definition Limit Definition[16][17][18][13][11]
f(n)=o(g(n)) Small O; Small Oh f is dominated by g asymptotically \forall k>0\;\exists n_{0}\;\forall n>n_{0}\;|f(n)|\leq k\cdot |g(n)| {\displaystyle \lim _{n\to \infty }{\frac {f(n)}{g(n)}}=0}
f(n)=O(g(n)) Big O; Big Oh; Big Omicron |f| is bounded above by g (up to constant factor) asymptotically {\displaystyle \exists k>0\;\exists n_{0}\;\forall n>n_{0}\;|f(n)|\leq k\cdot g(n)} {\displaystyle \limsup _{n\to \infty }{\frac {\left|f(n)\right|}{g(n)}}<\infty }
f(n)=\Theta (g(n)) Big Theta f is bounded both above and below by gasymptotically \exists k_{1}>0\;\exists k_{2}>0\;\exists n_{0}\;\forall n>n_{0}k_{1}\cdot g(n)\leq f(n)\leq k_{2}\cdot g(n) f(n)=O(g(n)) and f(n)=\Omega (g(n))(Knuth version)
{\displaystyle f(n)\sim g(n)} On the order of f is equal to g asymptotically \forall \varepsilon >0\;\exists n_{0}\;\forall n>n_{0}\;\left|{f(n) \over g(n)}-1\right|<\varepsilon {\displaystyle \lim _{n\to \infty }{f(n) \over g(n)}=1}
f(n)=\Omega (g(n)) Big Omega in number theory (Hardy-Littlewood) |f| is not dominated by g asymptotically {\displaystyle \exists k>0\;\forall n_{0}\;\exists n>n_{0}\;|f(n)|\geq k\cdot g(n)} {\displaystyle \limsup _{n\to \infty }\left|{\frac {f(n)}{g(n)}}\right|>0}
f(n)=\Omega (g(n)) Big Omega in complexity theory (Knuth) f is bounded below by g asymptotically \exists k>0\;\exists n_{0}\;\forall n>n_{0}\;f(n)\geq k\cdot g(n) {\displaystyle \liminf _{n\to \infty }{\frac {f(n)}{g(n)}}>0}
f(n)=\omega (g(n)) Small Omega f dominates g asymptotically \forall k>0\;\exists n_{0}\;\forall n>n_{0}\ |f(n)|\geq k\cdot |g(n)| {\displaystyle \lim _{n\to \infty }\left|{\frac {f(n)}{g(n)}}\right|=\infty }
1、简单来说,big-O表示的是上界,big-Theta表示的是渐进紧确界,big-Omega表示的是下界。

2、(1)Θ(西塔):紧确界。            相当于"="

(2)O (大欧):上界。              相当于"<="

(3)o(小欧):非紧的上界。       相当于"<"

(4)Ω(大欧米伽):下界。          相当于">="

(5)ω(小欧米伽):非紧的下界。 相当于">"

3、o(f)\subset O(f) (and thus the above properties apply with most combinations of o and O).

4、

  1. T(n) = O(n100)
  2. T(n) = O(n3)
  3. T(n) = Θ(n3)

The equivalent English statements are respectively:

  1. T(n) grows asymptotically no faster than n100
  2. T(n) grows asymptotically no faster than n3
  3. T(n) grows asymptotically as fast as n3.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值