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:00448247 at 2009-03-08 00:27:09 谢了 > 分析 4种情况 > 00 01 10 11 > 设达到长度n-1的时候,得到的分别以上述串结尾的“合法”序列个数分别为 > f1(n-1) f2(n-1) f3(n-1) f4(n-1) > 则总共的序列个数F(n-1)=f1(n-1)+f2(n-1)+f3(n-1)+f4(n-1) > 则: > f1(n)=f1(n-1)+f3(n-1) > f2(n)=f1(n-1) > f3(n)=f2(n-1)+f4(n-1) > f4(n)=f2(n-1) > > F(n)=f1(n)+f2(n)+f3(n)+f4(n) > =f1(n-1)+f3(n-1)+f1(n-1) +f2(n-1)+f4(n-1) +f2(n-1) > =F(n-1) + f1(n-1) + f2(n-1) > =F(n-1) + f1(n-2)+f3(n-2) + f1(n-2) > =F(n-1) + 2*f1(n-2)+f3(n-2) > =F(n-1) + 2*( f1(n-3)+f3(n-3) ) + f2(n-3)+f4(n-3) > =F(n-1) + 2*f1(n-3) + f2(n-3) + 2*f3(n-3)+f4(n-3) > =F(n-1) + F(n-3) + f1(n-3) + f3(n-3) > =F(n-1) + F(n-3) + f1(n-4)+f3(n-4) + f2(n-4)+f4(n-4) > =F(n-1) + F(n-3) + F(n-4) > Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator