Link to the Problem
Manikandan's solution to this problem was absolutely correct!
My solution:
Since there are 5 cards and only 4 suits there has to be at least 2 cards of the same suit! So one of those cards can be kept as the 5th card and one card can be sent first to denote the suit of the 5th card to the second prisoner. Knowing the suit brings down the number of possibilities of the 5th card from 52 to 12 (as one card of that suit has already been sent). An absolute ordering can be established between the other three cards breaking ties by giving different weightage to different suits. So there are three cards, low, mid and high with which we can make 6 combinations. So the prisoners could decide to denote numbers from 1 to 6 by the different orders in which these cards are sent (low mid high as 1, low high mid as 2 etc.). Now there are 12 possibilities for the 5th card but only 6 numbers can be encoded using the 3 cards. So we need some other information. The beauty is you can send any of the 2 cards of the same suit and any of these two cards can be kept as the card to be guessed. So choose the first card such that the difference between the fifth and the first card is less than or equal to 6 (on a circular scale). After sending the first card, the difference between the first and the fifth card can be sent using the other three cards. For example if u have 3 and Jack of the same suit, send Jack first and then 3 so that the difference is 5.
Hence, send the first card to denote the suit and the other 3 cards in the order encoding the difference between the fifth and the first card!
No comments:
Post a Comment