Shuffling cards...

Posted:
in AppleOutsider edited January 2014
Here's one for thought:



Let's say you had a fresh deck of cards, sealed, and you just opened them.



If you were to mad shuffle those cards you could end up with any one of the 52! (thats 52 factorial) ways the deck order could be.



But what's funny is I doubt no one has ever shuffled a deck and ended up with the deck being in the exact same order as it was when you first opened the pack...



So basically it's seems impossible to shuffle a deck and have the deck be in original order when you are done...



Just something for thought...



I know statistically if you had a machine shuffling the deck for 5 years or something like that one of those times you might get the deck back in original order but...

Comments

  • Reply 1 of 5
    taurontauron Posts: 911member
    Quote:
    Originally Posted by rezwits View Post


    Here's one for thought:



    Let's say you had a fresh deck of cards, sealed, and you just opened them.



    If you were to mad shuffle those cards you could end up with any one of the 52! (thats 52 factorial) ways the deck order could be.



    But what's funny is I doubt no one has ever shuffled a deck and ended up with the deck being in the exact same order as it was when you first opened the pack...



    So basically it's seems impossible to shuffle a deck and have the deck be in original order when you are done...



    Just something for thought...



    I know statistically if you had a machine shuffling the deck for 5 years or something like that one of those times you might get the deck back in original order but...



    This is like Microsoft shuffling Windows Vista code so that Windows 7 won't be a complete piece of shit OS. You can shuffle all you want but the probability that it will not suck arse is astronomically low.
  • Reply 2 of 5
    If I rember correctly from my math classes many years ago, in the case of shuffling the outcome is independent from the state the deck was in before shuffling, as long as you shuffle long enough.



    Therefore, every outcome has the same probability, hence the possiblity that the deck is exactly the same as before shuffling, is 1/52! (1 out of all possible outcomes).



    Except if you don't know how to shuffle, and then after two iterations, you have the same order in the deck.
  • Reply 3 of 5
    floorjackfloorjack Posts: 2,726member
    Assuming enough shuffling and random reordering of cards so that any final order is as likely as another then it's equally possible that they are right back where they started as in any other state.
  • Reply 4 of 5
    intenseintense Posts: 106member
    no seriously

    seriously

    ... like

    ...



    ..

    no

    seriously



    i love how this post made me smile

    thank you



    good night
  • Reply 5 of 5
    dentondenton Posts: 725member
    Quote:
    Originally Posted by rezwits View Post


    I know statistically if you had a machine shuffling the deck for 5 years or something like that one of those times you might get the deck back in original order but...



    I don't think you quite understand just how big 52! is. Let me write it out for you:



    52! = 80658175170943878571660636856403766975289505440883 277824000000000000



    This is an integer 68 digits long.



    On average you will need to shuffle the deck 52! times before you return to the original state, so you should be asking, how long would this take?



    IBM recently built a computer capable of performing 1 petaFLOP (that is 1,000,000,000,000,000 floating point operations per second). Suppose that you wrote a program that ran on this computer that was capable of shuffling the deck once each operation (not reasonable, but let's ignore that). So the rate of shuffles is 1,000,000,000,000,000 shuffles per second, and we need to perform 52! shuffles before we expect to return the deck to its original state. This will take:



    (52! shuffles)/(1,000,000,000,000,000 shuffles per second)

    = 80658175170943878571660636856403766975289505440883 277 seconds

    = 13443029195157313095276772809400627829214917573480 55 minutes

    = 22405048658595521825461288015667713048691529289134 hours

    = 933543694108146742727553667319488043695480387047 days

    = 2557653956460676007472749773478049434782138047 years

    = 170510263764045067164849984898536629 lifetimes of the universe



    (supposing that the universe is 15 billion years old).



    So what I'm saying is that, although it's not impossible to return a deck of cards to its original state by randomly shuffling, it will never happen.



    If you wanted a deck that you could shuffle by hand continuously for 5 years and expect to return it to its original state (and supposing that you could shuffle the deck once per second -- still unreasonably fast, but good enough), then you should limit yourself to a deck of about 12 cards. That's right: 12 cards! (and it would take more like 15 years)
Sign In or Register to comment.