首页 > 其他 > 详细

班课2

时间:2020-06-18 11:31:53      阅读:41      评论:0      收藏:0      [点我收藏+]

1. Big O 

f(n) = O(g(n)) is an abbreviation for :"There exist positive constants c and n0 such that 0≤f(n)≤cg(n) for all n≥n0"

上限

2. Omega

f(n)=Ω(g(n)) is an abbreviation for :"There exist positive constants c and n0 such that 0≤cg(n)≤f(n) for all n≥n0"

等价于g(n)=O(f(n))

下限

3. Theta

f(n)=Θ(g(n)) if and only if f(n)=O(g(n)) and f(n)=Ω(g(n)); thus, f(n) and g(n) have the same asymptotic growth rate

相等

4. let a≥1 be an integer and b>1 a real number; Assume that a divide-and-conquer algorithm;

将一个size为n的问题划分为n/b的size,则T(n)=aT(ceiling(n/b))+f(n)

T(n)=aT(n/b)+f(n)

5. 由于大部分recurrence比较复杂,所以我们可以利用master Theorem计算大概的时间复杂度体现算法效率

技术分享图片

 

6. Generalizing Karatsuba‘s algorithm很像二次项定理

减少乘法的数量

 

班课2

原文:https://www.cnblogs.com/eleni/p/13156586.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!