The Faro Shuffle:

A Faro shuffle is probably one of the most intricate skills in an elite magician’s arsenal. Although it’s simple in concept, it is extremely difficult to perform and it typically needs years and years of practice. The idea of a shuffle is to randomize the cards, and since a typical shuffle is sloppy, that is usually true. However, a Faro shuffle is not random at all. In a perfect shuffle or a Faro shuffle the cards are divided exactly in half (top and bottom) and then interspersed alternately. Twenty one consecutive (out) Faro shuffles for a 50-card deck. However, it only takes eight consecutive Faro shuffles to bring a 52-card deck back to its original order. Interesting. Java: If the number of cards in the deck is 12,

public class outFaro {
 public static void main(String[] args) {

  // the number of card in the deck
  int numberofcardindeck = 12;
  // creating an array of cards
  int[] deck = new int[numberofcardindeck];

  // printing the order of cards in original deck
  System.out.println("Original deck");
  for (int i = 0; i < numberofcardindeck; i++) {
   deck[i] = i + 1;
   System.out.print(deck[i] + " ");
  }
  System.out.println();

  // dividing the cards in half
  int[] firsthalfdeck = new int[numberofcardindeck / 2];
  int[] secondhalfdeck = new int[numberofcardindeck / 2];

  // performing a (out) Faro shuffle
  for (int Faro = 1; Faro <= 50; Faro++) {

   for (int i = 0; i < numberofcardindeck / 2; i++) {
    firsthalfdeck[i] = deck[i];
    secondhalfdeck[i] = deck[i + (numberofcardindeck / 2)];
   }

   for (int i = 0; i < numberofcardindeck / 2; i++) {
    deck[2 * i] = firsthalfdeck[i];
    deck[2 * i + 1] = secondhalfdeck[i];
   }
   System.out.println();
   System.out.println("Order under Faro Shuffle: " + Faro);
   for (int i = 0; i < numberofcardindeck; i++) {
    System.out.print(deck[i] + " ");
   }
   // done when the second card comes back to its original position
   if (deck[1] == 2) {
    break;
   }
  }
 }
}

Result:

Original deck
1 2 3 4 5 6 7 8 9 10 11 12 

Order under Faro Shuffle: 1
1 7 2 8 3 9 4 10 5 11 6 12 
Order under Faro Shuffle: 2
1 4 7 10 2 5 8 11 3 6 9 12 
Order under Faro Shuffle: 3
1 8 4 11 7 3 10 6 2 9 5 12 
Order under Faro Shuffle: 4
1 10 8 6 4 2 11 9 7 5 3 12 
Order under Faro Shuffle: 5
1 11 10 9 8 7 6 5 4 3 2 12 
Order under Faro Shuffle: 6
1 6 11 5 10 4 9 3 8 2 7 12 
Order under Faro Shuffle: 7
1 9 6 3 11 8 5 2 10 7 4 12 
Order under Faro Shuffle: 8
1 5 9 2 6 10 3 7 11 4 8 12 
Order under Faro Shuffle: 9
1 3 5 7 9 11 2 4 6 8 10 12 
Order under Faro Shuffle: 10
1 2 3 4 5 6 7 8 9 10 11 12 

After 10 out-Faro shuffles, the card returns to its original permutation. Therefore, 10 is the order of the permutation.

The table below shows number of cards in a deck and the number of out-Faro shuffles required to bring it back to its original permutation.

The definition of permutation and permutation group:

“A permutation of a set A is a function from A to A that is both one-to-one and onto. A permutation group of a set A is a set of permutations of A that forms a group under function composition.”

A Faro Shuffle is one-to-one and onto. At any frequency of the shuffle, every index (1-n) will have a unique card. Also, for every card, there is a unique index regardless of the frequency of the shuffle. The permutation for every “Number of cards” can be thought as a group under the operation - FaroShuffle. Also, since “Number of Faro Shuffles” returns us back to the original permutation, we can establish it as the order of the permutation group.

Theorem: The order of a permutation of a finite set written in disjoint cycle form is the least common multiple of the lengths of the cycles.The order of a permutation of a finite set written in disjoint cycle form is the least common multiple of the lengths of the cycles.

This is one of the most important Group Theory Theorems. Let us consider a 52-card deck to demonstrate this. From the Java code, the order is 8 when n is 52. Instead of looking at disjoint cycle form of the permutation to figure out the order of each element, we can also look at every permutation the original permutation has been to before returning to the original permutation. For n = 52, the table below shows all the permutations.

From the table above, order of 1 and 52 = 1, order of 18 and 35 = 2 and order of rest of the elements = 8 The L.C.M (1,2,8) = 8 is the order of the group according to the Theorem. This is also what we got from the Java code.

Conjectures / Proofs:

In-Faro and Out-Faro In an out-Faro shuffle, the top card from first half of the deck always remains on top. In an in-Faro shuffle, the top card from second half will be the new top card of the new shuffled deck.

Since I did not have a deck of card with me, and I was bored, I wrote a very simple Android app to demonstrate in and out shuffle.

Generating a random deck with 4 cards. Notice that the Eight of Hearts is on top.

Out-Faro 1: Eight of Hearts is on top.

Out-Faro 2: Eight of Hearts is still on top and the deck is back in its original permutation. Therefore, order = 2.

In-Faro 1: Using the same deck, Eight of Hearts is no longer on top.

In-Faro 2: Again…

In-Faro 3:

In-Faro 4: Back to its original order. Order = 4.

More screenshots:

Another reason for writing the app was to see the connection between Binary Number System and Faro Shuffle. I read somewhere that magicians and gamblers use this for their advantage.

Consider a random eight card deck.

Now, the trick is, to send the Queen of Clubs to say for example, 7th position in the deck (6 cards on top of it), the gambler would perform two in-Faros and one out-Faro. 6 in binary is 110; so, for digit 1, the magician would perform an in-Faro and for 0, an out-Faro.

1st in-Faro:

2nd in-Faro:

out-Faro:

Queen of Clubs is now in the 7th position. Also, its really interesting that this works irrespective of the number of cards in the deck.

I also found that the order of (2n+2) out-Faro shuffle is equal to the order of (2n) in-Faro shuffles.

I find that pretty interesting and I do not really see that to be obvious. It also implies that for no 2n, In-Faro=Out-Faro (I think). I will be investigating on these more later.