Counting The Sixes

A fair, 6 6 -sided die is rolled 20 20 times, and the sequence of the rolls is recorded.

C C is the number of times in the 20-number sequence that a subsequence (of any length from one to six) of rolls adds up to 6. 6. These subsequences don't have to be separate and can overlap each other. For example, the sequence of 20 20 rolls 12334222111366141523 12334222111366141523 contains the ten subsequences 123 , 33 , 42 , 222 , 2211 , 1113 , 6 , 6 , 141 , 15 123, 33, 42, 222, 2211, 1113, 6, 6, 141, 15 which all add up to 6 , 6, so C = 10 C=10 in this case.

The expected value of C C is equal to a b \frac{a}{b} for coprime positive integers a a and b . b.

What is a + b ? a+b?


The answer is 13733.

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.

3 solutions

David Vreken
Aug 7, 2018

There is 1 1 way to make a 6 6 with a 1 1 -digit subsequence (with a 6 6 ), out of a total of 6 6 1 1 -digit combinations, and there are 20 20 1 1 -digit subsequences in the 20 20 -digit sequence, for an expected value of 1 6 20 = 10 3 \frac{1}{6}\cdot 20 = \frac{10}{3} .

There are 5 5 different ways to make a 6 6 with a 2 2 -digit subsequence (with a 15 15 , 24 24 , 33 33 , 42 42 , or 51 51 ), out of a total of 6 2 6^2 2 2 -digit combinations, and there are 19 19 2 2 -digit subsequences in the 20 20 -digit sequence, for an expected value of 5 6 2 19 = 95 36 \frac{5}{6^2}\cdot 19 = \frac{95}{36} .

There are 10 10 different ways to make a 6 6 with a 3 3 -digit subsequence (with the digits of 114 114 there are 3 ! 2 ! = 3 \frac{3!}{2!} = 3 ways, with the digits of 123 123 there are 3 ! = 6 3! = 6 ways, and with the digits of 222 222 there is 3 ! 3 ! = 1 \frac{3!}{3!} = 1 way, for a total of 3 + 6 + 1 = 10 3 + 6 + 1 = 10 different ways), out of a total of 6 3 6^3 3 3 -digit combinations, and there are 18 18 3 3 -digit subsequences in the 20 20 -digit sequence, for an expected value of 10 6 3 18 = 5 6 \frac{10}{6^3}\cdot 18 = \frac{5}{6} .

There are 10 10 different ways to make a 6 6 with a 4 4 -digit subsequence (with the digits of 1113 1113 there are 4 ! 3 ! = 4 \frac{4!}{3!} = 4 ways, with the digits of 1122 1122 there are 4 ! 2 ! 2 ! = 6 \frac{4!}{2!2!} = 6 ways, for a total of 4 + 6 = 10 4 + 6 = 10 different ways), out of a total of 6 4 6^4 4 4 -digit combinations, and there are 17 17 4 4 -digit subsequences in the 20 20 -digit sequence, for an expected value of 10 6 4 17 = 85 648 \frac{10}{6^4}\cdot 17 = \frac{85}{648} .

There are 5 5 different ways to make a 6 6 with a 5 5 -digit subsequence (with the digits of 11112 11112 there are 5 ! 4 ! = 5 \frac{5!}{4!} = 5 ways), out of a total of 6 5 6^5 5 5 -digit combinations, and there are 16 16 5 5 -digit subsequences in the 20 20 -digit sequence, for an expected value of 5 6 5 16 = 5 486 \frac{5}{6^5}\cdot 16 = \frac{5}{486} .

Finally, there is 1 1 way to make a 6 6 with a 6 6 -digit subsequence (with a 111111 111111 ), out of a total of 6 6 6^6 6 6 -digit combinations, and there are 15 15 6 6 -digit subsequences in the 20 20 -digit sequence, for an expected value of 1 6 6 15 = 5 15552 \frac{1}{6^6}\cdot 15 = \frac{5}{15552} .

The combined expected value is 10 3 + 95 36 + 5 6 + 85 648 + 5 486 + 5 15552 = 12005 1728 \frac{10}{3} + \frac{95}{36} + \frac{5}{6} + \frac{85}{648} + \frac{5}{486} + \frac{5}{15552} = \frac{12005}{1728} , so a = 12005 a = 12005 and b = 1728 b = 1728 , and a + b = 13733 a + b = \boxed{13733} .

積乱雲 asodk aosdkosas

Kaisei Tanaka - 2 years, 10 months ago

Hooray for the linearity of expectation!

Richard Desper - 2 years, 9 months ago

Log in to reply

Hahah, I was to say the same! One must simply love this property.

Uros Stojkovic - 2 years, 9 months ago

"C is the number of times...". Just from that "number of times" C should be a natural. And it cannot be presented as two comprime a/b, because to get natural number here, b should be a divisor of a, which means they are not comprime. I think that some definition are wrong in this task.

Tetiana Kushla - 2 years, 7 months ago

Log in to reply

The definitions are correct. The number of times an event occurs (C) can be different than its expected value (a/b).

David Vreken - 2 years, 7 months ago
Mark Hennings
Aug 6, 2018

Suppose that a total of N 6 N \ge 6 dice are rolled. For integers 1 u 6 1 \le u \le 6 and u v N u \le v \le N , let X u v X_{uv} be the indicator random variable that is equal to 1 1 if a consecutive subsequence of u u dice rolls (ending with the v v th in the main sequence) adds to 6 6 , and which is equal to 0 0 otherwise. Thus X u v = { 1 d v + d v 1 + . . . + d v + 1 u = 6 0 o w X_{uv} \; = \; \left\{ \begin{array}{lll} 1 & \hspace{1cm} & d_v + d_{v-1} + ... + d_{v+1-u} = 6 \\ 0 & & \mathrm{ow} \end{array}\right. where d k d_k is the value of the k k th die roll for 1 k N 1 \le k \le N . Then C = u = 1 6 v = u N X u v C \; = \; \sum_{u=1}^6 \sum_{v=u}^N X_{uv} and hence, by the linearity of expectation, E [ C ] = u = 1 6 v = u N E [ X u v ] = u = 1 6 v = u N P [ X u v = 1 ] \mathbb{E}[C] \; = \; \sum_{u=1}^6 \sum_{v=u}^N \mathbb{E}[X_{uv}] \; = \; \sum_{u=1}^6 \sum_{v=u}^N \mathbb{P}[X_{uv} = 1] Now P [ X u v = 1 ] \mathbb{P}[X_{uv} = 1] is the probability that the sum of u u dice rolls is equal to 6 6 , and hence is n u 6 u \frac{n_u}{6^u} , where n u n_u is the number of ways in which u u dice rolls can total 6 6 , which is the coefficient of x 6 x^6 in the expansion of ( x + x 2 + x 3 + x 4 + x 5 + x 6 ) u (x + x^2 + x^3 + x^4 + x^5 + x^6)^u . Since x + x 2 + x 3 + x 4 + x 5 + x 6 = x ( 1 x 6 ) 1 x x + x^2 + x^3 + x^4 + x^5 + x^6 \; = \; \frac{x(1-x^6)}{1-x} we see that n u n_u is the coefficient of x 6 x^6 in x u ( 1 x ) u x^u(1-x)^{-u} , and hence is the coefficient of x 6 u x^{6-u} in ( 1 x ) u (1-x)^{-u} . Thus we deduce that n u = ( u + ( 6 u ) 1 u 1 ) = ( 5 u 1 ) 1 u 6 n_u \; = \; {u + (6-u) - 1 \choose u-1} \; =\; {5 \choose u-1} \hspace{2cm} 1 \le u \le 6 Therefore E [ C ] = u = 1 6 v = u N n u 6 u = u = 1 6 n u ( N + 1 u ) 6 u = u = 1 6 N + 1 u 6 u ( 5 u 1 ) = u = 0 5 N u 6 u + 1 ( 5 u ) = 1 6 N ( 1 + 1 6 ) 5 5 36 ( 1 + 1 6 ) 4 = 2401 ( 7 N 5 ) 46656 \begin{aligned} \mathbb{E}[C] & = \sum_{u=1}^6 \sum_{v=u}^N \frac{n_u}{6^u} \; = \; \sum_{u=1}^6 \frac{n_u(N+1-u)}{6^u} \; = \; \sum_{u=1}^6 \frac{N+1-u}{6^u}{5 \choose u-1} \\ & = \sum_{u=0}^5 \frac{N-u}{6^{u+1}}{5 \choose u} \; = \; \tfrac16N\left(1 + \tfrac16\right)^5 - \tfrac{5}{36}\left(1 + \tfrac16\right)^4 \\ & = \frac{2401(7N-5)}{46656} \end{aligned} In particular, when N = 20 N=20 we have E [ C ] = 12005 1728 \mathbb{E}[C] = \frac{12005}{1728} , making the answer 12005 + 1728 = 13733 12005 + 1728 = \boxed{13733} .

Nice generalization. I would, personally, prefer stars and bars over generating functions here because it seems to me that it's the faster way. If we consider subsequence length u u then:

  • number of ways to get 6 as a sum of u u 6-sided dies is equivalent to the number of integer solutions to the equation x 1 + x 2 + + x u = 6 u x_{1}+x_{2} + \cdots + x_{u} = 6-u , which can be found to be: ( ( 6 u ) + ( u 1 ) u 1 ) = ( 5 u 1 ) . \binom{(6-u) + (u - 1)}{u-1} = \binom{5}{u-1}.

Uros Stojkovic - 2 years, 9 months ago

Nice solution! (I also used indicator variables :) )

I would only remark that to see that n u = ( 5 u 1 ) n_u = \binom{5}{u-1} you can just write six ones in a row, and insert u-1 separators in the 5 spaces between them.

Varsha Dani - 2 years, 8 months ago
John Ross
Aug 14, 2018

We can find the expected value of C by making a list of all possible subsequences that add to 6 and their expected values, then adding up all of the expected values. 111111 11112 1113 1122 114 123 222 15 24 33 6 15 ( 1 6 ) 6 16 ( 1 6 ) 5 5 17 ( 1 6 ) 4 4 17 ( 1 6 ) 4 6 18 ( 1 6 ) 3 3 18 ( 1 6 ) 3 6 18 ( 1 6 ) 3 19 ( 1 6 ) 2 2 19 ( 1 6 ) 2 2 19 ( 1 6 ) 2 20 ( 1 6 ) \begin{array}{l} \\ 111111 && 11112 && 1113 && 1122 && 114 && 123 && 222 && 15 && 24 && 33 && 6 \\ \hline 15(\frac 16) ^6 && 16(\frac 16) ^5 \cdot 5 && 17(\frac 16) ^4 \cdot 4 && 17(\frac 16) ^4 \cdot 6 && 18(\frac 16) ^3 \cdot 3 && 18(\frac 16) ^3 \cdot 6 && 18(\frac 16) ^3 && 19(\frac 16) ^2 \cdot 2 && 19(\frac 16) ^2 \cdot 2 && 19(\frac 16) ^2 && 20(\frac 16) \end{array} For the expected value part of this table, we have the number of places the subsequence could start within the 20 length sequence times the probability of rolling exactly that sequence times the number of ways to rearrange the sequence. For example, the 11112 subsequence could start in 16 different places, the probability of rolling all five dice perfectly is ( 1 6 ) 5 (\frac 16) ^5 and it could be rearranged 5 different ways. If we add up all of the expected values, we get 12005 1728 \boxed{\dfrac{12005}{1728}}

What is this I am in class 7 now in india

Supriya Manna - 2 years, 9 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...