Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum > General > > "Random generator"

Post Reply:
Name:
Email Address:

Please send email when my message is replied to.

Url (optional):
Subject:
Message: view original message?
Attachment (optional):
Please answer this:4+4 =



Original Message (ID '284529') By Student0002012:
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, . . ..