How many ways are there to get a sum of 25 when 10 distinct
How many ways are there to get a sum of 25 when 10 distinct dice are rolled?
Solution
Each die can be a number from 1 to 6. With 10 dice, our generating function becomes:
f(x) = (x + x^2 + x^3 + x^4 + x^5 + x^6)^10
We want to find the coefficient of x^25. Observe that the expression inside the brackets is a finite geometric series with a = x, r = x, and n = 6. Thus, we have:
(x + x^2 + x^3 + x^4 + x^5 + x^6)^10
= (x(1 - x^6)/(1 - x))^10
= x^10 * (1 - x^6)^(10) * (1 - x)^(-10)
(I will use the notation C(n, r) to mean the binomial coefficient \"n choose r\").
So we want the coefficient of x^15 in:
(1 - x^6)^(10) * (1 - x)^(-10)
= (?(C(10, i)(-x^6)^i)) * (?(C(-10, j)(-x)^j))
In order to get terms that involve x^15, there are 3 combinations of i and j to consider so that 6i + j = 15:
1. i = 0 and j = 15
2. i = 1 and j = 9
3. i = 2 and j = 3
Thus, we have:
[C(10, 0)(-1)^0 * C(-10, 15)(-1)^15] + [C(10, 1)(-1)^1 * C(-10, 9)(-1)^9] + [C(10, 2)(-1)^2 * C(-10, 3)(-1)^3]
= [C(10, 0) * C(-10, 15) * (-1)] + [C(10, 1) * C(-10, 9)] + [C(10, 2) * C(-10, 3) * (-1)]
= [C(10, 0) * C(10 + 15 - 1, 15) * (-1)^15 * (-1)] + [C(10, 1) * C(10 + 9 - 1, 9) * (-1)^9] + [C(10, 2) * C(10 + 3 - 1, 3) * (-1)^3 * (-1)]
= [C(10, 0)*C(24, 15)] - [C(10, 1)*C(18, 9)] + [C(10, 2)*C(12, 3)]
= 831,204
