WoodCentral Forums

Est. 1998 — 27 years of woodworking knowledge

Friday Puzzler--three coin flips

Posts

Friday Puzzler--three coin flips

#1

Friday Puzzler--three coin flips

Alex Y

In this game, contestant A chooses a pattern of three successive coin flips, e.g., HTH or HHT. After A has announced his choice, contestant B gets to make his choice and announce it. (Contestant B knows A's choice and cannot select the same pattern.) Then a fair coin is tossed until either A or B's pattern comes up, and the person whose pattern comes up first is the winner.

Would you rather be contestant A or B, and what is your strategy to maximize the chance that you will win?

Re: Friday Puzzler--three coin flips

#2

Re: Friday Puzzler--three coin flips

Larry Barrett

The only strategy I see is a simple one. B matches A’s first two selections and then selects the opposite for the third choice. For example, if A chooses HTH, B chooses HTT. This guarantees that B has a 50% chance of winning. It effectively reduces the game to a single toss of the coin.

Re: Friday Puzzler--three coin flips

#3

You can do better!


Re: Friday Puzzler--three coin flips

#4

Kent B

Larry - I'm in the weeds.  Might be up to you.


Re: Friday Puzzler--three coin flips

#5

Hint

Alex Y

You want to be B.

But I guess you already figured that part, so I'll give you a second hint:

What's the best A and B can do if A chooses HHH?

Re: Friday Puzzler--three coin flips

#6

HHH

Alex Y

The hint to look at A choosing HHH didn't seem to help, so I'll walk through that case.

If flips 1, 2, and 3 are all heads, A wins. Nothing B chooses can come up sooner. P=1/8.

Assume the first time three heads in a row comes up is on tosses n, n+1, and n+2, with n>1.

What was the result of flip n-1?

Won't flips n-1, n, and n+1 be a threesome that will always come up before HHH in the 7/8 of the time that HHH is not the first three flips?

Re: Friday Puzzler--three coin flips

#7

Re: HHH

Larry Barrett

If A chooses HHH, or TTT, B should choose the opposite for the first position and then choose the same as A for the 2nd and 3rd positions - for example, THH, or HTT - and be sure of winning before A does.

But what if A chooses, for example, HTH? If B then chooses THT and the coin flips come up THHTH A will win first.

So far I don't see a strategy that guarantees a win for B.

Re: Friday Puzzler--three coin flips

#8

Three more to go

Alex Y

Larry correctly got what B should pick if A picks HHH, to give B a 7:1 chance of winning.

While there are 8 different choices for how three tosses could show up, there are really only 4 when you consider symmetry.

Solve

HHH HHT HTH THH

And by switching heads and tails you will have the solutions for the rest:

TTT TTH THT HTT

The solution for HHT is similar to that for HHH, but gives B only a 3:1 chance of winning.

The remaining two are more difficult and give B only a 2:1 chance of winning.

When you get them all, you will discover that this contest is non-transitive, like rock-paper-scissors, where rock beats scissors beats paper beats rock beats...

Re: Friday Puzzler--three coin flips

#9

Solution to "Penney's Game" *LINK*

Alex Y

This three coin flip problem was developed in 1969 by Walter Penney.

The solution is easy to implement, but very difficult (IMO) to understand its workings:

If A chooses F1, F2, F3 as his sequence, B should choose ~F2, F1, F2, where ~F2 is the opposite of F2. So, for instance if A selects HTT, B should choose H(the opposite of A's second pick)HT.

Interestingly, this strategy works no matter the length of sequences you are comparing. So if you are comparing sequences of 10 flips, once A has chosen his sequence, B should choose the opposite of A's second flip followed by A's first 9 choices.

Now here is a really weird result, applying this rule:

HHT is likely to come up before HTT

THH is likely to come up before HHT

TTH is likely to come up before THH

HTT is likely to come up before TTH

So if you toss a coin multiple times, which of these four patterns is likely to come up first, since each of them (if you believe the rule) has another that is likely to come up before it? This is so counter-intuitive that it makes one believe that this rule must be wrong (it's not).

Another weird thing about this game is that if you figure out the expected number of flips before a certain sequence comes up, getting this expected time for two different sequences may NOT tell you which is likely to come up first.

The Wiki article on Penney's Game has more info, but the PDF at this link has all the math you could ever want on this puzzle:


Penney Ante: CounterintuitiveProbabilities in Coin

👍 This page answered my questions

Your vote helps other woodworkers quickly find the answers and techniques that actually work in the shop.