班课2

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很像二次项定理

减少乘法的数量

 

posted on 2020-06-18 11:16  Eleni  阅读(123)  评论(0编辑  收藏  举报

导航