Assignment #5 Simulating coins Due on Friday, 16 February. 1. You are stuck on a
ID: 3195849 • Letter: A
Question
Assignment #5 Simulating coins Due on Friday, 16 February. 1. You are stuck on a desert island with a friend and single coin which is your only source of randomness. [Deterministic desert islands are very boring! The coin in question is biased in that it comes up heads more often than tails, though you do not know the exact bias. It does come up tails some of the time.) You and your friend want to play a game that needs a fair coin. How can you use the biased coin to simulate the fair coin that you need?Explanation / Answer
Let the probability of getting H be " p ".
So, Probability of getting T = ( 1 - p ).
Consider tossing the coin twice.
We may get HH , HT , TH or TT.
Probability of getting HT = Probability of getting TH = p(1-p)
So We get HT and TH with equal probability.
Hence, We can do the following :-
1) Toss the coin twice.
2) If We get HH or TT , reject and toss the coin twice again.
3) If We get HT, Take the outcome as H.
4) If We get TH, Take the outcome as T.
In this way , We can get H and T with equal probability.