Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Random generator' topicStudent Support Forum > General > Archives > "Random generator"

< Previous CommentHelp | Reply To Comment | Reply To Topic
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: ,

Subject (listing for 'Random generator')
Author Date Posted
Random generator Student0002012 01/24/13 7:30pm
Re: Random generator Student0002012 01/26/13 07:59am
< Previous CommentHelp | Reply To Comment | Reply To Topic