Hacker Timesnew | past | comments | ask | show | jobs | submitlogin

You can generally turn any random binary distribution into a uniform binary distribution by generating two bits, then if they're different, output the first bit, and if they're the same, ignore the result.


01 01 01 01 00 01 01 01 11 01

Doesn't seem to work... It depends on odd bits and even bits having the same distribution, which in many cases they won't.


Yes, the draws from the random distribution must be uncorrelated. But the mentioned algorithm does indeed a "flat" output in this case.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

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

Search: