Subscribe via feed.

## Three dice problem

Posted by Chris on February 22, 2011 – 5:55 am

Here’s a problem posed by DP.

You have three die. You roll all three together (that counts as one roll). If you get any 6’s, you continue to roll with the remaining die/dice. You keep doing this until all three die show a 6.

What is the mean number of rolls you’d make to get all three die showing a 6?

This post is under “Logic, MathsChallenge” and has 9 respond so far.

### 9 Responds so far- Add one»

1. 1. cazayoux Said：

probabilities for this many 6’s with three die…
0 – 125/216
1 – 75/216
2 – 15/216
3 – 1/216

probabilities for this many 6’s with two die…
0 – 25/36
1 – 10/36
2 – 1/36

probabilities for this many 6’s with two die…
0 – 5/6
1 – 1/6

probabilities for this many 6’s in the first throw.
3 – 1/216 (DONE)
2 – 15/216
1 – 75/216
0 – 125/216

probabilities for this many 6’s in the second throw.
(considers number of 6’s from previous throws)
3 – (125/216)(1/216) + (75/216)(1/36) + (15/216)(1/6) (DONE)
2 – (125/216)(15/216) + (75/216)(10/36) + (15/216)(5/6)
1 – (125/216)(75/216) + (75/216)(25/36)
0 – (125/216)(125/216)

This is my original thought for solving.
Will have to get back to this later.

Cheers!

more generically…

(example for notation: p2 means the probability of 2 sixes)
probabilities for this many 6’s in the next throw.
p3(N) = (p0(N-1))(p3) + (p1(N-1))(p2) + (p2(N-1))(p1)
p2(N) = (p0(N-1))(p2) + (p1(N-1))(p1) + (p2(N-1))(p0)
p1(N) = (p0(N-1))(p1) + (p2(N-1))(p0)
p0(N) = (p0(N-1))(p0)

2. 2. Chris Said：

Hi cazayoux. You’re making the right sort of noises

I haven’t solved it yet, but I know exactly what to do. I’ll be using the method that luv2fap used in the “Coin Toss” problem.

In my first scribblings I defined P(m,n) as the probability of throwing exactly m 6s with n dice.

3. 3. Chris Said：

Hi cazayoux. I have solved it (many hours ago in fact). If I haven’t made a silly numerical calculation error, the answer is just over 10.5 (I’ll keep the exact value secret).

You only needed to calculate 6 of those probabilities.

4. 4. cazayoux Said：

Hi Chris.

I can see that it moves toward 10.55544, suspecting it is 2280/216 (or 380/36).
I think I need an explanation of luv2fap’s solution on the coin toss problem to better understand how to take this recursive idea and create a formula for it.

5. 5. Chris Said：

Hi cazayoux. I have attempted (not very successfully) an explanation on the “Coin Toss” page.

The exact answer is 10 + 556/1001.

Would you like me to post my solution?

6. 6. cazayoux Said：

I think I’ve got it.

D3 = 1 + (125/216)D3 + (75/216)D2 + (15/216)D1
D2 = 1 + (25/36)D2 + (10/36)D1
D1 = 1 + (5/6)D1

D1 = 6
D2 = 96/11
D3 = 10566/1001 = 10 556/1001 = 10.555444555444555444—

I’m tickled by such an elegant solution.
Thanks!!!

7. 7. Chris Said：

Hi cazayoux. Bingo, that’s it Your answer is so concise, and taken together with the coin toss page, that I shan’t bother to post my version in it’s original form. I will mention that if you counted each die’s roll individually, you’d have got D1 = 6, D2 = 12 and D3 = 18, precisely as you should expect.

I hope that you, and everyone, can see why I was happy, nay pleased, that DP offered it. To not be able understand or use the technique would be a crying shame. I think that this problem makes the interpretaion of the equations easier.

I am going to post an explanation of the coefficients/probabilities that you’ve used, but that’s by way of an example in fully explaining the technique.

PS I now think that I’ve provided a good explanation of the equations on the “coin toss” page (i.e. non-waffle and non-arm-waving derivations). But I am going to repeat them on this page, but with a little more background and with fewer ()’s to make the equations easier on the eye.

8. 8. Chris Said：

As the method of solving this problem (and similar one’s) is so nice, I’m going to give a fairly complete justification of it. I have done that on the coin toss problem, but haven’t brought all the relevant bits together in one place. So I’m going to do that now.

I have another analysis, which I’m putting in the next post.
I’ll use a notation that makes sense for the dice problem, it avoids (). After the first roll of the dice we may have got some 6’s. Let x be the number of 6’s that we still need (to get all 3 6’s) and let px be the probability of being in that situation. Let nx be the average number of rolls we need to get those x 6’s.

After the first roll, px of the time we will have made 1 roll and need nx more rolls. As x = 0,1,2 or 3 we have that, on average:
n3 = p0(1+n0) + p1(1+n1) + p2(1+n2) + p3(1+n3)
=> n3 = (p0 + p1 + p2 + p3)*1 + p0*n0 + p1*n1 + p2*n2 + p3*n3
But, after the first roll, we must need 0,1,2 or 3 more 6’s to finish, so
p0 + p1 + p2 + p3 = 1. Another way of seeing that is that we had examined all of the possibilities, and the probability that one them having occurred is 1.
So n3 = 1 + p0*n0 + p1*n1 + p2*n2 + p3*n3.
But n0 = 0 (as we’ve got the required 3 6’s) => n3 = 1 + p1*n1 + p2*n2 + p3*n3
I now need to modify the notation slightly. px above is the probability that we need x more heads after rolling all three dice. To make that explicit, I now replace px with p3x. Clearly, p3x is the same as the probability that we rolled (3-x) 6’s with three dice. There is no need to redefine nx as it implicitly means that x dice are being used to get x 6’s.

So n3 = 1 + p31*n1 + p32*n2 + p33*n3, and it is pretty obvious that
n2 = 1 + p21*n1 + p22*n2 and n1 = 1 + p11*n1.

p31 = prob of rolling 2 6’s with 3 dice = 3 * 1/6 * 1/6 * 5/6 = 15/216
p32 = prob of rolling 1 6 with 3 dice = 3* 1/6 * 5/6 * 5/6 = 75/216
p33 = prob of rolling 0 6’s with 3 dice = 5/6 * 5/6 * 5/6 = 125/216

p21 = prob of rolling 1 6 with 2 dice = 2 * 1/6 * 5/6 = 10/36
p22 = prob of rolling 0 6’s with 2 dice = 5/6 * 5/6 = 25/36

p11 = prob of rolling 0 6’s with 1 die = 5/6

Substituting those p’s into the recursions =>
n1 = 1 + 5/6 *n1 => n1 = 6
n2 = 1 + 10/36 *6 + 25/36 *n2 => n2 = 96/11 ≈ 8.73
n3 = 1 + 15/216 * 6 + 75/216 * 96/11 + 125/216 * n3 => n3 = 10566/1001
=> n3 ≈ 10.56

For completeness:
p30 = 1/6 * 1/6 * 1/6 = 1/216, p20 = 1/6 * 1/6, p10 = 1/6

So p30 + p31 + p32 + p33 = (1 + 15 + 75 + 125)/216 = 1
p20 + p21 + p22 = (1 + 10 + 25)/36 = 1
p10 + p11 = (1 + 5)/6 = 1

9. 9. Chris Said：

If it takes n trials, on average, to get a success, then the probability of a success in one trial is 1/n. That could be taken as the definition of probability. Therefore, if the probability of a success in one trial is p, then the average number of trials to get a success is 1/p. See http://trickofmind.com/?p=437 for a more rigorous proof of that.

Now n = 1/p => np = 1 => n( 1 – (1-p)) = 1 => n = 1 + (1-p)n
=> n = p*1 + (1-p)(1+n), would you believe
Note that p is the probability of a success, so q = 1-p is the probability of failure, and then n = p*1 + q(1+n).

If this were a simple one die problem, we would interpret the p*1 as, on p occassions we will have had 1 roll and got the desired 6 and so have no more rolls to do, and the q(1+n) as, on q occassions we would have had 1 roll, failed to get the desired 6 and so still have n more rolls to do. But our situation is more complex. With e.g. the three dice, we would interpret q as the probability of getting no 6’s at all (and then we’d have used 1 roll and having n to go), and p*1 as the average number of rolls to go, given that we got 1, 2 or 3 6’s. Unfortunately, that’s 3 possibilities, and I can’t see a really nifty way to obtain the rest of the desired equation from it. The three 6’s case has 0 rolls to go, and that might be the chink in the armour of this analysis.

I’ll leave this up as I expect that at least some of you will see where I’m trying to go with it. I also think that it’s best if you can see more than one way of getting the equations. It might be that I should be starting with 1 die, and inducing upwards, rather than starting at the top and working down. 5 am, so I’m going to try to force myself to go to bed. But don’t be surprised, if I do finish this analysis quite soon. I’ll probably get it 10 seconds after turning my puter off.

PHP Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files (x86)\Parallels\Plesk\Additional\PleskPHP5\ext\php_mssql.dll' - The specified module could not be found. in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files (x86)\Parallels\Plesk\Additional\PleskPHP5\ext\php_pdo_mssql.dll' - The specified module could not be found. in Unknown on line 0