Can anyone help me with this probability question??
You are out to dinner with two friends. You discover that there is only one remaining slice of chocolate cake, and so you all want to devise a fair way of choosing one person to receive the slice. All your friends have is a fair coin. Can you devise a fair way with this coin? How?
You always can simulate the uniform law on $\{1, \ldots, n\}$ with a fair coin. The rough idea is quite natural: write $n$ in its binary development (say with $k$ digits, i.e. $n <2^k$), then toss a coin for each digit.
We quickly understand there is a slight "waste" of undesired possible numbers with this method (safe the ideal case $n=2^k$): if you hit such a number with the algorithm, you can restart, and the algorithm terminates with probability 1.