in reply to Re^7: Algorithm RFC: fast (pseudo-)random shuffle with no repetition
in thread Algorithm RFC: fast (pseudo-)random shuffle with no repetition
They are. Mea culpa.
You are listing the permutations of the fillers between the fixed 1s, hence 7! valid solutions.
See Re^8: Algorithm RFC: fast (pseudo-)random shuffle with no repetition for what I meant and try (1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2) instead.
If this doesn't convince you that try-and-error isn't a good idea, try adding even more 1s and 2s.
Cheers Rolf
(addicted to the Perl Programming Language :)
see Wikisyntax for the Monastery
|
|---|