in reply to Re^8: Algorithm RFC: fast (pseudo-)random shuffle with no repetition
in thread Algorithm RFC: fast (pseudo-)random shuffle with no repetition

15! is the number of ways to sort 15 different elements.

But you have 8 identical 1 which would always create 8! duplicates for each solution by swapping 1s (well rather symmetries or congruence classes)

hence 15!/8!

update

WP has nice graphics visualizing it

https://en.wikipedia.org/wiki/Permutation#Permutations_of_multisets

Cheers Rolf
(addicted to the Perl Programming Language :)
see Wikisyntax for the Monastery

  • Comment on Re^9: Algorithm RFC: fast (pseudo-)random shuffle with no repetition
  • Download Code