Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
Re:找到了递推关系的规律,但找不到合理的解释,谁来解释一下?In Reply To:找到了递推关系的规律,但找不到合理的解释,谁来解释一下? Posted by:yiyiyi4321 at 2005-11-05 10:29:52 > 当N为奇数a[N]=a[N-1]*2-1; > 当N为偶数a[N]=a[N-1]*2+1; > 00只能从上一层01转化而来,而01的来源有两个:一个是上一层的1能转化成01,还有一个 是上一层的00能转化1010其中有01,所以即可写出递推公式:f(n)=2^(n-3)+f(n-2);其中 2^(n-3)表示第n-2层1的个数,f(n-2)表示n-2层00的个数 Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator