Fog Creek Software
Discussion Board

Card trick without a trick

The system for 1-6 can't be based on the suits as it is possible that babak would select for example 5 cards of the same suit.
Is it possible to represent a number from 1 to 6 by ordering 3 randomly selected numbers from 1 to 13?

Fredrik Olsson
Monday, January 3, 2005

To correct the solution.  Use the ranking of the cards to identify the Low (L), Middle (M) and High (H) cards.

You have six permutations of LMH:
LMH = 1
LHM = 2
MLH = 3
MHL = 4
HLM = 5
HML = 6

You will need to include the suits when considering rank, as you may have the following...
A,3 Clubs
3 Spades
3 Hearts
3 Diamonds

As you can see, the number on the card is not enough for you to determine rank.

I suggest the Bridge ranking scheme, from low to high, Clubs, Diamonds, Hearts, Spades

So for the example above, give your mark the 3 of clubs and
Give your partner the remaining cards from top to bottom as follows:
A Clubs, 3 Diamonds, 3 Spades, 3 Hearts.


Will Smith
Sunday, January 9, 2005

I believe there is another way to solve this problem, without considering the suit at all, just the ordering of the four cards:

All 52 cards can be numbered with bridge ranking, then consider the numbering to wrap around from ace of spades to 2 of clubs.

Since four cards are handed over, only 48 remains. This is twice 4! = 24, so one more bit of information is sufficient to encode any of them.

Since we can select the fifth card to hide, there are many ways to solve the problem, the  easiest might be to pick the card that is contained in the smallest numeric gap between two of the four cards handed over:

If the five original cards were nearly equidistant, then the gap left after selecting one cannot be more than 20.

Any other distribution would place three cards less than 20/21 positions apart, and therefore leave a smaller gap when the middle one was taken out.

If two or more gaps would be equally long, select the smallest value card.

This solves the original puzzle, but with a bit more effort in the 'official' solution.

Terje Mathisen
Wednesday, February 2, 2005

*  Recent Topics

*  Fog Creek Home