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

A computer starts somewhere. It starts with a bios and a CPU and a motherboard ect... When we code that computer to pump out a random number, what makes it pick the number it picks? Exactly the same computer sits beside it's identical and they both pick different 1st random numbers. Is the Bios fed a seed during construction and every new bios gets a different seed? Those of us that have worked with random numbers know what a seed is. So why does my computer give a number between 100 and 1000 as 756, but yours gives, 537? Is that not a form of intelligence beyond that of artificial? We gave the computer the ability to give random numbers, but what makes it give or pick that random number when in reality it has no 'will' to decide. Why 3 and not 4, when it favours nothing? Even with a seed, what makes it choose 5 with this seed but 7 with that seed? Where in the ruels of life does it say that, with this seed equaling 756395837 in that computer, 1st random # will be this?

2006-07-21 23:48:08 · 5 answers · asked by LipSync 1 in Science & Mathematics Other - Science

5 answers

Anything that needs a seed is NOT a random number generator! It is a pseudo-random number generator that will deliver a totally repeatable and predictable sequence of numbers that appear to be random, by using some mathematical function.

Some computer languages and some math packages have an option for selecting a seed by using a number of variable values that can be read from the hardware. For example, the current time, date, and local Ethernet MAC address can be used to create the seed. If you repeat the operation later, the seed would be different because of the time difference. If you ran the same generator at exactly the same time on two such computers, the seeds would be different because of the different MAC addresses.

If you need a truly random sequence of numbers then you can use a hardware interface to a random physical event. Some devices that have been used measure the time between detections of cosmic rays or the random decay of a radioactive sample. Another is based on the random noise created by a diode junction.

2006-07-22 00:58:19 · answer #1 · answered by pondering_it_all 4 · 4 0

The computers I know have to run a random-number algorithm (program or procedure) to generate "random" numbers. The numbers are actually in a deterministic sequence after the seed value is set. Many of these algorithms initialize themselves to a number that depends on the current time as kept by the computer's clock, or at least have that method as an option if you don't provide a seed. If you are getting different numbers on different machines when using the same seed, I suspect the algorithms are different or else were written to use time-based initialization even when letting you supply a seed, which would be poor programming practice.
One quirk I know about QuickBasic (if you happen to be using it), and possibly for some other programming languages, is that for repeatable output during the second and subsequent executions within a running program, the seed for the RND function must be a negative number supplied as an argument (e.g., x=RND(-5)); repetitions of the RANDOMIZE N statement do not produce repeatable results from RND.
There is one other possibility; that a built-in program uses a physical random noise source and derives numbers from that. But I don't know of any PCs that do that, and anyway such a device wouldn't ask for a seed.

2006-07-22 08:21:18 · answer #2 · answered by kirchwey 7 · 1 1

Most computer random number generators do not generate random numbers per se. There are lots of methods/algorithms used in computers to generate random numbers, but most work by generating a pseudo random sequence of numbers. Usually, these will repeat the same random sequence if started from a particular number. This starting number is the seed. So, in order to give a different number sequence each time as different seed is used. How do we get that randomly? Usually, the clock is interrogated as this will change depending on when the program is run and this will be used to generate a random starting point.

Where truly random numbers are needed, usually some form of electronic device is used e.g. based on the noise from a diode or a noise cell and this is then used electronically to decide the value.

Truly random numbers without patterns are difficult to actually generate in a limited state machine without an external device.

2006-07-22 07:48:39 · answer #3 · answered by Anonymous · 1 1

i would say the answer is very simple. in soft wares like excel or anywhere the computer are given certain mathematical formulae which make it chose a specific random number. so it will be different each time. i have used one for doing my maths coursework, it really is like this. try in excel. type =rand and give a range of cells in the brackets and it will give a random number from the range of cells. it is just a formula. so it is just following the instructions of humans.it cannot think. it is just mathematics which has applications in every field.

2006-07-22 08:08:18 · answer #4 · answered by Anonymous · 1 1

reasoning of plus or minus is set to pick either one so now minus being 1 and plus being two, understand now!

2006-07-22 06:54:23 · answer #5 · answered by sorrells316 6 · 1 1

fedest.com, questions and answers