• 沒有找到結果。

Corollary 2. Consider two second-order MRGs

5. Empirical study

above integer quadratic programming problem is precisely the spectral value of kth-order MRG . So that the spectral values of the sequences generated by two

kth-order MRGs and are identical. †

Zn

Xn Zn

5. Empirical study

Applying Propositions 2 and 3, this section adopts empirical analysis to find the maximum spectral value in full period kth-order MRGs with modulus ,

for each order

)

8(k

S 231−1

=2

k , 3, …, 7. The problem of identifying the optimal vectors of multipliers is among the combinatorial optimization problems, because this problem

has astronomical figures of possible vectors of multipliers, lacks rich structure, and has multiple local optima. As a result, a practical approach to overcome the computational burden is to restrict both the number of nonzero multipliers and the range of multipliers. Among all variants of the kth-order MRGs, the most efficient one is a two-term MRG, proposed by L’Ecuyer et al. [9], defined as

) (mod m X

a X a

Xnj nj + k nk for n>k,

where . On the other hand, two types of restriction on multipliers in the

literature. One is the so-called the approximate factoring (AF) method. Define k

j<

≤ 1

m aj

q= / and rm(modaj), namely, m=ajq+r, 0<r<aj. Tang [13] showed

that the most effective and efficient restriction on producing the multipliers for AF

method in applications is q

r≤ . (17)

The other restriction on multipliers is

252

) 1 (m− <

aj (18)

for the double precision implementation on computers whose hardware supports ANSI/IEEE standard 754-1985, with a sign bit, 11 exponent bits, and 52 mantissa bits.

In the literature, L’Ecuyer [8] considered the problem of multipliers satisfying restriction (18) in a LCG with both the objective of maximizing , , or

, and the largest prime modulus m smaller than the computer’s word size )

1

8(

S S16(1)

) 1 (

S 2 .w

L’Ecuyer performed an exhaustive search for w≤26, and an random search for 28, …, 63, 64, 127, 128. For a two-term kth-order MRG with multipliers

satisfying AF restriction (17), Tang [15] conducted an exhaustive search for some good vectors of multipliers with respect to the criterion for each order

3, …, 7.

,

=27 w

)

8(k

S k=2,

To study the influence of restrictions (17) and (18) on spectral value , we

adopt two basic approaches: theoretical analysis and empirical analysis to understanding their performance. For a theoretical analysis, we analyze the number of possible legal multipliers for a two-term kth-order MRG. For a two-term kth-order MRG, the number of possible multipliers is

)

8(k S

⎣ ⎦

)2

)(

1 (

16 km for multipliers satisfying AF restriction (17), and is 4(k1)(

252(m1)

)2 for multipliers satisfying double precision restriction (18). Let m0 =17179869184 or 17179869185. The

numbers of possible multiplies of two restrictions (17) and (18) are equal if modulus . Moreover, the double precision restriction (18) has larger number of possible multipliers for 0

m0

m=

m

m< , and the AF restriction (17) >m0. For the popular

prime mo 31−1 as an example, there are 3435832960 and 17592186044416 legal multiplies for restrictions (17) and (18), respectively.

Therefore, the double precision restriction (18) places less restriction on multiplies for

a two-term MRG with .

for m

dulus m=2 0(k−1)

) 1 (k

1 231

= m

From an empirical perspective, we perform an exhaustive analysis for the full period two-term kth-order MRGs with multiplies satisfying restriction (18), for each order , 3, …, 7. The sole criterion is the best value of obtained by an

exhaustive search of each two-term kth-order MRG on vectors of multipliers satisfying restriction (18). For purposes of comparison, we also measure the value of the relative error (RE), which is the deviation from the theoretical upper bound , and is expressed as

=2

bounds on spectral value are 0.15749, 0.05195, 0.02422, 0.01392, and 0.00903 for 4, 5, 6, and 7, respectively. For the sake of completeness, the

rough upper bound of spectral value 1.0 is adopted for the second-order MRG. All runs are conducted using 2.8 GHz Pentium 4 PC and running the Microsoft Windows XP operating system. Each algorithm is implemented in C++, and compiled using the Microsoft Visual C++ compiler.

1

From Propositions 2 and 3, we can recognize that the spectral values of sequences produced by a kth-order MRG with vector of multipliers ,

, , and

are equal. Therefore, three fourths of the vectors of

multipliers is reduced. For each order

) Table 1 reports the results of an exhaustive search for the maximum S8(k) among all

vectors of multipliers that satisfy the restriction (18). Table 2 is the RE comparisons.

The fourth column of Table 2 is the RE values for the two-term kth-order MRG with multipliers satisfying AF restriction (17) found from an exhaustive search. These values are the best RE previously published, conducted by Tang [15]. The salient feature is that the RE values of two-term kth-order MRGs with multipliers satisfying (18) yield better results than their counterpart in which a AF restriction (17) is adopted for orders , 3, 4. This strong relative performance is primarily due to the larger range of multipliers for the restriction (18). However, for orders , 6, 7, two restrictions (17) and (18) provide equally good performance. Therefore, an exhaustive search for the maximum spectral value of full period two-term MRGs with multipliers satisfying restriction (18) is a good way of designing ideal MRGs.

=2 k

=5 k

(Insert Tables 1 and 2 about here.) 6. Conclusion

We construct an associated kth-order MRG satisfying linear relationship (4) for reducing the possible vectors of multipliers for a kth-order MRG with the objective of maximizing the spectral value. In this paper, we first establish a linear relationship between a MRG and its reverse one. Consequently, a MRG and its reverse satisfy a special linear relationship (4) with coefficient (7). Propositions 2 and 3 show that these two MRGs satisfying generalized linear relationship (4) possess the same

periods and spectral values. With these equivalence properties, we also perform an exhaustive search on computers with double precision floating point implementation for full period two-term kth-order MRG with multipliers satisfying restriction (18) for each order 3, …, 7. These two-term MRGs not only have the best spectral

values found so far but also can be a fast implementation in double precision floating point arithmetic on computers whose hardware supports ANSI/IEEE standard 754-1985.

,

=2 k

References

[1] R.R. Coveyou, R.D. MacPherson, Fourier analysis of uniform random number generators, Journal of the ACM 14(1967)100-119.

[2] L.Y. Deng, H.Q. Xu, A system of high-dimensional, efficient, long-cycle and portable uniform random number generators, ACM Transactions on Modeling and Computer Simulation 13(2003)299-399.

[3] G.S. Fishman, Multiplicative congruential random number generators with modulus 2β: an exhaustive analysis for β =32 and a partial analysis for

=48

β , Mathematics of Computation 54(1990)331-344.

[4] G.S. Fishman, Monte carlo: concepts, algorithms, and applications, Springer Series in Operations Research, Springer-Verlag, New York, 1996.

[5] J.E. Gentle, Random number generation and Monte Carlo methods, Second

Edition, Springer-Verlag, 2003.

[6] D.E. Knuth, The art of computer programming vol. 2: semi-numerical algorithms, Third edition, Addison-Wesley, Reading MA, 1997.

[7] A.M. Law, W.D. Kelton, Simulation modeling and analysis, Third edition, McGraw-Hill, New York, 2000.

[8] P. L'Ecuyer, Tables of linear congruential generators of different sizes and good lattice structure, Mathematics of Computation 68(1999)249-260.

[9] P. L'Ecuyer, F. Blouin, R. Couture, A search for good multiple recursive random number generators, ACM Transactions on Modeling and Computer Simulation 3(1993)87-98.

[10] B.L. Nelson, Stochastic simulation research in management science, Management Science 50(2004)855-868.

[11] H. Niederreiter, Random number generation and quasi-monte carlo methods, SIAM CBMS-NSF Regional Conference Series in Applied Mathematics, vol. 63, SIAM, Philadelphia, 1992.

[12] H.C. Tang, Symmetry property of multiple recursive random number generator in full period and spectral test, Applied Mathematics and Computation 142(2003) 291-303.

[13] H.C. Tang, Effective and efficient restriction on producing the multipliers for the

multiple recursive random number generator, Computers & Mathematics with Applications 47(2004)1309-1315.

[14] H.C. Tang, Reverse multiple recursive random number generators, European Journal of Operational Research 164(2005)402-405.

[15] H.C. Tang, An exhaustive analysis of two-term multiple recursive random number generators with efficient multipliers, Journal of Computational and Applied Mathematics, 2005, to appear.

Table 1

Some good two-term kth-order MRGs with and multipliers satisfying (18) found from an exhaustive search for each order

1 231

= m

,

=2

k 3, …, 7.

k Vector of multipliers Spectral value 2 (702847, 2072610)

(2146780800, 2072610)

0.81065

3 (1866770, 0, 50201) (0, 2145616877, 50201) (2145616877, 0, 50201) (0, 50201, 2145616877)

0.15740

4 (0, 0, 1866770, 2147433446) (0, 0, 2145616877, 2147433446) (50201, 0, 0, 1866770)

(2147433446, 0, 0, 1866770)

0.05192

5 (0,0,1873894,0,47661) (2145609753,0,0,0,47661)

0.02402

6 (2145641895,0,0,0,0,2147298583) (1841752,0,0,0,0,2147298583)

0.01379

7 (2145662203,0,0,0,0,0,339254) 0.00895

Table 2

The RE values for the two-term kth-order MRGs of this study and Tang [15].

k Upper bound

RE found by this study

RE found by Tang [15]

2 1 18.9350% 22.4560%

3 0.15749 0.0571% 0.7874%

4 0.05195 0.0577% 0.7892%

5 0.02422 0.8258% 0.8258%

6 0.01392 0.9339% 0.9339%

7 0.00903 0.8859% 0.8859%

An exhaustive analysis of linear congruential random number

相關文件