1
$\begingroup$

I need a way to control that my program finds the right amount of different results you can get on nd6. Let's say that i have 2d6, then the total amount of results would be $6^2 = 36$. But the different amount of results would be 21, i know this since i counted. The thing is that i do not want to count for 10d6.

$\endgroup$
  • $\begingroup$ So you want to regard the dice as indistinguishable? A throw of 5-3 is the same regardless of which die had the 5 and which the 3? $\endgroup$ – Joffan Dec 11 '16 at 22:02
  • $\begingroup$ Yes, order doesnt matter $\endgroup$ – Zaizer zazza Dec 11 '16 at 22:04
1
$\begingroup$

This can be translated into a stars and bars problem, where you are putting some number of balls (throws) into one of six boxes (results). For the 2d6 case that you worked out, the answer is as you found, $\binom{2+6-1}{2}= 21$. So the number of different outcomes for 10d6 is just $\binom{10+6-1}{10} = 3003$

| cite | improve this answer | |
$\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.