Middle-square Method

In mathematics, the middle-square method is a method of generating pseudorandom numbers. In practice it is not a good method, since its period is usually very short and it has some crippling weaknesses. The method was first suggested by John Von Neumann in 1946. For example, to generate a sequence of ten-digit pseudorandom numbers, you would create a ten-digit starting value and square it. The middle ten digits of the result would be the next number in the sequence. You would then square that, and so on. Clearly, for a generator of n-digit numbers, the period can be no longer than 10n. If the middle ten digits are all zeroes, the generator then outputs zeroes forever. If the first half of a number in the sequence is zeroes, the subsequent numbers will be decreasing to zero. While these runs of zero are easy to detect, they occur too frequently for this method to be of practical use.

See also

 

<< PreviousWord BrowserNext >>
oktavian kinsky
arrowhead pond
battle droid
kdeadmin
thomas elphinstone hambledon
tawana brawley
corps (disambiguation)
virgin (disambiguation)
glendale arena
kde edutainment project
farley
esther vanhomrigh
clay allison
chuvash language
chartered institute of library and information professionals
xml data binding
beale street
text encoding initiative
mellon arena
tl universit
rainbow coalition
dummy reversal
office depot center
anne kirkbride
coup (bridge)
rbc center
commensurable
dorothy jenner
national guard (france)
carat (purity)
macomb's purchase
allen fieldhouse
circulation (fluid dynamics)
uss bedford (dlg 113)
ken jennings
cameron indoor stadium
john a. volpe
pauley pavilion
sidney s. culbert
kristen french
gra kalwaria
education in denmark
danish pre school education
john paul vann