# Fair biased coin

From Math Puzzle Wiki

Here is a puzzle based on an algorithm invented by John von Neumann.

## Puzzle

You and a friend have just discovered what appears to be a very valuable old coin. To determine who gets to keep the treasure, you decide to flip the coin. However, as your buddy points out, you do not know if the coin is *fair* -- that is, it might be more likely to land heads up than tails up, or the opposite. How could you use this coin to give you and your friend an equal probability of winning?

## Help

**Hint**

The coin will need to be flipped more than once. Depending on the outcome, perhaps even more.

**Answer**

You agree to flip the coin twice. If it comes up heads then tails, you will win. If it comes up tails then heads, your friend wins. If it comes up heads-heads or tails-tails, you try again

**Solution**

Why does this work? If the probability of the coin landing heads up is <m>P</m>, then the probability of the coin landing tails up is <m>1-P</m>. Thus the probability of the coin landing heads-tails is <m>P(1-P)</m>, which is identical to the probability of the coin landing tails-heads: <m>(1-P)P</m>.