Source

I got this problem from Rustan Leino, who got it from Joe Morris, who created it.

I solved it and wrote up my solution.

Problem

Each of two players picks a different sequence of two coin tosses. That is, each player gets to pick among HH, HT, TH, and TT. Then, a coin is flipped repeatedly and the first player to see his sequence appear wins. For example, if one player picks HH, the other picks TT, and the coin produces a sequence that starts H, T, H, T, T, then the player who picked TT wins. The coin is biased, with H having a 2/3 probability and T having a 1/3 probability. If you played this game, would you want to pick your sequence first or second?

Solution
Reveal

You'd want to pick second, because the player to pick second can use the following strategy to always have a better-than-even chance of winning.

If the first player chooses HH, choose TH. This way, you'll win if and only if the first two flips are TH, TT, or HT. So, you'll win with probability 5/9.

If the first player (unwisely) chooses TH, choose HT. This way, you'll win if and only if the first flip is H. So, you'll win with probability 2/3.

If the first player (also unwisely) chooses HT, choose HH. This way, you'll win if and only if the flip that immediately follows the first H is also an H. So, you'll win with probability 2/3.

If the first player (really unwisely) chooses TT, choose HT. This way, you'll win if and only if the first two flips are HT, HH, or TH. So, you'll win with probability 8/9.