DFA · Regular
Shuffling three cards
s swaps the top two cards; c moves the top card to the bottom. Accepted: the shuffles that put the deck back in order. The six states are the six orders, and the machine is the Cayley graph of the permutation group S₃.
The author’s examples, run
ε → acceptccssc → acceptss → acceptcccccsscss → accepts → rejectscssc → rejectcs → rejectsccccsscss → reject