知识卡片
等差求和呈平方级
前n个正整数之和等于n(n+1)/2,量级为Θ(n²)。
循环第i轮耗时与i成比例时,逐轮累加即落在此类等差求和上;附加常数项不会改变二次量级。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
在整书笔记中的位置
- · 等差求和呈平方级
原书出处 · 1 处
- 附录A 求和 · 查看原书依据
Arithmetic series The summation is an arithmetic series and has the value A general arithmetic series includes an additive constant a ≥ 0 and a constant coefficient b > 0 in each term, but has the same total asymptotically:
参考来源
- 位置:《算法导论(第4版)》附录A《求和》(OEBPS/appendix001.xhtml,文本字符[0,5000))。
- 结论依据:附录A.1“Arithmetic series”及原书公式图 Art_P1533.jpg–Art_P1535.jpg(式A.1–A.3):对正整数 n,∑_{k=1}^n k=n(n+1)/2=Θ(n²);若 a≥0、b>0 为常数,∑_{k=1}^n(a+bk)=Θ(n²)。附录开头明确以插入排序第 i 轮耗时与 i 成比例为应用例。
- 原始内容:Arithmetic series The summation is an arithmetic series and has the value A general arithmetic series includes an additive constant a ≥ 0 and a constant coefficient b > 0 in each term, but has the same total asymptotically: