• 沒有找到結果。

Some 64-bit random number generators

One straightforward way to construct a 64-bit generator is to consider a 64-bit LCG by choosing a prime modulus p = 263−c or p = 264−c and a appropriate multiplier B to achieve a maximum period length of p − 1. For example, L’Ecuyer [1993] found some good parameters for 64-bit LCGs using the spectral test and Beyer ratios as selection criteria:

1. B = 2307085864, p = 263− 25,

2. B = 13891176665706064842, p = 264− 59.

It is well-known that LCGs have poor high dimension lattice structure. Marsaglia [1968]

was the first to point out that successive t-tuple in the output sequence by an LCG with the modulus m lies in a simple lattice structure which will fall on at most (t!m)1/t hyperplanes.

In addition, Hormann [1994] suggested that it is not recommended to use LCG as generate random numbers by the ratio of uniforms method, proposed by Kinderman and Monahan [1997].

For more discussion, see Gentle [2003].

To the best of our knowledge, there are only few other 64-bit random number generators proposed in the literature. Nishimura [2000] proposed a 64-bit generator which is an extension of 32-bit MT19937. Several new parameters are also listed. The period length is still 219937−1 ≈

106001, but the dimension of equi-distribution property is decreased from 623 (for 32-bit) to 311 (for 64-bit).

L’Ecuyer [1997] proposed a popular generator for 64-bit CPUs, called M RG63k3a, by comb-ing the followcomb-ing two generators:

In this thesis, we perform a computer search for 64-bit or 128-bit MRGs and we then compare these large order efficient MRGs with previously proposed 64-bit random number generators.

In chapter 2, we discuss some key issues for the search of large order MRGs. In particular, we describe the efficient algorithm proposed by Deng [2004] to avoid two search bottlenecks in the classical search algorithm. In chapter 3, we then describe a series of efficient and portable Multiple Recursive Generators (MRGs) proposed recently by Deng and his co-authors. We then describe some criteria of selecting these MRGs. In chapter 4, we extend the computer search of Multiple Recursive Generators (MRGs) from 32-bit generators to 64-bit and 128-bit generators and we tabulate them in several tables. In chapter 5, we utilize TestU01 packages to evaluate the empirical performance of these generators found. We also compare them with other 64-bit generators proposed in the literature. The empirical test results show that our generators are great choices for 64-bit and 128-bit CPUs. In chapter 6, we discuss the issue of performing parallel simulation using these newly found MRGs as the backbone generators. In particular, we first describe some automatic generation method (mostly for 32-bit generators) proposed in Deng and Xu [2003], Deng, Li and Shiau [2009] and Deng, Shiau, and Tsai [2009]. We then perform a similar steps for the parallel simulation for 64-bit or 128-bit CPUs. In chapter 7, we introduce our web program which can provide the required parameters or the associated program codes for our generators. Interested users can obtain the desired generator in C language directly by downloading the codes produced from our web program. In addition, they can implement the MRGs found in different programming by getting the required parameters provided in our

2 Computer Search of MRGs of Large Order

As mentioned earlier, the MRG for the corresponding primitive characteristic k-th degree poly-nomial will achieve the maximum period of pk− 1. As the order k becomes larger and larger, the work of computer checking of k-th degree primitive polynomial becomes harder and harder.

Next, we describe the efficient algorithm proposed by Deng [2004] for checking k-th degree primitive polynomial.

2.1 Efficient Search Algorithm for Large Order MRGs

A set of necessary and sufficient conditions under which f (x) in (3) is a primitive polynomial has been given in Alanen and Knuth [1964] and Knuth [1998]:

AK(i) (−1)k−1αk must be a primitive root mod p.

AK(ii) xR= (−1)k−1αk mod (f (x), p), where R = (pk− 1)/(p − 1).

AK(iii) For each prime factor q of R, the degree of xR/q mod (f (x), p) is positive.

However, it is difficult to check the conditions in practice, especially when the values of k and p are large. Alternatively, Deng [2004] proposed an efficient algorithm that bypasses the difficulty of factoring a large number and provided an early exit strategy for a failed search to achieve a better efficiency:

Algorithm GMP Given a prime order k, choose a prime modulus p such that R(k, p) = (pk− 1)/(p − 1) is also a prime number. Let f (x) be as in (3).

(i) αk must be a primitive element mod p. If this condition is met, then go to the next step.

(ii) Initially, let g(x) = x. For i = 1, 2, 3, · · · , bk/2c, do 1. g(x) = g(x)p mod f (x);

2. d(x) = gcd(f (x), g(x) − x);

3. if d(x) 6= 1, then f (x) cannot be a primitive polynomial.

If all the loops in Step (ii) have been passed, then f (x) is a primitive polynomial.

Hence, we choose the smallest prime order k for each interval from 101 up to 2003. For each value of k and d, we find the smallest c for a prime p = 2d− c such that R(k, p) = (pk − 1)/(p − 1) is a probable-prime number. We recommend utilizing the free packages of PFGW (http://www.fermatsearch.org/index.html) to verify the primality of R(k, p). PFGW

provids a quick probable-prime test for large numbers. The probability of making false positive error can be smaller than 10−200 with several independent probabilistic tests. It is much smaller than a computer error or hardware error. Hence, it can be safely accepted as a prime number.

Even if R(k, p) is not a prime, L’Ecuyer [1997] showed that we only have a tiny chance(say, 10−50 or less) of misclassifying a non-primitive polynomial. Hence, throughout this paper, we are following this procedure to find prime modulus p as described here.

In addition, we require that both p and Q ≡ (p − 1)/2 are prime numbers. If this condition is satisfied, such Q is called Sophine-Germain prime number and p is usually called a “safe prime”

in the area of cryptography. But there is no particular strong advantage to choose a “safe prime”

in the area of computer simulation. MRGs with a non-Sophine-Germain prime have a advantage of a larger prime modulus than its counterpart with a Sophine-Germain prime. Hence, it has a slightly longer period length of (pk− 1).

A series of efficient and portable MRGs were proposed by Deng and Xu [2003], Deng [2004]

and Deng [2005]. Particularly, the maximum period length of MRG, proposed in Deng [2005], is approximately 1014903.

Next, we describe the key issues for the computer search of efficient large order MRGs for 64-bit or 128-bit CPUs.

相關文件