An even split seems like the safest choice. Here, however, the best strategy creates one perfect opportunity and concentrates the remaining risk in the other urn.

The prisoner and the two urns

Riddle statement

A prisoner is given 50 white balls and 50 black balls.

He may distribute all 100 balls between two urns in any way, provided that neither urn is empty.

The jailer then:

  1. chooses either urn at random, with probability \(1/2\) for each;
  2. draws one ball uniformly at random from the chosen urn.

If the ball is white, the prisoner goes free. If it is black, he dies.

How should he distribute the balls to maximize his probability of survival? What is the maximum probability?

Show solution

Solution

Answer:

  • first urn: 1 white ball;
  • second urn: 49 white balls and 50 black balls.

If the jailer chooses the first urn, the prisoner survives with certainty. If the second urn is chosen, the probability of drawing a white ball is \(49/99\). Therefore,

\[ P=\frac12\cdot1+\frac12\cdot\frac{49}{99}=\frac{74}{99}\approx74.75\%. \]

Why no other distribution can do better.

Call the smaller urn the first urn. Suppose it contains \(n\) balls, \(w\) of which are white. Then \(1\le n\le50\), while the other urn contains \(100-n\) balls, \(50-w\) of which are white.

The survival probability is

\[ P(n,w)=\frac12\left(\frac{w}{n}+\frac{50-w}{100-n}\right). \]

For fixed \(n<50\), replacing a black ball in the smaller urn with a white one always increases this probability, since the coefficient of \(w\) is

\[ \frac12\left(\frac1n-\frac1{100-n}\right)>0. \]

Thus, for each \(n\), the smaller urn should contain only white balls. Then

\[ P(n)=\frac12\left(1+\frac{50-n}{100-n}\right)=\frac{75-n}{100-n}. \]

Moreover,

\[ P(n+1)-P(n)=-\frac{25}{(99-n)(100-n)}<0, \]

so the probability decreases as \(n\) increases. The maximum therefore occurs at \(n=1\): one isolated white ball.

The key idea is to break the symmetry completely: one urn guarantees success, while the other still offers almost a one-half chance.