in reply to Challenge: Detecting sequences.
Do you really want to know?
However, simple generators (unlike the Mersenne Twister) are really deterministic, so if you observe the same number a second time, you know that the sequence now repeats.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Challenge: Detecting sequences.
by BrowserUk (Patriarch) on May 10, 2013 at 18:23 UTC | |
However, simple generators (unlike the Mersenne Twister) are really deterministic, so if you observe the same number a second time, A generator of the integers 0 .. 2, can generate those 3 values in 6 different sequences:
And those 6 (sub)sequences can be output in 720 permutations before repetition is required:
That's not strictly true, because it is likely that some 18-digit overlaps between two subsequences will replicate an earlier subsequence. But then, the last 2 digits of subsequence a, and the first digit of subsequence b; form an out-of-sync repetition of subsequence d. and given that MT can only produce 2**32 values; similar, out-of-sync subsequence repetitions have to have occurred many times to arrive at the 2**19937-1 periodicity. So, repetition of a single value, or even a single subsequence is not an indicator that periodicity has been reached. With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
| [reply] [d/l] [select] |
by hdb (Monsignor) on May 10, 2013 at 20:28 UTC | |
SIMPLE RNGs, that I was referring to, are usually working like x[i+1] = a*x[i]+b mod m, with suitable a, b, and m, which cause the sequence to repeat, once a number repeats. | [reply] [d/l] |
by BrowserUk (Patriarch) on May 11, 2013 at 02:17 UTC | |
SIMPLE RNGs, that I was referring to, are usually working like xi+1 = a*xi+b mod m, LCGs are far from the only "simple [P]RNGs"; see also ICGs (CIGs) for another class of simple PRNG with some interesting properties, but the same max.period == mod(M) limitation. But there are other, even simpler (addition/subtraction/mod only) classes that do not. Eg. this 8-bit generator (thus M=256) displays near perfect randomness by a variety of measures, but has a periodicity of nearly M2:
With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
| [reply] [d/l] |