# An odd card trick

Michael Wendl dissects some variants of the magic separation, a self-working card trick.

This picture is a plACEholder

Martin Gardner—one of history’s most prolific maths popularisers—frequently examined the connection between mathematics and magic, commonly looking at tricks using standard playing cards. He often discussed ‘self-working’ illusions that function in a strictly mechanical way, without any reliance on sleight of hand, card counting, pre-arrangement, marking, or key-carding of the deck. One of the more interesting specimens in this genre is a matching trick called the magic separation.

This trick can be performed with 20 cards. Ten of the cards are turned face-up, with the deck then shuffled thoroughly by both the performer and, importantly, the spectator. The performer then deals 10 cards to the spectator and keeps the remainder for herself. This can be done blindfolded to preclude tracking or counting. Not knowing the distribution of cards, our performer announces she will rearrange her own cards ‘magically’ so that the number of face-ups she holds matches the number of face-ups the spectator has. When cards are displayed, the counts do indeed match. She easily repeats the feat for hecklers who claim luck.

## How the illusion works

The magic separation was first devised by Bob Hummer in his pamphlet Half-a-Dozen Hummers back in 1940, and since has been the subject of discussion in books by senior conjurors such as Bill Simon in Mathematical Magic from 1964, Karl Fulves in Bob Hummer’s Collected Secrets in 1980, and by the master of mathematical puzzles Martin Gardner in his aptly named book The Scientific American Book of Mathematical Puzzles and Diversions from 1959. The unusual step of allowing the deck to be out of the performer’s control makes the trick particularly baffling, but this is simply a diversion to further obscure its deterministic workings. What might these workings be?

The water and wine riddle: a litre of wine is transferred to the water container, then a litre of mixture is transferred back. Is there more wine in the water than water in the wine?

Gardner explained the trick in terms of a conservation of mass property, borrowing from the classic riddle of equal containers of water and wine. Namely, if a litre of wine is transferred to the water container, which is then stirred, and a litre of the mixture is subsequently transferred back to the wine container, is there more wine in the water than water in the wine?

Intuition often suggests there is, since the first transfer was pure wine, while the second, reverse transfer was a water and wine mixture. This intuitive, but incorrect supposition is what renders the magic separation trick so likewise remarkable. In fact, there is as much water in wine as wine in water: since the starting and ending volumes in the containers are equal, whatever wine is in the water container must be matched by whatever water is in the wine container.

This conservation principle can be concretely demonstrated for the magic separation by starting with two separate piles, one of 10 face-up cards and the other of 10 face-down cards. Now, make a one-for-one exchange of cards between the piles any number of times you wish. You can make each selection randomly and you can even shuffle each pile after each transfer. The only condition is that transferred cards maintain their original orientations. At the conclusion, each pile still has 10 cards that will now be some mixture of face-ups and face-downs. What one necessarily finds is that the number of face-up cards in one pile (analogous to the wine) equals the number of face-down cards in the other pile (analogous to the water). The ‘magic’ part of the magic separation is that our performer simply—though with some theatrical flourish—turns her pile over to force matching numbers of cards.

In Hummer’s original 1940 pamphlet, he referred to this trick as “sure fire” and it is now easy to see how this is the case. Indeed, the deterministic outcome enabled by combining conservation with the ‘turn over’ manoeuvre and the elegant misdirection of spectator shuffling has made the magic separation a standard part of the close-up magic toolkit. The original trick has since expanded into a large family of variations, both stylistically and in terms of the numbers of cards used.

The version above—10 cards up and 10 cards down—is popular and we shall call this a 10/10 configuration. Some other versions split a full deck evenly, while others use an uneven division of a deck, for example a 20/32 configuration. These variations go by many names within professional conjuring circles, including the match-upthe topsy turvy deck, and the gremlins.

## Here come the mathematicians

The fact that there are so many versions of the magic separation and that they all seem to work on the same combination of conservation and turn over manoeuvre beckons a deeper mathematical look: is there some sort of general law that governs the magic separation family?

To start investigating this question, let $T$ be the total number of cards in the deck and $F$ be the number of face-up cards therein. Also, take $S$ as the total number of cards, face-up plus face-down, that the spectator is dealt. These are parameters that characterise a specific variation of the magic separation. However, separate from these are the variables, which, unlike parameters, are out of the performer’s control and which generally change each time the trick is performed because of shuffling. Following the Diaconis and Graham convention in their book Magical Mathematics, where an overbar indicates ‘face-up-ness’, let $\overline{\sigma}$ and $\sigma$ represent the respective numbers of face-up and face-down cards the spectator is holding and $\overline{\mu}$ and $\mu$ be the corresponding counts of the magician’s cards.

Four classes of cards, tallied respectively by $\overline{\sigma}$, $\sigma$, $\overline{\mu}$, and $\mu$, result from two types of division: spectator versus magician and face-up versus face-down.

The following tallies for cards held by each party are immediately implied: for the spectator $\overline{\sigma} + \sigma = S$ and for the magician $\overline{\mu} + \mu = T – S$. A third equation comes from noting that, although the cards are shuffled, the number of face-ups is fixed, no matter how the cards are distributed in any instance of the trick, meaning $\overline{\sigma} + \overline{\mu} = F$. The last, and most key ingredient is the observation that the number of face-up cards held by the spectator has to equal the number of initially face-down cards possessed by the magician because it is the conjuring ‘turn over’ manoeuvre that forces the matching effect into existence. In other words, the illusion only works if $\mu = \overline{\sigma}$.

These ingredients are now baked into the following mathematical pie. Rearrange the face-up equation as $\overline{\mu} = F – \overline{\sigma}$, substitute this into the equation tally for the magician’s cards, and then rearrange terms to find $\mu = \overline{\sigma} + T – S – F$. The only way $\mu = \overline{\sigma}$ can be satisfied is if the last three terms are self-cancelling, meaning that the mathematical condition enabling the magic separation is $F \>+\> S \>=\> T\>.$ For convenience, we will call this little result Hummer’s theorem.

## Visualising the workings

Hummer’s theorem is actually quite profound in the sense that it explains how all extant variations of the magic separation work and also shows how to immediately invoke numerous newer versions, as limited, it seems, only by the number of cards the magician can physically handle. For instance, following some quick calculations using the theorem, one could readily perform much grander versions of the trick that combine, say, several full 52-card decks.

A Fisher table showing that a new drug is more effective than an old drug.

Another interesting aspect of Hummer’s theorem is that it immediately suggests how to visualise the workings of the magic separation at their most basic, mechanistic level by borrowing on $2\times 2$ contingency tables. Such tables are ordinarily used in the context of assessing whether two categorical variables, for instance medical treatment (old drug versus new drug) and clinical result (patient improves versus does not improve), are statistically related. One of the most common statistical calculations executed on such tables is something called Fisher’s exact test, so it will be convenient to call these $2\times 2$ structures Fisher tables.

Visualising the magic separation.

Now, in order to visualise the architecture of the magic separation, we use the columns for the people (spectator versus magician) and rows for the cards (face-up versus face-down). The diagram to the right shows the variables $\sigma$, $\overline{\sigma}$, $\mu$, and $\overline{\mu}$, and the parameters, $F$, $S$, and $T$, in such a table. A moment’s consideration should indicate that the only $2\times 2$ tables consistent with Hummer’s magic separation are those in which the leading diagonal entries are equal.

A 10/10 Hummer configuration (left), a 20/32 Hummer configuration (right).

A bit more consideration suggests that all Hummer-compliant tables are Fisher tables, but not all Fisher tables are Hummer tables. This is readily confirmed by example. The top two tables to the right satisfy diagonal equality, while the bottom table does not. Here, Hummer’s theorem is violated ($8+12\neq24$), so this instance lacks the required conservation property for the magic separation. These tables can be used to visualise the actual dynamics of the magic separation.

A non-Hummer table that violates the separation condition.

Tables representing a trick possess a conservation property: the margin totals are rigidly fixed. Because parameters $F$, $S$, and $T$ are likewise fixed for a particular variation of the magic separation trick, we can exploit the conservation property here to visualise the 10/10 pile experiment introduced above as a series of $2\times 2$ tables, one for each round of trades. The experiment starts with 10 face-ups for the spectator and 10 face-downs for the magician, resulting in the leftmost $2\times 2$ below.

In the first exchange, the spectator cedes a face-up card to the magician, who in turn passes back a face-down card, resulting in the round 1 table. Importantly, while the boxed variable tallies show each person’s new holdings, the margin tallies have not changed.

After shuffling both piles, the second iteration might see the same type of exchange, resulting in the table marked round 2. One could now step through many additional rounds of trades, sometimes exchanging cards of the same orientation, for which the table remains exactly the same, and sometimes exchanging cards of opposite orientation, whereby the boxed tallies are updated appropriately.

A performance of magic separation, represented as a pile experiment with no card exchanges made.

Every table would display constancy of margin totals and strict satisfaction of Hummer’s theorem, no matter how the cards are distributed. One possible endpoint to this 10/10 experiment is familiar from above.

In a sense, the magic separation trick itself could actually be thought of as a special case of this process that consists of the magician’s deal, with zero rounds of card exchange.

## Heightened mystery of odd-numbered decks

In the original magic separation, Hummer emphasised that the deck size, $T$, must be an even number. Fulves’ instruction manual repeats this condition, as do Simon’s and another of Gardner’s books on mathematical magic. But here is a question: can the magic separation work if $T$ is odd?

The answer is not intuitively obvious. First, face-up cards must be matched one-for-one between spectator and performer, ie in pairs. Second, there are many tricks that do indeed require even-numbered decks (Diaconis and Graham discuss examples). However, since there were no parity conditions placed on $T$ in our derivation, we can immediately conclude that odd decks are indeed acceptable. A quick corollary to Hummer’s theorem evidently leads to a new and non-obvious extension of this 80-year-old trick!

Because this aspect is somewhat more difficult to perceive, a truth table showing all possible parity combinations can be helpful:

spectator magician $\overline{\sigma}+\overline{\mu}=F$ is satisfied?
case $F$ $S$ $\overline{\sigma}$ $\sigma$ $T-S$ $\overline{\mu}$ $\mu$
A even odd odd even even even even no
B even odd odd even even odd odd yes
C even odd even odd even even even yes
D even odd even odd even odd odd no
E odd even odd odd odd even odd yes
F odd even odd odd odd odd even no
G odd even even even odd even odd no
H odd even even even odd odd even yes

Half the cases—namely A, D, F, and G—are actually inaccessible because they violate $\overline{\sigma} + \overline{\mu} = F$. For instance, in case G, both people cannot hold an even number of face-ups if the total number of face-up cards in the deck, $F$, is odd.

For the admissible cases, B and C are the more pedestrian because the required parities are already established. Conversely, cases E and H are a little more interesting. Here, the magician’s own two subsets have different parities from one another and it is the conjuring ‘turn over’ that forces the parities of $\overline{\sigma}$ and $\mu$ to match because the latter now has become flipped. Hummer’s magic separation works even when there are an odd number of cards in a deck that itself starts with an odd number of face-up cards!

This ‘double-odd’ configuration is surprising and does not seem to have been empirically discovered over the eight decades that the magic separation has been performed.

KC Cole remarked in her book The Universe and the Teacup that mathematics can produce a “literal expansion of consciousness” and it seems that Hummer’s theorem, namely that the spectator’s card count plus the face-up card count must equal the size of the deck, marks yet another example of this amazing and long-established phenomenon. Keep that in mind the next time you dazzle your friends and neighbours with the magic separation.

Michael is at Washington University in St Louis, Missouri, USA. Between his work in cancer bioinformatics and theoretical mechanics, he spends time playing the accordion.
+ More articles by Michael

• ### That’s a Moiré

Donovan Young interferes in wave patterns
• ### On the cover: Vhat? Vhere? Venn

Madeleine Hall takes a brief dive into the world’s favourite set-relationship-representation diagram.
• ### Handbook of equations

Forgotten how to draw a log graph? No need to panic – here's a handy guide!
• ### In conversation with Dominique Sleet

Ellen Jolley learns how to run a maths outreach programme
• ### Correction: Who is the best England manager?

Paddy provides a much anticipated update to the most important use of statistical analysis in the last two years
• ### Pawns, puzzles, and proofs

Dimitrios Roxanas tells us why playing chess backwards is the new black (and white).