**August 2006**

This month, we take up where we left off a year ago in The First Norman Invasion. There, we considered a terrific and versatile mathematical card principle published in 1958 by Norman Gilbreath. Eight years later, in 1966, he published a wonderful generalization--basically extending his first observation from the case *n = 2* to arbitrary *n*--which is often referred to as the Second Gilbreath principle. Both first appeared in the *Linking Ring*, a magazine for magicians.

##
The Second Gilbreath Principle

Riffle shuffling a deck of cards is generally assumed to randomize the cards, yet a single riffle shuffle of a prearranged deck can lead to some quite predictable results. The kind of prearrangement we have in mind here is a cyclic repetition, for instance, a whole deck could consist of 4 stacked repeats of 13 cards in the (alphabetical) order: Ace, 8, 5, 4, Jack, King, 9, Queen, 7, 6, 10, 3, 2; completely ignoring suits. Another possibility would be to cycle suits, for instance having 13 repeats of ♣, ♥, ♠, ♦, this time ignoring values. (A simple colour cycling, red/black, is a special case of this which takes us back to the First Gilbreath Principle considered before.) There's no need to use an entire deck; indeed losing a few cards gives rise to packet sizes which have more interesting factorizations than 52 has.

In general, suppose we have packet of *mn* cards consisting of *m* stacked repeats of a particular set of *n* cards, each set being in the same fixed order with respect to some key characteristic. *Gilbreath shuffling* such a packet refers to the process of dealing out onto the table (hence reversing their order) some of these cards, typically "about half the packet," and riffling shuffling the resulting two piles together.

What Norman Gilbreath noted about the shuffled packet was that from the top down--or the bottom up--counting *n* cards at a time, we are sure to get sets which are identical in characteristic (disregarding order) to the original sets.

For instance, in the case *m = 13* and *n = 4* above, cycling suits in the order ♣, ♥, ♠, ♦, we are certain to end up with 13 stacks of 4 cards, in each of which all suits are represented (once), although their precise order can vary. In the case *m = 4* and *n = 13*, cycling values, then provided that the same order is used within each collection of 13 cards, we are certain to end up with 4 stacks of 13 cards, in each of which all values are represented (once), in some order. (Presently, we will consider situations in which both cases hold simulataneously.)

Note that the special case where *n = 2* permits additional flexibility: instead of dealing out cards to reverse their order, the packet can simply be cut anywhere to form two piles before shuffling, provided that a minor adjustment is made at the completion of the shuffle (this was discussed last year).

To see why the Second Gilbreath Principle holds in general, let's assume that some cards are dealt out to form one pile, which is then riffle shuffled into the rest. Consider the top *n* cards of the shuffled packet: if * k* of them come from the dealt out cards, then they are intermingled with *n - k* cards which can only have come from the undealt packet. But a moment's though reveals that these *n = k + (n - k)* cards were contiguous in the original deck, and hence contain one of each type. A similar argument applies to the next *n* cards, and so on, until we arrive at the bottom *n* cards.

Note that it's also permissible to cut the packet anywhere, as often as desired, before it's Gilbreath shuffled, and the desired outcome is still guaranteed.

The effects explored below follow paths well-trodden over the decades.

##
Her Room of Cards

Our first effect is based on a classic first learnt from John H. Conway circa 2000. (In more recent times, he has completely reworked the presentation as a crowd pleaser called "This is the trick that I can't do," involving up to a dozen participants, which we cannot do justice to here.)

A deck is handed out, and a spectator invited to cut it as often as she wishes. She is then asked to deal between a third and a half of the cards to the table before riffle shuffling the resulting piles together. Take the deck back and remark that surely the cards are thoroughly mixed now, flashing some of the card faces to prove your point.

Take pairs of cards from the top of the deck, dropping them on the table face up remarking, "One red, one black." Once the audience is suitably impressed, drop clumps of four cards face up on the table, drawing attention to the fact that all four suits are represented. Finally, deal thirteen cards face up, saying, "Even more remarkably, there is one card of each possible value here." Turn over the remaining cards, saying, "The same holds for these cards."

The secret here is to have interwoven cycles of length 13 and 4: the values and suits simultaneously repeat in separate fixed orders. E.g., using the orderings suggested above, the deck would run: A♣, 8♥, 5♠, 4♦, J♣, ..., 7♦, 6♣,..., 10♥, 3♠, 2♦, from top to bottom. After the Gilbreath shuffle, the deck exhibits two properties, starting at the top (or bottom): firstly, each group of four cards has one of each suit, and secondly each group of thirteen cards has one of each value. As a free bonus (and an example of the First Gilbreath Principle), since the deck started with alternating colours, each pair of cards still consists of one red and one black (although the order may vary).

The goal, upon getting the deck back, is first to turn over an even number of pairs, one at a time, verifying that there is always one red and one black card. Next, turn over clumps of four cards, confirming that each suit is present, until 24 cards have being dealt. Turn over one more pair as an apparent afterthought, drawing attention to the opposite colours. The remaining 26 cards can now be dealt out face up, 13 at a time, to reveal one of each value each time.

##
Faces Mod Horror

Another possibility when a complete deck has been Gilbreath shuffled as above is to take the deck back and ask the shuffler to call out a number between one and thirteen, saying that you will try to guess the identity of the corresponding card in the deck. Suppose "Nine" is called out. Deal out about a third of the deck in an untidy overlapping row, all cards face up except for the ninth, which is face down. Stress the difficulty of determining the face down card, since you can't see all of the 51 remaining cards. Nevertheless, in short order you correctly announce the identity of the ninth card.

To determine the suit involved, all you have to do is scan the cards in groups of four, starting with the first one, and see what suit is missing. In the case of the ninth card, you would only need to pay attention to the suits of the three cards immediately after it. To determine the value, you must scan the values of the first 13 cards, and note which one is missing. Unless "Thirteen" is called out, it suffices to deal out just 13 cards each time, but it's much better to deal more so that some values repeat. You can even have a little fun playing with the spectators' minds, muttering something like, "Aha, I see two Jacks, those have value 11, raise that to the power of 9--you did say `nine' right?--now take the remainder upon division by 51. Next use the Chinese Remainder Theorem, let's see, yes, your card is... ."

##
Separated at Girth

Gilbreath shuffling a deck in which the colours alternate, such as in the last few routines--or several of the ones considered a year earlier--facilitates a display of a "sixth sense" which can be used at the conclusion of one of those routines. Care must be taken in picking up the cards not to disturb the order they were in after the riffle shuffle. The following presentation is due to Jeffrey Ehme---it's a twist on a standard flourish learnt from John H. Conway.

Having already performed some minor miracle as above, hand the reassembled deck face down to another spectator and say, "Let's do an experiment here. Please deal these cards alternately into two piles." Once this has been done, ask the spectator to point to either pile and pick it up, turning it over so that the card faces can be seen. You take the other pile for yourself and hold it behind your back. Request that the spectator deal his cards into two face up piles, according to colour: reds to the left, blacks to the right. Bring your own hands forward and say, "I asked you to pick a pile at random, and then to split them into red and black cards. I made it easy for you by letting you see the card faces. I tried to achieve the same result myself, but my cards were well out of sight. I used my sixth sense. A waist is a terrible thing to mind. Let's see how I did." Turn over your hands to reveal that the left one has all the reds, and the right one all the blacks.

Here's how it's done. With your hands behind your back, you mirror his actions as follows. Holding your pile face up in the left hand, collect cards in your right hand in two new piles, say a lower and an upper, using some of your right fingers as a natural separator, and anchoring everything with your right thumb and little finger. Every time the spectator deals a red card to the left on the table, you move a card from your left hand to the lower pile in your right hand, and every time the spectator deals a black card to the right on the table, you move a card from your left hand to the upper pile in your right hand. When it's all over, your lower pile will be all black and your upper pile will be all red. It only remains to transfer the upper one back to the left hand and bring both hands forward.

##
The Magician Writes a Prediction (Variation 47)

We wrap up with a stunt which might amuse fans of logician Raymond Smullyan. Write a prediction on a piece of paper which is folded and set aside, under a book, saying, "The magician writes a prediction on a piece of paper which is folded and set aside." Hand the deck to a spectator, who is invited to cut it, deal between a third and a half of the cards to the table, and riffle shuffle the resulting piles together. Have the top nine cards turned over, and the sum of their values computed. Have the spectator turn to the corresponding page in the book and read aloud the first complete sentence on that page; it will match your prediction to the letter and word.

The book is Martin Gardner's classic *Mathematics, Magic and Mystery*, which is now celebrating its 50th birthday. The deck contains just 48 cards, the 8's having been surreptitiously removed. The cards are arranged as follows, ignoring suits: order each set of Ace, 2, 3, 4, 5, 6, 7, 9, 10 the same way, for instance alphabetically, and stack these together. Finally, randomly insert the twelve Jacks, Queens and Kings any where into this packet. When ready to perform, publicly cut the deck several times, and write "The magician writes a prediction on a piece of paper which is folded and set aside" on a piece of paper which is folded and set aside, under the book, announcing what you are doing as suggested earlier.

Before handing the deck out, cut it a few times and say, "This works best without the royal cards." Openly run through the deck face up, tossing out Jacks, Queens and Kings as they occur; the fact that they are in random positions suggests that the rest of the deck is in no particular order. Next, proceed as indicated. After the spectator Gilbreath shuffles, request that the first nine cards have their valued added. By the Gilbreath principle, these will be (in some order) the Ace, 2, 3, 4, 5, 6, 7, 9 and 10, whose sum is 47. By an odd coincidence, the first complete sentence on page 47 of *Mathematics, Magic and Mystery* is "The magician writes a prediction on a piece of paper which is folded and set aside."

##
How to Analog Divide

Since the Gilbreath Principle depends on reversing the order of many of the cards before riffling, continuously dealing out a lot of the deck seems unavoidable. But there is a simple way to effect a similar result in one fell swoop, which is an option for many of the routines above: merely flip over some of the deck, before shuffling it into the rest! One way to make this seem like a natural thing to do is to have the deck rigged as desired but with numerous cards face up from the beginning. Draw attention to the mixed state of the deck, then ask for a chunk to be cut off, turned over and shuffled into the remainder.

##
It's the Principle that Counts

Some have argued that since the First Gilbreath Principle is just a special case of the Second one, it's a mistake to use the terms "First" and "Second," and better to say that there is just one principle. Long established conventions have a way of determining current usage. Here are some recent words of interest from Norman Gilbreath himself: "I am afraid I was the first to use the phrase Second Gilbreath Principle--this was to make it more understandable for magicians. At the time while I had realized the general principle I had not yet found an application that was interesting except for pairs and the whole deck. It is best in principle to just refer to the Principle. By the way, since it took over two years for the first application to appear in the *Linking Ring* I had already developed most of the routines that I later published before the first was in print."