# 5 logicians with 1 or 2 hats (Part II) [8,9,10]

This is the corrected version of this question.

There are 5 logicians seated around a table. They are blindfolded and hats are placed on their heads. After removing the blindfolds, they are told a true statement:

Each of you has either one hat or two hats on your head. The total number of hats is 8,9 or 10.

The actual sum is 9, but this is not told to them.

They are then told to answer the question "How many hats are on your head?" in clockwise fashion (starting from any of the 5). If it is possible to logically deduce the number of hats on their own heads, they do so, otherwise reply "I don't know." and wait till the question cycles back to them.

They have no means of knowing the number of hats on their own heads (except logically), but can see every other person. They have no other means of communication, and no tricks involved.

The game completes when everyone has figured out their hat count. At what number should the one-hatted logician be placed so that:

• The game is completed?
• The game goes on forever?

I am too dumb to calculate it exactly, so I will only provide a safe upper border for the amount of rounds required.

There are 9 hats, so four logicians have 2 and one logician has 1 hat.

For the first round, everyone will tell his colleague that he does not know (because he does not see a total of only 6 hats on his colleagues' head). If he would, he could deduce that he has 2, and then every person with one hat could deduce that he has one, and every person with two hats could deduce that he has two on their hat. So after no more than 2 rounds, the game would be over.

So, after 2 rounds, every logician is completely safe to assume that there are more than 8 hats on the heads, because otherwise, the puzzle would already be over.

So, the first logician will be able to start saying "I know that I have 2 hats on my head" if he sees 7 hats. If he sees 8, he can't be so sure, but his neighbor can. By solving that he knows, everyone can assume that there are 9 hats total. So, after at most 3 rounds and a fourth turn by logician 1, the puzzle is solved.

I even think that 3 full rounds could be enough, because the last logician can start his deduction in his 2nd turn already, but that's just too high for me at the moment.

If Actual arrangement

21222,22122,22212

Logicians assumed cases

11222,12122,12212,21122,21212,22112 in this case last person would have said that he has 2 hats (since least count + max 2 hats on head) evaluates to two hats on last head

21222,22122,22212 since in assumed arrangement since last person didnt said anything first person can predict he has 2 hats

in this way game completes

But if actual arrangment is

12222,22221 then first and last logicians may assume following arrangement as well

12221,12221 respectively so game do not completes

Preamble: The following are all of the possible (unordered) hat combinations that could exist for a total of 8, 9, or 10 hats:
22222: 10 hats
22221: 9 hats
22211: 8 hats

TL;DR

The game never completes.

Case 12222:

$L_1$ sees 8 hats. He does not yet have enough information to make a decision. The table could be 12222 or 22222.
From the viewpoint of the other logicians, $L_1$ must have seen fewer than two 1-hatted logicians. Had he seen two, $L_1$ would have enough information to deduce that he was wearing two hats in an 8-hat scenario.
$L_1$ would have passed when seeing zero or one 1-hatted person.
$L_2$ sees 7 hats, six of which are on $L_{3,4,5}$. He knows that if $L_1$ had seen a 1-hat logician, it's $L_2$. This does not give $L_2$ enough information to make a decision.
Had $L_2$ seen one of $L_{3,4,5}$ wearing 1 hat, he would have seen only 6 hats, leaving him knowing that he had 2 hats on his head. Because he did not state this, $L_{3,4,5}$ know that $L_2$ sees $L_1$ wearing 1 hat and did not see a second logician wearing 1 hat. From this, they can each deduce that they are wearing 2 hats.
$L_1$ now knows that $L_3$ was the first to have enough information.
$L_1$ considers the possibility that they are sitting at a table with 10 hats.
If this is the case, $L_2$ sees 8 hats, but because $L_1$ could have seen 1 hat on $L_2$ from the perspective of $L_2$, $L_2$ cannot decide.
$L_3$ would also see 8 hats, but would know that $L_2$ saw 8 hats. If $L_2$ had seen 7 hats, $L_2$ would know he is wearing 2 hats, or else $L_1$ would have seen two 1-hatted logicians.
$L_3$ can now conclude that he is wearing 2 hats in the 10-hat scenario. $L_{4,5}$ can also conclude their 2-hat status based on this.
Because $L_3$ is the first to figure out his 2-hat status in either a 9- or 10-hat scenario, $L_1$ does not have enough information.
Similarly, $L_2$ does not have enough information since $L_{3,4,5}$ could see $L_{1,2}$ with three total hats or two total hats and still make the same statements about themselves.
The game does not complete. $L_1$ and $L_2$ are stuck.

Case 21222:

$L_1$ sees 7 hats. He does not yet have enough information to make a decision. The table could be 11222 or 21222.
From the viewpoint of the other logicians, $L_1$ must have seen fewer than two 1-hatted logicians. Had he seen two, $L_1$ would have enough information to deduce that he was wearing two hats in an 8-hat scenario.
$L_1$ would have passed when seeing zero or one 1-hatted person.
$L_2$ sees 8 hats, six of which are on $L_{3,4,5}$. He knows that if $L_1$ had seen a 1-hat logician, it's $L_2$. However, this does not give $L_2$ enough information to make a decision as $L_1$ would also pass if he sees four 2-hat logicians.
$L_3$ sees 7 hats and knows that $L_1$ did not see two 1-hat logicians.
$L_3$ is able to conclude that he is wearing two hats.
$L_{4,5}$ are able to make the same conclusion based on the indecision of $L_1$.
$L_1$ now knows that $L_3$ was the first to have enough information.
$L_1$ considers the possibility that they are sitting at a table with 8 hats.
If this is the case, $L_2$ sees 7 hats, but because $L_1$ could have seen 1 hat on $L_2$ from the perspective of $L_2$, $L_2$ cannot decide.
$L_3$ would see 6 hats, immediately revealing that they are at an 8-hat table and $L_3$ now knows he is wearing 2 hats.
Because $L_3$ is the first to figure out his 2-hat status in either a 8- or 9-hat scenario, $L_1$ does not have enough information.
Similarly, $L_2$ still does not have enough information. (Compare to 12222.)
The game does not complete. $L_1$ and $L_2$ are stuck.

Case 22122:

$L_1$ sees 7 hats. He does not yet have enough information to make a decision. The table could be 12122 or 22122.
From the viewpoint of the other logicians, $L_1$ must have seen fewer than two 1-hatted logicians. Had he seen two, $L_1$ would have enough information to deduce that he was wearing two hats in an 8-hat scenario.
$L_1$ would have passed when seeing zero or one 1-hatted person.
$L_2$ sees 7 hats, including the 1 hat on $L_3$. He knows that $L_1$ had not seen two 1-hat logicians, so $L_2$ is able to decide that he is wearing two hats.
$L_3$ sees 8 hats and must now consider the possibility of a 10-hat table.
If $L_3$ were wearing 2 hats, $L_2$ would have had the same information as a 21222 scenario and thus be unable to decide his hat count.
However, since $L_2$ could decide, they must not be in a scenario that fits 2x222. With $L_3$ seeing 22x22, the only possibility is that $L_3$ is wearing 1 hat.
$L_3$ is able to conclude that he is wearing 1 hat.
$L_4$ sees 7 hats and must consider the possibility of an 8-hat table.
If $L_4$ were wearing 1 hat, $L_1$ would have seen two 1-hatted logicians and been able to decide his own hat status.
Because this is not the case, $L_4$ can correctly deduce that he is wearing 2 hats.
The same is true for $L_5$.
$L_1$ is now the only logician that has not yet determined his hat status.
$L_1$ must consider the 12122 table scenario in order to determine if he is wearing 1 or 2 hats.
In such a scenario, $L_2$ would have seen two 1-hat logicians and would have been able to decide that he was wearing two hats, so $L_2$ has not offered enough information to $L_1$.
$L_3$ would have seen the same as in the 12222 scenario, but would have been able to tell the difference because $L_2$ was able to state his hat count. $L_3$ has not offered enough information to $L_1$.
$L_{4,5}$ would each see two 1-hat logicians and be able to state that they have two hats on, so they also do not provide enough information to $L_1$.
The game does not complete. $L_1$ is stuck.

Case 22212:

$L_1$ sees 7 hats. He does not yet have enough information to make a decision. The table could be 12212 or 22212.
From the viewpoint of the other logicians, $L_1$ must have seen fewer than two 1-hatted logicians. Had he seen two, $L_1$ would have enough information to deduce that he was wearing two hats in an 8-hat scenario.
$L_1$ would have passed when seeing zero or one 1-hatted person.
$L_2$ sees 7 hats, including the 1 hat on $L_4$. He knows that $L_1$ had not seen two 1-hat logicians, so $L_2$ is able to decide that he is wearing two hats.
$L_3$ follows the same logic as $L_2$ to deduce that he is also wearing 2 hats.
$L_4$ sees 8 hats and must now consider the possibility of a 10-hat table.
If $L_4$ were wearing 2 hats, $L_2$ would have had the same information as a 21222 scenario and thus be unable to decide his hat count.
However, since $L_2$ could decide, they must not be in a scenario that fits 2x222. With $L_4$ seeing 222x2, the only possibility is that $L_4$ is wearing 1 hat.
$L_4$ is able to conclude that he is wearing 1 hat.
$L_5$ sees 7 hats and must consider the possibility of an 8-hat table.
If $L_5$ were wearing 1 hat, $L_1$ would have seen two 1-hatted logicians and been able to decide his own hat status.
Because this is not the case, $L_5$ can correctly deduce that he is wearing 2 hats.
$L_1$ is now the only logician that has not yet determined his hat status.
$L_1$ must consider the 12212 table scenario in order to determine if he is wearing 1 or 2 hats.
In such a scenario, $L_2$ would have seen two 1-hat logicians and would have been able to decide that he was wearing two hats, so $L_2$ has not offered enough information to $L_1$.
$L_3$ offers no additional information for the same reason.
$L_4$ would have seen the same as in the 12222 scenario, but would have been able to tell the difference because $L_2$ was able to state his hat count. $L_4$ has not offered enough information to $L_1$.
$L_5$ would see two 1-hat logicians and be able to state that they have two hats on, so they also do not provide enough information to $L_1$.
The game does not complete. $L_1$ is stuck.

Case 22221:

$L_1$ sees 7 hats. He does not yet have enough information to make a decision. The table could be 12221 or 22221.
From the viewpoint of the other logicians, $L_1$ must have seen fewer than two 1-hatted logicians. Had he seen two, $L_1$ would have enough information to deduce that he was wearing two hats in an 8-hat scenario.
$L_1$ would have passed when seeing zero or one 1-hatted person.
$L_2$ sees 7 hats, including the 1 hat on $L_5$. He knows that $L_1$ had not seen two 1-hat logicians, so $L_2$ is able to decide that he is wearing two hats.
$L_{3,4}$ follow the same logic as $L_2$ to deduce that they are also each wearing 2 hats.
$L_5$ sees 8 hats and must now consider the possibility of a 10-hat table.
If $L_5$ were wearing 2 hats, $L_2$ would have had the same information as a 21222 scenario and thus be unable to decide his hat count.
However, since $L_2$ could decide, they must not be in a scenario that fits 2x222. With $L_5$ seeing 2222x, the only possibility is that $L_5$ is wearing 1 hat.
$L_5$ is able to conclude that he is wearing 1 hat.
$L_1$ is now the only logician that has not yet determined his hat status.
$L_1$ must consider the 12221 table scenario in order to determine if he is wearing 1 or 2 hats.
In such a scenario, $L_2$ would have seen two 1-hat logicians and would have been able to decide that he was wearing two hats, so $L_2$ has not offered enough information to $L_1$.
$L_{3,4}$ offer no additional information for the same reason.
$L_5$ would have seen the same as in the 12222 scenario, but would have been able to tell the difference because $L_2$ was able to state his hat count. $L_5$ has not offered enough information to $L_1$.
The game does not complete. $L_1$ is stuck.

Long and short:

If order is 12222 or 21222 first and second can't tell. Otherwise, all but first can tell.

Let's assume the order is 12222

The second 2-hat person to guess can know their own hat. That person knows that the first 2-hat person saw 5+ their hat. If the first saw 6 total hats, they know they have to have 2 hats or else they would be below the minimum. Hence, they saw 7 and couldn't say yea/nay.

The 3rd and 4th 2-hat can say the same.

Now it gets tricky going back to the 1-hat and first 2-hat. The 1-hat sees 8, so he can't guess. Then he sees first 2-hat not know with 6+ him. Then he sees second 2-hat know with 6+ him. If he has a 2-hat (total 10), then nobody would be able to guess their hat. And it would make sense that the first 2-hat would see 7, not know, then the second 2-hat could guess, as could the rest. So, 1-hat figures it out.

That leaves the first 2-hat. In this case, I don't think he can figure it out. If he had a 1-hat, then second-fourth 2-hats would have gotten the right answer and the 1-hat could have guessed right.

Let's change the order to 21222

First 2-hat, 1-hat can't figure it out, second-fourth 2-hats know they don't have a 1-hat, since the first 2-hat would have gotten his hat right.

First 2-hat still doesn't know, and the 1-hat knows his (by the 10=loop).

(Thinking)
So, how would they deal with the scenario that all of them have 2 hats? First sees 8, doesn't know. Second sees 8, first could have seen 7, doesn't know. Third sees 8, knows first two saw the same thing, but the second person couldn't figure out their hats. If they saw 7, the 2nd would have been able to say he was a 2-hat. So they saw 8.... which puts a crimp in my logic above.

The game never completes.

Reasoning:

In every sequence in which the first logician has 2 hats and there are 8 hats in total, the first logician immediately knows his hat count. If not, then there is at most one 1-hat logician among logicians 2-5.

If logician 2 sees one hat on the head of logician 3, 4 or 5, he knows his own hat count is 2. Otherwise, he says "I don't know".

If logician 2 said "I don't know", then the other logicians all know they have 2 hats. Otherwise, exactly one of them has 1 hat, and they can easily determine who.

Since none of the other logicians made their decisions based on what logician 1's hat count actually was, he's stuck. If logician 2 didn't figure out his own hat count in the first round, then he's stuck as well.

Thus, this game can only complete when the actual hat count is 8 and the first logician has 2 hats (but according to the question, the actual hat count is 9).

All possible sequences:

22222: ??222 1,2 stuck
12222: ??222 1,2 stuck
21222: ??222 1,2 stuck
22122: ?2122 1 stuck
22212: ?2212 1 stuck
22221: ?2221 1 stuck
11222: ??222 1,2 stuck
12122: ?2122 1 stuck
12212: ?2212 1 stuck
12221: ?2221 1 stuck
21122: 21122*
21212: 21212*
21221: 21221*
22112: 22112*
22121: 22121*
22211: 22211*

The game always completes in this scenario(This would be more complicated if the possible number of hats were [7,8,9,10]).

No matter what the order, the first logician with 2 hats will immediately know that he has 2 hats if the number of hats is 8(he sees 2211). He'll reply "don't know" only if the total number of hats is either 9 or 10. Since, the true number is 9, he replies "don't know".

Now the second person with 2 hats knows that the number is either 9 or 10. If the total number is 9, then the second 2 hatted person in the sequence will immediately know because he sees 7 hats in front of him and knows that total number is not 8. He'll reply "don't know" only if the total number of hats is 10, in which case the third two hatted person will immediately know the configuration.

Hence, the game always completes. However if the total number of hats could be in the set {7,8,9,10}, things would be different.

• The game only completes when each person has given a definitive answer. All you've stated is who will be the first to give an answer. That's a long way from "hence, the game always completes". Imagine the situation XY222 where the person with X is first asked. You've proven that regardles of X and Y, the third person will be the first to answer. Since this says nothing about the values of X and Y, how do the first two determine how many they're each wearing in order for the game to complete? Apr 1 '15 at 22:48
• Finding out the total number of hats in the game is sufficient for the game to be completed. The number is 8(X,Y=1) if first person with 2 hats "knows", 9 if second 2 hatted person "knows" and 10 if the third one "knows". Everyone on the table can gather this information logically and it is trivial to work out the correct number of hats after a two hatted person declares that he "knows". Apr 2 '15 at 19:17
• You're ignoring where I said "regardles of X and Y, the third person will be the first to answer". 11222, 12222, 21222, 22222. In all these cases, the third person is the first to "know", so how are they figuring out the total number of hats? Apr 2 '15 at 20:24
• partition_Z says not the "third person will be the first to answer" but "the third person with two hats will be the first to answer" Jun 3 '16 at 9:43

It always is completed.

As soon as one two hat is unable to guess, the next two hat would know that they cannot be a one, as if they see a one and the previous two hat didn't say that they had two hats on they know that there cannot be two one hats. They would see the only one hat and immediately know that they are a two hat. The one hat would know that the total is not eight, and as soon as one person guesses the one hat will know he has to have one hat. Even if the total number of hats were ten this would still complete.

In other words, the third two hat will be able to guess their hat number, and from that point, all other logicians can deduce their number of hats due to the cyclical nature of the game.

The game never completes.

We number the logicians $L1$ through $L5$, where $L1$ is the first to play, then $L2$ et cetera. In $Lx=y$, $y$ refers to the number of hats on $Lx$.

$Block\ 1:$

Whenever a logician $Lx=2$ says "I don't know", it informs all the other logicians that said $Lx$ does not see two logicians with value $1$. Thus any other logician $Lx=2$ will see the logician with value $1$ and instantly know they themselves have value $2$; there cannot be a second $1$.

$Block\ 2:$

The logician $Lx=2$ that announced "I don't know" (Let's call this logician $La$) does not gain sufficient knowledge to deduce its own value from other $Lx=2$ logicians. They could either have used the above deduction or they could simply have seen two logicians whose value was $1$: the $La$ can see and $La$ itself.

$Block\ 3:$

The logician $Lx=1$ can deduce its value as soon as the first $Lx=2$ player to announce its value does so. Since $La$ informs the other players that there are either $0$ or $1$ $Lx=1$ logicians in the set of logicians excluding $La$, and the next $Lx=2$ logician can instantly deduce its own value, it does so through the deduction in block 1, requiring it to see a logician $Lx=1$ leaving only one candidate.

So from the above three blocks we can draw the conclusions that $La$ never finds out its own value, $Lx=1$ figures out its own value as soon as another player announces its value and the remaining three players figure out their own values from the initial "I don't know" announced by $La$.