English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I have a scientific calculator and i was wondering about the Rand(#) button, if you press it and then keep pressing = then it churns out random numbers between 0.001 and 0.999 these numbers look random enough but i was wondering how does the calculator come up with these random numbers i.e how is it random. This in turn got me thinking, such as how do computer games that have dice, or cards etc choose what dice or cards to give you? How does a computer think "Randomly?"

2006-09-17 02:10:58 · 4 answers · asked by Paul B 1 in Science & Mathematics Mathematics

4 answers

They use algorithms

2006-09-17 06:12:13 · answer #1 · answered by Anonymous · 0 1

A computer generally doesn't "think" "randomly", so you were right to wonder about it. However, a hand-held calculator can easily include a special-purpose "noise" component, running fast enough so that clocking spikes above some threshold could generate a (say) 4-bit random number quicker than you can imagine, and six or eight of them to string together still quicker than it takes for the display to light up with the result.

Computers have to be predictable, and they generate random numbers in a way that is meant to defy sequential prediction, but to allow exact repetition of the sequence when desired. This is important when you are fine-tuning an algorithm and want to re-test it with the same "random" input - you don't want any difference in the random sequence to swamp the tiny difference in your algorithm. There is a HUGE professional literature on this topic. Visit mathworld.wolfram.com for reliable information.

2006-09-17 02:24:49 · answer #2 · answered by bh8153 7 · 0 0

I don't not know the function that your calculator or computer uses to find random numbers. But I know how a couple of random number generators work.

Take a 16 digit number a square it, and then uses the last 16 digits as a new number.

So an example (using only a four digit number) start with ABCD
then you can get another number by taking cd*cd. Often the first number can be given as a seed, or computers will often use internal clocks to find the first number.

2006-09-17 06:08:59 · answer #3 · answered by sparrowhawk 4 · 0 0

Random number generators use ALGORITHM software programs, which can be simple enough to work in calculators much like software programs solve addition and subtraction problems.

2006-09-17 02:21:04 · answer #4 · answered by Teacher Man 6 · 1 0

fedest.com, questions and answers