views:

211

answers:

5

Hello all,

This question may not be language specific.

  • Is it possible to create a true random number ?
  • If not why random number generation has to go through some algorithm, why garbage values cannot act as random numbers.
+15  A: 
Mehrdad Afshari
However, it could be used as an input for the seed at certain timespans. Like, seed every x minutes wiuth some garbage.
Dykam
+1 for the use of Dilbert to clarify a point...
Smalltown2000
He changed colour. :O
brownstone
Our world is not 100% predictable due uncertainty principle. You may measure something to predict its future behavior, but during that measurement you change that thing a little, so its future not precisely predictable after measurement.
actual
actual: I didn't claim world is predictable. I said "I don't have an answer for this case." As far as I know, there is a claim that the uncertainty in the quantum phenomena can be a result of a "cause" that we don't know of. We just see the effect and consider it random.
Mehrdad Afshari
@actual: That is not a problem. We want to predict what's actually going to happen, not predict what would have happened if you wouldn't have tried to predicted what will happen.
Guffa
@Guffa: We don't have data on hands to do that. In some sense, measurements required for precise prediction are always one step behind the things.
actual
+1  A: 

Garbage values are unpredicted, and you can't make any assumptions on them.

If you want a true random number, your algorithm would have to involve some "real-world" variables (e.g, the CPU temperature, fan speed, environmental noise..). Otherwise, your "random" values, would be very predictable.

+1  A: 

There is no known "true" random number generator (as of now), but we do have pseudo random number generators, which generate number which can act as random numbers for "practical" purposes.

Mahesh Velaga
You can't do it in software, but sampling thermal noise, or nuclear decay is random. So we have true hardware random number generators.
Douglas Leeder
There are certainly other sources of random numbers than pseudo random numbers. For cryptography you need random numbers that are not pseudo random. An interesting example of random numbers can be found at http://www.lavarnd.org/.
Martin Liversage
"Some physical phenomena, such as thermal noise in Zener diodes appear to be truly random and can be used as the basis for hardware random number generators. However, many mechanical phenomena feature asymmetries and systematic biases that make their outcomes not truly random."<br/>I was looking at the practically implementable things .. :)
Mahesh Velaga
Thanks for the link Martin, I was in security field, In my college I did my honors in security lab. In cryptography we use pseudo random generators which generate strings(which are practically indistinguishable from random string) from a seed. Correct me if I am wrong :)
Mahesh Velaga
+3  A: 

By "garbage values" I presume you mean uninitialized memory. You're not going to get good distribution, and more importantly you're going to get a lot of sequences of repeated values. Getting thousands of the same number in a row would be pretty useless for most applications that require random numbers.

For a number to be a "true random number", it would have to be non-deterministic. And since pretty much everything is (probably) deterministic, there really is no such thing as a random number. Mixing of atmospheric noise is probably the closest you can get at this point.

Gerald
+1  A: 

Computers are deterministic and can only generate pseudorandom numbers, unless they rely on some external stochastic process.

A pseudorandom number generator forms a sequence, which sooner or later is going to repeat.

Of course, very long sequences may be practically indistinguishable from 'truly random' numbers.

A 'garbage value' might be used to seed a random number generator, but then the question would be 'what range of values are being used for a seed?

It may introduce predictability, since we know some pseudorandom number generators produce the same sequence when seeded identically.

pavium