| 所在主题: | |
| 文件名: Chapter01.doc | |
| 资料下载链接地址: https://bbs.pinggu.org/a-2794470.html | |
| 附件大小: | |
|
数据结构与算法分析 Java语言描述 原书第三版 韦斯 WEISS 习题答案 源码
1555688998(1).png CHAPTER 2 Algorithm Analysis 2.1 2/N, 37, , N, N log log N, N log N, N log(N2), N log2 N, N1.5, N2, N2 log N, N3, 2N/2, 2N. N log N and N log (N2) grow at the same rate. 2.2 (a) True. (b) False. A counterexample is T1(N) = 2N, T2(N) = N, and f (N) = N. (c) False. A counterexample is T1(N) = N2, T2(N) = N, and f (N) = N2. (d) False. The same counterexample as in part (c) applies. 2.3 We claim that N log N is the slower growing function. To see this, suppose otherwise. Then,would grow slower than log N. Taking logs of both sides, we find that, under this assumption,grows slower than log log N. But the first expression simplifies toIf L = log N, then we are claiming thatgrows slower than log L, or equivalently, that 2L grows slower than log2 L. But we know that log2 L = o(L), so the original assumption is false, proving the claim. 2.4 Clearly,if k1 < k2, so we need to worry only about positive integers. The claim is clearly true for k = 0 and k = 1. Suppose it is true for k < i. Then, by L’Hôpital’s rule, The second limit is zero by the inductive hypothesis, proving the claim. 2.5 Let f(N) = 1 when N is even, and N when N is odd. Likewise, let g(N) = 1 when N is odd, and N when N is even. Then the ratio f(N)/g(N) oscillates between 0 and inf. 答案如上 预览更多加我V信:ID 答案为本人自己创作,如有雷同,纯属巧合 本文来自: 人大经济论坛 现金交易版 版,详细出处参考: https://bbs.pinggu.org/forum.php ... mp;from^^uid=11596612 |
|
熟悉论坛请点击新手指南
|
|
| 下载说明 | |
|
1、论坛支持迅雷和网际快车等p2p多线程软件下载,请在上面选择下载通道单击右健下载即可。 2、论坛会定期自动批量更新下载地址,所以请不要浪费时间盗链论坛资源,盗链地址会很快失效。 3、本站为非盈利性质的学术交流网站,鼓励和保护原创作品,拒绝未经版权人许可的上传行为。本站如接到版权人发出的合格侵权通知,将积极的采取必要措施;同时,本站也将在技术手段和能力范围内,履行版权保护的注意义务。 (如有侵权,欢迎举报) |
|
京ICP备16021002号-2 京B2-20170662号
京公网安备 11010802022788号
论坛法律顾问:王进律师
知识产权保护声明
免责及隐私声明