Is a random-looking-number generator.
Thing about random numbers is, they don't necessarily look random. Ask a true random-number generator for a 4-digit random number, and 0000 is just as likely as any other.
But 0000 isn't a random-looking number. 3586 is a random-looking number.
So, to generate random-looking decimal numbers... for starters, the first digit can't be zero. It just can't. Or maybe it could be zero, but with a low probability. Then, repeated digits are bad. So:
Start with 10 bins, representing digits 0 through 9. Bin 0 gets maybe a 2% probability, and 1 though 9 get 10.889% each. For each digit in the result, pull a digit out of a bin according to current probabilities, then take some of the probability from that bin and distribute it evenly among the others.
This should result in numbers that look nicely random, despite being considerably less random than really random numbers.
Has someone already done this? I dunno. I haven't done my homework. I'm just being random, or at least random-looking.
Comments