Pseudo-Random Number Generators
So how would a computer determine a choice from a set of numbers with equal probability? It can't be commanded to do so. It must be programmed to do so. There's no roulette wheel inside. How would you program it?
Undoubtedly, the pseudo-random number routines have grown in sophistication since I was studying them about 27 years ago. Such a routine is a simple algorithm (algebraic formula) that first takes a seed number (X) as the independent variable and calculates the value of the dependent variable (Y), which becomes the first generated pseudo-random number. The formula could be something like Y = (131X + 101) MOD 256, with X from 0 to 255. Then that number (Y) is made the new independent variable (X) that is run through the same formula to determine the value of another dependent variable (Y) that becomes the second generated pseudo-random number. This process continues in similar fashion.
I learned this using a simple generator that produced pseudo-random numbers from 0 to 255. The resulting pattern looked random, but it repeated itself after every 256 numbers. It's actually a deterministic process that appears random, hence the term pseudo-random number.
Practical pseudo-random number routines would have to go through a huge number of repetitions before the pattern repeats itself. The trick is to understand the context in which the routines are applied to determine if they are appropriate. When I write card-dealing routines, I have to qualms about using a pseudo-random number routine that generates results with 17-decimal-digit accuracy. It would take a zillion years for the pattern of dealt cards to repeat.
.....i seem to remember that no generator we use is truly random...although i don't quite see why not....
If a program is set so that 0-9 each can be chosen with prob 0.1, and then that program is iterated n times to create an n long number....why is that not random?
So how would a computer determine a choice from a set of numbers with equal probability? It can't be commanded to do so. It must be programmed to do so. There's no roulette wheel inside. How would you program it?
Undoubtedly, the pseudo-random number routines have grown in sophistication since I was studying them about 27 years ago. Such a routine is a simple algorithm (algebraic formula) that first takes a seed number (X) as the independent variable and calculates the value of the dependent variable (Y), which becomes the first generated pseudo-random number. The formula could be something like Y = (131X + 101) MOD 256, with X from 0 to 255. Then that number (Y) is made the new independent variable (X) that is run through the same formula to determine the value of another dependent variable (Y) that becomes the second generated pseudo-random number. This process continues in similar fashion.
I learned this using a simple generator that produced pseudo-random numbers from 0 to 255. The resulting pattern looked random, but it repeated itself after every 256 numbers. It's actually a deterministic process that appears random, hence the term pseudo-random number.
Practical pseudo-random number routines would have to go through a huge number of repetitions before the pattern repeats itself. The trick is to understand the context in which the routines are applied to determine if they are appropriate. When I write card-dealing routines, I have to qualms about using a pseudo-random number routine that generates results with 17-decimal-digit accuracy. It would take a zillion years for the pattern of dealt cards to repeat.

Last edited:
