Faro shuffle

Diaconis, Graham, and Kantor also call this the technique, when used in magic.

[1] Mathematicians use the term "faro shuffle" to describe a precise rearrangement of a deck into two equal piles of 26 cards which are then interleaved perfectly.

The deck is separated into two preferably equal parts by simply lifting up half the cards with the right thumb slightly and pushing the left hand's packet forward away from the right hand.

A flourish can be added by springing the packets together by applying pressure and bending them from above.

According to the magician John Maskelyne, the above method was used, and he calls it the "faro dealer's shuffle".

[4] Maskelyne was the first to give clear instructions, but the shuffle was used and associated with faro earlier, as discovered mostly by the mathematician and magician Persi Diaconis.

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.

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.

Repeated in-shuffles can reverse the order of the deck.

For example, 52 consecutive in-shuffles restore the order of a 52-card deck, because

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

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, ... (sequence A002326 in the OEIS).

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.

A deck of this size returns to its original order after 3 in-shuffles.

A deck of this size returns to its original order after 4 out-shuffles.

Magician Alex Elmsley discovered[citation needed] that a controlled series of in- and out-shuffles can be used to move the top card of the deck down into any desired position.

The trick is to express the card's desired position as a binary number, and then do an in-shuffle for each 1 and an out-shuffle for each 0.

Notice that it doesn't matter whether you express the number ten as 10102 or 000010102; preliminary out-shuffles will not affect the outcome because out-shuffles always keep the top card on top.

In mathematics, a perfect shuffle can be considered an element of the symmetric group.

, the perfect shuffle is the permutation that splits the set into 2 piles and interleaves them: In other words, it is the map Analogously, the

Comparison of a perfect faro out-shuffle and in-shuffle, the numbers denoting each card's positions before the shuffle