Card Shuffling Font

by Erik Demaine and Martin Demaine, 2015



A perfect shuffle cuts a deck of cards exactly in half, and riffle shuffles them together with exact alternation between the two halves. There are two different perfect shuffles depending on which half drops a card first, placing the top card either on top (outside or O) or one card down (inside or I). By an appropriate sequence of perfect shuffles (just logarithmically many), you can bring any desired card to the top of the deck; this is known as Elmsley's Problem, which was solved by Persi Diaconis and Ron Graham.

In this font, we start with a sorted deck of 26 cards labeled A through Z (shown at the left), and for each letter in the message, apply the (at most 5!) perfect shuffles needed to bring that letter to the top of the deck (shown in bold), so that it could be presented to the audience. The Is and Os encode the needed shuffles, and the graphics show how the cards re-order along the way. This font is unusual in how the encoding of each letter depends on the current location of the letter in the deck, which in turn depends on the sequence of letters and resulting shuffles performed before. The font was prepared in honor of Ron Graham's 80th birthday.

Check out other mathematical and puzzle fonts. • Feedback or not working? Email Erik.