[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/sci/ - Science & Math


View post   

File: 91 KB, 900x281, Logo-3-inches.png [View same] [iqdb] [saucenao] [google]
9574766 No.9574766 [Reply] [Original]

Explain randomness to me. Why is it impossible(is it?) for a computer to generate a truly random number? Why is math.Random() for example not actually random?

>> No.9574771

>>9574766
because nothing is ultimately random. What we think off as random is just an outcome involving variables that we have no way to quantify. This generally means what we consider truly random involves some kind of phyical device.

>> No.9574774

Because computers are deterministic. If you have a trillion completely identical computers and have them all generate a "random" number under completely identical computers, you will get the same number for all of them.

math.random() and the like are just very chaotic and give numbers that appear to be random but are generated by a set formula.

>> No.9574790

>>9574766
It follows from the idea of causality. Can anything happen with no purpose at all?

>> No.9574794

think about what 'random' means
then answers to your questions follow immediately

>> No.9575019

>>9574766
Computers are deterministic. Every step follows a rule for transforming the previous step. Because there are only a finite number of states, the random sequences simply loop.

When "genuine" random is needed, you use an analog input. Say, final digit(s) of
The number of atoms which decayed in the last millisecond
Thermal shot noise in an amplifier
Number of picoseconds since midnight at the instant they user pressed the "rnd" key.

>> No.9575043

Well, it pretty much depends on one's definition for randomness.

You could generate random numbers with a computer by extracting sets of decimal digits from some irrational number such as pi. This would require one to believe that the irrational number in question is "random" by itself.

>> No.9575047
File: 143 KB, 600x600, Thinking_Face_Emoji_grande.png [View same] [iqdb] [saucenao] [google]
9575047

>>9574774
>>9575019
Will quantum computers be able to generate true random numbers on its own?

>> No.9575061

>>9574766
because that calls a function/ algorithm.
computers cannot just select a random number "arbitrarily"
they must be told how to do it

honestly there are randomly generated numbers.

however I think since humans or rather brains are really pattern recognition machines. I don't think we would even recognize anything random.
or if we did we would try to place some sort of meaning to it.

>> No.9575117

>>9574766
>Why is it impossible(is it?) for a computer to generate a truly random number
This meme comes from viewing computers as Turing machines. TMs get exactly one input (when they are started) and produce deterministic output based on that. Indeed, a TM with a certain input always produces the same output.
Actual computers are slightly different in the sense that they can have other I/O, making it possible to just sample a random process, such as fission of radioactive elements.

While sampling a random process once for each desired random number is possible, it's only done for really sensitive systems. Normal applications just give you random numbers using a function [math]f[/math] with few patterns and initial time [math]t[/math], producing "random enough" numbers [math]f(t),f(f(t)),f(f(f(t))),\dots[/math].

>> No.9576580

>>9574766
>impossible for a computer to generate a truly random number?
its not impossible. recording atmospheric noise gives plenty of randomness

>> No.9576581

>>9574771
Yes, there are systems that have inherent true randomness in them.

>> No.9576583

>>9575047
Yes

>> No.9576586

>>9574766
>Why is it impossible for a computer to generate a truly random number?
this is not a very well-formed question

What do you count as "a computer"? I mean, you can definitely have hardware random number generation.

>> No.9576587

>>9574766
It's effectively random for our purposes -- That is, without perceivable bias. By using noise that humans can't navigate, it reduces human bias, so having a computer roll a die between two people or flip a coin is fair for human-centric purposes.

More precisely, that system interface remains encrypted for the purposes we use it for, and is thus functionally random.

>> No.9576605

>>9576580
Atmospheric noise is not random

>> No.9576611

>>9574774
They would also have to be in an identical condition, i.e. some programs utilise outside noise for example