Introduction
In playing card games with my daughter, I've come to wonder how I can reshuffle the cards with a minimum of effort, so I decided to do a brief investigation of the qualities of the different shuffling techniques.
Techniques
There are four techniques I looked at: overhand, over-under, pile, and riffle shuffling.
About the visualizations
Each technique, and some combinations of techniques, has an associated visualization. The background of the visualization shows two histograms. The colored histogram shows, for each card in the original deck, where in the new deck it's likely to end up. The dot in each column shows how likely that card is to end up before or after cards that it was before or after in the original deck. If the dot is at the bottom, the card is very likely to still be after any cards that it was originally after, and before any cards that it was originally before. If the dot is at the top, the card is very likely to be before any cards it was originally after, and after any cards it was originally before. If the dot is in the middle, the card is about equally likely to be before or after cards that it was originally before or after. The foreground of the visualization shows a single, archetypical example of the shuffle, chosen to have characteristics similar to the average statistics for the shuffle.
Overhand shuffling (visualize)
In overhand shuffling, you repeatedly strip off small groups of cards from the top of the deck, stacking each group on the next to form the shuffled deck. Typically, you'll get five to ten groups in a shuffle. The top group from the original deck becomes the bottom group of the new deck, while the bottom group from the original deck sits on top of the new deck, but within each group the order is the same as in the original deck. In other words, the order of the groups is reversed but the order within groups is preserved. The technique is functionally equivalent to the Hindu shuffle, but seems a bit more ergonomic.
Because each group contains about five to ten cards whose order relative to each other is not changed, overhand shuffling is not good for breaking up runs of cards. In fact, you need dozens of overhand shuffles before the deck will start to look random, but it's one of the faster shuffles and can be effective when combined with other techniques.
Over-under shuffling (visualize)
Over-under shuffling is a technique I either invented or picked up from somewhere. I don't know if it has a name, but it's somewhat similar to overhand shuffling. You pick up the deck in one hand and drop groups of cards from the top into the other hand on edge, alternating dropping the cards on "top" of the new deck (on one side) and on the "bottom" of the new deck (on the other side). The top group from the original deck becomes the middle of the new deck, the second group sits next to it, above or below, the third group sits next to it on the other side, and so on. The bottom group sits either on the top or bottom of the new deck. Even though dropping the second group on the bottom is equivalent to simply making the first group bigger, and thus it seems intuitively better to always drop it on the top instead to break up the card sequence better, simulations show that it's best to choose at random whether you'll drop the second group on the top or bottom.
Because it's slightly awkward, you'll typically get fewer, larger groups in over-under shuffling than you do in overhand shuffling, resulting in runs being even less broken up, but it outperforms overhand shuffling in other ways, as I'll show later.
Pile shuffling (visualize)
Pile shuffling is what I do when I really want to mix up the deck, such as after a game of Solitaire. I deal the cards into five piles, trying to choose a random pile for each card, and then stack the piles on each other in a random order (visualize) or mush them together (visualize) to create the shuffled deck. Because they're dealt one by one, the cards in each pile are in the reverse order compared to the original deck. The top card of the new deck is a card from near the bottom of the original deck, and vice versa.
Pile shuffling is probably the best simple shuffle you can do, at least in the variant where you stack the piles in a random order. (Mushing the cards together is less effective.) Unfortunately, it's much slower than other techniques, and can be beaten by a combination of simpler, faster shuffles.
Riffle shuffling (visualize)
Riffle shuffling is a common shuffling technique in which the deck is divided into two halves, which are then approximately interleaved. Unless you have great technique and a good deck, the cards won't end up perfectly interleaved. Rather, small groups of cards from either side will be interleaved. Top and bottom cards will end up very near the top and the bottom respectively, while the middle cards will be reordered somewhat. The closer a card is to the middle of the original deck, the more randomly it will be shuffled into the new deck.
Riffle shuffling is an effective technique, but needs to be repeated - canonically, seven times - to really randomize the deck. It also doesn't always work well, mechanically speaking, especially with cards that are too new (or too old?) to riffle nicely. The main problem with riffle shuffling is that it does a poor job of randomizing the top and bottom of the deck; this can be addressed by mixing riffle shuffles with over-under shuffles or sloppy cuts.
Interestingly, a single riffle shuffle of a new deck neatly puts the red cards on top and the black cards on the bottom (visualize).
Cutting the deck (visualize)
Cutting the deck is not a shuffle, but is simply splitting the deck in half, swapping the two piles, and putting them back together. It places the middle cards on the top and bottom, and the top and bottom cards in the middle. It hardly shuffles the deck at all, but is very fast and may combine with other techniques to enhance them. Note, however, that this enhancement effect often relies on the cuts not being perfect! This is discussed more later.
Combinations
No technique is great in and of itself, except pile shuffling, which is slow. Can we combine techniques so that the weaknesses of each technique are countered by the strength of another technique? First we'll need to develop a way to measure how well shuffled a deck is before we can judge which combinations work best.
Quantifying a Shuffle
After shuffling the deck, how can we know it's good? I'm sure there is some accurate and complicated statistical theory about this, but I developed a few metrics of my own which I'll use instead.
Absolute distance
In a perfect shuffle, there should be no correlation between the absolute position of a card in the original deck and the card in the shuffled deck. We can take the position of each card in the original deck, counting from the top, and compare it to its position in the shuffled deck. Intuitively, the cards should be, on average, about "half a deck" away from each other. (The actual figure is more like a third of a deck, due to cards on the ends having less freedom of motion than cards in the middle.) We can average the absolute values of the distances for each card to find the mean absolute distance for the whole deck, and compare it to the ideal value.
Histogram
In a perfect shuffle, a card should be equally likely to end up in any place in the deck. We can create a histogram of where each card ends up and see how much it deviates from the ideal uniform distribution.
Order
In a perfect shuffle, any two pairs of cards should have a 50% chance of being in the same order relative to each other in the shuffled deck as they are in the unshuffled deck. We can compute this value for a deck and compare it to the expected value. (If you do no shuffle, 100% of the pairs will be in the same order relative to each other; if you reverse the deck, 0% of the pairs will be in the same order relative to each other. Both cases are 50 percentage points off from the expected 50% value - the largest error possible.)
Relative distance
In a perfect shuffle, most runs of cards (like 2, 3, 4, 5) should be broken up in the shuffled deck, whereas overhand and over-under shuffling tend to keep them together. We can measure this by taking an average of the distance from each card to several of its neighbors in the original deck (weighted by how close together they are), and comparing this to the weighted average distance of those same cards in the sorted deck. (I chose to compare against six neighbors on each side.)
Summary
It would be nice to combine the four measures above into a single number so we can easily rank the techniques. There are a number of ways to do this, most of them completely arbitrary, such as averaging them, averaging their squares or square roots (or some other power), or taking a weighted average. I tried a few summary measures and arbitrarily decided that the histogram is more important than the relative distance, which is more important than absolute distance, which is much more important than overall order in making a shuffle "good", and thus arrived at a weighted average of the four (overall error = (absolute error / 2 + histogram deviance * 2 + order error / 16 + relative error) / 3.5625).
Performance of techniques
Using the measures developed above we can measure and rank the techniques and their combinations. The short answer is that the best quick way of shuffling the cards is some number of riffles or an over-under shuffle followed by some number of riffles. Generally you want at least three shuffles (either three riffles or an over-under and two riffles). The best medium-speed way is to do two over-unders and a pile shuffle (with the stacking variant). This is pretty close to a perfect shuffle. The best slow way is to do three pile shuffles (again with the stacking variant). This is quite nearly perfect. Most combinations of techniques can be interspersed with cuts to improve them - especially sequences of riffle shuffles - but only if the cuts are a bit sloppy, as described later.
Read on for the longer answer.
Basic performance
We'll start with the performance of the individual techniques. Each technique was simulated in the form expected for a typical card handler. For example, overhand and over-under groups were somewhat uneven, cuts were not always in the center, and riffle shuffling worked on small, randomly sized groups rather than assuming a perfect riffle. To help show that the measures are working as intended, I've included "no shuffle", which should have maximal error (near 1.0), and "perfect shuffle", a Fisher-Yates shuffle which should have minimal error (near zero, visualize). Here are the results for the individual techniques. All numeric results are aggregated from 100,048 shuffles. Click the links for each technique or combination to view a visualization.
Technique | Absolute | Histogram | Order | Relative | Overall |
---|---|---|---|---|---|
No shuffle | 1.000 | 1.000 | 1.000 | 1.000 | 1.000 |
Perfect shuffle | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 |
Reverse the cards | 0.500 | 1.000 | 1.000 | 1.000 | 0.930 |
Cut the deck | 0.493 | 0.489 | 0.015 | 0.864 | 0.587 |
Overhand shuffle | 0.489 | 0.321 | 0.755 | 0.853 | 0.502 |
Over-under shuffle | 0.012 | 0.247 | 0.140 | 0.803 | 0.368 |
Pile shuffle (stacking) | 0.101 | 0.080 | 0.194 | 0.227 | 0.126 |
Pile shuffle (mushing) | 0.418 | 0.129 | 0.631 | 0.487 | 0.279 |
Riffle shuffle | 0.253 | 0.333 | 0.492 | 0.232 | 0.296 |
As you can see, overhand and over-under shuffling are about the same when it comes to relative distance, but over-under shuffling is significantly better in both ordering and absolute distance. Riffle shuffle, as expected, is much better at breaking up runs of cards and so obtains a lower relative distance. Pile shuffle, at least with the stacking variant which I recommend, beats the others overall. The mushing variant seems inferior.
Combinations
By exhaustively trying combinations of techniques, we can find the combination that best approximates a perfect shuffle. Then, we can look among the good performers to find which one we can execute the fastest. Not surprisingly, the best performer by far is repeated pile shuffles, but that is too slow. Restricting the results to at most one pile shuffle gives the following abbreviated tables, each of which is ordered from best to worst. (Combinations with an overall error greater than a threshold were excluded.)
Before describing the combinations, I'll make a note about mixing cuts into them. In several places, I say that you can mix cuts into combinations - especially between riffles - to improve the quality, but this comes with an important caveat: it only works when the cuts are a bit sloppy, and the deck is not always cut in the exact middle. Consider that a riffle shuffle consists of cutting the deck in half and riffling the halves back together. If you do a cut before the riffle, and your cuts in both cases are perfect, then all you've done is swap the two halves used in the riffle, i.e. swap the hands in which the two halves are held, which is no improvement at all! So, when cutting the deck, including when doing the cut at the start of a riffle shuffle, don't try to divide the deck exactly in half. Just choose a point roughly near the center. This random factor added to the cut is what makes it work to improve our shuffles.
Legend: C = cut, OH = overhand, OU = over-under, P = pile (stacking), R = riffle
Combining up to two, excluding pile shuffles
It seems the best combination of up to two techniques, excluding pile shuffles, is two riffles (visualize), but an over-under and a riffle (visualize) beats it in some ways (but is worse in others). You can do a cut before the two riffles (C + R + R, visualize) to produce a combination that beats both of them, with only a small loss of speed, assuming all your cuts are slightly sloppy. Note that none of these combinations are all that good, and I can't really recommend any of them. Pile shuffles are included in the table to show how they compare to the combinations.
Technique | Absolute | Histogram | Order | Relative | Overall |
---|---|---|---|---|---|
R + R | 0.124 | 0.119 | 0.241 | 0.081 | 0.111 |
OU + R | 0.127 | 0.072 | 0.117 | 0.221 | 0.123 |
Pile shuffle (stacking) | 0.101 | 0.080 | 0.194 | 0.227 | 0.126 |
OH + R | 0.240 | 0.111 | 0.277 | 0.201 | 0.157 |
R + OU | 0.035 | 0.172 | 0.069 | 0.202 | 0.160 |
OU + OU | 0.007 | 0.084 | 0.087 | 0.549 | 0.204 |
C + R | 0.144 | 0.222 | 0.354 | 0.190 | 0.204 |
R + OH | 0.240 | 0.222 | 0.372 | 0.216 | 0.225 |
R + C | 0.121 | 0.282 | 0.005 | 0.191 | 0.229 |
OU + OH | 0.009 | 0.121 | 0.020 | 0.595 | 0.237 |
Pile shuffle (mushing) | 0.418 | 0.129 | 0.631 | 0.487 | 0.279 |
C + OU | 0.006 | 0.205 | 0.122 | 0.625 | 0.294 |
Riffle shuffle | 0.253 | 0.333 | 0.492 | 0.232 | 0.296 |
... | |||||
Over-under shuffle | 0.012 | 0.247 | 0.140 | 0.803 | 0.368 |
Overhand shuffle | 0.489 | 0.321 | 0.755 | 0.853 | 0.502 |
Combining up to three, excluding pile shuffles
It seems the best combination of up to three techniques, excluding pile shuffles, may be an over-under shuffle followed by two riffles (visualize), but the over-under shuffle could be replaced by a cut (visualize) to make it faster with a moderate loss of quality, or replaced by another riffle shuffle (visualize) to produce a combination that beats it in relative position error. Alternatively, you can do cuts between the riffles (e.g. R + C + R + C + R, visualize) to significantly improve the quality without much loss of speed, again assuming that all your cuts are a bit sloppy.
Technique | Absolute | Histogram | Order | Relative | Overall |
---|---|---|---|---|---|
OU + R + R | 0.000 | 0.007 | 0.081 | 0.098 | 0.033 |
R + R + R | 0.060 | 0.017 | 0.118 | 0.056 | 0.036 |
OH + R + R | 0.117 | 0.014 | 0.083 | 0.084 | 0.049 |
R + OU + R | 0.003 | 0.048 | 0.058 | 0.077 | 0.050 |
C + R + R | 0.034 | 0.046 | 0.128 | 0.066 | 0.051 |
OU + OH + R | 0.031 | 0.018 | 0.033 | 0.171 | 0.063 |
R + R + OU | 0.004 | 0.072 | 0.035 | 0.082 | 0.064 |
R + OH + R | 0.114 | 0.048 | 0.135 | 0.073 | 0.066 |
OU + R + OU | 0.004 | 0.034 | 0.053 | 0.163 | 0.067 |
R + C + R | 0.071 | 0.082 | 0.173 | 0.065 | 0.077 |
R + OU + OU | 0.001 | 0.063 | 0.043 | 0.151 | 0.079 |
OU + R + OH | 0.066 | 0.048 | 0.023 | 0.168 | 0.084 |
R + R + C | 0.059 | 0.106 | 0.000 | 0.066 | 0.086 |
OH + OU + R | 0.066 | 0.045 | 0.024 | 0.190 | 0.088 |
C + OH + R | 0.041 | 0.079 | 0.028 | 0.143 | 0.090 |
OH + R + OU | 0.004 | 0.074 | 0.031 | 0.177 | 0.093 |
R + R + OH | 0.117 | 0.090 | 0.181 | 0.085 | 0.094 |
R + OU + OH | 0.004 | 0.093 | 0.010 | 0.166 | 0.099 |
OU + OU + OH | 0.004 | 0.020 | 0.037 | 0.344 | 0.109 |
OU + R + C | 0.099 | 0.065 | 0.107 | 0.209 | 0.111 |
OU + C + R | 0.123 | 0.057 | 0.115 | 0.214 | 0.112 |
OH + C + R | 0.143 | 0.076 | 0.156 | 0.165 | 0.112 |
OH + OH + R | 0.231 | 0.054 | 0.357 | 0.183 | 0.121 |
C + OU + R | 0.110 | 0.062 | 0.091 | 0.248 | 0.121 |
OH + R + C | 0.121 | 0.098 | 0.192 | 0.167 | 0.122 |
C + R + OU | 0.031 | 0.127 | 0.062 | 0.162 | 0.122 |
OU + OU + OU | 0.002 | 0.012 | 0.068 | 0.415 | 0.125 |
Pile shuffle (stacking) | 0.101 | 0.080 | 0.194 | 0.227 | 0.126 |
R + C + OU | 0.024 | 0.146 | 0.061 | 0.153 | 0.130 |
R + OH + OU | 0.014 | 0.140 | 0.009 | 0.191 | 0.134 |
OH + R + OH | 0.231 | 0.090 | 0.335 | 0.186 | 0.141 |
R + OU + C | 0.031 | 0.148 | 0.061 | 0.199 | 0.144 |
OU + OH + OU | 0.006 | 0.052 | 0.049 | 0.423 | 0.150 |
... | |||||
Pile shuffle (mushing) | 0.418 | 0.129 | 0.631 | 0.487 | 0.279 |
Riffle shuffle | 0.253 | 0.333 | 0.492 | 0.232 | 0.296 |
Over-under shuffle | 0.012 | 0.247 | 0.140 | 0.803 | 0.368 |
Overhand shuffle | 0.489 | 0.321 | 0.755 | 0.853 | 0.502 |
Combining up to three, including up to one pile shuffle
The best technique with a single pile shuffle is clearly two over-unders and a pile shuffle (visualize).
Technique | Absolute | Histogram | Order | Relative | Overall |
---|---|---|---|---|---|
OU + OU + P | 0.000 | 0.004 | 0.012 | 0.006 | 0.004 |
R + P + OU | 0.003 | 0.006 | 0.034 | 0.041 | 0.016 |
OU + R + P | 0.001 | 0.014 | 0.019 | 0.030 | 0.017 |
R + P + C | 0.004 | 0.015 | 0.022 | 0.030 | 0.018 |
R + R + P | 0.024 | 0.025 | 0.045 | 0.003 | 0.019 |
R + OU + P | 0.001 | 0.024 | 0.010 | 0.021 | 0.020 |
R + P + R | 0.044 | 0.009 | 0.084 | 0.035 | 0.022 |
R + P + OH | 0.044 | 0.009 | 0.030 | 0.040 | 0.023 |
OH + R + P | 0.046 | 0.024 | 0.058 | 0.024 | 0.027 |
C + OU + P | 0.000 | 0.027 | 0.019 | 0.059 | 0.032 |
OU + R + R | 0.001 | 0.006 | 0.081 | 0.098 | 0.033 |
R + R + R | 0.060 | 0.017 | 0.118 | 0.056 | 0.036 |
OU + OH + P | 0.002 | 0.022 | 0.001 | 0.097 | 0.040 |
C + R + P | 0.029 | 0.045 | 0.066 | 0.034 | 0.040 |
R + C + P | 0.024 | 0.052 | 0.005 | 0.030 | 0.041 |
R + OH + P | 0.048 | 0.046 | 0.077 | 0.037 | 0.045 |
OU + P + R | 0.001 | 0.004 | 0.023 | 0.155 | 0.046 |
OU + P + C | 0.000 | 0.008 | 0.019 | 0.155 | 0.048 |
P + R + OU | 0.004 | 0.004 | 0.048 | 0.160 | 0.049 |
OH + R + R | 0.117 | 0.014 | 0.082 | 0.084 | 0.049 |
OU + P + OU | 0.008 | 0.001 | 0.025 | 0.169 | 0.050 |
OH + P + C | 0.010 | 0.015 | 0.014 | 0.142 | 0.050 |
R + OU + R | 0.003 | 0.048 | 0.058 | 0.077 | 0.050 |
OU + P + OH | 0.001 | 0.003 | 0.022 | 0.172 | 0.050 |
C + R + R | 0.035 | 0.045 | 0.128 | 0.066 | 0.051 |
OH + OU + P | 0.002 | 0.028 | 0.001 | 0.130 | 0.052 |
P + R + OH | 0.090 | 0.006 | 0.088 | 0.129 | 0.054 |
P + C + R | 0.017 | 0.001 | 0.078 | 0.177 | 0.054 |
P + OU + R | 0.022 | 0.001 | 0.031 | 0.180 | 0.055 |
P + R + C | 0.003 | 0.006 | 0.055 | 0.181 | 0.055 |
P + C + OU | 0.001 | 0.000 | 0.056 | 0.195 | 0.056 |
OU + C + P | 0.000 | 0.029 | 0.019 | 0.147 | 0.058 |
P + C + C | 0.026 | 0.006 | 0.092 | 0.177 | 0.058 |
P + C + OH | 0.009 | 0.001 | 0.062 | 0.198 | 0.058 |
P + OU + OH | 0.012 | 0.003 | 0.024 | 0.197 | 0.059 |
P + OH + OU | 0.002 | 0.004 | 0.044 | 0.202 | 0.060 |
OH + P + OU | 0.011 | 0.006 | 0.039 | 0.194 | 0.060 |
P + OU + OU | 0.002 | 0.002 | 0.050 | 0.207 | 0.061 |
P + R + R | 0.088 | 0.006 | 0.170 | 0.152 | 0.061 |
C + P + R | 0.041 | 0.010 | 0.003 | 0.178 | 0.061 |
C + P + OU | 0.006 | 0.006 | 0.051 | 0.201 | 0.062 |
C + P + C | 0.009 | 0.018 | 0.070 | 0.175 | 0.062 |
OU + OH + R | 0.031 | 0.018 | 0.034 | 0.171 | 0.063 |
R + R + OU | 0.003 | 0.072 | 0.034 | 0.082 | 0.064 |
R + OH + R | 0.114 | 0.048 | 0.135 | 0.073 | 0.066 |
P + OH + R | 0.078 | 0.004 | 0.038 | 0.185 | 0.066 |
OU + R + OU | 0.003 | 0.035 | 0.052 | 0.164 | 0.067 |
OH + P + R | 0.090 | 0.010 | 0.137 | 0.171 | 0.069 |
P + OU + C | 0.026 | 0.005 | 0.023 | 0.224 | 0.070 |
P + OH + OH | 0.095 | 0.005 | 0.147 | 0.182 | 0.070 |
P + OH + C | 0.020 | 0.007 | 0.073 | 0.222 | 0.070 |
C + OH + P | 0.050 | 0.054 | 0.041 | 0.122 | 0.072 |
C + P + OH | 0.049 | 0.011 | 0.113 | 0.206 | 0.073 |
OH + P + OH | 0.095 | 0.011 | 0.087 | 0.190 | 0.074 |
OH + C + P | 0.050 | 0.051 | 0.041 | 0.143 | 0.076 |
R + C + R | 0.071 | 0.082 | 0.173 | 0.064 | 0.077 |
R + OU + OU | 0.000 | 0.063 | 0.043 | 0.151 | 0.078 |
OU + R + OH | 0.066 | 0.049 | 0.023 | 0.168 | 0.084 |
R + R + C | 0.059 | 0.105 | 0.000 | 0.066 | 0.086 |
OH + OU + R | 0.066 | 0.045 | 0.023 | 0.191 | 0.089 |
C + OH + R | 0.041 | 0.079 | 0.028 | 0.142 | 0.090 |
OH + OH + P | 0.094 | 0.049 | 0.156 | 0.170 | 0.091 |
OH + R + OU | 0.005 | 0.074 | 0.031 | 0.177 | 0.093 |
R + R + OH | 0.117 | 0.090 | 0.181 | 0.086 | 0.094 |
R + OU + OH | 0.005 | 0.093 | 0.010 | 0.166 | 0.099 |
C + C + P | 0.079 | 0.066 | 0.164 | 0.207 | 0.109 |
OU + OU + OH | 0.004 | 0.020 | 0.037 | 0.345 | 0.109 |
OU + R + C | 0.099 | 0.065 | 0.107 | 0.209 | 0.111 |
OU + C + R | 0.124 | 0.057 | 0.116 | 0.214 | 0.112 |
OH + C + R | 0.144 | 0.076 | 0.157 | 0.166 | 0.112 |
OH + OH + R | 0.232 | 0.054 | 0.357 | 0.184 | 0.121 |
C + OU + R | 0.111 | 0.062 | 0.091 | 0.248 | 0.121 |
C + R + OU | 0.031 | 0.127 | 0.062 | 0.162 | 0.122 |
OH + R + C | 0.121 | 0.098 | 0.192 | 0.167 | 0.122 |
OU + OU + OU | 0.003 | 0.012 | 0.067 | 0.415 | 0.125 |
Pile shuffle (stacking) | 0.101 | 0.080 | 0.194 | 0.227 | 0.126 |
R + C + OU | 0.025 | 0.146 | 0.060 | 0.154 | 0.130 |
R + OH + OU | 0.015 | 0.140 | 0.010 | 0.191 | 0.134 |
OH + R + OH | 0.231 | 0.089 | 0.335 | 0.186 | 0.141 |
R + OU + C | 0.030 | 0.148 | 0.060 | 0.199 | 0.144 |
OU + OH + OU | 0.006 | 0.052 | 0.049 | 0.423 | 0.150 |
... | |||||
Pile shuffle (mushing) | 0.418 | 0.129 | 0.631 | 0.487 | 0.279 |
Riffle shuffle | 0.253 | 0.333 | 0.492 | 0.232 | 0.296 |
Over-under shuffle | 0.012 | 0.247 | 0.140 | 0.803 | 0.368 |
Overhand shuffle | 0.489 | 0.321 | 0.755 | 0.853 | 0.502 |
Repetitions
Also of some interest is how well each technique improves the shuffle if repeated. As you can see, overhand improves very slowly, while riffle approximately halves the error on each iteration and pile shuffle reduces it by about 80%. (This 80% figure is probably directly related to the fact that I use 5 piles. 1-1/5 = 80%.) Other observations: overhand seems to alternate several properties with each iteration; over-under does the same but mixes much more rapidly, although many runs remain unbroken; pile shuffling rapidly approaches perfection; and riffle shuffling quickly mixes the middle of the deck while the top and bottom are much slower to mix.
Technique | Absolute | Histogram | Order | Relative | Overall |
---|---|---|---|---|---|
Overhand x1 | 0.489 | 0.322 | 0.755 | 0.853 | 0.502 |
Overhand x2 | 0.730 | 0.229 | 0.806 | 0.760 | 0.458 |
Overhand x3 | 0.468 | 0.185 | 0.666 | 0.685 | 0.374 |
Overhand x4 | 0.634 | 0.157 | 0.696 | 0.622 | 0.364 |
Overhand x5 | 0.447 | 0.136 | 0.601 | 0.569 | 0.309 |
Overhand x6 | 0.565 | 0.120 | 0.617 | 0.522 | 0.304 |
Overhand x7 | 0.425 | 0.107 | 0.548 | 0.480 | 0.264 |
Over-under x1 | 0.012 | 0.247 | 0.140 | 0.803 | 0.368 |
Over-under x2 | 0.007 | 0.084 | 0.087 | 0.549 | 0.204 |
Over-under x3 | 0.004 | 0.012 | 0.066 | 0.415 | 0.125 |
Over-under x4 | 0.000 | 0.001 | 0.052 | 0.346 | 0.098 |
Over-under x5 | 0.000 | 0.000 | 0.040 | 0.288 | 0.082 |
Over-under x6 | 0.000 | 0.000 | 0.032 | 0.241 | 0.068 |
Over-under x7 | 0.000 | 0.000 | 0.027 | 0.205 | 0.058 |
Pile (stacking) x1 | 0.101 | 0.080 | 0.194 | 0.227 | 0.126 |
Pile (stacking) x2 | 0.020 | 0.003 | 0.034 | 0.045 | 0.017 |
Pile (stacking) x3 | 0.004 | 0.000 | 0.005 | 0.001 | 0.001 |
Pile (stacking) x4 | 0.000 | 0.000 | 0.001 | 0.001 | 0.000 |
Pile (stacking) x5 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 |
Riffle x1 | 0.254 | 0.332 | 0.493 | 0.232 | 0.296 |
Riffle x2 | 0.124 | 0.119 | 0.241 | 0.081 | 0.111 |
Riffle x3 | 0.061 | 0.017 | 0.119 | 0.056 | 0.036 |
Riffle x4 | 0.029 | 0.003 | 0.058 | 0.046 | 0.019 |
Riffle x5 | 0.014 | 0.001 | 0.031 | 0.026 | 0.010 |
Riffle x6 | 0.007 | 0.000 | 0.017 | 0.015 | 0.006 |
Riffle x7 | 0.003 | 0.000 | 0.009 | 0.009 | 0.003 |
Riffle x8 | 0.002 | 0.000 | 0.005 | 0.005 | 0.002 |
Comments
No comments yet.