The Best Card Trick —
I gave a talk on The Best Card Trick at the Boston Haskell meetup tonight, and then we implemented the technique together in Haskell as a group. Afterwards, we compared our program with this one that my friend Mark Carroll wrote a long time ago. Here’s a summary of the trick from the paper’s abstract:
You, my friend, are about to witness the best card trick there is. Here, take this ordinary deck of cards, and draw a hand of five cards from it. Choose them deliberately or randomly, whichever you prefer — but do not show them to me! Show them instead to my lovely assistant, who will now give me four of them, one at a time: the 7♠, then the Q♥, the 8♣, the 3♦. There is one card left in your hand, known only to you and my assistant. And the hidden card, my friend, is the K♠.