Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Not all computer generated numbers are pseudorandom. If you have a non-deterministic source such as voltage measurements or hard disk sensors you can gather entropy and generate a real random number. Though if the method is reproducible and deterministic is pseudorandom.
Btw, pseudorandom methods may also show statistical randomness. -
muliyul5768yThey are important mostly for software security. PRNGs are based on seed number as part of their formula. That's why they are pseudo random. Think of it as if you have a formula for "random" numbers. It's true you can't tell the next one without the seed but once you have it, it becomes easier. That's why seed numbers are kept a secret.
-
The numbers might seem to be ramdom, but the numbers are predictable. Of you are using the times as seed, hou can predict which numbers are generated at a specific time.
-
Your numbers are for practical purposes random, but the crux is here: they're based off of something that we can (eventually) model-- invocation time.
In the 'wild', most "random" numbers are actually experimentally collected via air current detectors. We take the least significant digits of the air particles' movement and use that for true random data. Maybe one day, if we can get really good and solve a million-body problem, these numbers might not be random.
If I remember correctly, you can prove that this is random enough because the air was first moved (excited) thermally (via light filtering through our atmosphere which is, in the particle level, difficult to predict) and it's had some number of collisions since then, which we can't really predict. While we could maybe guess the main velocity of the stuff, the exact particular speed is unique enough that if works well.
... I think. 😅 -
@starless using the air is on theory also predictable, but as you said, it's to hard to calculate anything like that. I guess that with a quantum mechamical system true randomness could be achieved.
-
@papierbouwer the light-as-a-particle action as sunlight filters through the atmosphere is literally quantum mechanics. 😥
-
port2211058yYou're assuming that a sequence of random numbers picked by a human is truly random when in fact it is not
-
@port22 yup. Humans are terrible at random. We search for patterns, which is what kills randomness
-
crisz81918y@papierbouwer it was what I was looking for. Now I understood, time used as a seed it's not safe, because if something is crypted using random numbers, then someone could guess the exact instant when the data has been encrypted and decrypt it. Well, he should know the exact nanosecond and he would have access to the algorithm, but I can see the lake of security.
Thanks to everyone, I loved your answers
I'll be honest, I've never understood why people say that numbers generated by a computer are pseudorandom and not random.
I know a lot of algorithms for number generation, and I implemented mine, based on time of invokation expressed in nanoseconds, taking digits, manipulating and transforming them. Then I analyzed the probability distribution and it's absolutely flat. So, if you know the Touring test, we can use a modified version of it. If I give you a sequence of random numbers generated by a computer and I give you a sequence of random numbers invented by a person, and you can't notice the difference, so the test is passed.
What's wrong on it?
undefined
existential questions