《算法导论》第三章-第1节_练习(参考答案)
来源:互联网 发布:中华遗产 知乎 编辑:程序博客网 时间:2024/05/21 06:56
算法导论(第三版)参考答案:练习3.1-1,练习3.1-2,练习3.1-3,练习3.1-4,练习3.1-5,练习3.1-6,练习3.1-7,练习3.1-8
Exercise 3.1-1
Let
f(n)+g(n) be asymptotically nonnegative functions. Using the basic definition ofΘ -notation, prove thatmax(f(n),g(n))=Θ(f(n)+g(n)) .
假设
一定存在
即
Exercise 3.1-2
Show that for any real constants a and b, where
b>0 ,
>(n+a)b=Θ(nb)>
多项式展开:
Exercise 3.1-3
Explain why the statement, “The running time of algorithm
A is at leastO(n2) is meaningless.
大
Exercise 3.1-4
Is
2n+1=O(2n) ? Is22n=O(2n) ?
第一个正确。第二个错误
Exercise 3.1-5
Prove Theorem 3.1:
For any two functions
f(n) andg(n) , we havef(n)=Θ(g(n)) if and only iff(n)=O(g(n)) andf(n)=Ω(g(n)) .
(根据渐进符号的数学表达式可知)
因为
因为
Exercise 3.1-6
Prove that the running time of an algorithm is
Θ(g(n)) if and only if its worst-case running time isO(g(n)) and its best-case running time isΩ(g(n)) .
同理exercise 3.1-5
Exercise 3.1-7
Prove
o(g(n))∩ω(g(n)) is the empty set.
小o和小ω,都为非渐进精确界。即存在任意正常数
Exercise 3.1-8
We can extend our notation to the case of two parameters n and m that can go to infinity independently at different rates.
For a given function
g(n,m) we denoteO(g(n,m)) the set of functions:
>>O(g(n,m)=>{f(n,m):>>there exist positive constants c,n0,and m0such that 0≤f(n,m)≤cg(n,m)for all n≥n0 or m≥m0.}>>
Give corresponding definitions forΩ(g(n,m)) andΘ(g(n,m)) .
- 《算法导论》第三章-第1节_练习(参考答案)
- 《算法导论》第三章-第2节_练习(参考答案)
- 《算法导论》第一章-第1节_练习(参考答案)
- 《算法导论》第二章-第1节_练习(参考答案)
- 《算法导论》第四章-第1节_练习(参考答案)
- 《算法导论》第五章-第1节_练习(参考答案)
- 《算法导论》第一章-第2节_练习(参考答案)
- 《算法导论》第二章-第2节_练习(参考答案)
- 《算法导论》第二章-第3节_练习(参考答案)
- 《算法导论》第四章-第2节_练习(参考答案)
- 《算法导论》第四章-第3节_练习(参考答案)
- 《算法导论》第四章-第4节_练习(参考答案)
- 《算法导论》第四章-第5节_练习(参考答案)
- 《算法导论》第四章-第6节_练习(参考答案)
- 《算法导论》第五章-第2节_练习(参考答案)
- 《算法导论》第五章-第3节_练习(参考答案)
- 《算法导论》第五章-第4节_练习(参考答案)
- 《算法导论》第三章-思考题(参考答案)
- 百练_2754:八皇后
- soapui接口性能测试(四)---- 输出报告和统计
- 用xamarin开发android遇见 SQLite.SQLiteException: no such collation sequence: Id 解决方法
- HDU 1016 Prime Ring Problem
- TCP/IP、Http、Socket的区别
- 《算法导论》第三章-第1节_练习(参考答案)
- 多线程执行定时程序
- React-引领未来的用户界面开发框架-读书笔记(二)
- NOI2017爆炸记
- hello go的makefile
- HTTP协议笔记
- 【JAVA学习】——转发和重定向
- grub
- Binder系统中的数据结构(Android系统源代码情景分析学习笔记)