递归问题——Concrete Mathematics

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

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 

1.1汉诺塔问题

 

How to solve a recurrence problem

先猜后证明,采用数学归纳法来证明之

1Look at small case.

2Find and prove a mathematical expression for the quantity of interest

3Find 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, 实际上都失去2rigion(2,3 ,as above)

 

所以Zn=L(2n)-2n

 

 

1.3 The Josephus problem

Determine the survivor's number:找到幸存者in  rounds

 

  1. 偶数个人的情况, 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. 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清单法):

 

 

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值