Permutations to scalars and back again.

James A. Donald jamesd at echeque.com
Sun Sep 11 18:09:06 PDT 2016


I need to be able to do two of the following three tasks.

Generate a permutation of eighteen ones and eighteen zeros with equal 
probability for each permutation.  Or equivalently shuffle eighteen 
black cards and eighteen red cards.

Sequentially generate all possible permutations with each permutation 
generated once and only once.

Map between permutations and scalars, such that each permutation maps to 
unique number, and the set of numbers that represents valid permutations 
is dense.

Could someone point me to the relevant literature, or literature for 
converting between different representations of a permutation?

Since there are only two classes of items being shuffled, this class of 
permutations has a variety of special and convenient properties.





More information about the cypherpunks mailing list