MathOverflow will be down for maintenance for approximately 3 hours, starting Monday evening (06/24/2013) at approximately 9:00 PM Eastern time (UTC-4).

## Magic trick based on deep mathematics

I am interested in magic tricks whose explanation requires deep mathematics. The trick should be one that would actually appeal to a layman. An example is the following: the magician asks Alice to choose two integers between 1 and 50 and add them. Then add the largest two of the three integers at hand. Then add the largest two again. Repeat this around ten times. Alice tells the magician her final number $n$. The magician then tells Alice the next number. This is done by computing $(1.61803398\cdots) n$ and rounding to the nearest integer. The explanation is beyond the comprehension of a random mathematical layman, but for a mathematician it is not very deep. Can anyone do better?

-
Please make this community wiki? – Theo Johnson-Freyd Dec 25 2009 at 22:47
I am informed that Persi Diaconis is the correct person to answer this question. – Sam Nead Dec 26 2009 at 0:09
I have discussed this question with Persi. He could not come up with anything significant (though he did not think about it very long). – Richard Stanley Dec 26 2009 at 16:30
I've also heard Persi talk about this subject, and my guess is that he would say that the requirements of "deep mathematics" and "would actually appeal to a layman" are nearly incompatible in practice. – Mark Meckes Dec 27 2009 at 13:54
I don't think they should be incompatible: the deep mathematics are the reason the trick works; you don't have to understand them to be stunned by the trick! – Sam Derbyshire Jan 17 2010 at 17:06

I would like to thank all the contributors on this page. I have been putting together a new Math-a-Magic show for the 9-12 grade level and have found some fantastic material here. If I get a decent video of the show I'll be sure to post a link here so you can play the "What concept is behind this trick?" game.

I have modified some of your ideas severely. For example. Craig Feinstein's suggestion was a commercial effect that asks the volunteer to pick one of a hundred different cities typed out on ten cards. The volunteer finds the city's name on two different cards which the magician looks at casually. You can then instantly tell him the name of the city he has mentally picked.

In my version, I instruct him not to ever let me see the city's name on the cards and yet I can still easily predict his choice!

Here is my favorite trick based on the deep principal of Set theory. Ok, maybe it is not too deep but the results are astounding!

They will be astounded by your amazingly detailed prediction. What happens is that all the face up cards are the ones that were originally in your half deck. This trick is self working. All you do is to pick out which cards you want in your half of the deck and place them at the top of the deck to start. Then just give him the random bottom half of the deck and you keep the pre-set ones.

Any questions? Just email me at kevin@hallsofmagic.com

-

Here's a couple of well-known simple topology tricks:

Tie ends of a long enough piece of rope to your wrists, while wearing a loosely fitting jacket or sweatshirt. With your arms tied like that, take the jacket off your back and put it back on inside out. It's easier to figure out how to do it than to explain it in words, so I'll skip the explanation. The more risque version is to tie the ankles and do the trick with pants.

The other one I haven't tried, but maybe it can be done at a party if you have a stick and some plasticine around.

-

If you are not mathematically inclined, this game can drive you crazy. http://www.transience.com.au/pearl.html

-

I hope this is contribution is appropriate; I think that a nice puzzle based on Hamming codes discussed a little here: http://ocfnash.wordpress.com/2009/10/31/yet-another-prisoner-puzzle/

is the following:

A room contains a normal 8×8 chess board together with 64 identical coins, each with one “heads” side and one “tails” side. Two prisoners are at the mercy of a typically eccentric jailer who has decided to play a game with them for their freedom. The rules are the game are as follows.

The jailer will take one of the prisoners (let us call him the “first” prisoner) with him into the aforementioned room, leaving the second prisoner outside. Inside the room the jailer will place exactly one coin on each square of the chess board, choosing to show heads or tails as he sees fit (e.g. randomly). Having done this he will then choose one square of the chess board and declare to the first prisoner that this is the “magic” square. The first prisoner must then turn over exactly one of the coins and exit the room. After the first prisoner has left the room, the second prisoner is admitted. The jailer will ask him to identify the magic square. If he is able to do this, both prisoners will be granted their freedom

-

A variant on Anton Geraschenko answer above- say you are in a fourth grade school that for some reason let these poor kids use calculators. you ask them to pick for themselves a 3 digit number say abc. Tell them to write it twice in their calculator ,i.e., abcabc and then divide by 77. Then by 13. What did you get? do it again with 143 and then by 7? What did you get. again with...

I learnt it from Avraham Arcavi.

-

Here is a trick much in the spirit of the original number-adding example; moreover I'm sure Richard will appreciate the type of "deep mathematics" involved.

On a rectangular board of a given size $m\times n$, Alice places (in absence of the magician) the numbers $1$ to $mn$ (written on cards) in such a way that rows and columns are increasing but otherwise at random (in math term she chooses a random rectangular standard Young tableau). She also chooses one of the numbers say $k$ and records its place on the board. Now the she removes the number $1$ at the top left and fills the empty square by a "jeu de taquin" sequence of moves (each time the empty square is filled from the right or from below, choosing the smaller candidate to keep rows and columns increasing, and until no candidates are left). This is repeated for the number $2$ (now at the top left) and so forth until $k-1$ is gone and $k$ is at the top left. Now enters the magician, looks at the board briefly, and then points out the original position of $k$ that Alice had recorded. For maximum surprise $k$ should be chosen away from the extremities of the range, and certainly not $1$ or $mn$ whose original positions are obvious.

All the magician needs to do is mentally determine the path the next slide (removing $k$) would take, and apply a central symmetry with respect to the center of the rectangle to the final square of that path.

In fact, the magician could in principle locate the original squares of all remaining numbers (but probably not mentally), simply by continuing to apply jeu de taquin slides. The fact that the tableau shown to the magician determines the original positions of all remaining numbers can be understood from the relatively well known properties of invertibility and confluence of jeu de taquin: one could slide back all remaining numbers to the bottom right corner, choosing the slides in an arbitrary order. However that would be virtually impossible to do mentally. The fact that the described simple method works is based on the less known fact that the Schútzenberger dual of any rectangular tableau can be obtained by negating the entries and applying central symmetry (see the final page of my contribution to the Foata Festschrift).

-

-
No, that one is dumb. – Harry Gindi Jan 17 2010 at 22:42
No, that one isn't dumb, but it's more about psychology than about mathematics (like most tricks with cards). – Konrad Voelkel Feb 7 2010 at 13:58

Lay out 21 cards face up in three vertical lines. Have a friend pick out any card without telling you which card he/she has chosen. Have your friend tell you which line of cards the selected card is in, and make three stacks of cards, each stack being made from each line of cards. stack the three stacks on top of each other, placing the stack with the selected card between the other two stacks (IMPORTANT!). lay out the cards again in the exact same set up (3 lines of 7 all face up) but here is the trick: when laying out the cards, flip them face up in a line every time. In other words, don't make one line at a time, but put a card in every line one at a time. Have your friend again tell you which line has the selected card. Stack the cards again, the exact same way you did the first time. One more time, lay out the cards the exact same way as the last time, one card per line, and again have your friend tell you which line has the selected card. Stack all the cards again one last time, again placing the line with the selected card between the other stacked cards. now lay out all the cards face down, one at a time. while you're doing this, remember to count, because the 11th card you place down is the selected card. from this point you can do whatever you can think of to make the trick "magical" and shock your friend by suddenly coming up with his/her card.

-

I think I learned this from a Martin Gardner article:

You are going to take a deck of cards and place them one at a time, face up, on a table (at a rate of about one per second). The person you are performing the trick for is to choose (secretly) one of the first 5 or 6 cards to start with. Whatever the rank of that card, they count that far to choose a new card, and repeats until the deck is exhasuted. Thus they have arrived at a (emphapsize this) "random" card near the bottom of the deck. You then tell them what that card is.

The trick is that it doesn't matter where you start counting, there is a pretty good probability that any two sequences of chosen cards will eventually coincide. The chances are better for larger decks (also if you say that every face card counts as 10).

-
That's the Kruskal count above. – Douglas Zare Feb 3 2010 at 11:33

Start with a deck of 32 cards. Then the player should take a card and tell a number $n$ between 1 and 32 then you divide the stack in 2 smaller stacks and the player has to tell which of the stacks contains his chosen card. according to a rule dependend on that number you put that stack above or below the other stack. After repeating this 5 times the chosen card should be exactly at position $n$. The rule has to depend on the way you want to deal cards (whether you turn around the deck and start dealing from the bottom, or you deal from the top and turn each single card around or you deal at first and then turn bost stacks around). In one of the cases the rule was take $N-11$, find the representation in the system with base $-2$ and revert that presentation. ($0$ tells you to put the stack containing the chosen card on top, etc.). I dont remeber this trick properly, it should not be too difficult to express the final position depending on the choices in some formula; but it is the only situation I know, in which the $-2$-system is useful.

-

The "casting out nines" sanity check of calculations is dead simple to use (a small child can do it), but the proof requires a deeper knowledge of mathematics (more precisely of arithmetic ; my own students don't have access to it even though they know what series are and can diagonalize matrices!).

-

Destination Unknown is a magic trick that makes use of Combinatorics. It really fools people.

-

A deck of cards is shuffled, the audience member selects a number $n_0 < 10$ but keeps it private. The cards are then dealt out, face up, one at a time. When the $n_0$th card is turned up (but the magician does not which it is), the value of this card becomes $n_1$. Again, when the $n_1$th subsequent card appears, the value of that card becomes $n_2$, and so on.

Without knowing $n_0$, the magician can still predict the final "secret value". The way to do so is that the magician choose any value of $n_0'$ at random, and performs the corresponding process. If at any time, the magician's and audience member's values agree, then they will continue to agree for the rest of the deal. This in fact occurs with high probability, and so with high probability the magician the magician correctly determines the secret final $n$.

This works because the deal of the card deck behaves as a random function, and random functions under repeated iterations tend to coalesce. The mathematics of the random function mapping under iteration is quite deep. It is interesting that although it would require a quite difficult analysis to determine, for example, the probability that the magician's prediction is correct, to the audience none of this math is needed to be impressed by the trick!

-
I believe this is the Kruskal count, which has already been offered twice in reply to this question. – Gerry Myerson Nov 17 2010 at 1:50