Is there such a beast as a "perfect" shuffle? :)

Steve Holden sholden at holdenweb.com
Fri May 10 14:14:45 EDT 2002


"Sean 'Shaleh' Perry" <shalehperry at attbi.com> wrote ...
>
> On 10-May-2002 Christos Georgiou wrote:
> > I needed a function that, given a sequence and a number, would produce
> > the <number>th permutation of the sequence.  I thought I once saw such a
> > function, but using google (web and groups) couldn't find it, so I wrote
> > one of my own (it's at the ASPN cookbook site:
> > http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/126037 )
> > Basically, this was because I was aiming for a "perfect" shuffle of a
> > deck of 52 cards, so I wanted to reduce the "randomness" factor to only
> > one number.
> >
>
> I seem to remember reading an article linked off of slashdot where they go
into
> the dynamics of shuffling cards and how to ensure a full spread of
> possibilities.
>
> There may or may not be a site talking about this in the context of
python, but
> anything they say should be relevant.
>

Slashdot!?!? Relevant!?!?!

That's expecting a bit much, surely...

those-people-have-no-life-beyond-"first-post!"-ly y'rs  - steve
--
-----------------------------------------------------------------------
Steve Holden                                 http://www.holdenweb.com/
Python Web Programming                http://pydish.holdenweb.com/pwp/
-----------------------------------------------------------------------








More information about the Python-list mailing list