My puzzle is based on this tweet (image):
Flip a fair coin 100 times—it gives a sequence of heads (H) and tails (T). For each HH in the sequence of flips, Alice gets a point; for each HT, Bob does, so e.g. for the sequence THHHT Alice gets 2 points and Bob gets 1 point. Who is most likely to win?
The question in the tweet is a counterintuitive probability puzzle, which is quite tricky to solve. There are already great explanations available online; see the answers to this stats.stackexchange question, or this writeup by Mihai Nica. My question is a harder version of the puzzle.
Generalizing from $100$ flips to $n$ flips, let $A_n$ be the set of coins flip sequences of length $n$ where Alice wins, and let $B_n$ be the sequences of length $n$ where Bob wins. It turns out that the game favors Bob whenever $n\ge 3$, so that $|B_n|>|A_n|$.
Let $B_n^*$ be the set of sequences such that Bob wins, and where Bob stays winning even when an extra H is added to the end. This means that $B^*_n$ is a subset of $B_n$. For example, the sequence $s=\mathsf{THTTH}$ is in $B_5$, because $s$ has one $\mathsf{HT}$ and zero $\mathsf{HH}$'s. However, when you append an extra $\mathsf{\color{blue}H}$ to $s$, the result is $\mathsf{THTTH{\color{blue}H}}$. The extended sequence has one $\mathsf{HH}$ and one $\mathsf{HT }$, so Bob is no longer winning, meaning $s$ is not included in $B_5^*$.
Puzzle: Prove, for all $n\ge 2$, that $|A_n|=|B^*_n|$.
Source: This was originally asked by reddit use bobjane in this reddit post on the math riddles subreddit.
Here is an illustration of what I am asking you to prove when $n=5$. In the right column, I list all of the sequences of $5$ flips where Bob wins, but then I cross out the sequences that are removed to make $B^*_5$. As you can see, the remaining sequences in $B^*_5$ can be matched one-to-one with those in $A_5$.
$A_5$ | $B_5^*$ |
---|---|
HHHHH | HTHTH |
HHHHT | HTHTT |
HHHTH | HTTHT |
HHHTT | HTTTT |
HHTHH | HHTHT |
HTHHH | HTHHT |
THHHH | THTHT |
THHHT | THTTT |
TTHHH | TTHTT |
TTTHH | TTTHT |