Derrick, Eric, and Frederick are standing in a line with Derrick in the back, Eric in the middle, and Frederick in the front. Each person is wearing a shirt with an integer between 1 and 5 inclusive printed on the back, and each person can only see the numbers on the backs of the people in front of them.
Garrick, who can see the numbers behind everyone's shirts, announces truthfully that all the numbers are unique and that they sum to a multiple of three. Then, he asks if anybody can figure out what number is on their own shirt.
Some time passes with nobody saying anything. Suddenly, Frederick states that he knows what number is on his shirt. What number is it?
Details and Assumptions:
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
For this solution, we work modulo 3. Let E = Eric's number and F = Frederick's number. The key to solving the problem is that Derrick and Eric's silence gives Frederick additional information that he can use to deduce his number.
If Derrick sees ( E , F ) ≡ ( 2 , 1 ) or ( 1 , 2 ) , then he knows that he must have the number 3 on his back because it is the only integer between 1 and 5 inclusive that will make the overall sum a multiple of 3, as Garrick stated. Since Derrick does not say anything, we discard these possibilities. Derrick can't see ( E , F ) ≡ ( 1 , 1 ) or ( 2 , 2 ) as those cases cannot have the overall sum be a multiple of three, so we deduce Derrick must see one of ( E , F ) ≡ ( 1 , 0 ) , ( 0 , 1 ) , ( 2 , 0 ) , ( 0 , 2 ) .
Now, Eric deduces the information about Derrick, and since Derrick remained silent, he knows that Derrick saw one of the four previously mentioned cases. If Eric saw F ≡ 1 , 2 , then he would know he has the number 3, since it is the only integer from 1 to 5 inclusive that is 0 modulo 3. Since Eric does not say anything, he must have seen F ≡ 0 .
Finally, Frederick deduces the information on Eric and realizes that he knows what number is behind his back - it must be F = 3 as Eric must have seen that number. Note that Frederick is the only person who can tell what number is behind his back; there is still ambiguity in what numbers Derrick and Eric have.