知识卡片
最坏情况与平均情况回答不同问题
最坏情况给出同规模输入的耗时上界,适合期限约束;平均情况则必须说明输入分布。
插入排序在随机次序下平均仍为二次量级。
不能把“所有输入等可能”默认当作实际业务分布。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 第2章 算法入门 · 查看原书依据
The scope of average-case analysis is limited, because it may not be apparent what constitutes an “average” input for a particular problem.
参考来源
- 位置:《算法导论(第4版)》第 2 章 2.2 节“Worst-case and average-case analysis”(`OEBPS/chapter002.xhtml`)。
- 结论依据:原文给出最坏情况的三个动机,并提醒平均输入分布可能不明确或不符合均匀假设。
- 原始内容:The scope of average-case analysis is limited, because it may not be apparent what constitutes an “average” input for a particular problem.