Logic Puzzles

5. The Card Trick

I ask Alex to pick any 5 cards out of a deck with no Jokers.

He can inspect then shuffle the deck before picking any five cards. He picks out 5 cards then hands them to me (Peter can't see any of this). I look at the cards and I pick 1 card out and give it back to Alex. I then arrange the other four cards in a special way, and give those 4 cards all face down, and in a neat pile, to Peter.

Peter looks at the 4 cards i gave him, and says out loud which card Alex is holding (suit and number). How?

The solution uses pure logic, not sleight of hand. All Peter needs to know is the order of the cards and what is on their face, nothing more.

Added 1 January 2007 · Updated 2 July 2026

Hint:

There are only 4 suits, so there will be at least two cards of one suit, one higher and another lower. By careful selection and placement the cards can be used to encode the exact number and suit of the selected card.

Solution:

Pick out two cards of the same suit. Select a card for Alex where adding a number no greater than six will result in the number of the other card of the same suit. Adding one to the Ace would cycle to the beginning again and result in a Two. E.g. if you have a King and a Six of Diamonds, hand the King to Alex. The other three cards will be used to encode a number from 1 through 6. Devise a system with Peter to rank all cards uniquely from 1 to 52 (e.g. the two of hearts is 1, the two of diamonds is fourteen etc...). That will allow you to choose from six combinations, depending on where you put the lowest and highest cards. 


Comments (11)

Anonymous 29 September 2007

I have an alternate solution to 'The Card Trick' which generalizes easily to larger decks, and a generalization of the solution to 'The Trainee Technician' that handles any number of wires other than 2.

Anonymous 1 October 2007

I have an alternate solution to 'The Card Trick' which generalizes easily to larger decks.

Anonymous 2 January 2009

There is little connection between the setup and the result. The dwarf puzzle was poorly constructed.

Anonymous 25 June 2009

I actually had a different solution for the card trick that I think is more elegant: pick 2 cards of the same suit - the top card given to Peter gives the chosen card's suit. Peter gets 4 cards - cards facing him represent a 1 bit, cards facing away represent a 0 bit - this is enough to represent 16 different cards, more than enough for the 13 we need.

Anonymous 3 June 2010

I have a simpler method for the card trick that could work better. It involves using face up and face down cards to represent the secret card's number and suit.

Anonymous 23 June 2011

I still fail to comprehend how the triangle puzzle works out. Could you please explain it better for me?

Anonymous 29 December 2011

I'm stuck on the Warden puzzle. Could you provide additional hints? I can solve for 3 easily, but I'm struggling with more than that.

Anonymous 13 September 2012

The last sentence in the solution is incorrect; it should state 4 instead of 3 regarding the visits of the prisoners.

Anonymous 6 August 2013

Can you please explain the card trick in more detail? I understand the process but don't really understand how my partner can read the remaining four cards to know which card is being held by the participant.

Anonymous 6 August 2013

I would like a more detailed explanation of the card trick. I understand the process but am unclear on how my partner can deduce the held card from the remaining four.

Anonymous 2 May 2015

The dwarf puzzle could be improved by allowing the character to bring an umbrella on days it does not rain.

Add a Comment or Suggest an Answer



« Back to Logic Puzzles


Puzzles

Site Map | Contact Us