I was trying to solve a hobby problem that required generating a million random numbers. But I quickly realized, it is becoming difficult to make them unique. I picked up Algorithm Design Manual to read about random number generation.It has the following paragraph that I am fully not able to understand.Unfortunately, generating random numbers looks a lot easier than it really is. Indeed, it is fundamentally impossible to produce truly random numbers on any deterministic device. Von Neumann [Neu63] said it best: Anyone who considers arithmetical methods of producing random digits is, of course, in a state of sin. The best we can hope for are pseudo-random numbers, a stream of numbers that appear as if they were generated randomly.Why is it impossible to produce truly random numbers in any deterministic device? What does this sentence mean?
Why is it impossible to produce truly random numbers?
algorithms;language agnostic;random
One should look for a cryptographically secure pseudo-random number generator. Most PRNG are linear congruence generators (so next number is a linear function of previous number), so if you plot next number vs previous number you'll get a chart of parallel lines. A CSPRNG will not do that. The trade-off is that they're slow. I group random number generators into 3 categories: Good enough for homework.  Good enough to bet your company on.  Good enough to bet your country on.  Why is it impossible to produce truly random numbers in any deterministic device ? A deterministic device will always produce the same output when given the same starting conditions and inputs - that is what it means to be deterministic. Truly random number is more of a philosophical viewpoint, as what does it mean to be random is the crux of the philosophical navel gazing (folks aren't even certain if atomic decay is random or follows some pattern we just can't figure out yet). A cryptographically secure random number generator is going to take some external source of entropy to make the device non-deterministic. 