已阅读5页,还剩48页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
Introduction to Algorithms 计算机算法导论 20072008年第一学期 Homework Exercises 3.2-4;3.2-7 Problems 3-4 Recurrences nRecurrences nThree methods for solving recurrences nSubstitution method nRecursion-tree method nMaster method Recurrences Example Solving recurrences nThe analysis of merge sort from Lecture 1 required us to solve a recurrence. nRecurrences are like solving integrals, differential equations, etc. nLecture 2: Applications of recurrences to divide-and-conquer algorithms. Technicalities nAssumption of integer arguments of functions nBoundary conditions nFloors and ceils 4.1 The substitution method Substitution method The most general method: 1. Guess the form of the solution. 2. Use induction to find the constants and show that the solution works. Substitution method nGuess:T(n)=nlgn+n Substitution method Making a good guess T(n)=2T(n/2+17)+n nSimilar solution is reasonable nProve loose upper and lower bounds and reduce the range of uncertainty Subtleties T(n)=2T(n/2)+1 Avoiding pitfalls T(n) 2c(n/2)+n=cn+n=O(n) Wrong! Changing variables An example An example An example 4.2 The recursion-tree method An example T(n)=T(n/3)+T(2n/3)+(n) An example T(n)=T(n/3)+T(2n/3)+(n) An example T(n)=T(n/3)+T(2n/3)+(n) An example T(n)=T(n/3)+T(2n/3)+(n) 4.3 The master metho
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 南阳职业学院《5G前沿技术》2024-2025学年第一学期期末试卷
- 照明器具故障应急处理分析报告
- 山东胜利职业学院《分子细胞生物学和遗传学实验》2024-2025学年第一学期期末试卷
- 贵州电子信息职业技术学院《社会福利与救助》2024-2025学年第一学期期末试卷
- 厦门安防科技职业学院《税务会计》2024-2025学年第一学期期末试卷
- 沈阳建筑大学《互联网金融W》2024-2025学年第一学期期末试卷
- 湖南女子学院《足球中级》2024-2025学年第一学期期末试卷
- 淮北理工学院《时尚商业摄影》2024-2025学年第一学期期末试卷
- 厦门城市职业学院《公差与测量技术实验》2024-2025学年第一学期期末试卷
- 黑龙江科技大学《建筑环境学》2024-2025学年第一学期期末试卷
- 混凝土配合比验证检验委托书模板
- 住房公积金投诉申请书
- 众辰变频器说明书3400
- 《世说新语》乘船 完整版课件
- 施工现场安全检查记录表(周)以及详细记录
- 《财务管理》课程教学实施方案
- 煤矿地质基础知识课件
- 检验科生物安全风险评估报告
- 西安市建设工程竣工验收备案表
- 大学体育四——啦啦操的教学设计
- 原始点疗法PPT课件
评论
0/150
提交评论