One standard trick that hasn't been mentioned: if you're e.g. looking at the ends of thrown undergarments, or at another random source that's guaranteed to produce uncorrelated output bits but is not guaranteed to produce a 0 with probability exactly 50% (e.g. an unbalanced undergarment), the following algorithm will yield uncorrelated outputs bits that are guaranteed to be 0 with probability exactly 50%:
- generate two bits
- if they are the same, discard both and start over
- if they are 0 1, return 0
- they are 1 0, return 1
Also, once you have generated some entropy using the above method, you can generate a much longer random-looking number using a (pseudo-)random number generator. You could use another of von Neumann's tricks, the middle-square method (http://en.wikipedia.org/wiki/Pseudorandom_number_generator#E...), if you're decent at arithmetic (and hey, any errors can be written off as a deliberate attempt to increase entropy); if you're really paranoid, you may want to try doing RC4, although I recommend smuggling in a pen for that.
That said, are you trying to solve some problem, or..?
- generate two bits
- if they are the same, discard both and start over
- if they are 0 1, return 0
- they are 1 0, return 1
Also, once you have generated some entropy using the above method, you can generate a much longer random-looking number using a (pseudo-)random number generator. You could use another of von Neumann's tricks, the middle-square method (http://en.wikipedia.org/wiki/Pseudorandom_number_generator#E...), if you're decent at arithmetic (and hey, any errors can be written off as a deliberate attempt to increase entropy); if you're really paranoid, you may want to try doing RC4, although I recommend smuggling in a pen for that.
That said, are you trying to solve some problem, or..?