Pages

Tuesday, December 6, 2011

Patterns in Card Shuffling


 By Tyler Ethridge  

    When shuffling cards, one may think that the cards become random after one shuffle, let alone many shuffles; however, this is not always the case. The greatest magicians that do card tricks have most likely learned a type of shuffling known as “perfect shuffling.” Perfect shuffling is the technique of cutting the deck exactly in half and shuffling so that the cards are alternated perfectly. That is to say that one card from the left hand is released, followed by a card from the right hand and that process is repeated until the entire deck is released. This may not mean anything to us now but after a bit of mathematics we can see that this will develop a pattern.
From Claymath website
   
The standard 52-card deck will return to its original order if it is shuffled using a perfect shuffle 8 times. Different sized decks have a different number of shuffles before they return to their original pattern. Decks of number n where n is a power of 2 return to their original form faster than other decks. To see this more clearly, picture a deck with the number of cards being 2n. Starting with the top card, label each card 0, 1, 2, 3,…, 2n-1. When a single perfect shuffle takes place, a card of position i will change to be in position 2i modulo (2n -1) (modulo gives the remainder in a division problem). After a second perfect shuffle, a card changes to 4i modulo (2n-1). After a third shuffle, it changes to be in the 8i modulo (2n-1) position. The deck restores itself when 2k modulo (2n-1) yields a result of 1.

    In the standard 52 card deck, 2n=52 and 2n-1=51. The various results of 2k modulo 51 are 0, 2, 4, 8, 16, 32, 13, 26, 1, where k is 1 through 8. We see that 28=256. We then calculate 256 modulo 51 and find that it equals 1. This means that each card has moved back to its original spot in the deck as it was before any shuffling took place. It is evident that a little bit of math combined with the technique of perfect shuffling can provide a large advantage in any card game when you are the dealer.

    Bibliography

Diaconis, P. (2006). Mathematics and magic tricks.

No comments:

Post a Comment