Chaces of get $b$ points throwing dices of set $D$

50 Views Asked by At

I'm currently working on a casino game involving throwing different dice. To adjust the fair pay of each play, I'm trying to develop the formula that describes this scenario:

Number of combinations that result in a total point sum of $b$, knowing that I will throw the dice of a certain set $D = \left\{(d_1, d_2) \mid d_1 = \text{number of dice}, d_2 = \text{number of sides}\right\}$.

Notice that my question is not about throwing just one kind of die (which I know is already solved in this site). I want to describe the chances of a scenario where the player can choose to use any number of dice each with different number of sides in the same throw.

In other words, given any combination of dice (for example, let's say I throw $n_4$ dice of $4$ sides, $n_6$ dice of $6$ sides and $n_8$ dice of $8$ sides), how can I calculate the total combinations of throws that results in a total sum of $b$, for $b = n_4+n_6+n_8, \dots, 4n_46n_68n_8$?

My work so far: I've noticed that the combinations follow some way of triangular pattern. For example, let's say I throw 2 dice of 6 faces. Then the combinations for each sum are:

  • $2$: $\{(1,1)\}$
  • $3$: $\{(1,2),(2,1)\}$
  • $4$: $\{(1,3),(2,2),(3,1)\}$
  • $5$: $\{(1,4),(2,3),(3,2),(4,1)\}$
  • $6$: $\{(1,5),(2,4),(3,3),(4,2),(5,1)\}$
  • $7$: $\{(1,6),(2,5),(3,4),(4,3),(5,2),(6,1)\}$
  • $8$: $\{(2,6),(3,5),(4,4),(5,3),(6,2)\}$
  • $9$: $\{(3,6),(4,5),(5,4),(6,3)\}$
  • $10$: $\{(4,6),(5,5),(6,4)\}$
  • $11$: $\{(5,6),(6,5)\}$
  • $12$: $\{(6,6)\}$

So for throws where there are just one kind of die (the number of sides is constant) I already have a formula. My problem is defining this rule for different types of die in the same throw. I noticed it always follows a similar triangular like distribution, but it's just not a perfect triangle (like it is when throwing all similar dices). In that case, there were three numbers for which the total number of combinations was max (instead of one or two).

Is there a formula for this expression? Any help or hint will be appreciated.

Edit: after reading a response from a user, I'm also interested of a solution to the problem where the number is obtained from multiplying the points obtained in each die (instead of adding).

2

There are 2 best solutions below

1
On BEST ANSWER

One approach is to use generating functions, which, in this case, boils down to multiplying out products of polynomials. In the example of one die each of $4, 6$ and $8$ sides, expand $$\left(x+x^2+x^3+x^4\right) \left(x+x^2+x^3+x^4+x^5+x^6\right) \left(x+x^2+x^3+x^4+x^5+x^6+x^7+x^8\right)$$ to get $$x^3+3 x^4+6 x^5+10 x^6+14 x^7+18 x^8+21 x^9+23 x^{10}+23 x^{11}+21 x^{12}+18 x^{13}+14 x^{14}+10 x^{15}+6 x^{16}+3 x^{17}+x^{18}$$ The coefficient of $x^n$ in the result is the number of ways to roll $n$. For example, the term $10x^{6}$ indicates that there are $10$ ways to roll $6$.

1
On

If it were products you were looking for it would be easier, via prime factorization.

With 2 six-sided dice, there would be $\frac{6^2}{2} = 12$ possibilities.

The number of factors a number $n$ whose prime factorization = $a^x \cdot b^y$ is $(x + 1)(y +1)$

So for 6, which is $2^1 \times 3^1$, we have $(1 +1)(1 +1) = 4$ factors. Factors come in pairs and so we have $2$ ways of getting $6$. But the total number of ways = $2! \times 2 = 4$.

Hence, the probability of getting two numbers whose product is 6 if you roll 2 six-sided die = $\frac{4}{36} = \frac{1}{9}$


Is there a formula (like the above for factors) for sums too?

1 = (ignore)
2 = 1 + 1
3 = 1 + 2, 2 + 1
4 = 1 + 3, 3 + 1, 2 + 2
5 = 1 + 4, 4 + 1, 2 + 3, 3 + 2
6 = 1 + 5, 5 + 1, 2 + 4, 4 + 2, 3 + 3
7 = 1 + 6, 6 + 1, 2 + 5, 5 + 2, 3 + 4, 4 + 3
8 = 2 + 6, 6 + 2, 3 + 5, 5 + 3, 4 + 4
9 = 3 + 6, 6 + 3, 4 + 5, 5 + 4
10 = 4 + 6, 6 + 4, 5 + 5
11 = 5 + 6, 6 + 5
12 = 6 + 6

Feels so like Pascal's Triangle.