This is a visualization of six repeated perfect in-shuffles of a deck with 125 cards and five piles. The horizontal lines of dots, which are colored from red to black, represent the particular orderings of the cards throughout the shuffling process. The vertical curves represent the paths the cards take from start to finish. Notice that after three shuffles the sequence of cards is reversed, and that after six shuffles the cards are restored to their original order. The curves are colored from white to black, and back to white again, in order to better show the mechanics of the shuffle, and the fact that each perfect in-shuffle preserves the so-called “stay-stack principle”.
The inspiration for these visualizations came from attending a talk by Perci Diaconis last year. I wanted to know if I could better understand the mathematics of card shuffling by aesthetically exploring the various permutations underlying the shuffling methods. My motivation was to make these invisible structures visible and create elegant and interesting art in the process. I find the process of experimenting with mathematical structures through computer code both rewarding and exciting, and I am deeply fascinated with how code can be used to visualize, and make tangible, mathematical concepts, and especially with how complexity can arise from simple assumptions. This art complements my Bridges paper “Card Shuffling Visualizations”.