Permutations to scalars and back again.

Mark Steward marksteward at gmail.com
Sun Sep 11 19:09:00 PDT 2016


And the wikipedia page
https://en.wikipedia.org/wiki/Combinatorial_number_system.

If you want some more theoretical stuff, Knuth has a chapter about
combinations that's easily googleable.

Mark

On 12 Sep 2016 03:01, "stef" <s at ctrlc.hu> wrote:

> On Mon, Sep 12, 2016 at 11:09:06AM +1000, James A. Donald wrote:
> > 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.
>
> https://stackoverflow.com/questions/1506078/fast-permutation-number-
> permutation-mapping-algorithms
>
>
> --
> otr fp: https://www.ctrlc.hu/~stef/otr.txt
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/html
Size: 2034 bytes
Desc: not available
URL: <https://lists.cpunks.org/pipermail/cypherpunks/attachments/20160912/15dabcf4/attachment.txt>


More information about the cypherpunks mailing list