Scenario
Two players, Alice and Bob, play Penney's Game. Alice chooses a binary coin sequence A∈{H,T}L of length L=3.
Bob then chooses a distinct sequence B∈{H,T}L.
A fair coin is repeatedly tossed until one of the two sequences appears as a consecutive subsequence; the player whose pattern appears first wins.
Your Task
- Define Conway's leading number correlation algorithm (XY) for sequences X,Y.
- Using martingale stopping theory, state Conway's formula for the winning odds ratio P(A wins)P(B wins).
- State Bob's optimal counter-strategy for any length-3 sequence A=(a1,a2,a3).
- Compute the exact winning probabilities when Alice chooses HHT and Bob responds optimally with THH.
Constraints
- Fair independent coin tosses with p(H)=p(T)=0.5.
Examples
If Alice picks HHT, Bob picks THH. (HHT,HHT)=4, (HHT,THH)=1, (THH,THH)=4, (THH,HHT)=3. Bob wins with probability 3/4=75%.