Replies: 3 comments
-
Generally the shuffleID is 32bits unsigned, a very big number. The number of possible generated permutation is further limited by the degree it effects the shuffle via the r1-rx "random factors" along with the 'listsize'. This will realistically only result in a very small fraction of Factorial(listSize) permutations. I think mathematically it is the listSize to the power of the number of "random factors" used, due to the effects of modulo math (%listSize). So if each 'shuffleID', r1, r2, r3 and r4 are used (as in MSA-d) to change 'si' and the shuffle mix, it would = listSize to the fifth. In which case, the 'shuffleID's 32bits is more limiting, it dictates the maximum number of possible generated permutations. |
Beta Was this translation helpful? Give feedback.
-
I did a million shuffles with the algorithms and looked for repeated shuffle instances. With MSA-d I found >4700 repeats, with MSA-e I found ~50 repeats. With the randomly driven (non deterministic) MSA-b and Fisher-Yates I found <10. When I tested ½ as many shuffles I found ½ as many and when I tested twice as many I found twice as many repeats. |
Beta Was this translation helpful? Give feedback.
-
See previously: README.md paragraph containing "MSA_e results in Zero repeated shuffles" |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I was wondering what the range of
shuffleID
could be. There areFactorial(listSize)
different shuffles, yet glancing at the code (on Wikipedia) it seems there are at mostp1*p2*listSize
different shuffles generated byfunction PRIG()
. It looks like this is fine in practice, but if you wanted some really big permutations you could be in for a surprise. Is that right?I don't know much about permutation generation.
Beta Was this translation helpful? Give feedback.
All reactions