Hacker News new | ask | show | jobs
by tpxl 1599 days ago
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.
1 comments

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.