The Math of Card Shuffling
fredhohman.com
fredhohman.com
Where can I find other things you've written? I tried searching your website, but it looks like the blog is pretty inactive.
On another note - I saw that you used Idyll for this site. I haven't heard of it but am very interested - what do you think about it?
This was a side project for me. I'm doing my PhD right now so all my current writing is funneled into my research. But Idyll is great for these types of articles, so I'm looking forward to doing more in the future. The creator of Idyll is also a good friend of mine so I may be a bit biased :)
Here's the homepage: https://idyll-lang.org/
Check out other examples too: https://idyll-lang.org/gallery
A small preview: after leaving high school at 14 to travel as a magician, a little more than a decade later he managed to get into grad school at Harvard, largely due to a letter of recommendation about his magic abilities (apparently that's a thing).
I also really enjoyed that he was shy revealing his background in magic to other Stanford faculty until he discovered that Paul Lévy also studied perfect shuffling [2].
[1]: http://www-history.mcs.st-andrews.ac.uk/Biographies/Diaconis...
[2]: https://www.chronicle.com/article/The-Magical-Mind-of-Persi/...
No one uses it in live tricks due to the dexterity required and the fact that to a layman the effect is identical to other easier false shuffles.
If you do that seven times you get a random deck.
If you do it three times you get a fairly random deck, but you'll get clumps of cards together. That's why casinos usually use three cut/riffle steps, and why you can have an advantage playing with a hand shuffled deck.
It's also why I will never play with a machine shuffled deck. Because those are actually shuffled seven times, and are truly random.
This can be improved by splitting the deck between riffles.
52 * (1/1 + 1/2 + 1/3... +1/n), where n=52. This is the harmonic series. I didn't know off-hand of a formula for the sum of the harmonic series, so I searched, and apparently, there is no closed form formula for this. So you either have to actually calculate this number, or find an approximation.
Personally, I just plugged it into Wolfram alpha: http://www.wolframalpha.com/input/?i=1%2F1+%2B+1%2F2+%2B+.......
The result is, approximately, 4.538. And indeed, 4.538 * 52 = 235.976, which rounds down to 235 (not sure why the author rounded down).
Thanks for asking this!
A better alternative would be to put the bottom-third of the deck on top, then riffle.
I'm a bit ill-equipped to go much further than that currently, but the Numberphile video linked in the post may help!
There's also been research on this topic too that you get to from Wikipedia: https://en.wikipedia.org/wiki/Shuffling#Randomization
It should also be said that the "7 normal riffle shuffles" mentioned earlier in the article is not a 'proper shuffle procedure' in the strict sense. For example, it seems to me that cards that were close together in the initial state are likely to remain closer together after 7 riffle shuffles than after a proper shuffle.
Quite a big number!