3
$\begingroup$

For example, if I want to roll n=6,

with 1 die it can be thrown in $$\binom {5} {0} = 1$$ way, with 2 dice $$\binom {5} {1} = 5$$ 3 dice $$\binom {5} {2} = 10$$ 4 dice $$\binom {5} {3} = 10$$ 5 dice $$\binom {5} {4} = 5$$ 6 dice $$\binom {5} {5} = 1$$ The sum of these is 32 - the correct answer, I believe.

I thought that the answer for any number n (where the number of dice is d) is $$\sum_{d=1}^{d=n} \binom {n-1} {d-1}$$ It seems that this isn't working, though. For example the correct answer for n=8 is 125, but this equation gives me 128. Where am I going wrong? Thanks in advance.

$\endgroup$
  • $\begingroup$ Hi Kurns, what are you actually counting with ${{n-1} \choose {d-1}}$? $\endgroup$ – 57Jimmy Jan 5 '18 at 8:40
  • 1
    $\begingroup$ The number of ways the number n can be rolled with d dice. $\endgroup$ – Kurns Jan 5 '18 at 8:42
  • $\begingroup$ Sure, but why can one compute it that way? What are you really counting? $\endgroup$ – 57Jimmy Jan 5 '18 at 10:04
  • $\begingroup$ I read that online... and it seems to work, to a point at least $\endgroup$ – Kurns Jan 5 '18 at 10:14
  • 1
    $\begingroup$ Though $\binom{7}{0}=1$, you cannot roll an 8 with one die, and though $\binom{7}{1} = 7$ there are only 5 ways to roll an 8 with two dice. $\endgroup$ – Fabio Somenzi Jan 5 '18 at 10:15
1
$\begingroup$

The answer is surprisingly complicated. The number of ways to roll $n$ with $m$ die is the coefficient of $x^n$ in the generating function

$$(x + x^2 + \dots + x^6)^m = x^m \left( \frac{1 - x^6}{1 - x} \right)^m.$$

This can be simplified somewhat but not substantially by applying the binomial theorem to $(1 - x^6)^m$ and $\frac{1}{(1 - x)^m}$ (here you will need the binomial theorem with negative exponents).

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.