General Question

PhiNotPi's avatar

On average, how many flips of a "three-sided coin" are needed to get each side at least once?

Asked by PhiNotPi (12681points) August 3rd, 2011

This question seems similar to an earlier question by me. That one was about a 2-sided coin (a normal coin). This question is about what would happen if I added an extra side.

You have either a fancy 3-sided coin or a fancy 3-sided die. You flip this coin until you have flipped each side at least once. What is the average (mean) number of flips required to achieve this?

For an example, the flips HTHS required 4 flips, while the sequence HTS required 3.

From the other question, I have found some things that need to be explained. The number of flips at which there is a 50–50 chance of getting all three sides is not necessarily the mean, but it is the median. I am also not asking for the minimum/maximum number of flips required.

Observing members: 0 Composing members: 0

16 Answers

prioritymail's avatar

I can’t think of any 3D shape that has 3 sides…

PhiNotPi's avatar

@prioritymail This is a purely theoretical question, so I am ignoring physical limitations that don’t have to do with the actual problem. If you need something to simulate a three-sided shape, use a regular six-sided die, and replace the numbers 4–6 with another 1–3.

Aqua's avatar

Actually, a cylinder has 3-sides, so any normal coin is actually 3-sided.

Mariah's avatar

You just had to go there, didn’t you? XD

Okay so there are 27permutations you can get right off the bat. HHH, HHT, HHS, HTH, HTT, HTS, HSH, HST, HSS, TTT, TTH, TTS, THT, THH, THS, TST, TSH, TSS, SSS, SSH, SST, STS, STT, STH, SHT, SHS, SHH. Only 6 of which will get all three the first try. If you get any of the remaining 21, you have to roll again.
When you roll again you can get (oh boy) 63 permutations. HHHH, HHHT, HHHS, HHTH, HHTT, HHTS, HHSH, HHST, HHSS, HTHH, HTHT, HTHS, HTTH, HTTT, HTTS, HSHH, HSHT, HSHS, HSSH, HSST, HSSS, TTTH, TTTT, TTTS, TTHH, TTHT, TTHS, TTST, TTSH, TTSS, THTH, THTT, THTS, THHH, THHT, THHS, TSTH, TSTT, TSTS, TSSH, TSST, TSSS, SSSH, SSST, SSSS, SSHH, SSHT, SSHS, SSTH, SSTT, SSTS, STSH, STST, STSS, STTH, STTT, STTS, SHSH, SHST, SHSS, SHHH, SHHT, SHHS. Whew. This gets very big very fast.
Of those 63, I think I spy 18 that contain all three letters. So 18/63 of the remaining 21/27, or 2/9, then satisfy the criteria. Please note that this is the same percentage as before: 6/27 simplifies to 2/9!

The pattern here is much harder to pick out… obviously it cannot continue to be 2/9 indefinitely, as between the 4th and 5th iterations you would surpass 1. I feel like I need to see the third iteration in order for the pattern to become more clear, but the third iteration will contain 135 elements and I really don’t want to have to do that.

Gimme a minute to think about this.

@Aqua A cylinder has three sides (kind of, a circular “side” is not really a side) but each side is not equally likely to occur, so that doesn’t suit this problem.

Mariah's avatar

[Removed by me, that doesn’t even make sense. Sorry.]

gailcalled's avatar

@Mariah: Nevertheless, it was a masterpiece of typing and had me convinced.

Mariah's avatar

Okay fortunately I think I managed to figure out how many of the 135 will contain all three letters without having to list them out, haha. I’m pretty sure 42/135 will be the next iteration.

Let me just think out loud here for a moment to make sense of all this:
In the first iteration, 6/27, or 2/9, permutations contained all 3.
In the second iteration, 18/63 of the remaining 21/27, or another 2/9, contained all three. This leaves 5/9 yet solved.
In the third iteration, I believe 42/135 of the remaining 5/9, or 14/81, will contain all three.

I’ll write the pattern so far, and instead of multiplying all the factors together, I’m going to leave some of them undistributed. This will help us see patterns in the numbers.

(6/27)(3) + (18/63)(21/27)(4) + (42/135)(5/9)(5)...

I’m starting to notice a bit of a pattern now. Let’s rewrite this same formula as…

(6*1)/(9*3)(3*9)/((27)(3) + (6*3)/(9*7)(3*7)/(27)(4) + (6*7)/(9*15)(3*5)/(27)(5)

There it is, the pattern! Do you see it?
The first numerator is 6 times 1, then 3, then 7 (add two then four)
The first denominator is 9 times 3, then 7, then 15 (add four then eight)
The second numerator is 3 times 9, then 7, then 5 (subtract two each time)
The second denominator is always 27
And then of course each term is multiplied by a successive number, 3, then 4, then 5.

So I feel mildly confident (I would feel better if we had more iterations, but this problem is so clumsy) in stating that that is the pattern for which we need to seek the formula, and I will now begin working on representing that pattern in terms of n.

@gailcalled Oh! Thanks. But you can’t get three sides in 2.5 flips! XD

gailcalled's avatar

@Mariah: I didn’t say that I actually read it.

Mariah's avatar

Just sayin’, my removed answer was pretty nonsensical, but I appreciate that you liked it nonetheless!

Mariah's avatar

K I’ve got the formula. It’s:

(6*(2^n-1))/(9(2^(n+1)-1)) * (3(11–2n))/27 * (n+2) starting with n=1.

If you guys don’t mind I’m going to do this the lazy, informal way again and just have my calculator compute a few hundred iterations to approximate the limit. It works well enough and I’m tired. XD

Edit: Oof. Problem. 11–2n obviously becomes negative after a few iterations. Maybe the pattern was deceptive; it seemed to be subtracting two each time (9, 7, 5) but what happens when it reaches the negatives, since negative numbers don’t make sense in the context of this problem? I need to see more iterations… :(

Supacase's avatar

@prioritymail I’m thinking a pyramid-shaped die.

LostInParadise's avatar

This is the Cereal Box Problem. In that problem, a brand of cereal includes one of six different prizes in each box and the question is how long on average it takes to get all 6.

The clue to the solution is that the average time for something of probability p to occur is 1/p. The first time you flip the coin, you get one of the sides. There is a ⅔ chance of getting one of the other sides, so on average it will take 1/(⅔) = 3/2 flips to get one of them. Once you have 2 of the sides, there is a ⅓ chance on each flip of getting the third, so it will take on average 3 additional flips. Adding, the total is 1 + 3/2 + 3 = 5½.

PhiNotPi's avatar

@LostInParadise I didn’t know that this problem already existed, but the simplicity of the math is amazing. This same math applied to the other question is 1 + 1/(½) = 3, which is correct.

LostInParadise's avatar

In general, finding expected values is much easier than finding probabilities.

mattbrowne's avatar

Favorable outcomes divided by all possible outcomes.

PhiNotPi's avatar

@mattbrowne I’m not even asking for the probability of something.

Answer this question

Login

or

Join

to answer.

This question is in the General Section. Responses must be helpful and on-topic.

Your answer will be saved while you login or join.

Have a question? Ask Fluther!

What do you know more about?
or
Knowledge Networking @ Fluther