Fair Outcome from an Extremely Biased Coin

Probability · Hard · Free problem
You have a coin that lands heads with probability $p \approx 0.99$. Your goal is to use this coin to simulate a single fair (50-50) outcome. 1. Describe von Neumann's classic method for extracting a fair bit from a biased coin. What is the expected number of flips when $p = 0.99$? Why is the worst case unbounded? 2. The information-theoretic limit says each flip carries $H(p) = -p \log_2 p - (1-p) \log_2(1-p)$ bits of entropy. For $p = 0.99$, what is the minimum expected flips per fair bit? Briefly describe how Elias's method (arithmetic coding) approaches this limit. 3. Now suppose you need a *guaranteed* upper bound on the number of flips -- no infinite loops allowed. Design a block-based scheme that uses a fixed number of flips $k$ and extracts a fair outcome. How do you choose $k$ to get at least one usable fair bit with high probability?

Open the full interactive solver, hints, and worked solution →