Session 8 of 13 · · 58 min

deBruijn Variant: Suit Grouping Variation

In the “Partitioning People” card trick, five spectators each receive consecutive cards from a specially arranged deck. Based on their card suits, they naturally form into groups - for example, if three people have hearts and two have clubs, they form a grouping pattern of “3,2”.

The deck is arranged so that at each possible cut point, the next five cards will create a unique grouping pattern. So the grouping alone (say “14,25,3”: persons 1 and 4 share a suit, so do persons 2 and 5, and person 3 is alone) tells the performer where the deck was cut, and hence which five cards were distributed.

A carefully arranged deck thus allows the performer to predict exactly how spectators will group themselves based on the suits of their cards. The arrangement ensures that each possible partition of 5 people appears exactly once in the sequence.

Session notes

The last section of chapter 4 closes out the family of tricks where a pre-arranged deck, cut anywhere, lets the top few cards name themselves. The thread running through it is the Bell number , and the suits of a deck serve as the alphabet.

2:00 Universal cycles, the last section of chapter 4 and the last of the “cut anywhere, read the top few cards” format. One performable trick here, built on a 52-letter cyclic word over four suits and a joker in which each window of five consecutive symbols gives a distinct grouping of five labelled positions into suit-blocks; and a speculative one needing a non-standard deck.

5:16 I demonstrated with colour-coded cards to track suits without peeking. Five spectators each take a card from the top, then people with the same suit stand together. The resulting partition of positions 1 through 5 identifies the cut – and therefore all five cards. No bottom peek; the deck can stay with the audience throughout.

7:21 First cut: spectators 1, 2, and 5 together; 3 and 4 alone. Prediction: ten of clubs, ten of hearts, ten of spades, nine and eight of spades. The similar values are my fault – the book supplies only a suit skeleton, and I filled in the cards lazily.

9:29 Second cut: 2 and 3 together, 1 and 4 together, 5 alone: eight of diamonds, ace and two of spades, six and seven of hearts. In performance you know only who groups with whom, not which suit they share; that smaller amount of information is still enough. Track spectator positions as people regroup.

12:38 Corner case: the all-singletons grouping requires five distinct suits; every other grouping has at most four blocks. The book replaces the king of spades with a joker as a fifth suit; alternatively, use 51 cards and give up that one grouping.

15:58 The groupings here are set partitions, not integer partitions. For three elements, : all singletons; one pair and one singleton, in three ways; all together. The pattern appears three separate times.

18:06 , the size of a standard deck. Diaconis and Graham write that they were intrigued by this coincidence for years; the trick is their answer, and they invite readers to find their own.

21:20 The construction problem: a cyclic 52-letter word over five symbols – one J, twelve S, thirteen each of the other three suits – with all 52 length-5 windows giving distinct set partitions. Reads are unlabelled, so five diamonds and five clubs give the same signal; a sorted deck yields very few distinct reads.

23:29 We tried a greedy approach at the table: start with SSSSS; the next card must break the block. After SSSD, the fifth card can be another diamond (123 | 45), a heart or a club (123 | 4 | 5, the same grouping either way), or a spade (1235 | 4). Whether greedy choices can always be completed to a valid skeleton is open, and many partial sequences have poor entropy.

25:32 The book’s skeleton was found “using Hamiltonian cycles and a lot of hard work,” after which “you’re on your own.” I verified by script that all 52 cuts are distinct. Shuffle each suit’s pile before dealing it onto the skeleton’s slots, or you get sequential runs.

28:43 Retrieval – from grouping to cut, on top of a memorised deck – is the hard part. I used a small calculator; a phone app is morally the same shortcut as the lookup card from chapter 2, and being open about using one is a reasonable performance choice.

30:47 Within a skeleton, any assignment of each suit’s 13 cards to its suit’s slots works, giving decks per skeleton. How many valid skeletons exist is not addressed in the book.

35:00 Universal cycles for -subsets: a cyclic sequence of length over in which every window of consecutive terms is a distinct -subset. The book’s example: , , length 56, with windows such as and wrapping around.

37:05 A necessary condition: symbol 1 appears in of the subsets, and each occurrence in the sequence covers exactly windows, so . Whether this condition is sufficient is not clear.

39:12 Known cases as reported in the book: classical; by Brad Jackson; by Glenn Hurlbert, who with Jackson also settled ; all were done (for every meeting the divisibility condition). Larger were open at time of writing; I have not checked since.

40:12 The 56-sequence trick requires a special deck and a computer; I followed the outline without working through it. The open design challenge: find an accessible, performable trick around the , universal cycle.

42:17 Two questions from the book. Does a cyclic binary sequence of length 56 exist where every window of eight has exactly three ones and the positions of the ones run through each 3-subset of exactly once? The book says no, via a periodicity argument I have not fully parsed – curious, since 8-bit strings with exactly three ones are the same objects as 3-subsets of 8. Second: a 126-card deck showing every element of exactly once, presumably with reads of two different window lengths – combinatorially natural, less obviously a trick.

47:00 We recapped the five effects across chapters 2–4: colour pattern; positions of the top three; order and colour; value from the first card and suit from the second; suit grouping. Euler walks were the recurring construction tool, and efficient generation of most universal sequences remains open.

49:10 Spoiler for session 7’s value-and-suit effect. Values follow “Eight kings threatened to save ninety-five queens for one sick knave”: 8, K, 3, 10, 2, 7, 9, 5, Q, 4, A, 6, J; suits cycle clubs, hearts, spades, diamonds. The deck runs 8♣, K♥, 3♠, 10♦, 2♣, and so on through all 52. Spectator 1 says “eight” (so it was a club), spectator 2 says “heart” (king); the third card is the 3 of spades. The argument is the cleanest of the three chapters, and the stack finds uses elsewhere.

52:25 Roughly halfway through the seven chapters planned for the series. Up next: the Gilbreath principle.

53:35 Vinod pointed out that , so four spectators and a 15-card deck need no joker. In the same spirit, yesterday’s order-and-colour trick has a baby version: windows of two, two orders, four colour patterns, eight cards (aces and twos). Homework: find a 15-card suit skeleton whose windows of four give all 15 groupings, and identify the graph whose Hamiltonian cycle the authors used.

To think about

  • Find a 15-card suit skeleton for with all 15 windows giving distinct groupings.
  • Determine whether greedy extension always completes to a valid 52-card skeleton.
  • Count or bound the number of valid 52-card skeletons.
  • Understand why no cyclic binary sequence of length 56 encodes each 3-subset of in windows of eight.
  • Find a universal cycle for , (length 10) by hand.

2 interactive demos from the original page are parked while the card-interactives library is built; the text above stands on its own.