Hacker News new | ask | show | jobs
by joebubna 3139 days ago
To prove a random number is truly random you would have to prove the random number generator that gave it to you is truly random.

If the output was plotted (from the minimum possible output to the maximum) and run a sufficient number of times, I would expect the chart of the output to have a very good distribution, and not have any serious hotspots.

To prove this, my solution would probably go something like: Probability of number N being output = 1 / MaxPossibleNumber

Then I would run a test a sufficient number of times (depends on what MaxPossibleNumber is) such that as the amount of numbers generated approaches infinity, the percentage of times any particular number is output approaches 1/MaxNumber.

The harder part would be making sure sequences of numbers don't repeat. In addition to looking at the total distribution, I think I would also want to log the order in which the numbers were generated and then run an algorithm that looks for sequence repeats.

I am NOT familiar with how random number generators work, so this is a naive solution off the top of my head and could be completely wrong, but w/e.