The faro shuffle is a controlled shuffle that does not fully randomize a deck. A perfect faro shuffle, where the cards are perfectly alternated, requires the shuffler to cut the deck into two equal stacks and apply just the right pressure when pushing the half decks into each other. A faro shuffle that leaves the original top card at the top and the original bottom card at the bottom is known as an
out-shuffle, while one that moves the original top card to second and the original bottom card to second from the bottom is known as an
in-shuffle. These names were coined by the magician and computer programmer
Alex Elmsley. An out-shuffle has the same result as removing the top and bottom cards, doing an in-shuffle on the remaining cards, and then replacing the top and bottom cards in their original positions. Repeated out-shuffles cannot reverse the order of the entire deck, only the middle n−2 cards. Mathematical theorems regarding faro shuffles tend to refer to out-shuffles. An in-shuffle has the same result as adding one extraneous card at the top and one extraneous card at the bottom, doing an out-shuffle on the enlarged deck, and then removing the extraneous cards. Repeated in-shuffles can reverse the order of the deck. If one can do perfect in-shuffles, then 26 shuffles will reverse the order of the deck and 26 more will restore it to its original order. In general, k perfect in-shuffles will restore the order of an n-card deck if 2^k\equiv 1\pmod{n+1}. For example, 52 consecutive in-shuffles restore the order of a 52-card deck, because 2^{52}\equiv 1\pmod{53}. In general, k perfect out-shuffles will restore the order of an n-card deck if 2^k\equiv 1\pmod{n-1}. For example, if one manages to perform eight out-shuffles in a row, then the deck of 52 cards will be restored to its original order, because 2^8\equiv 1\pmod{51}. However, only 6 faro out-shuffles are required to restore the order of a 64-card deck. In other words, the number of in-shuffles required to return a deck of cards of even size
n, to original order is given by the
multiplicative order of 2
modulo (
n + 1). For example, for a deck size of
n=2, 4, 6, 8, 10, 12 ..., the number of in-shuffles needed are: 2, 4, 3, 6, 10, 12, 4, 8, 18, 6, 11, ... . According to
Artin's conjecture on primitive roots, it follows that there are infinitely many deck sizes which require the full set of
n shuffles. The analogous operation to an out-shuffle for an infinite sequence is the
interleave sequence.
Example For simplicity, we will use a deck of six cards. The following shows the order of the deck after each in-shuffle. A deck of this size returns to its original order after 3 in-shuffles. :: The following shows the order of the deck after each out-shuffle. A deck of this size returns to its original order after 4 out-shuffles. :: ==As deck manipulation==