看板 Math 關於我們 聯絡資訊
Let A={1,2,...,9}.Then there are ____ subsets of A which do not contain consecutive numbers.(i.e.,if x belongs to A is in the subset then x-1 and x+1 must not be selected.) 這題我知道大概是要用遞迴去算,但 recurrence relation 寫不太出來 麻煩大家幫我解答了 謝謝! -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 59.121.150.59
ak47love77 :如果{1,2,..,n}有A_n種 那就是A_n+1=A_n+A_n-1 02/19 23:30
ak47love77 :因為{1,2,..,n+1}的所有可能子集分為有n+1與沒有n+1 02/19 23:31
ak47love77 :有n+1的話 必定沒有n 所以剩下的就是A_n-1種 02/19 23:32
ak47love77 :沒有n+1的話 就是A_n了 02/19 23:32