Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

Re:找到了递推关系的规律,但找不到合理的解释,谁来解释一下?

Posted by newstar04415 at 2008-05-09 17:47:51 on Problem 2680
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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator