generating very long binary sequences



It depends on what you want: m-sequences have very nice auto-correlation
properties, but if you're just wishing to produce uniformly distributed
random numbers, then the Mersenne twister is better.  You might also check
Marsaglia's complimentary-multiply-with-carry generator, described at

http://groups.google.com/group/comp.lang.c/browse_thread/thread/a9915080a4424068/

and which is simpler than MT, as well as being faster, and having a longer
period.

-Alasdair

On Thu, Feb 5, 2009 at 2:34 PM, Mehmet Suzen <mehmet.suzen at physics.org>wrote:

> Thanks Alasdair, the length of m-sequence looks considerably smaller then
> the MT19937. So I guess using MT19937 is safer, right?
>
> -m
>
> Alasdair McAndrew wrote:
>
>> Grab a primitive polynomial from
>> http://www.jjj.de/mathdata/all-lowblock-primpoly-short.txt and use it to
>> generate your sequence.  A primitive polynomial of degree n will produce an
>> m-sequence of length 2^n-1.
>> -Alasdair
>>
>> On Wed, Feb 4, 2009 at 6:27 PM, Mehmet Suzen <mehmet.suzen at physics.org<mailto:
>> mehmet.suzen at physics.org>> wrote:
>>
>>
>>
>>    Robert Dodier wrote:
>>     > On Tue, Feb 3, 2009 at 9:52 AM, Mehmet Suzen
>>    <mehmet.suzen at physics.org <mailto:mehmet.suzen at physics.org>> wrote:
>>     >
>>     >> What can you suggest to generate very long pseudorandom binary
>>    sequence?
>>     >> (At least 1-2 Ghz)
>>     >
>>     > Well, Maxima has an implementation of the Mersenne twister rng.
>>     > You could concatenate outputs from that to get a long sequence.
>>     > The Maxima function is "random" and the source code is
>>    src/rand-mt19937.lisp.
>>
>>    Do you know how long sequence is considered to be safely pseudorandom
>>    with the implementation? (not repeating!) Can you suggest a reference
>>    for the Mersenne Twister?
>>
>>     >
>>     >> Are there any implementation of Maximum Length Sequence (MLS)?
>>
>>    It's explained here:
>>    http://en.wikipedia.org/wiki/N-sequence
>>    I have read somewhere that one can generate very long random binary
>>    sequences with this.
>>
>>     >
>>     > I don't know what that is. Maybe you can explain briefly.
>>     >
>>     > Robert Dodier
>>    _______________________________________________
>>    Maxima mailing list
>>    Maxima at math.utexas.edu <mailto:Maxima at math.utexas.edu>
>>    http://www.math.utexas.edu/mailman/listinfo/maxima
>>
>>
>>
>>
>> --
>> Blog: http://amca01.wordpress.com
>>
>


-- 
Blog: http://amca01.wordpress.com