RIDDLE : ANY FIVE CARDS

He looks over the 5 cards you chose, takes one of them, and hands it back to you.
"That going to be your card," he says. He asks you to put it in your pocket out of sight.

He then takes the four remaining cards and arranges them in a stack in a special order. All four cards in the stack are face-down.
He hands you the stack of four cards and asks you to place them on the table however you like (as long as you don't change the order). He then calls the assistant back in. The assistant picks up the four cards, looks them over, and promptly tells you what your card is.
Note that the magician did not do anything extra to communicate information to the assistant. The only information the assistant has in figuring out your card is the order of the four cards on the table.
How was the assistant able to figure out your card?

(HINT: Because you picked five cards, it's guaranteed that at least two of those cards have the same suit. What if the magician decided to make one of these cards "your" card?) 

SOLUTION:
There are probably a number of possible solutions to this problem. We present a rather elegant one.

The high-level strategy the magician uses is as follows: 
He uses the suit of the top card in the stack of four to indicate the suit of your card. 
He uses the value of this top card, along with the ordering of the other 3 cards in the stack, to indicate the numeric value of your card.
Here are the specific details:

1. Picking "your" card

First, the magician looks at the five cards you handed him. It is guaranteed that at least two of these cards have the same suit since there are only four suits total. So he takes two cards having the same suit from the stack (it's fine if more than two cards have this suit, and it doesn't matter which two he chooses). Call these cards A and B. One of these two will be "your" card. He decides which one using the following method:
  1. He imagines the numbers 1 through 13 as numbers on a strange wall clock, evenly spaced along the circumference (like a normal clock)
  2. With Jack=11, Queen=12, and King=13, he circles the values of cards A and B on the "clock"
  3. He measures the number of clockwise unit from A to B, and then does the same from B to A.
  4. For whichever distance is shorter (let's call this distance the "shorter clockwise distance"), he looks at the second number, takes the corresponding card (A or B), and makes it "your" card.
For example, if the two cards are a 3 and a Jack, then there are 8 clockwise units from the 3 to the Jack (4, 5, 6, 7, 8, 9, 10, 11), but only 5 units from the Jack to the 3 (12, 13, 1, 2, 3). For this shorter distance, the second card is the 3, and so he would make the 3 "your" card. Notice that in this case, the "shorter clockwise distance" is 5.
He will place the other card (the one he didn't make "your" card) on the top of the stack of four that he hands to his assistant.

2. Ordering the other cards

The second part of the magician's strategy is to use the remaining three cards to convey the "shorter clockwise distance" to his assistant. Then the assistant will simply need to look at the top card and add the "shorter clockwise distance" to the value of this top card, and it will give him the value of your card.
A key observation here is that the "shorter clockwise distance" can never be greater than 6. This is because if the clockwise distance from A to B is greater than 6, then the clockwise distance from B to A is less than or equal to 6 (and is thus the "shorter clockwise distance"). Also, the "shorter clockwise distance" can never be less than 1. So this distance is always either 1, 2, 3, 4, 5, or 6.
So the magician needs to order the final 3 cards in the stack to convey a number between 1 and 6 to his assistant. This is easy to do. He and his assistant have already decided on an ordering on all the cards in the deck (Ace is lowest, King is highest, ties are broken by some order of suits, let's say Hearts < Diamonds < Spades < Clubs).
The magician and the assistant have mapped the following orderings of the final 3 cards to the numbers 1 - 6 as follows:

  • Lowest, Middle, Highest : 1
  • Lowest, Highest, Middle : 2
  • Middle, Lowest, Highest : 3
  • Middle, Highest, Lowest : 4
  • Highest, Lowest, Middle : 5
  • Highest, Middle, Lowest : 6
So if the "shorter clockwise distance" was 5, and the remaining three cards were 2-hearts, 2-diamonds, and Queen-clubs, then he would order them [Queen-clubs, 2-hearts, 2-diamonds] (Highest, Lowest, Middle) to convey the number 5.
That's it. 
The assistant comes in and looks at the top card in the stack of four. This tells him the suit. He then looks at the ordering of the next 3 cards and determines the "shorter clockwise distance". He adds this distance to the value of the top card (wrapping around at 13 if necessary), which gives him the value of your card. So he has the suit and the value of your card, which is to say, he knows what your card is.



No comments:

Post a Comment