All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Probability
Fair Toss (Posted on 2024-07-02) Difficulty: 3 of 5
Suppose you have one fair coin, that is, a coin that comes up heads half the time and tails half the time.

Show how to use this coin to choose fairly among N people. Solutions using the fewest coin tosses are preferred.

No Solution Yet Submitted by K Sengupta    
Rating: 5.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
re: | Comment 4 of 12 |
(In reply to "Inflate and Gamble" algorithm by Larry)

I like the "inflate and gamble" approach, but I think there's some refinement needed. 


Suppose N = 9. Then I can certainly add enough people to get to N = 16.  k = 4 and d = 7, so the expected flips is 4*2^4 / (2^4 - 7) = 64 / 9 ~= 7.1

But suppose instead I flip 6 at a time, creating 64 different possibilities. I assign them in groups of 7 to each person, which uses 63, and I repeat the process if I flipped a "64". 

Now k = 6 and d = 1, and the expected flips is 6*2^6 / (2^6 - 1) =  384/63 ~= 6.1

So flipping more to begin with (6 at a time vs 4 at a time) has actually reduced the expected number of flips.


This approach doesn't always yield an improvement. For N=5, for example, we can flip in 3's and we'll repeat 3/8 of the time, or we can flip in 5's and repeat 1/16 of the time, but that's not a big enough improvement -- the former gives an expected flips of 4.8 vs ~5.3 for the latter.

So while this algorithm absolutely lets you choose fairly among N people,  I don't have a way to compute the minimum expected number of flips, or to compute the optimal number of imaginary friends to add.


  Posted by Paul on 2024-07-02 13:30:21
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (0)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information