0% found this document useful (0 votes)
12 views7 pages

MixMax Generator

This document proposes a simple recurrent way to construct integer matrices A that can be used as pseudorandom number generators for Monte Carlo simulations. The matrices must satisfy three conditions: have a determinant of 1, all eigenvalues greater than 1 in absolute value, and preserve the volume of the unit hypercube. The proposed construction starts with a smaller matrix meeting the conditions and recursively builds a larger matrix by adding rows and columns. The document provides examples of matrices up to size 170 and verifies they meet the necessary conditions to serve as pseudorandom number generators.

Uploaded by

Jenny Sni
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views7 pages

MixMax Generator

This document proposes a simple recurrent way to construct integer matrices A that can be used as pseudorandom number generators for Monte Carlo simulations. The matrices must satisfy three conditions: have a determinant of 1, all eigenvalues greater than 1 in absolute value, and preserve the volume of the unit hypercube. The proposed construction starts with a smaller matrix meeting the conditions and recursively builds a larger matrix by adding rows and columns. The document provides examples of matrices up to size 170 and verifies they meet the necessary conditions to serve as pseudorandom number generators.

Uploaded by

Jenny Sni
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

JOURNAL OF COMPUTATIONAL PHYSICS 9, 573-579 (1991)

Note

Matrix Generator of Pseudorandom Numbers

In the work [l] it was proposed to use the Komogorov’s K-systems as the
pseudorandom numbers generators for the Monte Carlo simulation of physical pro-
cesses. The main idea of this approach is as follows: The pseudorandom series { PN}
is represented by the trajectory of a particular unstable dynamical system, and the
phase space is a F’-hypercube in the space of dimension d. The system must be
maximally unstable in order for the trajectory to fill this hypercube ZZd uniformly.
As it is well known, these are the Kolmogorov’s K-systems.
In [l] it was proposed to use for that the automorphisms of compact
commutative groups, which are defined by the integer matrix A = ilaiill

P, = AP,- I mod 1, (1)

where P is the d-dimensional vector, belonging to Lrd, Pi = (X’,i’, Xy’, .... X$‘), and

det A = f 1 (2)

in order to preserve phase space volume IZd.


To ensure the automorphism (1) to be a K-system, all its eigenvalues must satisfy
the condition:

V,l z 1, K= 1, .... d (3)

Thus, the problem of the pseudorandom sequence { PN} construction reduces to the
construction of the matrix A which satisfies the conditions (2) and (3).
Here we propose a simple recurrent way for construction of such a matrix A of
arbitrary order d. Suppose we have a matrix of the dimension IId - 10 d - 11) with
det A = 1. Construct now a new matrix the type IId@ dlJ:

(4)

It is evident that det A is also equal to 1.


573
0021-9991/91 $3.00
Copyright 0 1991 by Academic Press, ix.
All rights of reproductmn in any form reserved
514 AKOPOV, SAVVIDY, AND TER-ARUTYUNYAN-SAVVIDY

Since the calculation of det A is invariant with respect to the addition of the lines
and columns, one can get nontrivial matrices which have different elements in the
first line and in the first column, without changing the value of det A. This
procedure allows us to get a large set of matrices, which are suitable for the
automorphism (1). One needs, however, to check whether all ]&,I are not equal to
one. We propose for the matrices A the form:

2 3 d 1
1 2 d-l 1
1 1 d-2 1
A,= . . .. .. . (5)
i 1 2 2 1
1 1 1 2 1
1 1 1 1 1

if d = 2, 3,4, we have

2 3 4 1
2 2 1
1 2 2 1
A,= A3= 1 2 1 (6)
> A‘,= 1 1 2 1
1 1 1
1 1 1 1

We have checked condition (3) for the matrix A, in the wide range of d
(d = 2, .... 170). All cases checked were fulfilled to the condition (3). An example of
such calculation for d = 170 is given in the Table I. The calculation shows that all
l&l are in the range -0.2 d 111,1< 1539.9 and that the Kolmogorov’s entropy

h(A)= c In l&J
I& > 1
increases with d:

h(A,,) x 47.5; h(A,,,)x 70.1; h(A,,,) z 108.9.

From that we obtain the characteristic time for the decay of correlations [ 11,

which decreases with d.


In order to realize the transformation (1) and to construct the concrete
trajectory, one must define the initial vector,

PO= (XjO’, .... Xlp’), (7)


PSEUDORANDOM NUMBERS 575

TABLE 1
Re)rr lm4 RX
N= 170 -0.68970 0.92iJ75 0.",4&9 -0.32080
ReXK ImXI; -0.58970 -0.02076 0.14806 -0.32060
1539.88525 O.OMlOO -0.61913 0.88842 0.15639 0.30852
-177.21851 63629004 -0.61913 -0.88842 0.16639 -0.30652
-177.21851 -636.29004 -0.46855 0.85218 0.16517 0.29533
-167.06267 l25.76oce -0.45855 -0.85128 0.16517 -0.29533
-167.06267 -125.76003 -0.39966 0.81641 0.17201 0.28229
-8.334687 39.28164 -0.39966 -0.81641 0.17201 -0.28229
-83.64697 -39.28154 -0.34836 0.78305 0.17826 0.26946
47.69344 18.16006 -0.34836 -0.78306 0.17826 -0.26946
47.69344 -l8.16009 0.30112 0.74994 0.18384 0.25821
-30.22507 10.69%7 -0.361l2 -6.74994 0.18384 -0.2582 1
-3O.Z?.5O7 -10.69967 4.25926 0.71236 0.18947 0.24661
-20.73701 7.32249 -0.25926 -0.71937 0.18947 -0.24681
-20.73701 -7.32249 -0.22253 0.69273 0.19654 0.23554
-15.03566 6.5oscM -0.22253, -0.69273 0.19654 -0.23554
15.035&j -5.50904 4.18586 0.66651 0.20162 0.22382
-11.35427 4.46811 -0.18680 -0.66651 0.20162 -0.22382
-11.35427 4.40811 -0.15309 0.64l34 020611 0.21215
-8.84335 3.67939 -0.16306 -0.64164 0.20611 -0.21215
-8.84335 -3.67899 -0.12206 0.61628 0.20976 0.20167
-7.06965 3.162m -0.12206 -0.61629 0.20975 -0.20167
-7.05865 -3.16208 0.09630 0.59228 0.21512 0.19130
674103 2.77608 -0.09630 -0.69228 0.21512 -0.19130
-6.74103 -27760s -0.07119 0.67082 0.21869 0.18@%5
a.74529 2.47596 -0.07119 -0.67062 0.21869 -0.18045
471529 -247696 -0.04841 0.66041 0.22288 0.16913
-3.97216 247590 -0.04841 -0.65041 0.22288 -0.16913
397216 -2.23676 -0.02611 0.52987 0.22491 0.15862
-3.36257 204017 -0.02511 -0.52967 0.22491 -0.15662
-3.36m -204017 -0.00614 0.50993 0.22840 0.14869
-286968 1.87670 -0.00614 -0.50993 022840 -0.14869
-286968 -L87670 o.om2 0.46053 0.23084 0.13927
-2.46762 1.73665 o.ol222 -0.49053 0.23084 -0.13927
-246762 -1.7366s 0.02869 0.47272 0.23412 0.12944
-213296 1.61385 0.02869 -0.47272 0.23412 -0.12944
-213296 -1.61385 0.04480 0.45668 0.23747 0.12944
-1.85761 1.50791 0.04480 -0.45668 0.23747 -0.11905
-1.85761 -L50791 0.06077 0.43943 0.23908 0.10917
-1.62230 1.14107 0.06077 -0.43943 0.23908 -0.10917
-1.62230 -1.14107 0.0747 1 0.42273 0.24025 0.09698
-1.42336 1.33389 0.07471 -0.42273 0.24025 -0.09898
-1.42336 -1.33399 0.56672 0.00000 0.24951 0.00410
-125055 125791 0.06756 0.40587 0.24951 -0.00410
-125055 -1.25791 0.08758 -0.40587 0.25096 0.01317
-l.lcKbs L18935 0.09808 0.39055 0.25096 -0.01317
-1.10046 -1.18935 0.09808 -0.39055 0.25051 0.02301
-0.97255 LlZI60 0.11006 0.37730 0.25051 -0.02301
-0.97255 -1.12860 0.1 loo0 -0.37730 0.27938 0.03312
-0.85875 LO7222 o.l212E 0.36!257 0.24938 -0.03312
-0.85675 -1.07222 0.12128 -0.36257 0.24912 0.04222
-0.75967 LO2177 0.13192 0.34737 0.24912 -0.04222
-0.75967 -1.02177 0.13192 -0.34737 0.24711 0.05101
-0.66924 0.97531 0.13932 0.33334 0.247 11 -0.05101
-0.6692: -0.97531 0.13932 -0.33334 0.24773 o.Mick57
576 AKOPOV, SAVVIDY, AND TER-ARUTYUNYAN-SAVVIDY

and act on it by matrix A,, so that the result will be

~,=(~~)=(~~~.:.:,:~~)(~~)=A~~~rnod~~. (8)

Then, operating on P, by A, again, we find vector P,,

P~=(~~)=(:::.:.:.::3(~~)=AP~~rnod~i, (9)

and so on:
PN={A{~...{APo}}...}. (10)
The points P,, P,, .... P, form the very trajectory in the hypercube ZId. In order to
check the statistical features of the sequence (10) we have to calculate ~5 and the
discrepancy D, [l], which determines the convergence of the Monte Carlo sums.
We arrange the components of P,, P,, ... in the series
xv-9
1 , ...) xlp’, xc,l), ...) A-!:), ...) x(1*), ...) xii”, ... . (12)
As in the case of the multiplicative generator one now can compose the words of
length K and represent them as the points of the Z7K hypercube. Varying K from
1 to d and beyond, we obtain points that fill the cube of the varying dimension K.
Using the xs criterion one can estimate the degree of uniformity of filling the cube
nK for different K.
We have considered ~5 when K = 1,2, 3,4 for the matrices A, with different d.
Each side of Z7K was divided into ten parts, so we have

x:-,=x; for II’,


2 2
x,-1=x99 for II*,
2 2 (13)
xs- 1 =x999 for 113,
2 2
xs ~ I = x9999 for n4,
where s - 1 is the number of degrees of freedom: s = 10K.
Let us write down values of xf- r for different matrices (5):
A 27 x; = 7.9 x\“’ = n/7
& = 106.6 xip’ = l/J?
x:99 = 34,046
xi999 = 5,769,697
PSEUDORANDOM NUMBERS 577

x; = 10.17 xl”’ = rc/7


x;g = 101.3 2-y = l&5

x&9 = 1080.8 xy’ = l/J3

x&w3 = 191,626
x; = 10.4 xcp’ = n/7
x& = 117.1 x(O) = l/Jz
x&g = 1031 x:0’ = l/J?
x&m = 10,209.l Xi” = 0 964 7873 3916

x:=4 x\O’ = x/7


& = 92.3 x:0) = l/J2
x c&g= 961.7 qLxy’=--y=xgLo
x&.=, = 9848

x; = 9.5 XiO’ = lq7 xp= (J13)


&, = 80.5 xl”’ = 1jJz x!y= {Ji?}
x& = 951.8 x:0’ = { Js} xcp,’ = { $5)
&99 = 9900.8 x$0’= {Jii} xyj’ = {J?}
x:0’ = {fi} xcp,‘= (1 Jii}
xp= {Jr}
x$1= (J23)

In all those examples N/s = 24, where N is the full amount of points and s - 1 is the
number of degrees of freedom. For comparison we give below the values of x,‘- I for
the standard multiplicative generator RNDM,

~9’= 8.9
xi, = 97.8
x;w = 1007.5
x&XXI= 10,301.l.

It is seen that the statistical properties become better with the growth of the dimen-
sion of matrix A,. Also we have calculated the dependence of xl-, on the total
number of generated points for the matrix A12.
578 AKOPOV, SAVVIDY, AND TER-ARUTYUNYAN-SAVVIDY

Al2

Nls 48 72 96 144

x; 7.9 10.1 6.3 9.83


xi9 82 105.3 91.8 95
x&9 1021 968.5 1006.9 999.5
x&99 9955.3 9976.4 10,069 9846

RNDM

Nls 48 72 96 144

x; 5.5 4.1 6.3 12.2


x992 112.3 113.9 108.4 101
x&9 1075.7 1054 1038.8 1024
XL3 10321 10130.9 10249.6 10373

One can also calculate mean value X5.. 1,

for A,, and RNDM,

Al2 RNDM

9.41 9.1
90.9 104.8
1001.4 1035.2
9935.6 10321.5

As we mentioned before, the convergence of the Monte Carlo sums is connected


with the behavior of the discrepance D,. Below we give the RNDM and matrix
generator A 1,,,,when K = 4:
RNDM

N.10’ 1 2 3 4 5 6 7 8 9 10

DNfi 1.714 1.930 1.944 2.071 2.355 2.610 2.937 3.164 3.204 3.302
X&99 10016 10081 10455 10202 10280 10197 10139 10199 10269 10226

A IM)

N.10’ 1 2 3 4 5 6 7 8 9 10

DNfi 1.233 1.350 1.287 1.141 1.264 1.587 1.470 1.410 1.228 1.102
x&99 10049 10086 9870 9751 9748 9858 9857 9901 9864 9952
PSEUDORANDOM NUMBERS 579

All this shows that those matrix generators (we call them “mixmax”) have good
statistical properties and are usable for Monte Carlo simulation. The great advan-
tage of the matrix generator is the possibility to change widely the components of
the initial vector P, = Xi”‘, .... X:0) and matrix A, in order to have the dependence
of the Monte Carlo calculations on these parameters, which, naturally, must be
weak. The proposed matrix generator can be successfully realized on computers
with a matrix processor.

REFERENCE

1. G. K. SAVVIDY AND N. G. TER-ARUTYUNYAN-SAVVIDY, On the Monte Carlo Simulation of Physical


Systems, TPI-MINN-88/2T, December 1988; Preprint EPI-865-16-86, Jan. 1986 (unpublished)
[Russian]; J. Comput. P&w. 97, 566 (1991).

RECEIVED: November 16, 1989; REVISED: June 11, 1990

N. Z. AKOPOV
G. K. SAVVIDY
N. G. TER-ARUTYUNYAN-SAVVIDY
Yerevan Physics Institute
Merkaryan Street 2
Yerevan 375036
Armenia, USSR

581!97/2-22

You might also like