• 沒有找到結果。

Comparing DX, DL, DS and DT generators

As mentioned, all maximum period MRGs of order k have a nice equi-distribution property up to k dimensions. Namely, every t-tuple (1 ≤ t ≤ k) of integers between 0 and p − 1 appears the same number of times (pk−t) over its entire period pk− 1, with the exception of the all-zero tuple which appears one times less (pk−t− 1). See, for example, Lidl and Niederreiter [1994, Theorem 7.43]. Therefore, DX, DL, DS and DT have the property of equi-distribution over dimensions up to k. In addition, all of the proposed generators are shown to pass some stringent empirical tests. The differences may be shown over the dimension larger than k like the spectral test which measures the minimum distance between two successive parallel hyperplanes over a dimension > k. However, to the best of our knowledge, it is computationally hard to perform such spectral test on a large dimension. Since the equi-distribution property of maximal period MRGs of order k as mentioned earlier is clearly a stronger condition than the spectral test, it is important to find MRGs with large order k.

The main motivation for proposing DX generator is the computing efficiency. It was achieved by setting lot of terms in the recurrence equation (2) to be zero. This leads to a potential program of “escaping from near-zero state”. For example, if k-dimensional state vector is of the form

(0, 0, · · · , 0, 0, v, 0)0, for any integer v, then the DX generator will produce a long sequence of zeros. DL and DS generators were proposed in Deng, Li, Shiau and Tsai [2008] with many non-zero terms with the same coefficients. One advantage is that they can escape quickly from such a near-zero k-dimensional state vector. However, DL and DS generators can stay with near-zero state for a long time (when k is large) with a k-dimensional state vector of the form (0, 0, · · · , 0, −v, v)0, for any integer v.

The DT generators in (16) can escape quickly from near zero state like (0, 0, · · · , 0, 0, v, 0)0 or (0, 0, · · · , 0, −v, v)0. However, with given multiplier B for the DT generator, it could also stay in near-zero states for a long time, when k is large and the state vector is of the form (0, · · · , 0, −v, Bv)0. But this most likely would only happen when one purposely chooses an initial state vector of the above form with the pre-specified multiplier B.

In our opinion, no single generator should be used for every computer simulation. One should try various types of generators like DX, DL, DS and DT generators and with various order k to ensure a consistent simulation result.

4 Tables of Efficient MRGs

With tables of non-Sophine-Germain primes and Sophine-Germain primes given, we can then search for two types of parameters for efficient and portable MRGs with different orders k from 101 to 2003.

Following the notation in Deng, Lu and Chen [2009], we will use DX(d), DL(d), DS(d) and DT(d) to denote the corresponding generators with p = 2d− c for some c. Specifically, for generators for 64-bit CPUs, we consider the prime modulus p = 263− c or p = 264− c. For 128-bit CPUs, we consider the generators with prime modulus p = 2127− c or p = 2128− c.

4.1 63-bit and 64-bit efficient MRGs

For 63-bit efficient and portable MRGs, we first search Sophine-Germain prime modulus. From p = 263− 1 downward, we choose the maximum prime modulus p that satisfies both R(k, p) = (pk− 1)/(p − 1) and (p − 1)/2 are prime numbers where the order k is from 101 to 2003. Once k and p have been selected, we then use the GMP algorithm to find the multipliers, minimum B and B <√

p. For the minimum multiplier B, we search from low bound B = 2 upward. And then we search the multiplier B <√

p from the upper bound B = 231− 1 downward. Latter, we search Non-Sophine-Germain prime modulus. Similar to Sophine-Germain primes, we use the same method to find the multipliers, minimum B and B <√

p. Deng had found the multiplier B <

p of Sophine-Germain primes for DX(63), DX(64), DX(127) and DX(128) from order k=101 up to 1511. We continue to search the multipliers, minimum B and B <√

p, for non-Sophine-Germain primes and non-Sophine-Germain primes from the order k = 101 to 2003 for DL, DS and DT generators. In addition, we also search the multipliers, minimum B and B <√

p, for Sophine-Germain primes from the order k = 1601 to 2003 and for non-Sophine-Germain primes from the order k = 101 to 2003 for DX generators. The period lengths of searched generators ranges from 101915 to 1037987. We list these generators in Table 2-8.

Similarly, for 64-bit efficient and portable MRGs, we first search the maximum Sophine-Germain prime modulus of the form p = 264−c for each prime order k. For each k and p selected, we then search the multipliers, minimum B and B <√

p (more precisely, B < 232 ). Following the same procedure, we search the same parameters p and B for non-Sophine-Germain prime modulus. Finally, We find 320, 80, 80 and 40 generators for DX(64)-k-s, DL(64)-k, DS(64)-k and DT(64)-k respectively. The period lengths ranges from 101946 to 1038590. We list these generators in Table 9-15.

4.2 127-bit and 128-bit efficient MRGs

Like 64-bit generators, we use the same procedure to search for 128-bit generators with prime modulus of the form p = 2127 − c and p = 2128− c. We find 320, 80, 80 and 40 generators for DX(127)-k-s, DL(127)-k, DS(127)-k and DT(127)-k respectively. The period lengths ranges from 103861 to 1076576. We list these generators in Table 16-22. And we find 320, 80, 80 and 40 generators for DX(128)-k-s, DL(128)-k, DS(128)-k and DT(128)-k respectively. The period lengths ranges from 103892 to 1077179. We list these generators in Table 23-29.

Among the generators listed in table 2-29, the shortest period length is close to 101915 and longest period length is close to 1077179. It is worth mentioning that the 128-bit efficient and portable MRGs with order k = 2003 have the longest period length of 1077179 and the property of equi-distribution over their dimensions is up to 2003.

相關文件