Poker communication problem

62 Views Asked by At

You've been dealt five cards from a standard deck, and you wish to communicate the exact contents of your hand. The catch is that you're only allowed to make utterances of the form "I have an $X$" or "I don't have any $X$s", where $X$ is the name of a rank. How many such statements do you need to convey what's in your hand, and what's the simplest protocol you can use?

1

There are 1 best solutions below

1
On

There are $\binom{52}5=2598960$ different poker hands, and you have $26$ different utterances to make. Thus you need to make at least $\lceil\log_{26}2598960\rceil=5$ statements.

Here's a simple protocol that almost works and can hopefully be adapted without undue complication. For each card, use its actual rank in one of the five statements, and decide whether to say that you have or don't have that rank according to whether the card is red or black. Since you don't have to convey order, you can use the order of the cards to convey the missing information about the suits. Ideally, if all five cards correspond to different statements, you have $5!=120$ ways of ordering them, and you only need $2^5=32$. However, if you're unlucky, you might have two pairs of identical statements, which would only leave $\binom5{2,2,1}=30$ ways of ordering them, slightly fewer than the required $32$, so you'd have to make an extra rule for encoding a few of these rare cases.