任意の合計値の順列数
出典: フリー百科事典『ウィキペディア(Wikipedia)』 (2022/06/17 18:27 UTC 版)
任意の合計値となる出目の順列の数は、パスカルの三角形を応用し、 ( ∑ i = 0 p − 1 x i ) f {\displaystyle \left(\sum _{i=0}^{p-1}x^{i}\right)^{f}} の係数を求めることで算出可能である。任意の合計値を s(ただし s ∈ N {\displaystyle s\in \mathbb {N} } かつ f ≤ s ≤ fp)とすると、 (任意合計値順列数)= ∑ i = 0 ⌊ s − f p ⌋ s − p i − 1 C f − 1 ⋅ f C i ⋅ ( − 1 ) i {\displaystyle \sum _{i=0}^{\left\lfloor {\frac {s-f}{p}}\right\rfloor }{}_{s-pi-1}\mathrm {C} _{f-1}\cdot {}_{f}\mathrm {C} _{i}\cdot (-1)^{i}} まず前述の式を変形し、パスカルの三角形の母関数を導き出す。 ( ∑ i = 0 p − 1 x i ) f {\displaystyle \left(\sum _{i=0}^{p-1}x^{i}\right)^{f}} = ( 1 + x + x 2 + x 3 + ⋯ + x p − 1 ) f {\displaystyle (1+x+x^{2}+x^{3}+\cdots +x^{p-1})^{f}} = ( 1 − x ) f ( 1 + x + x 2 + x 3 + ⋯ + x p − 1 ) ( 1 − x ) f {\displaystyle {\frac {(1-x)^{f}(1+x+x^{2}+x^{3}+\cdots +x^{p-1})}{(1-x)^{f}}}} = ( 1 − x p ) f ( 1 − x ) f {\displaystyle {\frac {(1-x^{p})^{f}}{(1-x)^{f}}}} これを展開して、各項の係数を取り出し整理すると、上記の式となる。 例(任意の合計値を11とした場合): ∑ i = 0 ⌊ 11 − 3 6 ⌋ 11 − 6 i − 1 C 3 − 1 ⋅ 3 C i ⋅ ( − 1 ) i {\displaystyle \sum _{i=0}^{\left\lfloor {\frac {11-3}{6}}\right\rfloor }{}_{11-6i-1}\mathrm {C} _{3-1}\cdot {}_{3}\mathrm {C} _{i}\cdot (-1)^{i}} = 10C2·3C0·(-1)0+4C2·3C1·(-1)1 = 45×1×1+6×3×(-1) = 27(10) = 43(6)
※この「任意の合計値の順列数」の解説は、「サイコロ」の解説の一部です。
「任意の合計値の順列数」を含む「サイコロ」の記事については、「サイコロ」の概要を参照ください。
- 任意の合計値の順列数のページへのリンク