3
$\begingroup$

Each of four people wear a hat with a distinct positive integer $<28$. Everyone can see everyone’s number except his own. At 12:00 pm everyone can say something: either “Red” or “Yellow” or nothing. After 12:00 everyone must know his own number. How can they achieve this?

Source: Brilliant

$\endgroup$
  • 2
    $\begingroup$ HINT: $27=3^3$. $\endgroup$ – Bram28 Apr 7 '18 at 13:22
  • $\begingroup$ Are they able to say red, yellow or none more than once? $\endgroup$ – John Douma Apr 7 '18 at 13:47
  • $\begingroup$ No, only one word is allowed! $\endgroup$ – Leo Gardner Apr 7 '18 at 13:51
  • $\begingroup$ Can they talk with each other before they start this test or something??? $\endgroup$ – Nimantha Apr 7 '18 at 14:09
  • $\begingroup$ @user120527: Each participant sees three of the four numbers, so they can combine that information with the spoken data to determine one of $24$ possibilities for their own number. $\endgroup$ – hardmath Apr 7 '18 at 14:10
5
$\begingroup$

Let's assume they are around a round table. For each participant X, let $A$ be the guy to his left, $B$ the guy in front, $C$ to his right. Let's write the numbers on the hats in basis $3$: $$n_X=x_2*9+x_1*3+x_0.$$ So $X$ says the number $a_0+b_1+c_2 \pmod 3$ (red=0, yellow=1, nothing=2).

  • He hears from $A$ the number $b_0+c_1+x_2 \pmod 3$. Since he already knows $b_0,c_1$, that tells him $x_2$.

  • He hears from $B$ the number $c_0+x_1+a_2 \pmod 3$. Since he already knows $c_0,a_2$, that tells him $x_1$.

  • He hears from $C$ the number $x_0+a_1+b_2 \pmod 3$. Since he already knows $a_1,b_2$, that tells him $x_0$.
| cite | improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.