Cointerpretability: Difference between revisions

From formulasearchengine
Jump to navigation Jump to search
en>David Eppstein
en>PWilkinson
m Link disambiguation
 
Line 1: Line 1:
{{Use dmy dates|date=July 2012}}
I'm Stormy and I live in Rockwell. <br>I'm interested in Engineering, Leaf collecting and pressing and Korean art. I like to travel and reading fantasy.<br><br>my blog post; [http://drive.ilovetheory.com/content/saving-money-bookbyte-promo-code-what-know-you-clip Bookbyte promo code january 2014]
[[Image:Randu.png|thumb|right|[[Three-dimensional space|Three-dimensional plot]] of 100,000 values generated with RANDU. Each point represents 3 consecutive pseudorandom values. It is clearly seen that the points fall in 15 [[2D geometric model|two-dimensional]] [[Plane (mathematics)|plane]]s.]]
 
'''RANDU'''<ref>IBM, ''System/360 Scientific Subroutine Package Version II Programmer's Manual,'' H20-0205-1, 1967, p. 54.</ref> is a [[linear congruential generator|linear congruential]] [[pseudorandom number generator]] of the [[Park–Miller random number generator|Park–Miller type]], which has been used since the 1960s.<ref name="Entacher-2000">
{{cite web
| last = Entacher
| first =  Karl
| title = A collection of classical pseudorandom number generators with linear structures - advanced version
| date = June 2000
| work =
| url=http://random.mat.sbg.ac.at/results/karl/server/server.html
| accessdate = 8 August 2013
}}</ref>  It is defined by the [[Recursion|recurrence]]:
 
:<math>V_{j+1} = 65539\cdot V_j\, \bmod\, 2^{31}\,</math>
 
with the initial seed number, <math>\scriptstyle V_0</math> as an [[even and odd numbers|odd number]]. It generates pseudorandom [[integer number|integers]] <math>\scriptstyle V_j</math> which are [[uniform distribution (discrete)|uniformly distributed]] in the interval {{nowrap|[1, 2<sup>31</sup> − 1]}}, but in practical applications are often mapped into pseudorandom [[rational number|rationals]] <math>\scriptstyle X_j</math> in the interval {{nowrap|(0, 1)}}, by the formula:
:<math>X_j = \frac{V_{j}}{2^{31}}</math>.
 
It is widely considered to be one of the most ill-conceived random number generators ever designed.  Notably, it fails the [[spectral test]] badly for dimensions greater than 2, and every integer result is odd. (However, at least eight low-order bits are dropped when converted to single-precision floating-point).
 
The reason for choosing these particular values is that with a 32-bit-integer word size, the arithmetic of mod 2<sup>31</sup> and <math>65539 (2^{16} + 3)</math> calculations could be done quickly, using special features of some computer hardware.
 
== Problems with multiplier and modulus ==
To show the problem with these values, of multiplier 65539 and modulus 2<sup>31</sup>, consider the following calculation where every term should be taken mod 2<sup>31</sup>. Start by writing the recursive relation as:
 
:<math>x_{k+2}=(2^{16}+3) x_{k+1}=(2^{16}+3 )^2 x_{k}\,</math>
 
which becomes, after expanding the quadratic factor:
 
:<math>x_{k+2}=(2^{32}+6 \cdot2^{16} +9 )x_{k}=[6 \cdot (2^{16}+3)-9]x_{k}\,</math>
 
:because {{nowrap|2<sup>32</sup> mod 2<sup>31</sup> {{=}} 0}}
 
and allows us to show the correlation between three points as:
 
:<math>x_{k+2}=6x_{k+1}-9x_{k}\,</math>
 
As a result of this correlation, the points in three dimensional space (mod 2<sup>31</sup>) fall in a comparatively small number of planes, 15 to be exact.<ref>{{cite journal |author=Marsaglia, George |year=1968 |title=Random Numbers Fall Mainly in the Planes |journal=Proc. Natl. Acad. Sci. U.S.A. |volume=61 |issue=1 |pages=25–28 |url=http://www.pnas.org/content/61/1/25.citation |doi=10.1073/pnas.61.1.25}}</ref> As a result of the wide use of RANDU in the early 1970s, many results from that time are seen as suspicious.<ref name="press92">{{cite book |author=Press, William H., et al. |year=1992 |title=[[Numerical Recipes]] in Fortran 77: The Art of Scientific Computing |edition=2nd |isbn=0-521-43064-X}}</ref>
 
This misbehavior was already detected in 1963<ref>ref. 7 of http://portal.acm.org/citation.cfm?id=363827</ref> on a 36-bit computer, and carefully reimplemented on the 32-bit IBM System/360.
 
==Sample output==
 
The start and end of the RANDU’s output period for the initial seed <math>\scriptstyle V_0 = 1</math> is:
: 1, 65539, 393225, 1769499, 7077969, 26542323, …, 2141591611, 388843697, 238606867, 79531577, 477211307, 1 {{OEIS|A096555}}
 
==Quotations==
 
{{quote|…its very name RANDU is enough to bring dismay into the eyes and stomachs of many computer scientists!|[[Donald Knuth]]<ref>{{cite book |author=Donald E. Knuth |title=The Art of Computer Programming |volume=22 |edition=3rd |publisher=Addison-Wesley |place=Boston |year=1998}}</ref>}}
 
{{quote|One of us recalls producing a "random" plot with only 11 planes, and being told by his computer center's programming consultant that he had misused the random number generator: "We guarantee that each number is random individually, but we don't guarantee that more than one of them is random." Figure that out.|[[William H. Press|W. H. Press]] et al.<ref name="press92"/>}}
 
==References==
{{Reflist|30em}}
 
[[Category:Pseudorandom number generators]]

Latest revision as of 18:38, 8 June 2014

I'm Stormy and I live in Rockwell.
I'm interested in Engineering, Leaf collecting and pressing and Korean art. I like to travel and reading fantasy.

my blog post; Bookbyte promo code january 2014