推 jackbll:感謝 09/22 23:18
※ 引述《jackbll (阿湯)》之銘言:
: 如題
: 想問一下 離散聖經本 10.2練習 17 要怎麼解釋答案 還有題目的意思
: a) For a fixed nonegative integer n,how many compositions of n+3 have no
: 1 as a summand?
: b) For the compositions in part(a), how many start with (i)2; (ii)3;(iii)
: 2<=k<=n+1 ?
: c) How many of the compositions in part (a) start with n+2 or n+3?
: 答案如下 a) Fn+2 這裡的 Fn 指得應該是費氏遞迴
: b) (i)Fn (ii)Fn-1 (iii) Fn-k+2
: c) n+2:0 n+3:1
: 有勞各位大俠相助了~感恩
原來寫過類似題 書真的要念熟 一一"
have no 1 as a summand 是說每一項至少要大於等於2
令n'=n+3 1<=t<=n/2
令x1+x2+....xt=n' for all xi
if x1=2 x2+x3+....xt=n'-2----------------------(1)
if x1>2 (x1-1)+x2+........xt=n'-1--------------(2)
(1)+(2)即為all case
an=an-1+an-2
a0=1(3=3) a1=2(4=4=2+2)
ps 在這邊5=2+3=3+2 他是算不一樣的
我想他是有算順序的 跟96中山那題很像
想法不甚完備 如有錯誤請指教 謝謝~
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 114.38.126.207
※ 編輯: AIdrifter 來自: 114.38.126.207 (09/20 22:05)