Home > Riddles > The coin justa

The coin justa

One of the minimal gems of randomness: extracting perfect justice from a biased source without knowing the bias.

You have a skewed coin, but you don't know how much. It can come up heads more times than tails, or the other way around; all you know is that its bias is fixed.

You can throw it as many times as you want, but you cannot use any other coin or other random mechanism. You must ultimately produce a perfectly fair result: heads or tails, each with probability exactly 1/2.

How would you do it?

Hints

Show hints
  1. A single toss is never enough, because the coin is skewed.
  2. Two releases can be compared to each other.
  3. The patterns heads-tails and tails-heads have exactly the same probability.

Solution

Show full solution

Suppose the probability of heads is p and that of tails is 1-p. So:

  • the probability of heads-tails is p(1-p)
  • the probability of tails-heads is (1-p)p They are exactly the same. So, if we use only those two cases and discard the others, we obtain two perfectly balanced results. The procedure is:
  • flip the coin twice;
  • if heads-tails, declare heads;
  • if tails-heads, declare tails;
  • If it comes up heads-heads or tails-tails, repeat from the beginning. In this way, the final result is exactly fair.

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 alpinista and the rope corta · Next: The nativos in circle →