Talk:Lagged Fibonacci generator
Large number of cycles?
I don't believe that this statement is true, is it?
"any maximum period LFG has a large number of possible cycles, all different"
For example, many M-sequences have only two cycles, one of length 2^N-1, and one of length 1 (the element 0)
I also believe that many additive LFGs have only a very small number of cycles, with extremely long cycles.
Dubious claim?
"It is important that M be greater than 100 for the additive case"
This isn't true so I've removed it. OoS (talk) 11:49, 22 November 2007 (UTC)
Reference to The Art of Computer Programming
"Another list of possible values for j and k is on page 28 of volume 2 of The Art of Computer Programming"
Not in the third edition. In the third edition the list is as follows (table 1, page 29):
(24,55), (38,89), (37,100), (30, 127), (83,258), (107,378), (273,607), (1029,2281), (576,3217), (4187,9689), (7083,19937), (9739,23209)
OoS (talk) 17:43, 23 November 2007 (UTC)
Mention of Matlab
Matlab by default now uses the mersenne twister, article needs updating to clarify —Preceding unsigned comment added by 80.3.31.37 (talk) 12:33, 27 September 2010 (UTC)
Error in definition of the maximum period
In the article you can find the following error:
Lagged Fibonacci generators have a maximum period of (2k - 1)*2M-1 if addition or subtraction is used, and (2k-1)*k if exclusive-or operations are used to combine the previous values.
Correct is the following:
In the case if the xor operation is used as binary operation in the Lagged Fibonacci generators the period p equals to (2k-1)*k only if (gcd(2k-1, k) = 1). In all other cases the period p equals to lcm(2k-1, k).
The following table lists some examples for small values of k:
k | (2k-1)*k | lcm(2k-1, k) | gcd(2k-1, k) |
---|---|---|---|
3 | 21 | 21 | 1 |
4 | 60 | 60 | 1 |
5 | 155 | 155 | 1 |
6 | 378 | 126 | 3 |
7 | 889 | 889 | 1 |
8 | 2040 | 2040 | 1 |
... | |||
12 | 49140 | 16380 | 3 |
... | |||
18 | 4718574 | 524286 | 9 |
19 | 9961453 | 9961453 | 1 |
20 | 20971500 | 4194300 | 5 |
21 | 44040171 | 6291453 | 7 |
... |
Legend: (gcd: greatest common divisor; lcm: least common multiple)
--Aragorn321 (talk) 20:37, 15 February 2013 (UTC)