🧮 Brain Teaser

The Absent Ticket Inspector

You board a train with nn seats, each assigned to exactly one passenger. You are the first to board, but you've lost your ticket and sit in a random seat (uniformly among all nn seats). Each subsequent passenger boards one at a time:

  • If their assigned seat is free, they sit there.
  • If their assigned seat is taken, they pick a random free seat uniformly.

Question: What is the probability that the last passenger sits in their own assigned seat?

(This is the classic "Airplane Boarding Problem." Solve it and explain why the answer is so clean.)

symmetryinductionrandom processclassic puzzleinvariant

Answer: The Absent Ticket Inspector

Key Idea / Intuition

The answer is exactly 12\frac{1}{2}, independent of nn. This is shocking — with 100 or 1,000,000 passengers, the last person still has a 50/50 chance. The key insight is that throughout the entire process, the "fate" of the last seat is determined by a single competition: at every displacement, the displaced passenger randomly chooses either seat 1 (your seat) or seat nn (their seat), or they pass the problem along. The last seat is eventually "claimed" by one of these two outcomes, and by symmetry they are equally likely.


Formal Proof / Solution

Setup: Label the seats 1,2,,n1, 2, \ldots, n. You (passenger 1) sit randomly. Passenger kk sits in seat kk if free, otherwise picks randomly among free seats. We want P(passenger n sits in seat n)P(\text{passenger } n \text{ sits in seat } n).

Key observation: At any moment during boarding, the only "contested" seats are seat 11 (yours, the one you stole) and seat nn (the last seat). All other seats will eventually be resolved.

Elegant symmetry argument:

Consider the following invariant: whenever a displaced passenger must choose a random free seat, seat 1 and seat nn are always equally likely to be chosen (since neither is ever "preferentially" occupied during the random choices).

More precisely, we prove by induction: the last passenger sits in seat nn with probability 12\frac{1}{2}.

Base case n=2n = 2: You sit randomly in seat 1 or seat 2, each with probability 12\frac{1}{2}. If you sit in seat 1 (your own), passenger 2 gets seat 2. If you sit in seat 2, passenger 2 is displaced and gets seat 1. So P(last in own seat)=12P(\text{last in own seat}) = \frac{1}{2}. ✓

Inductive step: Suppose the result holds for n1n-1 passengers. With nn passengers:

  • With probability 1n\frac{1}{n}, you sit in seat 1 (your own) → everyone boards correctly → passenger nn gets seat nn. ✓
  • With probability 1n\frac{1}{n}, you sit in seat nn → passenger nn is immediately displaced → passenger nn cannot sit in seat nn. ✗
  • With probability kn\frac{k}{n} (for seats 2kn12 \leq k \leq n-1, i.e., probability n2n\frac{n-2}{n}), you sit in seat kk for some 2kn12 \leq k \leq n-1.

In the last case, passengers 2,,k12, \ldots, k-1 sit normally. Passenger kk is displaced and now faces the same problem with nk+1n - k + 1 remaining seats (including seat 1 and seat nn). By the symmetry of the random choice, this sub-problem has exactly the same structure as the original with fewer passengers.

By summing over all kk:

Pn=1n1+1n0+k=2n11nPnk+1P_n = \frac{1}{n} \cdot 1 + \frac{1}{n} \cdot 0 + \sum_{k=2}^{n-1} \frac{1}{n} \cdot P_{n-k+1}

where PjP_j is the probability for jj passengers. Using P2=12P_2 = \frac{1}{2} and assuming Pj=12P_j = \frac{1}{2} for all j<nj < n:

Pn=1n+0+k=2n11n12=1n+n2n12=1n+n22n=2+n22n=n2n=12.P_n = \frac{1}{n} + 0 + \sum_{k=2}^{n-1} \frac{1}{n} \cdot \frac{1}{2} = \frac{1}{n} + \frac{n-2}{n} \cdot \frac{1}{2} = \frac{1}{n} + \frac{n-2}{2n} = \frac{2 + n - 2}{2n} = \frac{n}{2n} = \frac{1}{2}.

The cleanest way to see it: The process terminates when either seat 1 or seat nn is chosen by a displaced passenger. At that moment, the choice is uniform between these two seats (both are always free until one is taken). So:

P(seat n chosen first)=12.P(\text{seat } n \text{ chosen first}) = \frac{1}{2}.

Answer: 12\boxed{\dfrac{1}{2}}, for all n2n \geq 2.

Source: Mathematical folklore / classic puzzle; related problems appear in Mosteller's Fifty Challenging Problems

Type: ProbabilitySource: Mathematical folklore / classic puzzle; related problems appear in Mosteller's Fifty Challenging ProblemsEdit on GitHub ↗