知识卡片
相同扩缩阈值会抖动
若满时倍增、低于半满就缩半,表在半满边界附近交替插入和删除会反复搬迁大量元素。
原文构造n次操作达Θ(n²)总成本;扩容与收缩之间需留出足够负载区间,才能积累搬迁费用。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 第16章 摊还分析 · 查看原书依据
The cost of each expansion and contraction is Θ(n), and there are Θ(n) of them. Thus, the total cost of the n operations is Θ(n2)
参考来源
- 位置:《算法导论(第4版)》第16章《摊还分析》(OEBPS/chapter016.xhtml,文本字符[35000,40000))。
- 结论依据:16.4.2 节构造半满时交替插入/删除的序列;若低于半满即缩半,每次扩缩 Θ(n) 且发生 Θ(n) 次,总成本 Θ(n²)。
- 原始内容:The cost of each expansion and contraction is Θ( n ), and there are Θ( n ) of them. Thus, the total cost of the n operations is Θ( n 2 )