Home > Riddles > White balls in two boxes

White balls in two boxes

White Balls in Two Boxes works when the reader accepts a simple rule and follows it to the end without losing the thread. That's where the beautiful part appears: in the clarity of the mechanism.

You have 50 white balls and 50 black balls. You must divide them into two boxes, with the only condition that neither is left empty.

Then one of the two boxes is chosen at random and, from that box, a ball at random. How should you distribute the balls to maximize the probability of getting a white one?

Hints

Show hints
  1. Don't look for a balanced cast; Here the best strategy is asymmetric.
  2. A of the boxes can darte probability perfecta if arrives a ser chosen.
  3. The optimal distribution begins by leaving a single isolated white ball.

Solution

Show full solution

Answer: Place 1 single white ball in one box, and the other 99 (49 white and 50 black) in the other. With that distribution:

$$ \mathbb{P}(\t\t\t\text{blanca})=\frac12\cdot1+\frac12\cdot\frac{49}{99} =\frac{148}{198}\approx0.7475. $$ To justify optimality, in an optimal solution the “small” box should not contain black balls (they only worsen its white fraction). If that box has white $x$ and 0 black ones, the probability is: $$

p(x)=\frac12+\frac12\cdot\frac{50-x}{100-x},\quad 1\le x\le50.

$$ And it is verified that $p(x)$ decreases with $x$, so the maximum occurs in $x=1$. **Conclusion:** the exact maximum is $\frac12+\frac12\cdot\frac{49}{99}\approx74.75\%$. $$

Related riddles

Keep practicing

If you enjoyed this one, try more pure-logic riddles, explore this theme, browse the full archive, or read the riddle-solving guide.

← Previous: The relay of messages · Next: Impossible coloring from 1 to 5 →