Here’s a nifty little problem that a friend gave me yesterday that i thought i’d share with you:
You have three items (call them ‘a’, ‘b’ and ‘c’) that you want to choose any one from without bias. If you had a fair three sided die, you could assign an item to each side of the die, then simply toss the die once and pick the item that it lands on.
However, you don’t have such a fair three sided die. Instead, you have a fair two sided coin. Note: ‘fair’ means ‘there is an equal chance of coming up heads or tails’. Can you come up with an algorithm that uses said coin in order to pick any one of those items with equal probability?
Edit: Clarified the wording for how ‘fair’ is defined. Sorry if this tripped anyone up.