| Author |
Comment/Response |
Student0002012
|
01/26/13 07:59am
Hi,
i found some functions for this random generator.
But i have no idea, how to use them in mathematica 8.
S. 17
http://www2.isye.gatech.edu/~sman/courses/6644/Module06-RandomNumberGenerationSlides_090606.pdf
Bi = (Bi−r + Bi−q)mod 2 (0 < r < q).
r = 3, q = 5;B1 = · · · = B5 = 1
Bi = (Bi−3 + Bi−5) mod 2 = Bi−3 XOR Bi−5, i > 5
B6 = (B3 XOR B1) = 0, B7 = (B4 XOR B2) = 0, etc. 2
Turns out period of 0-1 bits is 2q − 1 = 31.
How do we go from Bi’s to Unif(0,1)’s?
Easy way: Use (ℓ-bit binary integers)/2ℓ.
Example: Set ℓ = 4 in previous example and get:
15
16 , 8
16 , . . . → 1111, 1000, . . ..
URL: , |
|