时间复杂度big-O、Big-Omega和big-Theta

我们有三种曲线:

 
A curve that we know is "above" the running time function when n is large. ( Big-O )
当n足够大时,曲线高于运行时间函数(big-o)
 
A curve that we know is "below" the running time function when n is large. (Big-Omega)
当n足够大时,曲线低于运行时间函数(big-omega)
 
If we can squeeze the curves that are "above" and "below" the running time function close enough, then we can figure out Big-Theta(big-theta)
 
Big-Theta 仅仅只是一个"Scaled"版本的运行曲线,big-theta仅仅只是scale最高序列的f(n)行为。big-theta仅仅只是一个曲线
 
 
Big-O 告诉你什么样的函数增长速度大于f(N)
Bit-Theta告诉你什么样的函数增长速度同f(N)
Big-Omega告诉你什么样的函数增长速度小于f(N)
 
Funcitons in Asymptotic notation
 
所有公式都可以用这个来表示
 
Logarithms grow more slowly than polynomials
对数比指数增长慢
 
接下来是指数增长的顺序(由慢到快):
 
 
 
 
 
It would be convenient to have a form of asymptotic notation that means
运行时间最多增长这么多,但它可以增长的更慢
big-O asymptotic upper bounds:渐近上界
 
best case average/expected case worst case 
 
 
 
 
 

转载于:https://www.cnblogs.com/zhichun/p/11361222.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值