Consecutive Tails
Problem
A fair coin is flipped times. What is the probability that any tails which occur, occur only in consecutive pairs? For instance, fails because of the lone tail at the start, while is fine — as is all heads.
Original Problem Link: Click here
Solution
Before counting anything, let us pin down the structure of the problem.
Ten flips of a fair coin give possible sequences, and every one of them is equally likely, each with probability . That is the key simplification: because the sequences are equiprobable, we never have to weigh one against another. The answer is just
So this is purely a counting problem. All the work is in the numerator.
Step 1: What does a valid sequence look like?
Read the condition carefully. Tails may only appear in consecutive pairs, so a valid sequence is nothing more than a string built out of two kinds of pieces:
- the block — a pair of tails
- the single letter
Glue any number of these together in any order and you get a valid sequence. Note that this correctly allows , which is just two blocks sitting next to each other, and it correctly forbids a lone , since there is no piece that can produce one.
Say we use blocks of . Those eat up of our ten flips, so the rest must be heads:
and the total number of pieces we are arranging is
Since , the possible values are . So the plan is clear: count the arrangements for each , then add them up.
Step 2: Counting the arrangements for a fixed
We are arranging pieces in a row: copies of and copies of .
Start by pretending every piece is distinguishable — label the heads and the blocks . Then there are simply
orderings, since we have distinct things to permute.
But of course they are not distinguishable, and this badly overcounts. Swap with and the string of H's and T's you actually see does not change at all. Same if you swap with . So every genuine sequence has been counted once for every way of relabelling the heads among themselves and the blocks among themselves — that is,
times over. To cancel this redundancy, we divide it out:
Which reads very naturally in the end: out of positions in the row of pieces, choose the that hold the blocks.
If you are being extra careful, you might also want to distinguish the two tails inside each block, multiplying the top by . But those two tails are identical as well, so you would divide the very same straight back out. It cancels, and we can ignore it entirely.
Step 3: Summing over
Now just add up the six cases:
Term by term:
- : (all heads)
- :
- :
- :
- :
- : (all tails, )
Step 4: The probability
Step 5: Sanity check
Let us verify a completely different way, by building the count up from short sequences. Let be the number of valid sequences of length .
Look at how a valid sequence of length starts. There are only two possibilities, since it cannot begin with a lone tail:
- it starts with , and the remaining flips form any valid sequence — ways
- it starts with , and the remaining flips form any valid sequence — ways
These cases are disjoint and cover everything, so
with (the empty sequence) and (just ). Rolling it forward:
So , agreeing with the sum in Step 3. (Those are the Fibonacci numbers, which is a nice thing to fall out of a coin problem — the recursion above is exactly the Fibonacci rule.)
It is also easy to spot-check the small cases by hand. For the formula gives , and indeed the only valid sequences are , , , and .