This application claims priority under 35 U.S.C. § 119(a) to Japanese Patent Application No. 2017-044355, filed Feb. 20, 2017, which is incorporated by reference herein in its entirety.
The subject matter disclosed herein related generally to random number generators.
Let S be a sequence of uniform random numbers with good local sequential independence. The present state of arts stipulates that a multiplicative congruential (MC) generator may realize closely such an ideal statistics by methods of selection by powerful spectral tests. However, difficulties remain in that distant random numbers on the sequence S may have uncontrolled, non-negligible correlations. There exist GFSR-type generators, typically Mersenne twister of Matsumoto and Nishimura (1998), which exploit primitive polynomials on finite fields and realize gigantic lengths of periods with the charming “equidistribution property” over their whole periods. However, equidistribution property does not ensure the local goodness of GFSR-type random number sequences and, above all, GFSR sequences lack means to “test” reliably on their local statistical goodness which is to be valid anywhere on their whole length of gigantic periods. The invention presented here is a new methods of spectral tests on the classic MC generators, but which is based on two new recently attained arts. Methods of spectral tests was first noticed of the suggestion for its wide range of possibilities by the work of Fishman and Moore (1986). The methods recently acquired new wider ways of applications and fundamental corrections in methods themselves. The former is the method of generalized 2nd degree tests by Nakazawa and Nakazawa (2014A), which give very stern results with very light computing burden. The latter is a completely new method to use the so-called regular L-simplex criteria for tests of degrees L with 3≤L≤6. These innovations enabled us to proceed over the difficulties recognized in so-called “combined generators” (Wang et al. (2011)) that spectral tests in prior arts could not find any passers and new invented ways of spectral tests give us now excellent MC generators with periods around and over T≈250, as posted in Nakazawa and Nakazawa (2014C); faster computers with larger scale allowing for quadruple precision arithmetic of integers will enable us to go over this magnitude of T. Despite these brilliant attainments of random number sequence with excellent local statistics, however, elements at positions far apart in S may have strong correlations. Please see the example in the behavior of the generalized 2nd degree spectral tests of the most excellent generator noted #3 therein, for results of 2nd degree tests of (d, zk) for 1≤k≤100. The difficulty arises unavoidably with any excellent generators on computers. We now show, however, that there exist ways to evade the difficulty in MC generators. Spoken more explicitly, there are ways to construct geometrical arrays of spatial L-dimensional lattices, on which MC generators are distributed realizing the property that emitted random numbers at a lattice point has excellent time-sequential statistics while random numbers generated at neighboring lattice points have the property of excellent non-correlation with neighbors in directions to geometrical coordinate axes. This invention stands as a generalization of similar structures distributed on a spatial one-dimensional lattices discussed in Nakazawa and Nakazawa (2016 A, B).
Necessary notations of MC random number generators are introduced. An MC generator comprises an integer d for the modulus, an integer z coprime to d as the multiplier and an integer s for the initial value or seed. They are summarized in a symbol (d, z, s), or (d, z) for short if the seed s is not relevant in arguments. The MC generator (d, z, s) generates the sequence of integers S: ={r0, r1, r2, . . . } by recursive congruence relations
r
0
:≡s(mod d), 0<r0<d,
r
j
:≡zr
j−1
≡sz
j−1(mod d), 0<rj<d, j≥1,
and gives the output sequence of uniform and independent random numbers
{vj:=rj/d|j=0,1,2, . . . }.
We regard the consecutive L outputs of integers (rj, rj+1, . . . , rj+L−1) as the coordinates of the point Pj or its position vector in the L-dimensional Euclidean space EL. Points {P0, P1, P2, . . . } are known to be on lattice points of an integer lattice, and this fact was exploited for the valuation of the performance of (d, z) generator, ever since the epoch making work of Fishman and Moore (1986) under the name of spectral tests. We use here the so-called generalized 2nd degree tests of Nakazawa and Nakazawa (2014A), and demand the generator (d, zk) to pass criteria
1<μd(2)(zk)<1.25,k=1,2, . . . ,6.
Here, criteria take consecutive 2-tuples of integer outputs from the MC generator (d, zk) as points on 2-dimensional lattices, considers largest distances {λd(2)(zk)|1≤k≤6} of said lattices between their adjacent parallel lattice lines, and compute
μd(2)(zk):=λd(2)(zk)/{(d/2)1/231/4},k=1,2, . . . ,6.
Likewise, consecutive L-tuples of integer outputs from the generator (d, z) is tested by the L-th degree spectral tests of Nakazawa and Nakazawa (2014B) with the so-named regular L-simplex criterion. This implies that said L-tuple of integers are regarded as point in the L-dimensional space and to form an L-dimensional lattice with its largest distance λd(L)(z) should give the following performance
1<μd(L)(z)<1.25, 3≤L≤6,
μd(L)(z):=λd(L)(z)/{L−1/2(L+1)(L−1)/(2L)d(L−1)/L}.
The premise for the present invention is the existence of an MC random number sequence S with its generator (d, z) fulfilling these two criteria; this is realized in 9 excellent generators posted in Nakazawa and Nakazawa (2014C). The invention aims to distribute such generators with suitable seeds on the geometrical lattice in the L-dimensional space so as to realize excellent non-correlation in time and to geometrical neighbors in the lattice.
We first describe the basic principle to be respected in the use of noted type of excellent MC generator and its output sequences of integers as well as of output random numbers. The first of the principle is that a simulation must use one and only one excellent MC generator and its output sequence. This is based on the technological reality met in finding excellent MC generators with the modulus d comprising 2 coprime factors d=d1d2. Suppose we choose excellent subgenerators (d1, z1) and (d2, z2) by spectral tests. This is a possible and almost exclusive way to evade the notorious computing-time difficulties of spectral tests for large modulus d. Yet, the probability that we obtain an excellent combined generator by Sun Tzu's theorem,
d=d
1
d
2
,z:≡z
k(mod dk),k=1,2,
is extremely small. We should not expect without tests, therefore, that excellent subgenerators (d1, z1) and (d2, z2) will give an excellent combination. Additionally, large scale simulations of today need parallel computing without exception. The above stated circumstances demand us to use a single MC generator with long enough period T, and we should use its random number sequence S without any duplication. The sole possibility is to divide the sequence S into consecutive subsequences. We call such small subsequences as threads, and denote their unanimous length as M. This length M should be the smallest but sufficient number of steps needed in simulations. Our aim is thus how to define the length M and how to distribute MC subgenerators giving length-M threads on a geometrical lattices.
As the simplest and the most useful geometrical structures, we consider the N-dimensional Euclidean space EN and its N-dimensional integer lattice LN in the parallelepiped M1×M2× . . . ×MN,
L
N;={(x1,x2, . . . ,xN)|xk is an integer, 0≤xk≤Mk−1, k=1,2,-,N}.
The aim is to distribute MC random number generators on lattice points of LN, so as for them to work in parallel giving random number threads at each lattice point. Namely, we plant threads of random numbers at every lattice points and let them extend along the 0th axis for the time t. We may also say that the aim is to plant threads forming an (N+1)-dimensional lattice and realize the distribution of random numbers on this (N+1)-dimensional lattice points which have as little correlations as possible to 0th, 1st, 2nd, . . . , Nth neighbors. This may figuratively be said to realize an (N+1)-dimensional white noise on computers. Note that if random numbers on S are ideally uniform and independent, any way of distribution of generated random numbers may be used to the end. However, this is not tenable in reality. Our aim is to seek technologically for the way to imitate the noted ideal distribution within the limited excellence of MC random number generators.
The total number of lattice points LN in the space EN is Ω:=M1M2 . . . MN. We put threads of length M on these lattice points. Hence we need the total number MΩ=MM1M2 . . . MN of random numbers, and the planting of threads requires the period T≥MΩ=MM1M2 . . . MN. We premise hereafter that this restriction on the period T is satisfied. The sole practical way to avoid duplicated use of random numbers is to divide the sequence S of random numbers into Ω consecutive threads {θ0, θ1, . . . , θΩ−1} of a unanimous length M. We regard these threads as (row) vectors along the 0th axis or the t-axis in the (N+1)-dimensional Euclidean space EN+1, and denote them explicitly as follows:
{θk:≡sζk(1,z,z2, . . . ,zM−1)(mod d)|k=0,1,2, . . . ,Ω−1}, ζ:≡zM(mod d).
An arbitrary thread Ok is thus the sequence generated by MC generator (d, z, sζk). We may realize the planting or the distribution of all of these threads on the integer lattice LN by just putting these seeds {sζk|(mod d)|k=0, 1, 2, . . . , Ω−1}. The problem is how to distribute them.
We think on the computer program that will realize the noted distribution, without annoying ourselves with the complexity of high dimensional spaces. In order to cope with the convention of programming that does not admit suffixes, we first prepare notations. We use the classic notation of programming to use capital letters such as
D:=d, Z:=z, S:=s.
We introduce the convention
M1:=M1, M2:=M2, . . . , MN:=MN.
Lattice points of LN cannot help being expressed by variables
I1:=I1,I2:=I2, . . . ,IN:=IN, 0≤IK≤Mk−1, k=1,2, . . . ,N;
in particular, IN−1 cannot be expressed in this way, and please understand that we avoid its use. With these notations the distribution of seeds on the integer lattice LN may be denoted as the ARRAY(I1, I2, . . . , IN). The computing of ARRAY(I1, I2, . . . , IN) may be realized by the following FORTRAN subprogram, which shows in somewhat simplified form the computing flow of the program posted in Claim.
The integer variable COUNT is for the confirmation that the computing time amounts to Ω=M1*M2* . . . *MN. This program shows that starting seeds SEED:=ARRAY(I1, I2, . . . , IN) have the following neighboring relations:
We resume the ordinary notation, departing from the programming Seeds on the geometrical lattice LN in the space EN generally have the form s(zM)k=sζk (mod d) with 0≤k≤M1M2 . . . MN−1. Threads starting from them may be denoted explicitly as
θk:≡sζk(1,z,z2, . . . ,zM−1)(mod d).
When we distribute seeds on the lattice LN by the noted program, the whole of the (N+1)-dimensional array of generated random numbers (which we denote as VN+1) has an element that moves to its neighbors by following multiplications modulo d,
(to t-axis or the 0th axis) multiplication by z modulo d;
(to x1-axis) the multiplication by ζ:≡zM (mod d);
(to x2-axis) the multiplication by ζ1:≡ζẑM1≡ẑ(MM1) (mod d);
(to xN-axis) the multiplication by ζN−1:≡ẑ(MM1M2 . . . MN−1) (mod d).
As above, let VN+1 denote the geometrical array of random numbers be constructed on LN in the way described so far. Our aim is to make all random numbers are ensured to have little correlation in transitions to above shown neighbors. Clearly, the aim is realized by the following set of spectral tests:
(test 0, to t-axis or the 0th axis) spectral tests on the generator (d,z);
(test 1, to x1-axis) spectral tests on the generator (d, ζ);
(test 2, to x2-axis) spectral tests on the generator (d, ζ1);
(test N, to xN-axis) spectral tests on the generator (d, ζN−1).
We premised that (d, z) is excellent in test 0. Therefore, the excellence of all threads to the t-axis direction is ensured, up to 6th neighbors. We describe test 1 to test N separately. Cumbersome inferences to (mod d) will be abbreviated.
(Test 1) The transition in VN+1 to neighbors along the x1-axis is effected by the MC generator (d, ζ≡zM). We need to tune (d, ζ) to be excellent. This is effected by replacing M with M′=M, M+1, M+2, . . . step by step with ζ′=ẑ(M′), performing the generalized 2nd degree spectral tests of (d, (ζ′)k) for k=1, 2, . . . , 6, say, within the criterions
1<μd(2)((ζ′)k)<1.25, 1≤k≤6.
Then we perform regular-simplex-criterion spectral tests of (d, ζ′) from 3rd up to 4th, 5th or 6th degrees so as to realize
1<μd(L)(ζ′)<1.25, L=3,4, . . . .
Though the degree L up to 6 is ideal and desirable, the matter depends on many circumstantial elements, such as the available computing time. The multiplier z in the original MC generator (d, z) is the very rare existence under the modulus d chosen up to the 6th degree spectral tests. Thus, we may well have to be content asking (d, ζ′) to pass spectral tests only up to the 5th degree. Or, we might well have to loosen the criterion to 1<μd(L)<1.30 or so. The compromise will be necessary according to the amount of our computing time, or of our computing budget. When an admissible valuation is obtained with (d, ζ′≡ẑ(M′)), we replace M by M′.
(Test 2) The transition to neighbors along the x2-axis is effected now by the MC generator (d, ζ1′) with ζ1′=ẑ(M′M1). To make the multiplier ẑ(M′M1) excellent we tune the width M1: We replace M1 with M1′=M1, M1+1, . . . , perform generalized 2nd degree tests of (d, (ζ1″)k=ẑz(kM′M1′) for 1≤k≤6 say, and throw (d, ζ1″) into the regular-simplex Lth degree spectral tests for degrees L=3, 4, . . . , and select an excellent (M1)′.
. . .
(Test N) The final step of tuning takes the multiplier ζN−1′:≡ẑ(M′M1′ . . . MN−1′), increases MN−1′ as MN−1, MN−1+1, . . . , so as to find an excellent MN−1′ for which ζN−1′:≡ẑ(M′M2′ . . . MN−1′) is excellent in generalized 2nd degree spectral tests of (d, (ζN−1′)k) for 1≤k≤6 and 3rd up to 5th (say) degrees of regular simplex spectral tests of (d, ζN−1′). Tuning steps end up with noted M′, M1′, M2′, . . . , MN−1′ with unchanged MN. We should again remind ourselves that the inequality for the total number of used random numbers
M′M
1
′M
2
′ . . . M
N−1
′M
N
′≤T, M
N
′:=M
N
must hold true for the construction of parallel generators to be possible at all. In practices this restriction is experienced non-restrictive. In terms of threads to be distributed on the lattice GN), the total number of threads is
Ω′:≡M1′M2′ . . . MN−1′MN′≤T/M′.
This configuration of threads is realized by distributing seeds
{ARRAY(I1,I2, . . . ,IN)|Ik=0,1, . . . ,Mk′−1, 1≤k≤N}
on GN′, where we may instead take the subset GN as said. But this operation might be dangerous in these intricate relations. By this reason claim 1 is stated without such streamlining in the present specification.
By taking a sequence S of MC random numbers with excellent statistics of uniformity and independence as generated from a (d, z, s) generator, and by exploiting the generalized 2nd degree spectral tests of (d, zk) for 1≤k≤6 as well as L-th degree spectral tests under the regular L-simplex criterion for L≥3, the invention presents a method to divides S into consecutive threads of length M′, plants threads on lattice points of a lattice GN′ in the N-dimensional Euclidean space with 1st, 2nd, . . . , Nth coordinate axes, and constructs in total an (L+1)-dimensional distribution of random numbers including the 0th time axis, in such a way that each random numbers are ensured to have little correlation with neighbors in 0th, 1st, 2nd, . . . , Nth axis directions.
The presented invention aims to realize an excellent set of MC random numbers distributed on a lattice with bounded but large extension in space-time, showing little correlations to respective neighbors to temporal as well as geometrical directions, thus ensuring high-quality parallel simulations on computers for particles distributed on geometrical set and under the effect of external, non-correlated forces.
Prepare an excellent MC random number sequence S with a sufficiently long period T, divide S into consecutive threads of length M. With generalized 2nd degree spectral tests up to the 6th power of the multiplier as well as with spectral tests of the generator for degrees greater 3, tune the length M along the time axis, also tune respective lengths along spatial and ensure little correlations to neighbors in temporal as well in spatial directions by suitably realizing the planting of the root of threads to spatial lattice points, and realize a set of random number threads on geometrical structures which may be generated in parallel.
The aimed ideal result is the realization of samples of random numbers distributed on temporal and spatial lattice points, with samples obtained by integrating a temporal and spatial white noise over the temporally smallest unit and over the spatial unit of volume, with the distribution of samples so realized as to ensure small correlations to neighboring samples in temporal as well as spatial directions. The present invention has shown the method to realize said ideal distribution of MC threads of random number samples which allows for their spatially parallel generation on computers. If the temporal development is not needed, as in random initial value problems of degrees of freedom distributed on spatial lattice points, the time axis may be re-interpreted as a spatial axis and the spatial dimension N in Claim may be taken as N−1 to recover the total dimension N. The Invention is thus amenable to generalizations and specializations to various random number problems on geometrical structures. A point to be noted, however, is that even the presented simplest construction may be totally very difficult, starting from the excellent random number sequence S, construction of spectral test programs for tuning, and probably long computing time to find good tuned results, will be a highly intricate and difficult procedures for usual researchers using simulations, programmers for computing games, not to say usual consumers who would need random numbers on their computers or portable phones. Their realization and equipment on computers will require the skill of professional computer engineers. and the use should be enabled as software archived in function libraries in computing centers or installed in programming languages, or as services in operating systems for computers or portable phones. The present Invention is believed to enable these innovative applications.
Said possibilities in applications fundamentally call for excellent MC random number generators with still larger period T. The prospects call for the general use of computers equipped with quadruple precision integer arithmetic beyond the present double precision machines. It is wished that universities, computer centers and their engineers, who are at present the sole people with accesses to such large scale computers, are heartily solicited to find excellent MC random number sequences with periods T≈260; their existence will facilitate greatly the standardization of invented generators on geometrical structures and greatly benefit researchers and general consumers in the world.
Number | Date | Country | Kind |
---|---|---|---|
2017-044355 | Feb 2017 | JP | national |