How does a computer program generate random numbers? Example: when you ask Siri to give you a random number between 1 to 10, how does it come up with that number?

772 viewsMathematicsOther

How does a computer program generate random numbers? Example: when you ask Siri to give you a random number between 1 to 10, how does it come up with that number?

In: Mathematics

18 Answers

Anonymous 0 Comments

The most basic forms of random number generator basically cycle one number into the next and next and next in a manner that is very hard to predict.

Essentially, they’re actually cycling very very very big numbers, but only ever show you a small portion of it. You don’t know enough of the big big number to figure out the next one.

But that means if you start at 0, you always get the same number sequence. So computers use something a little unpredictable to start off. The most basic form is to use the exact time, which is very hard to synchronize.

More complex random number generators may incorporate more unpredictable things so that a user couldn’t guess what’s going to pop out. These could be things like disk latencies, network traffic metrics, background radiation levels, or even specific devices that measure radioactive decay.

You are viewing 1 out of 18 answers, click here to view all answers.