Generate (in R) a matrix of all possible outcomes for throwing n dice (ignoring order)
- by Brani
In cases where order does matter, it's rather easy to generate the matrix of all possible outcomes. One way for doing this is using expand.grid as shown here.
What if it doesn't?
If I'm right, the number of possible combinations is (S+N-1)!/S!(N-1)!, where S is the number of dice, each with N sides numbered 1 through N. (It is different from…