TIL that a computer cannot generate truly random numbers. While the pattern of computer-generated “random” numbers can be sufficiently complex and difficult to identify, these numbers are created by a carefully defined and consistently repeated algorithm; hence, “pseudo-random” numbers are produced.

Read more: https://engineering.mit.edu/engage/ask-an-engineer/can-a-computer-generate-a-truly-random-number/

What do you think?

12 Points
Upvote Downvote


Leave a Reply
  1. Bonus fact: computers can produce truly random numbers by observing the world around them.

    One really simple way (albeit somewhat inconvenient) to do this is by setting up a bunch of lava lamps and using a photo of them as the seed for your random number generator. Alternatively, the quantum state of a radio signal can be read after having passed through the atmosphere, making it as chaotically random as weather itself.

  2. Nitpick (because one needs to be nitpicky when talking about computers, and the linked article is over 10 years old, which is an eternity in that field): a computer can most definitely generate truly random numbers. This is commonly done by using thermal noise in the CPU as a source of entropy, e.g. [https://en.wikipedia.org/wiki/RDRAND](https://en.wikipedia.org/wiki/RDRAND)

    The pseudo random number generators you are referring to are indeed predictable in their most basic form, but modern implementations will feed additional entropy into those generators to make them unpredictable again, even on older hardware lacking a true random noise source. Such entropy might be obtained from things like network traffic or mouse movements.

  3. A cpu, without external sensors, can’t produce true randomness.

    A computer can though, because computers usually have ways to measure real world data in subtle ways, and those can be used to produce true randomness.

    .. I’m leaving aside the whole free will vs determinism vs true randomness debate here.

  4. “random” numbers might be generated with dates and times. One example i can give is this. A computer is tasked with generating a random number. So it takes the digit at the top of the hour and multiplies it by the amount of time the computer has been powered on in seconds. Then it divides it by the the digit of the month (12 for december, 3 for March, etc). The result is your random number. If you only asked for a 2 digit number (10,20,30,etc) and the generated number is longer, it will slice off the remaining digits at the front or the back depending if the date is even or odd. While very hard to guess as the parameters for generating are changing every second, it is theoretically possible to find the exact number that will be generated. You would need to know the order things were executed and the exact time the number was requested to do so in this case, so it’s incredibly unlikely you’ll be able to figure it out and thus appears random to the end user.

  5. Is it? As a programmer myself I could create an algorythm that could give a random number in response.

    Can anyone educate me? Is it not easy?

Leave a Reply