Faro shuffle perfect shuffles, solved

Cut the deck exactly in half and interleave the halves card by card. If the top card stays on top it is an out-shuffle (O); if it goes second, an in-shuffle (I). Eight out-shuffles bring a 52-card deck back to new-deck order, 26 in-shuffles turn it upside down, and the two together reach exactly 26!·2²⁶ ≈ 2.7·10³⁴ orders — every order in which the cards at positions i and 53−i stay together as a pair.

Puzzle: the target order was made from a new deck by a few perfect shuffles. Reach it with as few shuffles as you can (keys I, O, Backspace). The solver finds the shortest I/O word by a bidirectional search.

reach the target

now
target

elmsley's trick — send the top card to any position: write it in binary, 1 = in, 0 = out

10

god's number — how many deck orders are exactly d shuffles from new-deck order (full census)

 

the shuffle group — order of <I, O>, proved

turning the deck over — shortest word for the reversal

checks