Linear congruential generator: Difference between revisions

From SklogWiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 1: Line 1:
The Lehmer algorithm can be written as
The Lehmer algorithm can be written as


<math>y_{n+1}\equiv ay_n + b~~~(\mod ~m),</math>
<math>y_{n+1}\equiv ay_n + b~~(\mod m),</math>


where the user chooses <math>a</math>, <math>b</math>, <math>m</math>, and a seed value to initiate
where the user chooses <math>a</math>, <math>b</math>, <math>m</math>, and a seed value to initiate
Line 9: Line 9:
   
   
==References==
==References==
#[ranLehmer51_photocopy]
 
#D. H. Lehmer, "Mathematical methods in large-scale computing units", Proceedings of the 2nd Symposium on Large-Scale Digital Calculating Machinery, vol '''XXVI''' pp. 141-146 The Annals of the Computational Laboratory of Harvard University,  Harvard University Press (1951)

Revision as of 11:40, 23 February 2007

The Lehmer algorithm can be written as

where the user chooses , , , and a seed value to initiate the algorithm, .

See the prime modulus multiplicative linear congruential generator page.

References

  1. D. H. Lehmer, "Mathematical methods in large-scale computing units", Proceedings of the 2nd Symposium on Large-Scale Digital Calculating Machinery, vol XXVI pp. 141-146 The Annals of the Computational Laboratory of Harvard University, Harvard University Press (1951)