https://www.pexels.com/photo/photo-of-two-red-dices-965879/ on pexels.com

Why true randomness is fundamentally impossible on a computer. plus bonus lava lamps!

By 80sVectors | AnythingComputer(); | 28 Dec 2021


28e663da4c12f339659b68d51a3d7e6834cf97cee7134ca98a8f73f29819763c.jpg

"What even is true randomness?"

You might be asking. Well for that we have to look at how a computer works fundamentally.

As you probably know computers work with ones and zeros. And the problem with those ones and zeros is that what happens to them is predictable.  Which means that you cannot have anything truly random happen. BUT, there is an alternative. how else would there be 'randomness' on a computer? The alternative is pseudo random numbers. Pseudo random numbers aren't truly random but they behave as such. A pseudo random number is derived from a seed. This seed can be the current time or any other changing value. It has to be changing because if you were to use the same seed the same number would come out!

"Okay, but are there any drawbacks/alternatives to this?"

Well yes. The drawback's are mostly with cryptography. Random numbers are used a lot in cryptography.

And if these numbers would be predictable that would be a huge problem.That's why cloud flare is using 100 lava lamps to generate random encryption keys.

Cloudflare Lava Lamp Wall

Each frame taken from a camera pointed at the lava lamps is always slightly different even just the tiniest flicker can help make it truly random.

Great video by Tom Scott explaining this in more detail:

Other local programs however use the time between key presses or any other thing that is truly unpredictable.

In summary

Al tough computers can't generate truly random numbers all by them self's. With a little help from outside sources truly random number are still possible.

How do you rate this article?

9


80sVectors
80sVectors

I'm a 16 year old Coding Enthusiast and a huge nerd for all things computer science, biology, chemistry, physics etc.


AnythingComputer();
AnythingComputer();

This blog is about anything computer related whether it's procedural generation or fluid simulation.

Publish0x

Send a $0.01 microtip in crypto to the author, and earn yourself as you read!

20% to author / 80% to me.
We pay the tips from our rewards pool.