Subscribe via feed.

## A more colorful roll of the Dice

Posted by DP on October 18, 2011 – 11:13 am

I have a pair of special 6-sided dice. One of them has 3 Red sides, 2 Yellow sides, and 1 Blue side. The other has 2 Red sides, 3 Yellow sides, and 1 Blue side. Assume the dice are fair (probability of rolling any face = 1/6).
I pick them up, shake them in my hand, and then roll one. If it shows blue, I ignore that roll, pick it up and start over. If it is not, I will roll the second. On average, what is the probability that I will roll at least one red or yellow, but not both?

This post is under “Tom” and has 35 respond so far.

### 35 Responds so far- Add one»

1. 1. DP Said：

Hint to all:
You may want to have a look at Chris’ post #131 on Girls, girls, girls. http://trickofmind.com/?p=674#comment-7515

2. 2. Curtis Said：

17/30

3. 3. Curtis Said：

4. 4. Curtis Said：

No, I didn’t mis-read….was right the 1st time, LOL

5. 5. Chris Said：

I get 1/2. But I haven’t thoroughly checked. I’ll wait a while before posting my workings.

6. 6. Curtis Said：

Let die 1 be R R R Y Y B

Let die 2 be r r y y y b

1st roll 2nd roll
– r r y y y b
R – - * * * -
R – - * * * -
R – - * * * -
Y * * – - – -
Y * * – - – -

- R R R Y Y B
r – - – * * -
r – - – * * -
y * * * – - -
y * * * – - -
y * * * – - -

total 60 permutations 26 give both a yellow and red, remaining 34 do not…answer 34/60 = 17/30

[DP edit - I hope I've fixed this to look the way you intended. Let me know if this looks wrong.]

7. 7. Chris Said：

Hi Curtis. I agree. I’d written 2/6 instead of 4/6 somehere.

Die 1: RRRYYB Die 2: RRYYYB
It is equally likely that you thrown either die for the first step. (But that’s only because each die has one blue face ^^).

I’ll use “│” to be read as “given that”
Altogether p = P(1 first)(P(1 R│not B) P(2 not Y) + P(1 Y│not B)P(2 not R))
+ P(2 first)(P(2 R│not B) P(1 not Y) + P(2 Y│not B)P(1 not R))

P(1 first) = P(2 first) = 0.5
So (without re-ordering any of the last equation), we get
0.5((3/5)(3/6) + (2/5)(4/6)) + 0.5((2/5)(4/6) + (3/5)(3/6))
= (1/60)(9 + 8 + 8 + 9) = 34/60 = 17/30

I’m dying to see the next one in the series (I have a good dea what it will B).

8. 8. cazayoux Said：

I’m sure I remember us having other problems where there was a probability that we ’start over’. I remember thinking the solution was brilliantly simple.
However, I can’t remember the actual solution.

So … I’m stuck with my not-so-brilliantly-simple approach.

There is a 1/6 chance that we roll the first die again and a 5/6 chance that we roll the second die.

If we roll both we have a 17/36 chance to roll RR, YY, RB, YB (1/6 + 1/6 + 1/12 + 1/18).

So (5/6)(17/36) + (1/6) chance to re-roll.

So this gets ugly…

(5/6)(17/36) * (1/6)^0 +
(5/6)(17/36) * (1/6)^1 +
(5/6)(17/36) * (1/6)^2 +
(5/6)(17/36) * (1/6)^3 +
(5/6)(17/36) * (1/6)^4 +
:
:

Not sure where this converges

(5/6)(17/36) * Sum (n = 1 to infinity) (1/6)^n ????

If anyone else remembers the other puzzles we had where there was a probability of starting over, please share.

Cheers!

9. 9. cazayoux Said：

Another thought, … looking at my 17/36 … this is not considering what we saw in the girls, girls, girls puzzle.

If we do consider that … There is a 50/50 chance of which die we roll first.

(RR + YY + RB + YB) for each die.

(1/5 + 1/5 + 1/10 + 1/15) = 17/30 if D1 used first.
(2/15 + 3/10 + 1/15 + 1/10) = 18/30 if D2 used first.

(1/2)(17/30) + (1/2)(18/30) = 35/60 = 7/12

I’m not certain, however, if this means I’m replacing 17/36 in my previous post or … if calculating in this manner is actually the more straight-forward, simple SOLUTION.

10. 10. DP Said：

Cazayoux,
I’m not sure that this will help you much, or if it is even what you are looking for, but I do know of another problem where you “start over” if the initial criteria aren’t met. It is one of the 5 most popular problems due to Chris’ recent re-interest. “Stacked Deck” published by…(possibly unfortunate for you)…well…me.
http://trickofmind.com/?p=808

11. 11. cazayoux Said：

(5/6)(17/36) * Sum (n = 1 to infinity) (1/6)^n ????
(from post 9)

I can see that Sum (n = 1 to infinity) (1/6)^n = 6/5.
So the formula above results in just 17/36.

12. 12. cazayoux Said：

Odd Coin Problem (http://trickofmind.com/?p=793) showed a hint of the nice solution I had learned on a previous problem.

Still trying to figure out that previous problem.
Maybe it had something to do with cards.

13. 13. cazayoux Said：

luv2fap’s post 15 on “Coin Toss”
http://trickofmind.com/?p=734

… now that I look at it … I’m not certain how to apply it here.

14. 14. Captainstegs Said：

Massively frustrating when you read the question wrong isn’t it? When I read the question;

“What is the probability that I will roll at least one red or yellow, but not both”

I somehow read “What is the probability that I will roll at least one red or yellow, but the dice can’t both be red, or both yellow”

I got the answer of 60%, so I believe that for a time Curtis and I had both misread the question in the same manner.

15. 15. cazayoux Said：

Realizing now that I was making it more complicated than necessary by looking at how many rolls it would take.
That isn’t the question.

The question is … Once we have rolled both, what is the probability of RR, YY, RB, YB.
I believe I have answered this in post 9.

(1/5 + 1/5 + 1/10 + 1/15) = 17/30 if D1 used first.
(2/15 + 3/10 + 1/15 + 1/10) = 18/30 if D2 used first.

(1/2)(17/30) + (1/2)(18/30) = 35/60 = 7/12

btw … I think it will take 2.2 rolls to complete.

E(2) = 1 + 1/6 E(2) + 5/6 E(1), where the first term is the current roll, the second term is the ’start over’ likelyhood, and the third term is the ‘go to next roll’ likelyhood

E(1) = 1, since the second roll will always complete the activity.

E(2) = 1 + 1/6 E(2) + 5/6
5/6 E(2) = 11/6
E(2) = 11/5 = 2.2 rolls to complete the activity

16. 16. cazayoux Said：

What happens if we add another die?
D1 : 3 Red sides, 2 Yellow sides, 1 Blue side
D2 : 2 Red sides, 3 Yellow sides, 1 Blue side
D3 : 2 Red sides, 2 Yellow sides, 2 Blue sides

Assume the dice are fair (probability of rolling any face = 1/6).

I pick them up, shake them in my hand, and then roll one. If it shows blue, I ignore that roll, pick it up and start over. If it is not, I will roll a second. On average, what is the probability that I will roll Red-Red, Yellow-Yellow, Red-Blue, or Yellow-Blue.

The die rolled first is chosen at random from the three.
The die rolled second is chosen at random from the remaining two.

Also … try it with D3 : 6 blue sides.

17. 17. Chris Said：

Hi cazayoux. I’m taking it that your question is, “how many rolls (on average) before you satisfy the posted problem?”

Let N be the average number of rolls. Then
N = 1 +(1/6)N +(5/6)(1 +(17/30)0 +(13/30)N) = 1 +(1/6)N +(5/6)(1 +(13/30)N)
Breakdown: We first do 1 roll. 1/6 th of the time we get B, so start over. 5/6 ths of the time we get to roll the second die (hence the second 1), but then we have a 17/30 probability of having finished, so 0 more rolls. But we’ll fail 1-17/30 = 13/30 ths of the time, and then we start over. Solving for N => N = 66/17 ≈ 3.882353.

As N is the average number of rolls, then 1/N = 17/66 ≈ 0.25757575… is the probability of succeeding on the first go (with the minimum two rolls). See post 22.

NB To ensure no errors, I checked my solution for the recursion equation on wolframalpha: http://www.wolframalpha.com/input/?i=N+%3D+1+%2B%281%2F6%29N+%2B%285%2F6%29%281+%2B%2813%2F30%29N%29

18. 18. Chris Said：

Hi cazayoux. You’ve done a miscount somewhere. The dice are anti-symmetric partners (in R and Y). i.e. if you swap R with Y on both, die 1 becomes die 2 and vice versa. So you can’t have 17/30 for one and 18/30 for the other.

You’re less likely to make mistakes if you use 30 ths throughout (except at the very end). It’d also make easier for others to follow what you’ve done.

Thanks for bringing the number of rolls question up. I love those recursion tricks.

19. 19. Chris Said：

Hi Captainstegs. I nearly read it that way too.

20. 20. ragknot Said：

It said to “ignore” if the first was blue. I have the top row for the first die, and first vertical for the second die. (RY means first was red and the second was yellow)
..
This diagram is just like a normal one for a pair of dice, but instead of numbers 1 to 6 use the colors. One has 3 reds, 2 yellows and a blue, the other 2 reds, 3 yellows and a blue.
..
There are two blocks of red and yellow, one is 3×3 the other 2×2. That is 9+4=13. It makes no difference which die is rolled first. You could swap the 3 red die with the 3 yellow die, but you will still have the 3×3 [RY] and the 2×2 {YR} red and yellow blocks.

……..[ R ] [ R ] [ R ] [ Y ] [ Y ] [ B ]
[ R ] [RR] [RR] [RR] [YR] [YR] [00]
[ R ] [RR] [RR] [RR] [YR] [YR] [00]
[ Y ] [RY] [RY] [RY] [YY] [YY] [00]
[ Y ] [RY] [RY] [RY] [YY] [YY] [00]
[ Y ] [RY] [RY] [RY] [YY] [YY] [00]
[ B ] [RB] [RB] [RB] [YB] [YB] [00]

red & yel….. 13….. 43.33%
red & red….. 6…… 20.00%
yel & yel…… 6…… 20.00%
yel & blu…… 2…… 6.67%
red & blu…… 3……. 10.00%
total ………. 30….. 100.00%

21. 21. Chris Said：

Hi Ragknot. Die 1 or die 2 could be the first rolled. It happens that, due to the antisymmetry in R and Y of the dice, that it doesn’t matter which die was rolled first.

22. 22. Chris Said：

I’m unhappy with claim that I made, in post 17, that 17/66 was the probability of success on the first go. In fact, I’m sure it’s wrong.

Another question is, “what is the average number of attempts needed to satisfy the conditions in the problem?”

Let N be the average number of attempts. Then,
N = 1 + (1/6)N + (5/6)((17/30)0 + (13/30)N)= 1 + (1/6)N + (5/6)(13/30)N
=> N = 36/17 ≈ 2.117647 [Nice, but rubbish. I goofed. See post 34]

The probability of success on the first attempt is 1/N = 17/36 ≈ 0.472222
[oh no it isn't]

I can’t make my mind up what the other presumed probability is.

23. 23. ragknot Said：

I just added a couple of sentences to my post #20. The Red and Yellow is 13 of 30 or 43.33%. I wish I could have posted my colored 6 by 6 diagram.

If the 2 red die is rolled first (top), the diagram is basically the same, but you have 3×3 that is YR not RY, the 2×2 is changed to RY.
The [00] are the blue rolled first and ignored and re-rolled.

……. [ R ] [ R ] [ Y ] [ Y ] [ Y ] [ B ]
[ R ] [RR] [RR] [YR] [YR] [YR] [00]
[ R ] [RR] [RR] [YR] [YR] [YR] [00]
[ R ] [RR] [RR] [YR] [YR] [YR] [00]
[ Y ] [RY] [RY] [YY] [YY] [YY] [00]
[ Y ] [RY] [RY] [YY] [YY] [YY] [00]
[ B ] [RB] [RB] [YB] [YB] [YB] [00]

The probability of the [00] is 6 of 36, but the [00] is ignored leaving only 30 that are not ignored.

24. 24. Chris Said：

DP’s being very quiet. I wonder if we’re misinterpreting the question!

25. 25. DP Said：

I’ll post the “official” final answer. Feel free to continue calculating whatever you like (i.e. number of trials req’d, three dice problems, etc.).

First, here is the actual question again. We want to make sure we are looking for what the question asks, not what we assume it is looking for.

———————————————————
I have a pair of special 6-sided dice. One of them has 3 Red sides, 2 Yellow sides, and 1 Blue side. The other has 2 Red sides, 3 Yellow sides, and 1 Blue side. Assume the dice are fair (probability of rolling any face = 1/6).
I pick them up, shake them in my hand, and then roll one. If it shows blue, I ignore that roll, pick it up and start over. If it is not, I will roll the second. On average, what is the probability that I will roll at least one red or yellow, but not both?
—————————————————-

I can think of several methods I could use to solve this. For this one, you don’t need to know much advanced math, probability, or how to play any other dice game; only a little logic and basic algebra.

As should be assumed by reading the problem statement, you have a 50% chance of stating with either die, and an even chance of rolling any face on that die.
So that we don’t confuse their roll order, I’ll label the 2 dice “Die 1” and “Die A”. Confused yet?

Die 1: Red-Red-Red-Yellow-Yellow-Blue
Die A: Red-Red-Yellow-Yellow-Yellow-Blue

If we roll Die 1 first (again, this happens 50% of the time) we can get either a Red face or a Yellow face. This is because we roll the first Die until it is NOT Blue. We can get Red [3/5] of the time and Yellow [2/5]. We now can roll Die A getting Red [2/6], Yellow [3/6], and Blue [1/6].
If Red is rolled first we will get:
Red-Red = [3/5] * [2/6] = 6/30 (good)
Red-Blue = [3/5] * [1/6] = 3/30 (good)
Red-Yellow = [3/5] * [3/6] = 9/30 (bad)
If Yellow is rolled first:
Yellow-Red = [2/5] * [2/6] = 4/30 (bad)
Yellow-Yellow = [2/5] * [3/6] = 6/30 (good)
Yellow-Blue = [2/5] * [1/6] = 2/30 (good)

Altogether (for Die 1) we have:
Good: 6/30 + 3/30 + 6/30 + 2/30 = 17/30
Bad: 9/30 + 4/30 = 13/30
Just for good measure: 17/30 + 13/30 = 30/30.

If we roll Die A first (again, this happens 50% of the time) we can get either a Red face or a Yellow face. This is because we roll the first Die until it is NOT Blue. We can get Red [2/5] of the time and Yellow [3/5]. We now can roll Die 1 getting Red [3/6], Yellow [2/6], and Blue [1/6].
If Red is rolled first we will get:
Red-Red = [2/5] * [3/6] = 6/30 (good)
Red-Blue = [2/5] * [1/6] = 2/30 (good)
Red-Yellow = [2/5] * [2/6] = 4/30 (bad)
If Yellow is rolled first:
Yellow-Red = [3/5] * [3/6] = 9/30 (bad)
Yellow-Yellow = [3/5] * [2/6] = 6/30 (good)
Yellow-Blue = [3/5] * [1/6] = 3/30 (good)

Altogether (for Die A) we have:
Good: 6/30 + 2/30 + 6/30 + 3/30 = 17/30
Bad: 4/30 + 9/30 = 13/30
Just for good measure: 17/30 + 13/30 = 30/30.

For both dice (the 1/2 is because we can roll either 50% of the time):
Good: (1/2)*(17/30) + (1/2)*(17/30) = 17/30

26. 26. DP Said：

Sorry Chris. I was finishing up my final solution while you submitted that last post

27. 27. Chris Said：

Phew!

28. 28. DP Said：

This one still seemed active, so I didn’t want to take away anyone’s joy of finally coming up with the correct solution.
Curtis had the correct answer right away…then changed it….then changed it back.
Chris had a wrong number somewhere, then agreed with Curtis on the correct answer.
Ragknot never posted his official stance, but it looks like he knows what’s going on.
And then there’s cazayoux…who still hasn’t posteed a confident answer, then went off to calculate # of trials for success and to make up new problems. I like some of the references to old problems though. I learned a lot on the coin problem. Maybe you should post your 3 colored dice problem. I won’t since you made it up.

29. 29. Chris Said：

Hi cazayoux. Re post 8. If |x| < 1, then sum 0 to ∞ xn = 1/(1 – x)

So sum 0 to ∞ (1/6)n) = 1/(1-(1/6)) = 6/5

Proof: Let Sn+1 = 1 + x + x2 + x3 + … + xn+ xn+1 = Sn + xn+1
Sn+1 = 1 + x(1 + x + x2 + … + xn) = 1 + x Sn
So equating the two expressions for Sn+1 => after solving for Sn,
Sn = (1 – xn+1)/(1 – x).
If |x| < 1, then xn → 0 as n→∞, so S = S = 1/(1 – x)

I’ll now read the 3 dice challenge. But I’ve got to collect my dad from hospital now.

30. 30. Chris Said：

I’ve now seen cazayoux’s 3 dice problem (post 16). Having two blues is the sort of problem that I thought might be the next in DP’s series.

We’d be tempted to say that when we roll the first die, that it is equally likely to be any of the three. But that’s the wrong way to look at it – we less likely to have rolled D3 than D1 or D2. For D1 and D2 we have a 5/6 prob of not rolling B, but for D3 we ave a 4/6 prob of not rolling B. Taking each die’s face as being independent, we have 18 possible faces. 14 are non-B. So the probability that we have rolled D1 is 5/14, the same for D2 but for D3 the probability is 4/14. Before anyone tells me that I’m an idiot, try it this way. Initially you are equally likely to roll any of the three dice. But you have a probability of 2/6 of rolling B with D3 and a 1/6 probability of rolling B with D1 or D2. So you are more likely to be failing to get to the next stage when you roll D3 first.

D1: RRRYYB, D2: RRYYYB, D3: RRYYBB
I’m using P1,P2,P3 for the the die probabilities. I’ll use “|!B” for “given that not B”. In each case it’ll be for the die that was rolled first.

D1, prob of being first = 5/14.
P1(R|!B) = 3/5. P2(!Y) = 3/6. P3(!Y) = 4/6. Product = (5/14)(36/216)(6/5)
P1(Y|!B) = 2/5. P2(!R) = 4/6. P3(!R) = 4/6. Product = (5/14)(32/216)(6/5)

D2, prob of being first = 5/14.
P2(R|!B) = 2/5. P1(!Y) = 4/6. P3(!Y) = 4/6. Product = (5/14)(32/216)((6/5)
P2(Y|!B) = 3/5. P1(!R) = 3/6. P3(!R) = 4/6. Product = (5/14)(36/216)(6/5)

D3: prob of beimg first = 4/14.
P3(R|!B) = 2/4. P1(!Y) = 4/6. P2(!Y) = 3/6. Product = (4/14)(24/216)(6/4)
P3(Y|!B) = 2/4. P1(!R) = 3/6. P2(!R) = 4/6. Product = (4/14)(24/216)(6/4)

Now totting that lot up =>
2(5/14)(6/5)(36+32)/216 + (4/14)(6/4)(24+24)/216 = 23/63 = 0.365079…

31. 31. DP Said：

(reference cazayoux’s post #16 for the problem I am solving in this post)

I think his problem still only rolls 2 dice (of the 3 available)

D1: Red-Red-Red-Yellow-Yellow-Blue
D2: Red-Red-Yellow-Yellow-Yellow-Blue
D3: Red-Red-Yellow-Yellow-Blue-Blue

18 faces, 4 are blue – so ignore them. First roll D1 has 5/14 chance of being rolled (or non-Blue), D2 5/14, and D3 4/14 just as Chris said in the previous post

If D1 rolls first:
5/14 – chance of being rolled
3/5 – chance of being Red; 2/5 – chance of being Yellow
7/12 – chance of other die showing non-Yellow; 8/12 – chance of other die showing non-Red
D1 first, non-Yellow: (5/14)(3/5)(7/12)
D1 first, non-Red: (5/14)(2/5)(8/12)
D1 first, success: 185/840 = 37/168

If D2 rolls first:
Same as D1, just switch Red for Yellow. (185/840 = 37/168)

If D3 rolls first:
4/14 – chance of being rolled
2/4 – chance of being Red; 2/4 – chance of being Yellow
7/12 – chance of other die showing non-Yellow; 7/12 – chance of other die showing non-Red
D3 first, non-Yellow: (4/14)(2/4)(7/12)
D3 first, non-Red: (4/14)(2/4)(7/12)
D3 first, success: 112/672 = 1/6

Total success probability (ignoring all first rolls that are Blue) = 37/168 + 37/168 + 1/6 = 17/28 (≈61%) – only slightly better chances than the posted problem (≈57%)

———————————

We were also asked to find the probability if D3 has 6 Blue faces.

D1: Red-Red-Red-Yellow-Yellow-Blue
D2: Red-Red-Yellow-Yellow-Yellow-Blue
D3: Blue-Blue-Blue-Blue-Blue-Blue

D1 & D2 again have a 50% chance each of being rolled first, since we will always ignore a Blue roll if on the first die. They also still have equal chances of being non-Red + non-Yellow. So we only need to find the probability of one of them, multiply by 2 (for both dice), and then divide by 2 (since they have equal chances of being rolled first).

D1 has 3/5 chance of being Red & 2/5 chance of being Yellow.
The next die has a 9/12 chance of being non-Yellow, and 10/12 chance of being non-Red.
All together that’s (3/5)(9/12)+(2/5)(10/12) = 27/60 + 20/60 = 47/60…..then multiply by 2 and divid by 2. So we end up with ≈78%, which is much greater than the ≈57% from the posted problem. We would expect that since there are now more “neutral” faces that cannot be rolled first.

32. 32. cazayoux Said：

I see my error in post 15 and agree with DP’s post 25.
I’ve never posted a problem myself, so I’m excited to break that ice.

33. 33. cazayoux Said：

Chris .. re: post 17 .. you stated that we have a 17/30 chance to finish.

Help me to understand this part.
My thinking was that we have a 5/6ths chance of making it to the second roll.
If we make it to the second roll, we have a 100% chance of finishing, since there is no stipulation to start over after the second roll.

34. 34. Chris Said：

Hi cazayoux. My bad(s). My reading of the problem is that a trial is: roll a die until not blue, then roll the second die [once]. If we don’t see Y and R then we’ve succeeded, otherwise we’ve failed. Either way, the trial is over.

I accept that the question didn’t literally say only roll the second die only once, but it was the clear intent, especially in view of DP’s solution. And, as you say, being able to roll the second die indefinitely will guarantee success. So that would be trivial.

My post 17 was written in view of the above understanding. I’m reasonably sure that I got the average number of rolls right. I then wondered what 1/N meant as a probability. I can’t associate a probability with it. It’s the average number of successes per roll, and that isn’t particularly meaningful.

If you allow the second die to be rolled indefinitely, the the average number of rolls is: N = 6/5 + 30/17 = 252/85 = 2.9647… and the average number of trials is 1.

For post 22, you’re right, I’d goofed when I restarted when I got a B. That makes an enormous difference. If N is the average number of trials until success, then
N = 1 + (13/30)N => N = 30/17 ≈ 1.7647. So p = 1/N = 17/30
LOL, I should have realised that immediately (red face).
i.e. I should have done it the other way round: N = 1/p = 30/17.

You are now an official author. That means that you can publish and manage your own problem pages. I’m not sure if you can edit your own comments on other people’s problem pages (I suspect not).

35. 35. Chris Said：

The barman said, “I’m sorry, but we don’t serve neutrinos”.
A neutrino walked into a bar and ordered a drink.

In case you didn’t get it, that’s a causality joke that came about due to the recent reports of faster than light neutrinos.

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