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...
 A: 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.
A: "The best card trick" is explained here:
http://courses.csail.mit.edu/6.042/spring10/cardTrick.pdf
A: I encountered the same question, and I am also wondering about the 'harder version' that you have posted.
By 'harder version' I mean the scenario where the you (the audience) picks the card that is to be returned to the deck. By 'easy version' I mean the scenario where the Pat (the assistant) picks the card to be returned to the deck.
I did a lot of searching on the internet but I am starting to think it is not possible to do the trick with the 4 cards alone, i.e. no additional help such as having the cards face up or down.
Here is a link that I found, which details a method for the 'easy version' for a deck as large as 124 cards. I am wondering if this method can be adapted to do the 'hard version' for 52 cards.
https://web.northeastern.edu/seigen/11Magic/Articles/Best%20Card%20Trick.pdf
Failing that, would there be a way to prove concretely that it is impossible?
