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 ...
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 ...
I would do it as follows. Basically, assign heads a weight of 1, and tails a weight of 0. Flip the coin three times, corresponding to the three sizes, and note the weights. At the end of the first round, if one side has a greater weight than the other two, then you have your ...