Live data from Hacker News

Ask HN: You're in an empty room. How do you generate a random number?

news.ycombinator.com

31–40 of 49 posts

Re: Ask HN: You're in an empty room. How do you generate a random number?

#33
Take off your one undergarment. Use your finger as a pen and your fecal matter as ink. Draw an x-y coordinate plane on the ground. Now throw your undergarment in the air and note which direction the elastic (or top) part is facing. Once again re-ink your pen and note this angle (from 0 to 360 degrees). Do this as many times as you feel will satisfy randomness. Take the sum of the angles and divide by the number of times you did the experiment (theoretically once should be enough).

To expand on the range do this another set of times, except this time take the sum (no average) and use this as the exponent.

Congratulations, you have successfully generated a random number using only your finger, fecal matter, and a little bit of math.

Now sit in this room of solitude until you die or are released from Guantanamo Bay.

Re: Ask HN: You're in an empty room. How do you generate a random number?

#36
Realize that you are in the Sims and some sick bastard user is trying to kill you. Look deeply within yourself and realize that what assigns your next task is partially the rand function.

Use it to generate a number. Try to say it in English and fail because you only speak Simanese.

Re: Ask HN: You're in an empty room. How do you generate a random number?

#38
1. de-thread the undergarment

2. lay out the threads

3. define distances between them to either be "big" or "small". proportion them better so that all the "big" distances are roughly the same size as each other, and do so for the smaller distances as well so there's no confusion as to which is big, and which is small.

4. assign a "1" to the "big" distances, and a "0" to the "small" distances, similar to how a barcode works.

5. you now have a binary number which contains as many bits as there are spaces between the individual threads (quite large!).

you can generate 2^n-1 random numbers in this fashion, where n is the number of threads in the undergarment.

Re: Ask HN: You're in an empty room. How do you generate a random number?

#39
Remove undergarment. Pick at its fabric until a loose thread emerges. Pull the thread out as far as you can.

Then, wrap the thread around your roundest finger or other body part as many times as it will go. It should be possible to tell what quadrant was reached by the end of the thread. E.g., if it ended up closest to the top of your chosen body part, that's 00, the right side is 01, the bottom is 10, and the left side is 11.

That's two bits of reasonably-good entropy per thread. Repeat until your underwear is gone or you have the desired number of digits.

Another idea: spit on the wall and count the number of heartbeats it takes for the spit to run down to the floor.

Post reply on HN