|
![](/i/fill.gif) |
http://en.wikipedia.org/wiki/Multiply-with-carry
"The period of a lag-r MWC generator is the order of b in the
multiplicative group of numbers modulo ab^r − 1."
So, if A = 4,294,967,118 and B = 2^32 and R = 4 then... what's the
period of the generator??
AB^4 - 1 is 1461501576760641606276638336235602896801190903807.
That's a big number. Now, what is the order of 2^32 module this huge number?
http://en.wikipedia.org/wiki/Cyclic_group
"[In a cyclic group of order n] The order of the residue class of m is n
/ gcd(n,m)."
So... that means I need to replace N with the huge number above, and M
with 2^32?
If I do that, the answer is... N? Is that right?
So... the period of the generator really is 1.46 * 10^48?
My head hurts...
Post a reply to this message
|
![](/i/fill.gif) |