4

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?

Joan Venge
  • 1,950
  • 2
  • 18
  • 24
  • 4
    I think this question in its current form is a better fit for other sites (perhaps sceptics or physics?). – Andy Hunt Apr 15 '13 at 23:57
  • 4
    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
  • 3
    I once paid for a million random numbers but had to return them because they weren't really random. – psr Apr 16 '13 at 00:09
  • Thanks I didn't realize this was a much bigger topic. What should I be looking up to find more info about this and related topics? Deterministic vs non-deterministic universe? Not sure about the exact keywords. – Joan Venge Apr 16 '13 at 00:17
  • 1
    @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 00:38
  • 3
    Is randomness deterministic: http://physics.stackexchange.com/questions/2377/is-randomness-deterministic – psr Apr 16 '13 at 00:43
  • possible duplicate of [How to create a random generator](http://programmers.stackexchange.com/questions/179798/how-to-create-a-random-generator) –  Apr 16 '13 at 00:49
  • No. Disclaimer: this answer was randomly generated –  Apr 16 '13 at 09:55
  • Even though the question was closed I'd like to add the following link in a comment: http://spectrum.ieee.org/computing/hardware/behind-intels-new-randomnumber-generator/0 – Thomas Apr 16 '13 at 11:58

4 Answers4

12

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. https://physics.stackexchange.com/questions/317/why-cant-the-outcome-of-a-qm-measurement-be-calculated-a-priori

Martin Beckett
  • 15,776
  • 3
  • 42
  • 69
6

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.

Southpaw Hare
  • 1,106
  • 2
  • 10
  • 23
  • 2
    According to accepted models, radioactive decay does not have a deterministic cause. – Rein Henrichs Apr 16 '13 at 01:25
  • As the comment above suggests, the current models does not model radioactivity as a deterministic cause. Which means that using such a model you can create truly random numbers. – meyumer Apr 16 '13 at 01:34
  • 1
    @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 01:52
  • @deceze Science doesn't decide how the universe works and then come up with explanations for observed phenomena that fit. Radioactive decay remains a strong counterexample to the deterministic universe hypothesis. – Rein Henrichs Apr 16 '13 at 01:56
  • 1
    @Rein So you're basically saying the universe is *not* deterministic? – deceze Apr 16 '13 at 01:57
  • It is not important whether the **true** radioactive decay is deterministic or random, the important thing in the context of random number generation is the model used for the generation. And, as far as radioactive decay models go, they are trying to model a true random process. – meyumer Apr 16 '13 at 01:57
  • 5
    @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 02:01
  • 1
    @Rein Fair enough. Which still leaves the possibility of our models simply not being sophisticated enough yet to see the determinism in what we call today non-deterministic systems, right? :P – deceze Apr 16 '13 at 02:03
  • @deceze If you insist on putting the cart before the horse then I suppose you could pick that cart if you like. – Rein Henrichs Apr 16 '13 at 02:04
  • @Rein Don't get me wrong, I'm happy with a non-deterministic universe. Just saying it's not conclusively proven one way or another yet, and probably never will be. :) – deceze Apr 16 '13 at 02:06
  • 1
    @deceze Of course, for sufficiently large values of conclusive, *nothing* is conclusively proven. – Rein Henrichs Apr 16 '13 at 02:07
  • @ReinHenrichs Yes, I agree that my answer is simple, recursive, and begs its own question. However, that was the point - to give an answer that is simple and practical while admitting it cannot solve it to the level that you desire. I feel that there is still some value in such an answer. – Southpaw Hare Apr 16 '13 at 02:11
  • @SouthpawHare The correct simple answer based on our current understanding of the universe is "yes, there is such a thing as truly random". – Rein Henrichs Apr 16 '13 at 02:12
  • 1
    @ReinHenrichs Based on my understanding, that is debatable. I have provided a relevant related link to help the OP to start their research into the deep topic, and come to their own conclusion on that, which is too weighed to reasonably answer here on Stack Exchange. – Southpaw Hare Apr 16 '13 at 02:17
  • 1
    @ReinHenrichs: How do we test the things that we think are truly random using the scientific method? Is this possible? Also how do we determine that they are truly random? Just wondering. – Joan Venge Apr 16 '13 at 02:20
  • 1
    -1: Inability to put Question into Context. This is Programmers.stackexchnage, not sceptics or physics...... – mattnz Apr 16 '13 at 02:52
  • 2
    @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 03:04
  • this is the correct answer. there is no such thing as random. it is just our theories knowledge is not enough to understand – Furkan Gözükara Mar 01 '17 at 11:49
6

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.

5

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.

  • 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 01:08
  • 2
    The [Wikipedia article on the Heisenberg Uncertainty Principle](http://en.wikipedia.org/wiki/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 01:12
  • Thanks, that's pretty interesting. But isn't there a smaller thing you can hit the electron with? Or something that goes though? I thought neutrino is smaller than electron, but I am don't have a strong physics knowledge like you so this comment might be stupid :) – Joan Venge Apr 16 '13 at 01:22
  • 1
    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](http://scienceworld.wolfram.com/physics/h-Bar.html), 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 01:31
  • 1
    @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 01:38
  • 1
    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 01:57
  • @Zim-Zam - Not quite true - Star Trek has the Heisenberg Compensator – mattnz Apr 16 '13 at 02:55
  • @Zim Unfortunately your explanation of uncertainty is completely wrong, even though it’s commonly taught in physics. The fact that your measurement by necessity influences the particle has nothing to do with uncertainty; uncertainty is an *inherent* property of quantum physics. The point about measurement equipment is just an illustration of this principle, but it’s in fact wrong. The Wikipedia article actually addresses this in the second paragraph. – Konrad Rudolph Apr 16 '13 at 08:54
  • @deceze you *have* to have an interaction to have an observation because that is what an observation *is* – jk. Apr 16 '13 at 08:55
  • @deceze No. You (and Zim) are confusing the uncertainty principle with the observer effect. They are in fact unrelated. Uncertainty is not an emergent property, it’s fundamental. It will never go away. – Konrad Rudolph Apr 16 '13 at 08:57
  • @KonradRudolph indeed this is the observer effect, thouugh to be fair it does seem even Heisenberg conflated the two – jk. Apr 16 '13 at 08:57
  • @jk. Yes he did indeed. – Konrad Rudolph Apr 16 '13 at 08:59
  • @Konrad OK. I have never gotten around to really getting my head around the observer principle then. What is it about *passively* observing something that changes the observed? I'm not really expecting you to answer this here, as it's quite off topic and maybe the space here doesn't suffice either. :) – deceze Apr 16 '13 at 09:01
  • @jk. If I look out the window, and light bounces off a tree and hits my eye and I'm thereby observing the tree, what about that makes me interact with the tree in a way that changes the tree? – deceze Apr 16 '13 at 09:05
  • @deceze Like I said, they are simply unrelated, uncertainty is just an inherent property of quantum systems. There really is no logical explanation or metaphor to capture that accurately since we don’t have any such effect in macroscopic systems. That’s why all these explanations fall down with quantum physics. Quantum uncertainty just *is*. The uncertainty derived from measurement errors is relative to that error, and to the precision of our instruments. Heisenberg’s uncertainty is an *absolute* value that doesn’t change, and can be mathematically derived. – Konrad Rudolph Apr 16 '13 at 12:57