Section 4 · The Gilbreath Principle
Four Suits Survive
You cut sixteen cards, deal some into a pile, and riffle the two packets together however you like. Then, from every group of four, you show me any three cards. I name the suit of the one you kept hidden.
Watch the lectureLecture 32 · Four suits survive the shuffle
Try it
You make every choice: how to cut, how many to deal, and which packet each card of the riffle comes from. The cards stay face down until the groups are laid out.
Why it works
The packet was prepared. Its suits repeat the cycle club, heart, spade, diamond, four times: ♣ ♥ ♠ ♦ ♣ ♥ ♠ ♦ … Any four neighbouring cards in that cycle hold one card of each suit. A cut only changes where we start reading the cycle, and because the packet is a whole number of cycles, the join between bottom and top fits the pattern too. So cuts are harmless.
The shuffle itself looks destructive, but it is very particular. Number the cards 1 to 16 in the order they had just before the deal. Dealing the top few one at a time reverses them, so the two packets now face away from each other across the place where you split. The next card of the dealt pile is always the neighbour just left of what has been used; the next card of the other packet is the neighbour just right. Whatever you choose, each card extends the used stretch by one at one end. It can never jump over a card.
So after any number of cards have come out of the riffle, they are exactly one unbroken stretch of the original numbering, in scrambled order. After four cards, that stretch has length four: one of each suit. After eight cards, a stretch of length eight: two of each suit. Take away the first group’s one of each, and the second group must hold one of each as well. The same subtraction works at twelve and at sixteen.
The first four, eight, twelve or sixteen cards of the shuffle (one, two, three or four complete groups) always come from one unbroken stretch of the cycle, so they hold that many of each suit; subtracting the totals at consecutive boundaries leaves one of each suit in every aligned group.
Step through the episode’s eight-card example below, or replay your own shuffle once you have done one. Watch the original numbering on the strip: the lit stretch never has a hole.
Two things do not survive. The order of suits inside a group changes, which is why the prediction is only ever about the missing suit. And a group that does not start at a multiple of four has no guarantee at all: in the worked example, output cards 2 to 5 are ♦ ♣ ♥ ♥. That window is the difference between the first five cards and the first card, and neither length is a multiple of four. This is why each completed group is set aside before the next four are taken.
Challenge: break the guarantee
Your goal: produce an aligned group of four with a repeated suit. Try it first with every rule in place. Then break exactly one rule and find the shuffle that fails. The feedback names the step of the proof that no longer holds.
Perform it yourself
Set-up
- Take the aces, twos, threes and fours. Stack them face down so that, from the top, they read A♣ 3♥ 2♠ 4♦ · 2♣ 4♥ 3♠ A♦ · 3♣ A♥ 4♠ 2♦ · 4♣ 2♥ A♠ 3♦. Only the suit cycle ♣ ♥ ♠ ♦ matters; the ranks are there to make the packet look ordinary.
- Why mix the ranks? The episode’s stack keeps them in blocks (A♣ A♥ A♠ A♦ 2♣ 2♥ …), and then a group of four often comes out as four of a kind, which hints at a prepared packet. With the order above, no legal shuffle ever deals four of a kind.
- Memorise the lookup, which is just “the suit that has not appeared”: visible ♥ ♠ ♦ → ♣; ♣ ♠ ♦ → ♥; ♣ ♥ ♦ → ♠; ♣ ♥ ♠ → ♦.
Performance
- Hand over the packet. The spectator may cut it as often as they like, keeping the cards face down.
- Ask them to deal some cards from the top into a new pile, one at a time, and to stop with cards still in their hand (anywhere from 1 to 15).
- Ask them to riffle the two packets together once. It need not alternate; several cards may drop from either side. The order within each packet must stay intact. Use the result exactly as it lands: no cut afterwards.
- Ask them to take the top four cards, in order, and lay them in a row face down. They choose any one to stay hidden and turn the other three face up.
- Name the missing suit, then have them turn the hidden card. Set the completed group aside, keeping its boundary, and take the next four from the top. Don’t drop or discard a card between groups: that shifts every boundary after it.
- For the third group, swap roles: you choose the hidden card and the spectator names the suit. Finish with the fourth group, then point out that every group holds one club, one heart, one spade and one diamond.
If something goes wrong
- The riffle is awkward. Say: “You can build the shuffle by choosing the next top card from either packet.” Lay the chosen cards in a row from left to right, then gather from the rightmost card first, so that the gathered packet’s top-to-bottom order equals the row.
- Three visible cards repeat a suit. Don’t guess. Say: “These cards do not meet our prepared-group condition. Let us inspect the handling and reset.” Check the stack, that there was only one interleaving, and that the groups were taken in order.
Going deeper
The general principle, for any cycle
Nothing here is special to suits. Take any m labels L1, …, Lm repeating in a fixed order, q complete times, so the packet has qm cards. Reverse a prefix and interleave it once with the rest, keeping both orders. For every k from 1 to q, the first km output cards are an unbroken stretch of the original line, so they contain k copies of every label. Group k occupies output positions (k − 1)m + 1 to km, and its labels are the difference between two prefix inventories: exactly one of each.
Red and black alternating is the case m = 2, which gives Gilbreath’s first principle: every aligned pair is one red, one black. If a label repeats inside the base cycle, the same argument preserves that cycle’s multiset: a cycle A A B C gives aligned blocks with two A’s, one B and one C.
The inventory has limits. If you hide two cards of a four-suit group, the visible two tell you which two suits are missing, but not which hidden card is which.
Which hypotheses the proof uses
The reversal. It makes the two packets run outward from one seam. Without it, both packets run forward from separate starting points and the used cards can have gaps. The Challenge lets you watch this happen.
Order within each packet. Taking a card from the middle of a packet jumps over an unused card, and the stretch acquires a hole.
Alignment. The subtraction compares prefixes whose lengths are multiples of four. A shifted window compares lengths like 5 and 1, whose inventories need not differ by one of each.
Complete cycles. These make arbitrary cuts safe. Without a cut, a packet that ends part-way through a cycle still works for the complete groups it contains; the performance uses whole cycles so that both cuts and the final grouping need no extra cases.
One shuffle only. A second riffle starts from an arrangement that is no longer the repeating cycle, so the theorem says nothing about it.
Computation checks examples; the proof covers all cases
For this page we checked every legal choice by computer: all 16 cuts, all 15 split sizes and every interleaving of the two packets, 1,048,544 shuffles of the sixteen-card packet (and every shuffle of the eight-card one). Every aligned group had one of each suit, and the missing-suit lookup was right for every choice of hidden card. That checks the simulation. The guarantee for packets of every size comes from the interval argument, not from the count.
Different histories can produce the same final order, so the number of shuffles is not the number of distinct outcomes. That question has a lovely answer, taken up in The Spectator Deals Poker.
Sources
Persi Diaconis and Ron Graham, Magical Mathematics (Princeton, 2012), Chapter 5, p. 66 and pp. 68–71: the four-suit illustration and the general Gilbreath principle. The sixteen-card presentation, the role swap in the third group and the explicit group handling are adapted for this course.
The principle is named for Norman Gilbreath, the mathematician and magician who discovered the shuffle’s hidden order in the late 1950s.
Course episodes 32 (performance) and 33 (the general principle).