Rolling a 35 with 10 Dice

If the probability that 10 10 regular 6 6 -sided dice add up to 35 35 is exactly p q \dfrac{p}{q} , where p p and q q are coprime positive integers, then find p + q p + q .


The answer is 112607.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

5 solutions

Mark Hennings
Aug 28, 2020

Without code... We want the coefficient of x 35 x^{35} in the series expansion of ( x + x 2 + x 3 + x 4 + x 5 + x 6 ) 10 = x 10 ( 1 x 6 ) 10 ( 1 x ) 10 = x 10 ( m = 0 10 ( 1 ) m ( 10 m ) x 6 m ) ( n = 0 ( 9 + n 9 ) x n ) = m = 0 10 n = 0 ( 1 ) m ( 10 m ) ( 9 + n 9 ) x 10 + 6 m + n \begin{aligned} (x + x^2 + x^3 + x^4 + x^5 + x^6)^{10} & = \; x^{10}(1 -x^6)^{10}(1 - x)^{-10} \; = \; x^{10}\left(\sum_{m=0}^{10}(-1)^m \binom{10}{m}x^{6m}\right)\left(\sum_{n=0}^\infty \binom{9+n}{9}x^n\right) \\ & = \;\sum_{m=0}^{10} \sum_{n=0}^\infty (-1)^m \binom{10}{m}\binom{9+n}{9} x^{10+6m+n} \end{aligned} which is X = m = 0 4 ( 1 ) m ( 10 m ) ( 34 6 m 9 ) = 4395456 X \; = \; \sum_{m=0}^4 (-1)^m\binom{10}{m}\binom{34-6m}{9} \; = \; 4395456 making the probability equal to X 6 10 = 7631 104976 \frac{X}{6^{10}} \; = \; \frac{7631}{104976} which gives the answer 7631 + 104976 = 112607 7631 + 104976 = \boxed{112607} .

Fantastic. Great method, thanks for sharing it.

Chris Lewis - 9 months, 2 weeks ago

This is multinomial theorem?

Mahdi Raza - 9 months, 2 weeks ago

Log in to reply

No. I am simply using the standard Binomial Theorem and the Inverse Binomial Theorem. I could use the Multinomial Theorem to say that X = ( k 1 , k 2 , . . . . , k 6 ) K ( 10 k 1 k 2 k 3 k 6 ) X \; = \; \sum_{(k_1,k_2,....,k_6) \in \mathcal{K}} \left(\begin{array}{ccccc} & & 10 & & \\ k_1 & k_2 & k_3 & \cdots & k_6 \end{array}\right) where K = { ( k 1 , k 2 , . . . , k 6 ) ( N { 0 } ) 6 k 1 + k 2 + + k 6 = 10 , k 1 + 2 k 2 + 3 k 3 + 6 k 6 = 35 } \mathcal{K} \; = \; \big\{(k_1,k_2,...,k_6) \in (\mathbb{N} \cup \{0\})^6 \; \big| \; k_1 + k_2 + \cdots + k_6 = 10\,,\,k_1 + 2k_2 + 3k_3 + \cdots 6k_6 = 35 \big\} but evaluating X X that way would be hard work.

Mark Hennings - 9 months, 2 weeks ago

Log in to reply

I am yet to learn the inverse binomial theorem. Side question: Can you give examples of where the multinomial theorem is best at use. Thanks though!

Mahdi Raza - 9 months, 2 weeks ago

It works with Windows:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#include <iostream>
using namespace std;
long long int solution=0;
long long int digit(long long int a, int b);    /// Get the b-th digit
long long int power(long long int a);           /// return: 10^a
int main()
{
    long long int a=1111111111;
    /**
    a is the dice. Initially each die is 1. The program will run
    until 6,6,6,6,6,1,1,1,1,1, because 6+6+6+6+6+1+1+1+1+2>35
    **/
    int alpha=0;
    for(;a<=6666611111;a++){
        long long int theta=1;                  /// If theta==0, then we should restart the function
        for(long long int b=1;b<10&&theta;b++)  /// For all digits
            if(digit(a,b)>6){                   /// If one of the dice is >6
                a-=power(b-1)*6;                /// Delete the digit
                a+=power(b);                    /// Add one to the next digit
                theta=0;                        /// Restart the function ---+
            }                                   ///                         |
        if(!theta){                             /// <-----------------------+
            a--;
            continue;
        }
        long long int sum=0;
        for(long long int b=1;b<=10;b++)
            sum+=digit(a,b);
        if(sum==35) solution++;                 /// If the sum is 35, then +1 solution exist
    }
    cout <<solution;
    return 0;
}
long long int digit(long long int a, int b){    /// Get the b-th digit
    long long int c=a%power(b);
    c=c/power(b-1);
    return c;
}
long long int power(long long int a){           /// return: 10^a
    long long int to_return=1;
    for(long long int c=0;c<a;c++)    to_return*=10;
    return to_return;
}

Output:

1
4395456

Solution:

4395456 6 10 = 7631 104976 p + q = 7631 + 104976 = 112607 \cfrac{4395456}{6^{10}}=\cfrac{7631}{104976}\implies p+q=7631+104976=112607

Hosam Hajjir
Aug 26, 2020

I used the generating function method

g ( x ) = ( x + x 2 + x 3 + x 4 + x 5 + x 6 ) 10 g(x) = (x + x^2 + x^3 + x^4 + x^5 + x^6)^{10}

You can convince yourself that the coefficient of x k x^k in g ( x ) g(x) is exactly the number of ways to get a sum of k k on the 10 10 dice.

I used simple code to find the coefficients of the resulting polynomial g ( x ) g(x) . The coefficient of x 35 x^{35} is 4395456 4395456

Therefore, the probability is P = 4395456 6 10 = 7631 104976 P = \dfrac{4395456}{6^{10}} = \dfrac{7631}{104976} in smallest terms.

And this makes the answer 7631 + 104976 = 112607 7631 + 104976 = 112607

I did this the same way but have a nagging suspicion there's a shortcut.

Chris Lewis - 9 months, 2 weeks ago

There is. Try my solution

Mark Hennings - 9 months, 2 weeks ago
Yuriy Kazakov
Aug 28, 2020

A018901

4395456 6 10 \frac{4395456}{6^{10}}

Answer 112607 112607 .

Chew-Seong Cheong
Aug 26, 2020

Since code is used, I addressed directly as follows using the code environment available on this Brilliant website.

Then p q = 4395456 6 10 = 7631 104976 \dfrac pq = \dfrac {4395456}{6^{10}} = \dfrac {7631}{104976} and p + q = 7631 + 104976 = 112607 p+q = 7631 + 104976 = \boxed{112607} .

Why range(1,7) and not range(1,6) ?

Hosam Hajjir - 9 months, 2 weeks ago

Log in to reply

Python index is such. range(a,b) means from a to b-1.

Chew-Seong Cheong - 9 months, 2 weeks ago

range(a, b) creates integers between a and b - 1 inclusive.

Alexander McDowell - 9 months, 2 weeks ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...