网站大量收购独家精品文档,联系QQ:2885784924

专题2算法描述及分析资料.ppt

  1. 1、本文档共86页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
* 指数时间算法只有在n取值非常小时才实用。 当数据集的规模(即n的取值)很大时,在现代计算机上运行具有比O(nlogn)复杂度还高的算法往往是很困难的。尤其是指数时间算法。 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mathematical induction now requires us to show that our solution holds for the boundary conditions. Typically, the boundary conditions are suitable as base cases for the inductive proof. This requirement can sometimes lead to problems. Assume that T 1 1 is the sole boundary condition of the recurrence. Then, we can‘t choose c large enough, since T 1 ≤c 1 lg 1 0, which is at odds with T 1 1. The case of our inductive proof fails to hold.(递归结果与初始情况矛盾,即递归证明失败?) 4.1 The substitution method * An inductive hypothesis inconsistent with specific boundary condition, How to overcome the difficulty? (如何克服递归结果与边界条件不一致的问题?) asymptotic notation only requires us to prove T n ≤cnlg n for n≥ n0, where n0 is a constant. to remove the difficult boundary condition T 1 1 Impose T 2 and T 3 as boundary conditions for the inductive proof. From the recurrence, we derive T 2 4 and T 3 5. The inductive proof that T n ≤cn lg n can now be completed by choosing any c≥2 so that T 2 ≤c2 lg 2 and T 3 ≤c 3 lg 3. To extend boundary conditions * Unfortunately, there is no general way to guess the correct solutions to recurrences. 猜想不是一种方法 Guessing a solution takes experience and, occasionally, creativity. why we study the course? It’s a training for us to get experience, to catch occasion, to have creativity. Fortunately, though, there are some heuristics recursion tress that can help you become a good guesser. 4.1.1 Making a good guess * If a recurrence is similar to one you have seen before, then guessing a similar solution is reasonable. For example, which looks difficult because of the added “17”. Intuitively, this additional term cannot substantially affect the solution to the recurrence.(该附加项不会从本质上影响递归解) When n is large, the difference between T n/2 and T n/2 + 17 is not that large. Consequently, we mak

文档评论(0)

bbnm58850 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档