## Not-second, First, Second

Two players are playing the following game:

- Player A picks a sequence of three consecutive coin toss results, e.g., Tails-Heads-Heads, and tells it to player B
- Player B picks another sequence of three consecutive coin toss results, e.g., Heads-Tails-Heads, and tells it to player A
- A coin is flipped repeatedly and results are written down until one of the sequences is observed
- The player who’s sequence is observed first wins

Is the game fair?

This is Penney’s game, in which player B has an advantage.

Monte-Carlo simulation using this program gives the following odds of winning:

a_seq | b_seq | b:a |
---|---|---|

TTT | HTT | 6.98838 |

HTT | HHT | 2.00116 |

THT | TTH | 1.99810 |

HHT | THH | 2.99746 |

TTH | HTT | 2.99821 |

HTH | HHT | 2.00244 |

THH | TTH | 1.99916 |

HHH | THH | 6.99671 |