# Is it inherently impossible to generate truly random numbers using computers?

**URL:** <https://boards.straightdope.com/t/is-it-inherently-impossible-to-generate-truly-random-numbers-using-computers/482420>\
**Category:** Factual Questions\
**Created:** [January 22, 2009, 6:26am UTC](https://boards.straightdope.com/t/is-it-inherently-impossible-to-generate-truly-random-numbers-using-computers/482420 "2009-01-22T06:26:06Z")\
**Posts on this page:** 13\
**Page:** 2

<div class="post-metadata">

**Author:** ![Henrichek](https://avatars.discourse-cdn.com/v4/letter/h/5daacb/32.png) [@Henrichek](https://boards.straightdope.com/u/Henrichek)\
**Post date:** [January 23, 2009, 2:04am UTC](https://boards.straightdope.com/t/is-it-inherently-impossible-to-generate-truly-random-numbers-using-computers/482420/21 "2009-01-23T02:04:10Z")

</div>

> [@Napier](#):
>
> Derleth, how are the pauses between successive events distributed? They, too, can’t have a Gaussian distribution, verified by noting they, too, can’t be negative. What are the requirements for a transform to turn random numbers having one distribution into random numbers having another one, without spoiling the randomness in any sense?

I used this for a simulation to get normally distributed random values from uniformly distributed ones:

> **[Normal distribution](https://en.wikipedia.org/wiki/Gaussian_distribution#Generating_values_for_normal_random_variables)**
>
> I
>           
>         
> (
> μ
> ,
> σ
> )
> =
>         
>           
> (
>             
>               
>                 
> 1
>                   
> /
>                   
>                   
> σ
>                     
> 2
>                     
>                   
>                 
>                 
> 0
>                 
> ...

I think that if your inputs are truly random the outputs will be too, as it inverts the CDF.

---

<div class="post-metadata">

**Author:** ![erislover](https://avatars.discourse-cdn.com/v4/letter/e/71e660/32.png) [@erislover](https://boards.straightdope.com/u/erislover)\
**Post date:** [January 23, 2009, 2:44am UTC](https://boards.straightdope.com/t/is-it-inherently-impossible-to-generate-truly-random-numbers-using-computers/482420/22 "2009-01-23T02:44:10Z")

</div>

> [@Napier](#):
>
> Bonus question: how many years before somebody figures out there is actually something nonrandom about radioactivity events and their timing?

Mildly OT but there was a paper I found within the last year that postulated some phenomena was correlated to changing nuclear decay rates. The phenomena? [Evidence for Correlations Between Nuclear Decay Rates and Earth-Sun Distance](http://arxiv.org/abs/0808.3283v1). I’m not saying it predicts them, but hey, better recalibrate your geiger counter-based RNGs…

---

<div class="post-metadata">

**Author:** ![Bolt\_the\_Nut](https://avatars.discourse-cdn.com/v4/letter/b/22d042/32.png) [@Bolt\_the\_Nut](https://boards.straightdope.com/u/Bolt_the_Nut)\
**Post date:** [January 23, 2009, 5:10am UTC](https://boards.straightdope.com/t/is-it-inherently-impossible-to-generate-truly-random-numbers-using-computers/482420/23 "2009-01-23T05:10:06Z")

</div>

> [@ch4rl3s](#):
>
> On the macro scale, we can come close to robot-tosses-coin-same-way-every-time-gets-same-result, but on the quantum scale? Not a chance.
> 
> [http://en.wikipedia.org/wiki/Bell’s\_Theorem](http://en.wikipedia.org/wiki/Bell's_Theorem)  
> quote:“No physical theory of local hidden variables can ever reproduce all of the predictions of quantum mechanics.”

Not to insult the work of some extremely talented physicists, but claiming “randomness” always struck me as an awfully convenient solution to a very difficult problem. Then again, I am posting on a message board and not publishing in the Journal of Physics G… 😉

---

<div class="post-metadata">

**Author:** ![Walton\_Firm](https://avatars.discourse-cdn.com/v4/letter/w/45deac/32.png) [@Walton\_Firm](https://boards.straightdope.com/u/Walton_Firm)\
**Post date:** [January 23, 2009, 6:19am UTC](https://boards.straightdope.com/t/is-it-inherently-impossible-to-generate-truly-random-numbers-using-computers/482420/24 "2009-01-23T06:19:15Z")

</div>

> [@Cagey\_Drifter](#):
>
> Nothing intelligent to add, but I remember reading this link a while back, which I found somewhat shocking.
> 
> [Pseudo-Random vs. True Random - Bo Allen](http://www.boallen.com/random-numbers.html)

Yep, that’s a particularly horrid example of the point I made in my cryptography post: it is not safe to assume that the default RNG which came with your programming environment is any good. Although in this case, as explained [here](http://cod.ifies.com/2008/05/php-rand01-on-windows-openssl-rand-on.html), the problem is not strictly with the RNG itself as with the horribly flawed way in which PHP scales the RNG’s output to a desired range.

---

<div class="post-metadata">

**Author:** ![Quercus](https://avatars.discourse-cdn.com/v4/letter/q/7ab992/32.png) [@Quercus](https://boards.straightdope.com/u/Quercus)\
**Post date:** [January 23, 2009, 3:16pm UTC](https://boards.straightdope.com/t/is-it-inherently-impossible-to-generate-truly-random-numbers-using-computers/482420/25 "2009-01-23T15:16:03Z")

</div>

> [@Bolt\_the\_Nut](#):
>
> Not to insult the work of some extremely talented physicists, but claiming “randomness” always struck me as an awfully convenient solution to a very difficult problem. Then again, I am posting on a message board and not publishing in the Journal of Physics G… 😉

Actually, most physicists find ‘randomness’ to be kind of a horrifying or depressing solution to a problem. A physicist wants to know ‘why’, and ‘because it’s random’ is saying ‘you’ll never know why’. So most physicists would admit that something is truly random only very reluctantly.  
Einstein, for example, hated that quantum theory ended up with ‘random’ elements, and found it difficult to accept, saying “God does not play dice”.

---

<div class="post-metadata">

**Author:** ![billfish678](https://avatars.discourse-cdn.com/v4/letter/b/7bcc69/32.png) [@billfish678](https://boards.straightdope.com/u/billfish678)\
**Post date:** [January 23, 2009, 3:20pm UTC](https://boards.straightdope.com/t/is-it-inherently-impossible-to-generate-truly-random-numbers-using-computers/482420/26 "2009-01-23T15:20:02Z")

</div>

> [@Quercus](#):
>
> Actually, most physicists find ‘randomness’ to be kind of a horrifying or depressing solution to a problem. A physicist wants to know ‘why’, and ‘because it’s random’ is saying ‘you’ll never know why’. So most physicists would admit that something is truly random only very reluctantly.  
> Einstein, for example, hated that quantum theory ended up with ‘random’ elements, and found it difficult to accept, saying “God does not play dice”.

This is gonna sound stupid, so here I go!

There are different kinds of infinities (whouda thunk it?)

Any theories for different kinds of randomness?

---

<div class="post-metadata">

**Author:** ![ftg](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/ftg/32/2801_2.png) [@ftg](https://boards.straightdope.com/u/ftg)\
**Post date:** [January 23, 2009, 5:23pm UTC](https://boards.straightdope.com/t/is-it-inherently-impossible-to-generate-truly-random-numbers-using-computers/482420/27 "2009-01-23T17:23:48Z")

</div>

> [@billfish678](#):
>
> Any theories for different kinds of randomness?

Actually, “random” has a lot of different meanings to different people. It can be a fairly low standard for some Stat types (a sequence passes all the tests applied to it), medium for some Computer Science types (can’t compute the next digit based on previous digits) and quite high for some Math types (no concept of computable at all). Variations abound.

---

<div class="post-metadata">

**Author:** ![billfish678](https://avatars.discourse-cdn.com/v4/letter/b/7bcc69/32.png) [@billfish678](https://boards.straightdope.com/u/billfish678)\
**Post date:** [January 23, 2009, 5:28pm UTC](https://boards.straightdope.com/t/is-it-inherently-impossible-to-generate-truly-random-numbers-using-computers/482420/28 "2009-01-23T17:28:38Z")

</div>

> [@ftg](#):
>
> Actually, “random” has a lot of different meanings to different people. It can be a fairly low standard for some Stat types (a sequence passes all the tests applied to it), medium for some Computer Science types (can’t compute the next digit based on previous digits) and quite high for some Math types (no concept of computable at all). Variations abound.

Understandable.

But do the long haired math types have any distinction. Or is there some wild so far unaccepted theory that randomness does not exist?

---

<div class="post-metadata">

**Author:** ![erislover](https://avatars.discourse-cdn.com/v4/letter/e/71e660/32.png) [@erislover](https://boards.straightdope.com/u/erislover)\
**Post date:** [January 23, 2009, 6:46pm UTC](https://boards.straightdope.com/t/is-it-inherently-impossible-to-generate-truly-random-numbers-using-computers/482420/29 "2009-01-23T18:46:54Z")

</div>

If you ask [Gregory Chaitin](http://en.wikipedia.org/wiki/Chaitin), he’d say most real numbers are random. A mildly persuasive and (very) mildly technical argument is given in his book Meta Math!: The Quest for Omega. (Omega is [algorithmically random](http://en.wikipedia.org/wiki/Algorithmic_randomness).)

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [January 23, 2009, 6:47pm UTC](https://boards.straightdope.com/t/is-it-inherently-impossible-to-generate-truly-random-numbers-using-computers/482420/30 "2009-01-23T18:47:09Z")

</div>

> [@](#):
>
> Bonus question: how many years before somebody figures out there is actually something nonrandom about radioactivity events and their timing?

Either “never”, or a negative number. Given what we know of quantum mechanics, for radioactive decay to be predictable, it would have to be governed by nonlocal nonhidden variables of some sort, and we’d have to have a way to observe those variables. Being able to observe nonlocal variables would require technology which could also be used to build a time machine. Which, of course, renders questions like “How many years” somewhat tangled.

---

<div class="post-metadata">

**Author:** ![Indistinguishable](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@Indistinguishable](https://boards.straightdope.com/u/Indistinguishable)\
**Post date:** [January 23, 2009, 7:12pm UTC](https://boards.straightdope.com/t/is-it-inherently-impossible-to-generate-truly-random-numbers-using-computers/482420/31 "2009-01-23T19:12:37Z")

</div>

> [@erislover](#):
>
> If you ask [Gregory Chaitin](http://en.wikipedia.org/wiki/Chaitin), he’d say most real numbers are random. A mildly persuasive and (very) mildly technical argument is given in his book Meta Math!: The Quest for Omega. (Omega is [algorithmically random](http://en.wikipedia.org/wiki/Algorithmic_randomness).)

Though there is the niggle that Omega is a relative notion; just which number “Omega” is depends on the programming language (or other language for specifying numbers) you’re talking about…

Then again, this is to be expected; “random” is just as relative a notion as well.

---

<div class="post-metadata">

**Author:** ![erislover](https://avatars.discourse-cdn.com/v4/letter/e/71e660/32.png) [@erislover](https://boards.straightdope.com/u/erislover)\
**Post date:** [January 23, 2009, 7:21pm UTC](https://boards.straightdope.com/t/is-it-inherently-impossible-to-generate-truly-random-numbers-using-computers/482420/32 "2009-01-23T19:21:04Z")

</div>

> [@Indistinguishable](#):
>
> Though there is the niggle that Omega is a relative notion; just which number “Omega” is depends on the programming language (or other language for specifying numbers) you’re talking about…

Weird fact: while you are correct, it is always the first random number larger than the smallest uninteresting number.

---

<div class="post-metadata">

**Author:** ![billfish678](https://avatars.discourse-cdn.com/v4/letter/b/7bcc69/32.png) [@billfish678](https://boards.straightdope.com/u/billfish678)\
**Post date:** [January 23, 2009, 9:37pm UTC](https://boards.straightdope.com/t/is-it-inherently-impossible-to-generate-truly-random-numbers-using-computers/482420/33 "2009-01-23T21:37:40Z")

</div>

> [@erislover](#):
>
> Weird fact: while you are correct, it is always the first random number larger than the smallest uninteresting number.

Hell, I’ve found it already then. Multiple times even!

I’ve had a few classes where my test grades meet that criteria!

[Previous page](https://boards.straightdope.com/t/is-it-inherently-impossible-to-generate-truly-random-numbers-using-computers/482420.md?page=1)
