- 1、本文档共44页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
算法设计与分析基础第三版PPTch06
Design and Analysis of Algorithms - Chapter 6 Transform and Conquer This group of techniques solves a problem by a transformation to a simpler/more convenient instance of the same problem (instance simplification) a different representation of the same instance (representation change) a different problem for which an algorithm is already available (problem reduction) Instance simplification - Presorting Solve a problem’s instance by transforming it into another simpler/easier instance of the same problem Presorting Many problems involving lists are easier when list is sorted, e.g. searching computing the median (selection problem) checking if all elements are distinct (element uniqueness) Also: Topological sorting helps solving some problems for dags. Presorting is used in many geometric algorithms. How fast can we sort ? Efficiency of algorithms involving sorting depends on efficiency of sorting. Theorem (see Sec. 11.2): ?log2 n!? ? n log2 n comparisons are necessary in the worst case to sort a list of size n by any comparison-based algorithm. Note: About nlog2 n comparisons are also sufficient to sort array of size n (by mergesort). Searching with presorting Problem: Search for a given K in A[0..n-1] Presorting-based algorithm: Stage 1 Sort the array by an efficient sorting algorithm Stage 2 Apply binary search Efficiency: Θ(nlog n) + O(log n) = Θ(nlog n) Good or bad? Why do we have our dictionaries, telephone directories, etc. sorted? Element Uniqueness with presorting Presorting-based algorithm Stage 1: sort by efficient sorting algorithm (e.g. mergesort) Stage 2: scan array to check pairs of adjacent elements Efficiency: Θ(nlog n) + O(n) = Θ(nlog n) Brute force algorithm Compare all pairs of elements Efficiency: O(n2) Another algorithm? Hashing Instance simplification – Gaussian Elimination Given: A system of n linear equations in n unknowns with an arbitrary coefficient matrix.Transform to: An equivalent system
您可能关注的文档
- 简洁商务动态PPT图片.ppt
- 简短精彩演讲33篇.doc
- 简笔画和板书设计.ppt
- 简爱英文ppt.pptx
- 简约、淡雅、纯色ppt模板.ppt
- 简奥斯汀 英语介绍 PPT.ppt
- 简易机故排除.ppt
- 第四节 中世纪的世俗音乐.ppt
- 简约欧美风彩色多变形创意商务ppt模板.ppt
- 等离子射频消融髓核成形术(人民医院).ppt
- 3.2 学习成就梦想 课件(共27张PPT) 统编版道德与法治七年级上册(内嵌音频+视频).pptx
- 2.1.2植物细胞工程的应用课件(共32张PPT) 人教版选择性必修3(内嵌音频+视频).pptx
- 纲要上第3课 秦统一多民族封建国家的建立 课件(共19张PPT)(内嵌音频+视频).pptx
- 高中历史必修三课件第6课文艺复兴和宗教改革1(共44张PPT).ppt
- 课时5二次函数y=ax2bxc的图像与性质课件北师大版九年级数学下册.pptx
- 《宗教大学生信仰调查报告》.doc
- 信息必刷卷03(广州专用)(原卷版).docx
- 343实际问题与一元一次方程(三)球赛积分问题(分层作业).docx
- Unit2Animals核心单词课件高中英语上外版(2020)1_1.pptx
- 2.1.2植物细胞课件(共20张PPT)人教版生物七年级上册(内嵌音频+视频).pptx
最近下载
- 夜航星-Night Voyager 高清钢琴谱五线谱.pdf
- 2024北京丰台区三年级(下)期末数学试题及答案.pdf VIP
- 餐饮食堂禁用食材及案例学习专题培训.pptx VIP
- 英语语法知到智慧树期末考试答案题库2025年黑龙江科技大学.docx VIP
- (高清版)-B-T 239.1-2023 金属材料 线材 第1部分:单向扭转试验方法.pdf VIP
- (高清版)B-T 19015-2021 质量管理 质量计划指南.pdf VIP
- 女性学女性精神在现代社会中的挑战2023章节测试答案_女性学女性精神在现代社会中的挑战超星尔雅答案.pdf VIP
- JB/T 9092-1999 阀门的检验与试验(扫描版).pdf VIP
- 2020-7-18温湿度监测系统专项内审.pdf VIP
- 《山海经》异兽图全.pdf VIP
文档评论(0)