5 cards game … (Solution)

For Question

Since there are 5 cards, at least two will have to be of same suite. So
I keep one of them and pass the other one as the first card. This way
the second guy will know the suite.

With the three remaining cards
that needs to be passed on, I will establish an absolute ordering
between them (breaking ties on number based on suite). So lets call the
largest card C3, the second largest C2 and smallest card C1. I can
arrange these in 3! = 6 ways. I can use these to represent 6 numbers.
The second prisoner needs to guess only one of 12 numbers (since the
first card passed to him will eliminate one number). By passing the
first card face up or face down, the first prisoner can tell the second
one whether the number to be guessed is in the first half (1 – 7) or
second half (7 – 13). He can encode the number using C1, C2 and C3 in a
particular permutation.

Case 1: what if the prisoners are not allowed to pass the card facing a
particular direction (the jailer just hands over the card to the other
prisoner without maintaining any configuration?

Then send the first card + the difference between first and second (on
a circular scale from 1 to 13) by encoding using C1, C2 and C3.
Difference can never be more than 6 so it can be encoded using the
other 3 cards.

Key part here is to arrange C1, C2 and C3 such that the circular differences (always less than 6 for 3 cards) starting from first card is equal to missing card.

Leave a Reply

Your email address will not be published. Required fields are marked *