Hacker News new | past | comments | ask | show | jobs | submit login

Good point. I am going off of the original algo by von Neumann, which throws away both flips if you get HH or TT. There are many others, and I don't see any reason against your optimization, if the flips are truly independent.

http://www.fas.harvard.edu/~libcs124/CS/coinflip3.pdf




yeah, indeed -- but i think the optimization is actually broken. if you are just waiting for an HT or a TH in a sequence of flips, then you will just wind up with H..HT or T..TH, so that the very first flip decides the outcome. this is how i first (much too hastily) read the algorithm, but, somewhat surprisingly, found that the expectation matched exactly.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: