Problem
You have a biased coin with unknown probability of heads. You don't know , but you can flip the coin as many times as you like. Design a procedure that outputs a perfectly fair bit (H or T with probability each), and analyze its expected efficiency in flips per output bit.