Discussion in 'Computer Science & Culture' started by Greg Bernhardt, Mar 20, 2002.
Why is it that computers can't create truely random numbers? What are it's limiting factors?
Log in or Sign up to hide all adverts.
The garbage values arent random numbers?
The rand() thing in C runs off the seconds since Epoch. Every time it occurs, it runs off a different value. And when does it occur? When we users make it happen. So we are mixing time since Epoch with our own arbitrary decisions. That's not bad for random stuff.
Computers are deterministic devices. They take in input, process it, and generate output. With no truely random input, a computer can only generate pseudo-random numbers.
I think GIGO principle can explain this out perhaps.the inputs determine the output...
This means that if we gave some Garbage input,we"ll get Garbage output.but i dont get you James R over Pseudo Random outputs.?
Just as James said, the random number generator doesn't produce true random numbers. What it does is it generates a very long sequence of numbers that seem to be random, but will repeat itself eventually. The start state is given by the seed value.
The start state is given by the seed value and arbitrary user input. And tell my why a repeating number can not bt random? If you have every number there is to choose from, and the one chosen is 0.33333...., what is it about that number which makes it intrinsically not random?
It is not random because if you know the state of the generator and how it works you can guess the next number. True random numbers are impossible to predict by definition.
Is the arbitrary human input which begins the process not random? How do you predict that?
Humans are very bad at choosing random numbers. For example, if I ask you to choose a random number between 1 and 100, you will, on average and without instruction, choose the number 1 far less often than a true random number generator would have.
i was thinking about this also... if the generation of a number is not related to its use, is it random?
It's not a matter of a human choosing a random number. The process involving the seed is triggered by analogue human events, such as the user sitting down and clicking the mouse. The user does not actively choose a random number, they just do things. Generaly they don't even consider the numbers at all.
Frequently it is a matter of a programmer choosing a method to get a seed number. Debugging an algorithmic procedure is easier if the same result is guaranteed each time. In operation the programmer may use the system clock to provide a seed. As Adam points out the user is often unaware of the seed. Some statistical applications allow the user to set the seed so that the same “random” sequence may be applied multiple times.
What does it mean to generate a sequence of random numbers? Consider the numbers between zero and one. If that interval is divided into equal subintervals the probability of each number lying in each subinterval should be equal. In the limit, the random numbers should be uniformly distributed between zero and one. Starting with a different seed should generate a new sequence with no relationship to the first sequence.
In a sense even such sequences aren’t random. The numbers will be represented by a finite length binary fraction so only a small subset of all numbers may be represented. The algorithm itself may be limited to generating only rational numbers or only algebraic numbers. (Imagine a person trying to use a random number generator to compare the frequency of rational numbers to irrational numbers. Hehe.)
This hamster has read of analog systems used to generate very “good” random number sequences. One used the time interval between water drops falling from a dripping faucet.
(What a great job! Random comment generator.)
In an industrial setting, I have used gas wellhead pressure value and changes in time interval for threshold spikes to calculate the random number. It is similar to using weather patterns at a given moment in time - which in a cosmic sense may not be true random but for us mere mortals is difficult to guess even with a super computer.
Check out http://www.howstuffworks.com/question697.htm
I have successfully created a function that can generate RANDOM numbers from 1 to 32767...
i can go to more count...
I think it actuall does, there is actually 2 types of random, there is pseudo random and real random.
Real Random :
There is an entropy pool which the OS keeps and when a keyboard is used and a key is pressed or the mouse is clicked or anyting at all is done it adds to the entropy pool and from this a number can be generated which i think is truelly random, i think they only use this for things like encryption where true randomness is required but i do think this is truely random becuase i mean there is no formula for how the user is going to use the computer.
sorry guys, don't agree with anyone here except jamesR
Computer would never be able to generate random numbers as every generated sequence will be reproducible at will.
before putting the flame on me , let me explain: a list will be generated by an algorithm which will always produce for a fixed input the same output. So knowing the method and the input gives you the whole sequence.
Hey but what if the input is 'random'? ie. garbage value from memory, human input, ping time between two pc's on the web (that's my pseudo random generator idea).... the problem is that the way you read the input is determined=>reproducible. Still, if you save the input, your sequence will be reproducible at will.
We can take as a definition for a truly random generator any method that if run twice in the same context will produce different output.
yet can we say the same thing for launching a coin for example ? if we know very precisely the way the coin was launched we would know/predict the side ?
No because the number of input parameter tends to be infinite and infinetely small... here comes heinsenberg incertitude thorem, you will never be able to know the input precisely, whereas any (non quantic)computer devices will run on a finite number of parameter, that can be known entirely.
If we run two instances of your method simultaneously (taking processing time in account/ with a parallel comp)on a given pc it will still produce the same sequence
What if we use a geiger counter and a radioactive element ?
Still if n computers uses the same counter/element, all of them will be able to know exactly what number the others generated
So it can't be used to generate critical numbers (for crypto) as anyone that can access the geiger will have the generated sequence. Moreover it is a very bad method as most of the time it is simpler to hack the link (to monitor it) between the counter and the pc than to read directly into a pc memory (for a garbage input method)
Still anyone who access/monitor the pc will be able to reproduce the number.... i agree it is <B>VERY</B> hard and nearly impossible (with a good secured comp) but possible and reproducible.
Are you saying the exact moment of arbitrary user input is exactly reproducable? (NOTE: The OS's seed number -seconds since epoch, I believe - is constantly changing, and never repeats.)
it is not immediatly reproducible by just looking at what the user do with human sense etc...
but the state of a given comp at a given time can be stored as a finite/rationnal number (take a memory dump for example) that's the input, whereas the state of a random system is not rationnal...consider the pi number or e, even if it hasn't been proved (and hardly can) they have an infinite number of decimal who doesn't form any predictable sequence so they can be considered as the state of a pure random system
Ok, if you know that i use Pi for my random generator state, you will be able to hack me by knowing on which decimal i stop... but by stopping at a given decimal i make Pi a rationnal number, not a real one. So the limit come from the fact that comp can't handle infinite number, whereas nature doest seem to have that limitation (considering that numbers exists in nature ~ ie that our physics model are truth, and not just representation)
I totally agree that knowing the state of a comp system can be somehow very hard to achieve, but it is still possible, whereas knowing the state of a natural event is impossible.
It is the treatment (passing from real numbers to rationnal one) that kills the randomness of anything
Separate names with a comma.