Remember the code would be a pretty challenging task if you were going to perform this trick for your friends. Here are some ways to make it simpler to memorize the coding of the cards
You don't actually have to agree on a number for all 52 cards. You are trying to encode a number between 1 and 6 using the order of 3 cards. If you rank the suits (ie bridge style: C,D,H,S), there will be a lowest, middle, and highest card of the three. So just label them 1,2 and 3. That way Peter doesn't have to remember a number for each card, just the ranking of the suits.
To remember which permutation corresponds to which number: you can turn any permutation into a three digit number, ie 123, 213, etc.. Number these 1 to 6 from lowest to highest.
Couldn't you just hand Peter the card with the same suit first, either upside down or right side up and then each of the other cards either upside down or right side up (regardless of what's actually on the cards)...this would encode the number of Alex's card in binary. Example: If you gave Alex the King of diamonds. You hand Peter the 6 of diamons right side up, the next card right side up (doesn't matter what it is), the next card upside down (doesn't matter what it is), and the last card right side up (doesn't matter what it is). Peter then knows the suit is diamonds from the first card, and seeing the sequence of right side up and upside down cards being 1101 (binary 13) he would know it's a king.
I was thinking about it more and realized this would not work. There are many cards in the deck that appear the same right side up or upside down. Plus this might be thought of as sleight of hand, which the problem description forbids.
I like Ian's approach and I think it works.
Hand Alex any card of the two cards with same suit. Don’t worry about selecting a card where adding a number no greater than six will result in the number of the other card. For example, if you have a King and a Six of Diamonds you can hand Alex the Six.
Use the 4 cards to encode Alex’s card in binary. Don’t worry about the numbers on the 4 cards.
Agree with Peter that if the card front side is up it means 0 and if the card back side is up it means 1. Hand Peter the 4 cards piled in a stack with front and back of cards forming the binary word. The first card must match the suit of Alex’s card. Agree with Peter that the card on the top of the stack is the card of same suit and it makes the most significant digit of the binary word.
If you handed Alex the Six of Diamond and you need to encode “Six of Diamond” using the 4 cards then do the following: Number 6 in binary is 0110. The card on the top should be King of Diamond (representing the suit) and it should front side up (0). The other 3 cards should be piled using back-side-up / back-side-up/ front-side-up (ignoring their numbers).
Thank you Ian.
Don’t worry about the problem description since the solution is simple and it works easily if you want to try it with friends.
the four cards are in peters hands. He looks at them....they are arranged in increasing numerical order with a queen at the end, or a nine if your talking specifically about numbers...he knows a king is next...to know the suit, they are arranged in order of suit importance and the missing one follows the sequence
I forgot to mention that this solution requires the same assumption that Ian's solution above does. However, if we make this assumption, then we can even find a solution to the problem if Alex chooses only four cards AND is allowed to choose which of the four to keep.
You don't actually have to agree on a number for all 52 cards. You are trying to encode a number between 1 and 6 using the order of 3 cards. If you rank the suits (ie bridge style: C,D,H,S), there will be a lowest, middle, and highest card of the three. So just label them 1,2 and 3. That way Peter doesn't have to remember a number for each card, just the ranking of the suits.
To remember which permutation corresponds to which number: you can turn any permutation into a three digit number, ie 123, 213, etc.. Number these 1 to 6 from lowest to highest.
Hand Alex any card of the two cards with same suit. Don’t worry about selecting a card where adding a number no greater than six will result in the number of the other card. For example, if you have a King and a Six of Diamonds you can hand Alex the Six.
Use the 4 cards to encode Alex’s card in binary. Don’t worry about the numbers on the 4 cards.
Agree with Peter that if the card front side is up it means 0 and if the card back side is up it means 1. Hand Peter the 4 cards piled in a stack with front and back of cards forming the binary word. The first card must match the suit of Alex’s card. Agree with Peter that the card on the top of the stack is the card of same suit and it makes the most significant digit of the binary word.
If you handed Alex the Six of Diamond and you need to encode “Six of Diamond” using the 4 cards then do the following: Number 6 in binary is 0110. The card on the top should be King of Diamond (representing the suit) and it should front side up (0). The other 3 cards should be piled using back-side-up / back-side-up/ front-side-up (ignoring their numbers).
Thank you Ian.
Don’t worry about the problem description since the solution is simple and it works easily if you want to try it with friends.
P.S. Read my "name" out loud...