1.1汉诺塔问题
How to solve a recurrence problem
先猜后证明,采用数学归纳法来证明之
1)Look at small case.
2)Find and prove a mathematical expression for the quantity of interest
3)Find and prove a closed form for our mathematical expression
1.2 平面上的线lines in the plane
平面切割问题
Ln=L(n-1) +n
DEEP:"zig" instead of line


对于每一个zig, 实际上都失去2个rigion(2,3 ,as above)
所以Zn=L(2n)-2n
1.3 The Josephus problem
Determine the survivor's number:找到幸存者in rounds
- 偶数个人的情况, 2n people original . After one round, left is like starting out with n people, and each person's number has been doubled and decreased by 1:
J(2n)=2J(n)-1, for n>=1
- 同1) 可得
J(2n+1)=2J(n)+1
This recurrence can make it possible to build a table to find patterns. 建立表格观察规律
Powers of 2 's magic!

Repeated application of J produces
Fixed Point : J(n)=n 可以得到当n=2v(n)-1时可以知道J(n)=n
General case (repertoire method清单法):

本文探讨了汉诺塔问题、平面切割问题及约瑟夫问题等经典算法案例,并提供了详细的解决思路与数学归纳法证明过程。通过小规模实例观察,逐步推导出一般规律。
1185

被折叠的 条评论
为什么被折叠?



