Early Approaches
An early computer-based PRNG, suggested by John von Neumann in 1946, is known as the middle-square method. The algorithm is as follows: take any number, square it, remove the middle digits of the resulting number as the "random number", then use that number as the seed for the next iteration. For example, squaring the number "1111" yields "1234321", which can be written as "01234321", an 8-digit number being the square of a 4-digit number. This gives "2343" as the "random" number. Repeating this procedure gives "4896" as the next result, and so on. Von Neumann used 10 digit numbers, but the process was the same.
A problem with the "middle square" method is that all sequences eventually repeat themselves, some very quickly, such as "0000". Von Neumann was aware of this, but he found the approach sufficient for his purposes, and was worried that mathematical "fixes" would simply hide errors rather than remove them.
Von Neumann judged hardware random number generators unsuitable, for, if they did not record the output generated, they could not later be tested for errors. If they did record their output, they would exhaust the limited computer memories available then, and so the computer's ability to read and write numbers. If the numbers were written to cards, they would take very much longer to write and read. On the ENIAC computer he was using, the "middle square" method generated numbers at a rate some hundred times faster than reading numbers in from punched cards.
The middle-square method has since been supplanted by more elaborate generators.
Read more about this topic: Pseudorandom Number Generator
Famous quotes containing the words early and/or approaches:
“Here is this vast, savage, howling mother of ours, Nature, lying all around, with such beauty, and such affection for her children, as the leopard; and yet we are so early weaned from her breast to society, to that culture which is exclusively an interaction of man on man,a sort of breeding in and in, which produces at most a merely English nobility, a civilization destined to have a speedy limit.”
—Henry David Thoreau (18171862)
“You should approach Joyces Ulysses as the illiterate Baptist preacher approaches the Old Testament: with faith.”
—William Faulkner (18971962)