Brainteasers & Puzzles

Coin Toss Game

A and B alternate fair tosses, and whoever throws a tail right after a head wins. Does going first help?

solvedmedium1 min

A and B alternately toss a fair coin, A first. The instant a head is immediately followed by a tail, the game stops and whoever tossed that tail wins. What is the probability that A wins?

Reveal solutionHide solution

#The states that matter

Going into a toss, only two things matter, the last symbol and whose turn it is. The whole game lives in two states, last tail (which includes the start) and last head.

graph LR
  T["last tail or start"] -->|heads| H["last head"]
  T -->|tails| T
  H -->|heads| H
  H -->|tails| W["this tosser wins"]

#Win chances by symmetry

Write aa for the chance the player about to toss eventually wins from last tail, and bb from last head. By symmetry these do not depend on which player it is.

From last head, the mover tosses tails and wins outright with chance 12\tfrac{1}{2}, or tosses heads and hands a last-head position to the opponent, winning with chance 1b1 - b. So

b=12+12(1b)=1b2,b=23.(1)b = \tfrac{1}{2} + \tfrac{1}{2}(1 - b) = 1 - \tfrac{b}{2}, \qquad b = \tfrac{2}{3}. \tag{1}

From last tail, no toss can end the game this step, and the mover passes either a last-head or a last-tail position to the opponent,

a=12(1b)+12(1a),3a+b=2,a=49.(2)a = \tfrac{1}{2}(1 - b) + \tfrac{1}{2}(1 - a), \qquad 3a + b = 2, \qquad a = \tfrac{4}{9}. \tag{2}

#The answer

A moves first from the start, a last-tail state, so

P(A wins)=a=49.(3)\PP(A \text{ wins}) = a = \frac{4}{9}. \tag{3}

B keeps the edge at 59\tfrac{5}{9}, since A is the one who tends to lay down the head that B finishes.