1 / 8
文档名称:

算法分析与设计2005春.课件.第06讲6.pdf

格式:pdf   页数:8
下载后只包含 1 个 PDF 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

算法分析与设计2005春.课件.第06讲6.pdf

上传人:中国课件站 2011/10/11 文件大小:0 KB

下载得到文件列表

算法分析与设计2005春.课件.第06讲6.pdf

文档介绍

文档介绍:Overview
第六讲:分摊分析法 Aggregate analysis
The accounting method
Amortized Analysis The potential method
宋斌恒 Example:
Dynamic tables
清华大学宋斌恒 1 清华大学宋斌恒 2
Overview 聚集分析法
由分摊分析法解决的问题 A sequence of n operations takes worst-
Sequence of operation on a dada structure case time T(n) in total
Average cost per operation The average cost T(n)/n is called the
【比如网站的整体效率问题与此问题的关系】 amortized cost,
三类主要分析手段 the amortized cost applies to each
Aggregate, worst case + average operation, even they are different.
Accounting, Amortized cost
Potential, is a whole index for the data
structure
清华大学宋斌恒 3 清华大学宋斌恒 4
Stack operation 粗略分析
Let S be a stack object, it has two basic In the worst case of these operations, the
operations: worst cost is n, the size of the dada
Pop() structure;
Push() A sequence of m operations cost at most
Adding another operation m*n
MultiPop(k), which pops k elements at once,
its cost is at most k pop()’s cost The amortized cost of the operations is
Attention: what it occurs when less than O(n)
()<k? It is right but not tight!
清华大学宋斌恒 5 清华大学宋斌恒 6
1
聚集分析法示例:计数器
Consider the entire sequence of operations: Consider the problem of incrementing a k-
A MultiPop(k) takes at most m = min{k, bit binary counter that counts upward from
()} operations 0.
It has at least m push operation had taken Array A=[0,1,

最近更新

2024年广东省外语艺术职业学院单招职业适应性.. 42页

2024年广东碧桂园职业学院单招职业倾向性考试.. 39页

2024年广东舞蹈戏剧职业学院单招职业适应性测.. 41页

2024年广东金融学院单招职业倾向性考试模拟测.. 39页

2024年广安职业技术学院单招职业适应性考试模.. 41页

2024年广州城建职业学院单招职业倾向性测试题.. 40页

2024年广州番禺职业技术学院单招职业适应性测.. 40页

2024年广西农业职业技术大学单招职业技能考试.. 41页

2024年广西工业职业技术学院单招职业技能测试.. 41页

2024年广西建设职业技术学院单招综合素质考试.. 38页

2024年广西演艺职业学院单招职业技能考试模拟.. 38页

2024年广西生态工程职业技术学院单招综合素质.. 39页

2024年广西省崇左市单招职业倾向性考试题库最.. 40页

2024年广西省玉林市单招职业倾向性考试题库含.. 40页

2024年广西科技职业学院单招职业倾向性测试模.. 38页

2024年应天职业技术学院单招职业技能测试模拟.. 41页

2024年廊坊职业技术学院单招职业适应性考试模.. 41页

2024年开封文化艺术职业学院单招职业技能考试.. 40页

2024年成都工贸职业技术学院单招职业适应性考.. 42页

2024年成都航空职业技术学院单招职业技能考试.. 40页

2024年承德应用技术职业学院单招职业技能测试.. 40页

2024年新星职业技术学院单招职业适应性考试模.. 42页

2024年新疆喀什地区单招职业倾向性测试题库新.. 41页

2024年新疆昌吉回族自治州单招职业倾向性考试.. 40页

2025年广州卫生职业技术学院单招职业技能测试.. 64页

美团代运营业务委托合同 6页

新概念青少版2A各单元重点归纳 15页

九年级家长会课件PPT下载(初三2班) 25页

年产3000万片硝苯地平缓释片车间设计 40页

DB61∕T 926-2014 火灾高危单位消防安全管理与.. 45页