# Unbiased Coin Puzzle

Unbiased coin puzzle

A little variation to the Biased coin puzzle.

You and your rival are competing for the same girl, and decide to settle it with a coin toss. Your rival has known the girl longer than you have, so you agree that it is fair for him to have a chance of winning equal to P, where P > 0.5. However, you only have a fair coin.

How can you conduct this contest such that the biased probability is manifested? What is the average number of coin flips needed to determine a winner?

### 4 Responses

1. Manoj says:

This comment has been removed by a blog administrator.

2. Shwetank says:

This comment has been removed by the author.

3. Shwetank says:

Let p be rounded off to 2 places of decimal(assumed).
Throw the coin ceil(log(100) base2) times, i.e. 7 times.
(7 coz, its nearer to 100, so p can very well get converted to a 2-digit number)

Each outcome is equiprobable, hence let any p’ * 128 of outcomes belong to opponent and rest belong to u.
Throw the coin 7 times, and accumulate the result. If at the end, result belongs to the set of opponent, he wins, else you win.

e.g.
p=0.6, p’ =128*0.6=76.8~77,
So, let first 77 outcomes (0-76) belong to opponent and 77-127 to u. Let H be 1 and T be 0. I
f coin throw results in HTTHTTH (last throw being the MSB) = 1001001 = 64+8+1 = 73

As 73 belongs to the range of opponent, he wins.

4. bharat says:

or we can toss the coin for some 10 times (say) . .if my rival gets it more than p fractions time he wins, if he gets less than P times, I win 🙂
{"ft_lang_label":"__label__en","ft_lang_prob":0.9345962,"math_prob":0.91673625,"size":1445,"snap":"2020-34-2020-40","text_gpt3_token_len":400,"char_repetition_ratio":0.102706455,"word_repetition_ratio":0.014285714,"special_character_ratio":0.2885813,"punctuation_ratio":0.13017751,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9867804,"pos_list":[0,1,2,3,4,5,6,7,8],"im_url_duplicate_count":[null,null,null,null,null,null,null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-09-22T17:13:19Z\",\"WARC-Record-ID\":\"<urn:uuid:9f321903-1890-443b-8381-aa38a1c79a71>\",\"Content-Length\":\"91330\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:93abb2c4-a810-4ac5-a774-196bd0f3c687>\",\"WARC-Concurrent-To\":\"<urn:uuid:6e29ffcd-f1bc-4d36-bac3-7a082b87f1d9>\",\"WARC-IP-Address\":\"192.0.78.183\",\"WARC-Target-URI\":\"https://thinkwitty.com/2008/06/unbiased-coin-puzzle.html\",\"WARC-Payload-Digest\":\"sha1:O7QWJOO5GMDPXJ2FJ6UOXGUAFIQCNIJF\",\"WARC-Block-Digest\":\"sha1:DZ7FB36YXTXYBBHSTEANJ5OOWL5CELYM\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-40/CC-MAIN-2020-40_segments_1600400206329.28_warc_CC-MAIN-20200922161302-20200922191302-00676.warc.gz\"}"}