Home > Riddles > The last ball

The last ball

Pure logicLevel 2/5

The process seems to depend on the chance of each extraction, but the final answer does not live in that detail. The key is to discover which feature of the set survives all the plays.

In an urn there are black and white balls. You repeatedly draw two balls:

  • if they are the same color, you remove them and insert a black one;
  • If they are a different color, you remove them and insert a white one. When there is only one ball left, what will its color depend on?

Hints

Show hints
  1. The final color does not depend on the specific sequence of extractions.
  2. Notice what simple feature of the white balls does or does not change in each rule.
  3. If this trait is preserved, the last ball is already very conditioned.

Solution

Show full solution

Answer: the final color depends only on the initial parity of white balls:

  • white even initials -> last black ball;
  • odd initial white -> last white ball. It does not depend on the extraction order. Proof by invariant: White's parity does not change:
  • two white ones -> you remove 2 white ones and add black one: change -2;
  • two black -> change 0 to white;
  • one white and one black -> you remove one white and add one white: change 0. White parity is always preserved. In the end there is only one ball left: if it is white, there is 1 white (odd); if it is black, 0 white (even).

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 100 coins a ciegas · Next: A cyclic elimination →