 # How ‘good’ are RNG numbers?

Jan 25, 2005 2:24 AM

Our discussions of the last few weeks have led us to the topic of random numbers, and in particular pseudo random numbers. A true random number is produced by a random physical process, such as the toss of dice, the flipping of a coin, the decay of radioactive matter, or any other such process, assuming that the process is unbiased.

A series of such random numbers has the property that the next number in the series cannot be predicted from any of the previous numbers. A study of such a series will reveal that the numbers are fairly evenly distributed across their range and that there will be few duplications of runs of any significant length (although such runs will occur.)

A pseudo random number will meet all of the qualifications above, although since it is produced by steps in a computer program, we can, if we know the program and the initial value used for computation, calculate the next number from the last.

All RNGs (Random Number Generators) in use in keno and lotto games currently are actually (and probably should be called) pseudo random number generators. In theory, if we know the starting value used by the program, and we know all the steps of the program, we can duplicate the entire series of numbers produced by the RNG.

All RNGs also share another characteristic: The series of numbers produced by them is cyclical. In other words, sooner or later the same series of numbers will be produced over and over by any RNG.

"Good" RNGs have a cycle of hundreds of millions of numbers. "Bad" RNGs have very short cycles. Although these principles have been known for almost half a century, there have still been RNGs put in action at keno games that have had cycles of less than a hundred games. This has happened more than once in the last ten years.

All RNG programs must start out with a seed. This is a number which is either arbitrary, or perhaps is taken off of the computer system, such as the date or the time. Imagine the number 36276 is the seed. Robust RNG programs always start with a different seed, while less robust programs start with the same seed.

Here is a simple example of an RNG program:

Get the seed.

36276

Take the logarithm

4.559619393225

Multiply the result by 1000

4559.619393225

Ignore the integer part

0.6193932254

Multiply the result by 100

61.93932254

Take the integer part

61

Make the results of the previous step the new seed

Go back to the top

Now, this program (or algorithm) is not very robust. It probably has a period of less than 100. In other words, it will start repeating its number series after about 100 numbers. (This is just a guess, I could write a real program to test it but that would take more time than I have this week.) It is not robust for two reasons: The seed is always the same upon startup; and there are not enough steps to fully "randomize" the numbers.

The point is, if you are playing keno or lotto at a game where the numbers are produced by a RNG, it doesn’t make any sense at all to play the so-called "cold numbers" because if a RNG has any bias, if it starts repeating numbers, the only sensible strategy is to play the "hot numbers" because they will, over time, start repeating.

Well, that’s it for now. Good luck! I’ll see you in line!