Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I saw a video about random numbers and how the programmer in that video was talking about computers generating pseudo random numbers and that they are not really random. I knew about this.

Then he showed the decay of a radioactive material to generate random numbers where he claimed to be truly random. Is there really such a thing? I mean the process of the radioactive material shooting electrons might seem random but is it? Isn't it just a mysterious black box to us simply because we don't know how it really works?

Or does randomness just depend on the current level of scientific knowledge?

If so, then how come quantum computers are often quoted to be capable of generating truly random numbers? Can they really do this?

share|improve this question

closed as off topic by Robert Harvey, psr, MichaelT, JeffO, Rein Henrichs Apr 16 '13 at 2:14

Questions on Programmers Stack Exchange are expected to relate to software development within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

I think this question in its current form is a better fit for other sites (perhaps sceptics or physics?). –  AndyBursh Apr 15 '13 at 23:57
This is more of a philosophical question than an objectively answerable one. Someone who truly believes in randomness will say radioactive decay is random, whereas someone who truly believes in determinism will say that it's based on processes that we don't understand yet. All we know for sure is that, based on our current understanding, it appears to be probabilistic and not deterministic. –  Mason Wheeler Apr 15 '13 at 23:57
I once paid for a million random numbers but had to return them because they weren't really random. –  psr Apr 16 '13 at 0:09
@psr - next time have the supplier sort them first, so you know how many of each you are getting. –  Martin Beckett Apr 16 '13 at 0:38
Is randomness deterministic: physics.stackexchange.com/questions/2377/… –  psr Apr 16 '13 at 0:43

4 Answers 4

All our current theories of Quantum Mechanics suggest that those quantum properties that are random - are truly random.

Some practical applications are the time between decays of atoms in a sample of a radioisotope or thermal noise in a resistor. These are fundementally random.

However you have to be a little careful with actual implimentations of these hardware effects, it's very easy to have a quantization of some timing circuit, or bias in an ADC which reduces the actual randomness.

There are a number of questions on physics.so eg. http://physics.stackexchange.com/questions/317/why-cant-the-outcome-of-a-qm-measurement-be-calculated-a-priori

share|improve this answer

There are random events.

Events such as the decay of radioactive material (hotbits) cannot be predicted. It is random. In the hotbits situation, the random bits are generated by comparing decay events. If the time of the first two events is less than the time of the next two events it is a 0 - if the second pair is shorter than the first pair, it is a 1, and if they are the same, it is thrown out.

These bits are 'expensive' in that there is not a lot of bits out there. Most people use this as a seed to a pseudo random number generator. If the seed is random it becomes very difficult to identify the sequence (most people seed random from the time or the process id or the combination...)

There are random sequences (known sequences, but the order of the values is random).

This was largely examined in Can you use Pi as a crude random number generator. The question if the number is normal plays a role (though not all normal numbers have apparently random next digits).

There are chaotic events, that while not random are extremely difficult to predict.

Lavarand uses a set of lava lamps to seed a random number generator, much the same as the radioactive decay does. Look at patent 5,732,138 for more on this.

share|improve this answer

On the macroscopic (i.e. non-quantum) level, things that we think of as "random" are in fact "chaotic." This means that minute perturbations can have non-minute effects on the outcome. For example, you could in theory accurately predict the outcome of a fair coin toss or a fair die toss, but this would take a ridiculous amount of calculation and a slight shift in the air currents would throw all of your calculations off. But the fact remains that in theory you could predict these outcomes, and so the processes aren't truly random.

As Southpaw Hare brought up, quantum effects are truly random, at least by our current reckoning in physics. An electron does not exist in any one place at any one time, instead the electron exists in a probabilistic cloud - at the quantum level, particles exist as both particles and waves. The Heisenberg Uncertainty Principle says that attempts to narrow down the location of an electron are doomed to failure; when you measure the electron's location then you affect its velocity (so the more accurately you know the electron's current position, the less accurately you know its subsequent position). I believe that random number generators based on radioactive decay are tapping into quantum uncertainty and are therefore truly random, but it's been a decade since I took a physics course and so radioactive decay may instead be a chaotic process.

share|improve this answer
Thanks. But why does measuring the electron's location affects its velocity? Is it because of the method used for measuring? What if there was a method that didn't do this? Also I am not sure what this would be used but if we could do this, then does it mean radioactive decay is not random, or is it a more revealing piece of data? –  Joan Venge Apr 16 '13 at 1:08
The Wikipedia article on the Heisenberg Uncertainty Principle will explain it better than I can, but I'll give it a shot. Essentially, to measure the location of an electron you need to hit it with a photon, which will affect its velocity; measuring its velocity will similarly affect its location. This is a theoretical limit to the accuracy of our measurements, not a practical side-effect to our equipment - by our current reckoning in physics, NO piece of equipment can ever eliminate this inaccuracy. –  Zim-Zam O'Pootertoot Apr 16 '13 at 1:12
Neutrinos actually carry a small amount of mass, so they would have a greater impact on an electron than a massless photon. But no, there is no way to completely eliminate our error in measurement - at best, our error in measuring the position multiplied by our error in measuring the velocity cannot be lower than 1/2 * h-bar, which is a small enough error that it doesn't impact our macroscopic measurements, but at the quantum scale this error is significant. –  Zim-Zam O'Pootertoot Apr 16 '13 at 1:31
@Zim This is totally off-topic for this site, but I have always wondered... :) With our current understanding and techniques, we cannot help but influence the electron while trying to measure it. But if there was a completely passive way to accurately observe electrons, which we may discover sometime in the future, possibly by discovering some new fundamental force of the universe, wouldn't that obliterate the Uncertainty Principle? –  deceze Apr 16 '13 at 1:38
Yes, but in that case all bets are off. This is sort of like saying that in the future we may discover that it's possible to travel faster than the speed of light, which would similarly turn physics on its head. –  Zim-Zam O'Pootertoot Apr 16 '13 at 1:57

The short answer is no. By a definition of the word random in this context, it means that, in terms of cause and effect, an effect must occur without any cause. In a deterministic universe, this is impossible.

At least, until you get into quantum theory.

I am not capable of explaining quantum theory to you, but know that it is a lens by which we do not ordinarily look at our world through. Anything we typically use the word "random" to talk about in normal speech is not truly random - it is simply unpredictable beyond our limited perceptions. However, were our knowledge or perception greater, we could find the cause of the effect, as there is one.

This may be a good starting point for further research.

share|improve this answer
According to accepted models, radioactive decay does not have a deterministic cause. –  Rein Henrichs Apr 16 '13 at 1:25
@Rein Doesn't this just mean that our current models are simply not sophisticated enough or that we are lacking some understanding that prevents us from seeing the deterministic causes in radioactive decay? If we believe that our universe is deterministic, radioactive decay should be a part of that, shouldn't it? –  deceze Apr 16 '13 at 1:52
@Rein So you're basically saying the universe is not deterministic? –  deceze Apr 16 '13 at 1:57
@deceze Yes, that's basically what I'm saying. I honestly don't understand why this answer is getting upvoted. It doesn't say anything more than "There is no randomness except for where there is randomness" and that from this it somehow follows that there is no randomness. –  Rein Henrichs Apr 16 '13 at 2:01
@mattnz The correct context you speak of is EXACTLY the context I put this in. I answered it without delving into physics or theoretical argument, and instead gave a practical answer relevant to the average computer lay-man. –  Southpaw Hare Apr 16 '13 at 3:04

Not the answer you're looking for? Browse other questions tagged or ask your own question.