Re: shuffling algorithm

From: Michael Amling (nospam_at_nospam.com)
Date: 11/23/04

  • Next message: Paul Tomkins: "That is not the algorithm I proposed"
    Date: Tue, 23 Nov 2004 05:26:10 GMT
    
    

    Michael Amling wrote:
    > Bill Unruh wrote:
    >
    >> Phil Carmody <thefatphil_demunged@yahoo.co.uk> writes:
    >>
    >> ]Joe Soap <me@privacy.net> writes:
    >>
    >> ]> In response to what Paul Tomkins <tomkinsp@iinet.net.au> posted in
    >> ]> news:41a0a186$0$25785$5a62ac22@per-qv1-newsreader-01.iinet.net.au:
    >> ]> ]> > There are three methods of shuffling cards that I can think
    >> of. When
    >> ]> > done on a computer, they are all based on numbers generated by a
    >> ]> > random or pseudo random number generator.
    >> ]> ]> You missed the easiest one:
    >> ]> ]> For i = 1 to 52, swap card #i with a randomly chosen card [of 52].
    >>
    >> ]That's not a fair shuffle. Some permutations are favoured over others.
    >> ](You have 52^52 outcomes, but there are only 52! permutations, and
    >> ]52! does not divide 52^52.)
    >>
    >> ???? There are NOT 52^52 outcomes.
    >
    >
    > "Outcomes" may not have been the right word. Joe Soap is saying there
    > are 52**52 different equally probable sequences of 52 2-card swaps.
    > Each sequence of events results in one of 52! of what you are calling
    > "outcomes". And because 52! does not divide 52**52, the outcomes cannot
    > be equiprobable, hence the shuffle is not good.
    > Joe Soap's outcome is good, in that his conclusion that the shuffle is
    > not good is valid.
    >
    >> There are 52! outcomes. There would be
    >> 52^52 only if you could have a deck after shuffling with all Ace of
    >> hearts.
    >> Ie only if repeated cards were allowed. They are not.
    >> Whether or not the suggestion is a good shuffle is a valid question, but
    >> your answer is not valid.
    >
    > --Mike Amling

       Where I said "Joe Soap", I meant "Phil Carmody". Sorry, Phil.

    --Mike Amling


  • Next message: Paul Tomkins: "That is not the algorithm I proposed"