You are on page 1of 1

Slide 11: For 32-bit computers, L'Ecuyer [1988] suggests combining k = 2 generators with

m1=2,147,483,563, a1 =40,014, m2 = 2,147,483,399 and a2 = 40,692.


Solution:
Select seeds: X1,0 in the range [1, 2,147,483,562] for the 1st generator.
X2,0 in the range [1, 2,147,483,398] for the 2nd generator.
 Set j = 0.
For each individual generator: X1,j+1 = 40,014X1,j mod 2,147,483,563
X2.j+1 = 40,692X1,j mod 2,147,483,399
Set Xj+1 = (X1,j+1 – X2,j+1) mod 2,147,483,562
Return:

X j +1

{
R j +1= 2,147,483,563
2,147,483,562
, X j +1 >0

, X =0
2,147,483,563 j +1

 Set j = j+1.
For each individual generator: X1,j+2 = 40,014X1,j+1 mod 2,147,483,563
X2.j+2 = 40,692X1,j+1 mod 2,147,483,399
Set Xj+2 = (X1,j+2 – X2,j+2) mod 2,147,483,562
Return:

X j +2

{
R j +2= 2,147,483,563
2,147,483,562
, X j+2 >0

, X =0
2,147,483,563 j +2

 Maximum possible period = (m1 - 1)(m2 - 1)/2


= (2,147,483,563 – 1)(2,147,483,399 – 1)/2
= 2x1018

This study source was downloaded by 100000786517590 from CourseHero.com on 03-03-2022 08:24:15 GMT -06:00

https://www.coursehero.com/file/84528278/HW4-Slide-11docx/
Powered by TCPDF (www.tcpdf.org)

You might also like