# Pat the Mathemamagician Part 2

Sal the Magician asks you to pick any five cards from a standard deck. You do so, and then hand them to Sal’s assistant Pat. Then you pick one of the five cards, and Pat puts it back into the deck, and takes the remaining 4 cards, arranges them in some way. Sal is blindfolded, and does not witness any of this. Then Sal takes off the blindfold, takes the pile of 4 cards, reads the four cards that Pat has arranged, and is able to find the fifth card in the deck (even if you shuffle the deck after the assistant puts the card in the deck!). Assume that neither Sal nor Pat have supernatural powers, and that the deck of cards is not marked, and that the pile of 4 cards that Pat arranges does not have any funny folding, or weird angles, etc.

How does Sal do this one? This one really has me stumped, maybe I am missing something...

-
Martin Gardner describes this trick in The Unexpected Hanging and Other Mathematical Diversions. –  Peter Phipps Dec 29 '12 at 20:53

One needs to cheat a bit. There are $48$ missing cards, which can be thought of as $1$ to $48$. (The meaning of these numbers depends on the $4$ remaining cards, but Sal knows these.)

Pat and Sal have to encode every integer from $1$ to $48$, using the $4$ cards. There are $24$ permutations of the $4$ cards, not enough. But if Pat is allowed to present the $4$ cards to the magician all faces up or all faces down, there is enough information.

-
Nope, you forgot that the assistant can pick which of the five cards to choose, allowing him to effectively reduce the range of the possible missing card. –  Thomas Andrews Dec 29 '12 at 19:17
@ThomasAndrews It's stated in the problem that you pick one of the five cards. –  David Mitra Dec 29 '12 at 19:20
@ThomasAndrews: The wording seemed to indicate that the mark chooses the five cards, and chooses the card from the five. –  André Nicolas Dec 29 '12 at 19:20
Ah, the original version of this problem has the assistant choose, in which case my solution is correct, but this variation does not, I see. –  Thomas Andrews Dec 29 '12 at 19:22
If the assistant were allowed to mix face-up and face-down cards in the arranging of the four remaining cards, then you could do this trick with a deck of 388 cards :) –  Thomas Andrews Dec 29 '12 at 19:41

"The best card trick" is explained here:

http://courses.csail.mit.edu/6.042/spring10/cardTrick.pdf

-

I misread assuming the assistant picked which of the five cards to exclude.

If the assistant chooses the fifth card...

Hint: Label the cards $1$ to $52$, and have the cards you selected be $a_1<a_2<a_3<a_4<a_5$.

The assistant picks the first card $a_i$ such that $a_{i+1}-a_{i-1}\leq 25$.

1. Show that there always will be such an $i$ from $i=2,3,4$.

2. Show how the assistant orders the cards to indicate which card was removed.

-