The notes of Algorithms ---- Asymptotic Notation

O notation:

      O(g(n))={f(n): there exists consts c>0 no>0 such taht 0<=f(n)<=c*g(n) for all n>no}

      f(n)=O(g(n)) represents an anonymous function[f(n)] in that set[O(g(n))].

      Ex1. f(n)=n^3+O(n^2) means there is a function h(n) in O(n^2) such that f(n)=n^3+h(n);

      Ex2. n^2+O(n)=O(n^2) the '=' means is and it is not symmetric.

  Summary: the O notation represents the upper bounds.

--------------------------------------------------------------------------------------------------------

Ω notation:

      Ω(g(n))={f(n): there exists consts c>0 no>0 such taht 0<=c*g(n)<=f(n) for all n>no}

  Summary: the Ω notation represents the lower bounds.

--------------------------------------------------------------------------------------------------------

Θ notation:

      Θ(g(n))={f(n): there exists consts c1>0 c2>0 no>0 such taht 0<=c1*g(n)<=f(n)<=c2*g(n) for all n>no}

  Summary: Θ(g(n))=O(g(n))∩Ω(g(n)).

--------------------------------------------------------------------------------------------------------

o & ω:

      o(g(n))={f(n): for any positive consts c>0 there exists a constant no>0 such taht 0<=f(n)<c*g(n) for all n>no}

      ω(g(n))={f(n): for any positive consts c>0 there exists a constant no>0 such taht 0<=c*g(n)<f(n) for all n>no}

--------------------------------------------------------------------------------------------------------

 

O: <=

Ω: >=

Θ: ==

o:  <

ω: >

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值