Rolling 10 dice.

When rolling 10 10 dice with 20 20 faces each (numbered 1 1 to 20 20 ), how many ways are there of rolling a total sum of 15 15 ?


The answer is 2002.

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.

7 solutions

Mark Hennings
Aug 16, 2019

We want the coefficient of x 15 x^{15} in ( x + x 2 + x 3 + + x 20 ) 10 = x 10 ( 1 + x + x 2 + + x 19 ) 10 = x 10 ( 1 x 20 1 x ) 10 \big(x + x^2 + x^3 + \cdots + x^{20}\big)^{10} \; = \; x^{10}\big(1 + x + x^2 + \cdots + x^{19}\big)^{10} \; = \; x^{10}\left(\frac{1 - x^{20}}{1-x}\right)^{10} which is therefore the coefficient of x 5 x^5 in ( 1 x ) 10 (1-x)^{-10} , which is ( 14 9 ) = 2002 \binom{14}{9} = \boxed{2002} .

I did the same way....

Nikola Alfredi - 1 year, 3 months ago
Simon Kaib
Aug 16, 2019

Consider all arrangements of 15 10 = 5 15-10=5 X X s and 10 1 = 9 10-1=9 I I s, such as I I X I I I I X I I X X I X . IIXIIIIXIIXXIX. We can bring these into a 1 1 to 1 1 correspondence to the possible ways of throwing our 10 10 dice. Each I I marks the beginning of the next dice and we count the amount of X X s in between the I I s and add 1 1 for the amount rolled. The example is thus put into a correspondence with ( 1 , 1 , 2 , 1 , 1 , 1 , 2 , 1 , 3 , 2 ) (1,\: 1,\: 2,\: 1,\: 1,\: 1,\: 2,\: 1,\: 3,\: 2) . The amount of ways to put 9 9 I I s in between (or around) the 5 5 X X s is ( 5 + 9 9 ) = 2002 {{5+9} \choose {9}} = \boxed{2002} .

Therefore, in general, for n n dice with each p p faces and a total sum of k p k \leq p , we have a total amount of ( k 1 n 1 ) k-1 \choose n-1 possible combinations.

Jam M
Jan 13, 2020

15 = 9 ( 1 ) + 1 ( 6 ) = 8 ( 1 ) + 1 ( 2 ) + 1 ( 5 ) = 8 ( 1 ) + 1 ( 3 ) + 1 ( 4 ) = 7 ( 1 ) + 2 ( 2 ) + 1 ( 4 ) = 7 ( 1 ) + 1 ( 2 ) + 2 ( 3 ) = 6 ( 1 ) + 3 ( 2 ) + 1 ( 3 ) = 5 ( 1 ) + 5 ( 2 ) 15 = 9(1) + 1(6) \\ \;\;\;\; = 8(1) + 1(2) + 1(5) \\ \;\;\;\; = 8(1) + 1(3) + 1(4) \\ \;\;\;\; = 7(1) + 2(2) + 1(4) \\ \;\;\;\; = 7(1) + 1(2) + 2(3) \\ \;\;\;\; = 6(1) + 3(2) + 1(3) \\ \;\;\;\; = 5(1) + 5(2)

The number of ways to roll a total of 15 15 is: 10 ! ( 1 9 ! + 1 8 ! + 1 8 ! + 1 7 ! 2 ! + 1 7 ! 2 ! + 1 6 ! 3 ! + 1 5 ! 5 ! ) = 2002 10!\left( \dfrac{1}{9!} + \dfrac{1}{8!} + \dfrac{1}{8!} + \dfrac{1}{7!2!} + \dfrac{1}{7!2!} + \dfrac{1}{6!3!} + \dfrac{1}{5!5!} \right) = 2002

Kyle T
Aug 16, 2019

I'm not proud of the code I wrote for this but here it is
Only thing I can say is with rolling 10 dice, minimum of 1 per dice, that means youre never going to want any number over 6, so we can save ourselves some time on loops by not counting to 20 and by using the 'continue' keyword any time our sum exceeds 15.

 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
<?php
$s = 0;
for($a=1;$a<=6;$a++){
    for($b=1;$b<=6;$b++){
        for($c=1;$c<=6;$c++){
            for($d=1;$d<=6;$d++){
                for($e=1;$e<=6;$e++){
                    for($f=1;$f<=6;$f++){
                        for($g=1;$g<=6;$g++){
                            for($h=1;$h<=6;$h++){
                                for($i=1;$i<=6;$i++){
                                    for($j=1;$j<=6;$j++){
                                        $sum = array_sum(array($a,$b,$c,$d,$e,$f,$g,$h,$i,$j));
                                        if($sum==15){
                                            $s++;
                                        } elseif($sum>15){
                                            continue;
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
echo $s;
?>

I understand the code but man so many for loops my eyes are hurting! Good job though

Krishna Karthik - 1 year, 9 months ago

x1+x2+x3+...+x10=15 : xi>=1 * *

yi=xi-1 then : yi>=0 * *

y1+y2+y3+...+y10=5 * *

n=C(10+5-1,10-1)=C(14,9)=2002

Wassef Khadra - 1 year, 9 months ago
Murad Magdiev
Aug 3, 2020

There is a formula to find how many ways are there to get sum p {p} when rolling n n dice each having s s faces:

k = 0 k m a x ( 1 ) k ( n k ) ( p s × k 1 p s × k n ) \sum^{k_{max}}_{k=0} (-1)^{k} {n \choose k} {p - s \times k - 1 \choose p - s \times k - n}

where k m a x = k_{max} = floor of p n s \frac{p - n}{s}

In this case its ( 10 0 ) ( 15 1 15 10 ) = ( 14 5 ) = 2002. {10 \choose 0} {15 - 1 \choose 15 - 10} = {14 \choose 5} = 2002.

Dong kwan Yoo
Jul 17, 2020

a 1 + a 2 + a 3 + . . . + a 10 = 15 a_{1} +a_{2} +a_{3} + ... + a_{10} = 15 ( 1 a i 1 ≤ a_{i} )

Let a i 1 = b i a_{i} -1 = b_{i} and then,

b 1 + b 2 + b 3 + . . . + b 10 = 5 b_{1} +b_{2} +b_{3} + ... + b_{10} = 5 with ( 0 b i 0 ≤ b_{i} )

So, we get 10H5 = 14C5 = 2002

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...