How many times should you shuffle a pack of cards to effectively randomize the distribution?
An article was recently published claiming it takes seven shuffles to mix a pack of cards. After studying the problem with the aid of my trusty 2068,I concluded it takes only six!
Referring to the aforementioned article, it stated that the average player employs only three or four shuffles, maximum. This seemed to be an interesting finding. However, this was a typical newapaper article, which gave no details of the work and, in any case, the mathematics were more than I was prepared to tackle from scratch. When visiting Vancouver B.C. a few weeks ago, I read another article which gave a few more details of the work, including a plot, purporting to show the maximum movement of the top card in relation to the number of shuffles. I could not understand the plot (I still can’t–I think it’s wrong!) but it made me start thinking and gave me clue as to how to solve the problem.
My analysis follows:
First,let’s consider the shuffling process: When a pack of cards is shuffled in a conventional manner, the 52 card pack is split into two packs of 26 each. The two 26 card packs are then “riffled” together, so that each card from one pack goes above or below the corresponding card in the other. This operation, I call a RIFFLE, while the total number of RIFFLES employed before dealing,I call a SHUFFLE. This process is somewhat idealized,as in normal circumstances, some cards will stick together, some blocks of cards will not be riffled but inserted in the other pack in a random manner and various other irregularities will occur. However, these irregualrities will tend to increase the random nature of the shuffle, so that the “idealized” shuffle offers a conservative approach.
What happens to the top card in the course of several riffles? Refer to the illustration in Figure 1. After the first riffle, it will be immediately above or below the top card from the other pack; i.e., it will be in the top(1) or second from the top (2) position. The lowest position it can be in is (2). After the next riffle, the lowest position possible will be (4), then (8), then (16), etc. After n riffles, its lowest possible position will be 2↑n.

After one riffle, the odds are 1 in 2 it will be in any position between (1) and (2). After the second riffle, the odds are 1 in 4 it will be in any position between (1) and (4). After the third riffle, the odds will be 1 in 8 between positions (1) and (8), etc. This process is shown in Figure 2 for riffles 1 to 5. After riffle 5, the fun starts!

If the pack were large enough, then, following riffle 5, the odds would be 1 in 64 between (1) and (64). Since there are only 52 cards in the pack, the odds are 1 in 64 it will be between (1) and (52) PLUS 1 in 64 between (1) and (12), i.e., the odds are 2 in 64 between (1) and (12) and 1 in 64 between (13) and (52).
Following this line of reasoning, Table 1 shows what happens for riffles 1 to 12.
RIFFLE POS ODDS POS ODDS POS
1 1 1/2 2
2 1 1/4 4
3 1 1/8 8
4 1 1/16 16
5 1 1/32 32
6 1 2/64 12 1/64 52
7 1 3/128 24 2/128 52
8 1 5/256 48 4/256 52
9 1 10/512 44 9/512 52
10 1 20/1024 36 19/1024 52
11 1 40/2048 20 39/2048 52
12 1 79/4096 40 78/4096 52
Table 1
It can be seen that this process can be continued indefinitely but the odds of the top card being in any position will never be even, i.e., 1/52 for positions (1) to (52), although the more riffles there are, the more nearly this situation will be approached.
Next, let’s use the abilities of the TS2068 to plot, print and generate random numbers to simulate a few riffles and see what happens!
Table 2 shows the distribution of the top card for ten shuffles of nine riffles each. ‘Mi’ and ‘Ma’ are the minimum and maximum positions, respectively,for each shuffle.
NUMBER OF SHUFFLES : 9
Riffle #
-------------------------------------------
[illegible] 1 2 3 4 5 6 7 8 9 10
-------------------------------------------
↑F 2 4 8 16 32 52 52 52 52 52
-------------------------------------------
1 1 1 1 1 1 2 3 6 11 21
2 1 1 1 1 2 4 8 16 31 9
3 1 2 4 8 16 32 11 22 44 35
4 1 1 2 4 7 14 27 2 4 7
5 2 3 6 11 22 44 35 18 36 19
6 2 3 6 12 23 46 39 25 49 45
7 2 3 6 12 24 48 44 35 18 35
8 1 1 2 4 7 13 25 50 47 41
9 2 4 7 13 26 51 50 47 41 30
-------------------------------------------
Mi 1 1 1 1 1 2 3 2 4 7
Ma 2 4 7 13 26 51 50 50 49 45
-------------------------------------------
Table 2
Figure 3 is a graphical rerepresentation of the riffles in Table 2.

Finally, let’s simulate 300 shuffles and record the distribution of the final position of the top card after 5, 6 and 7 riffles. This is shown Figure 4. The odds for each riffle are also outlined on each plot. It can be seen that there is a significant change from five to six riffles — the distribution covers 52 instead of 32 possible positions. From six to seven riffles, the change is negligible.

A few conclusions can now be drawn:
Using an “idealized” shuffling process, it would take an infinite number of riffles to perfectly shuffle a pack of cards, such that the odds of a card finishing in any of the 52 possible positions would be 1 in 52.
If less than SIX riffles are employed,the pack is not properly shuffled.
SEVEN riffles do not significantly improve the shuffle of the pack over SIX.
Since, in practice, the pack is not ideally shuffled, FOUR riffles probably, effectively “randomize” the pack for all practical purposes.
THOUGHTS FOR FURTHER WORK:
What is the effect of an imperfect riffle?
- cards being interleaved not 1 to 1 but in blocks of size say, 1 to 5
- only part of the pack gets riffled
Examine other methods of shuffling the pack, e.g., building a pack in one hand by taking the top and bottom cards from the pack in the other hand.