How to formally model the "hesitation" in the hat-guessing puzzle? Hua Luogeng (in Chinese, 华罗庚) took a hat-guessing puzzle as an illustration in a booklet focusing on mathematical induction. The following description is a literal translation from Chinese.

Hat-Guessing Puzzle: A teacher wants to identify the most smartest one from his three students by the following methods: 5 hats are shown, in which 3 of them are white and the other two are black, to the three students. With eyes closed, each student is put on a white hat, while the other two black ones are hidden. Once the permissions of opening eyes are granted, the three students open their eyes simultaneously and are allowed to look at the hats of others without any communication. After a hesitation, they say that "the hat on my own hat is white" with one voice. The question is how do they make it?

The puzzle can be easily generalized to the version with $n$ persons, $n-1$ black hats, and $\ge n$ white hats and be solved by induction on $n$:

Prove by induction on $n$: 



*

*When $n$ is 2, the situation is trivial because there is only one black hat. If I am wearing the black one, then the other person can tell that the hat on his head is white, without any hesitation. However, he does hesitate. Contradiction. 

*Suppose that we have solved the puzzle with $n = k$.

*When $n = k + 1$, the reason goes in the following way: If someone is wearing the black hat, all the other people will know that and the problem is reduced to a version with $k$ person, $k-1$ black hats and $\ge k+1$ white hats. According to the inductive hypothesis, the $k$ persons should tell that the hats on their heads are all white, without any hesitation. Contradiction.


While both the puzzle and proof sound very simple, I am very confused with the informal keyword "hesitation" in them. I even cannot tell the vagueness of hesitation clearly. For example, is the hesitation itself a suitable object which can be used in mathematical induction? Informally, my problem can be stated as follows.

My Problem: How to formally model the hesitation in the hat-guessing puzzle?

Thank you for any suggestions.
 A: The puzzle is older than its mathematical formalizations and a version of it dates back to the fifties. The most common way to model such a situation is by using the partitional model introduced by Robert Aumann. There is a finite set (can be somewhat generalized) $\Omega$ of states. A state describes everything relevant that could be the case. In the puzzle, a state could describe who wears what hat, so there are seven states $$\Omega=\{www,wwb,wbw,bww,bbw,bwb,wbb\},$$ where for example $wbw$ stands for kid $1$ wearing a white hat, kid $2$ wearing a black hat, and kid $3$ wearing a white hat. Now we have to model what the kids know. We do this the following way: A person is able to differentiate between certain states, but not others. We model this by that person having a partition of $\Omega$ and the person gets informed in which element in the partition the true state lies but not the precise state. In the puzzle, a kid is unable to differentiate states in which everyone else wears the same hat. For example, kid $2$ has the partition $$P_2=\big\{\{www,wbw\}, \{bww,bbw\},\{wwb,wbb\},\{bwb\}\big\}.$$
Note that kid $2$ knows the color of her hat only if the true state is $bwb$. Kid $1$ knows it if the true state is $wbb$ and kid $3$ know it if it is $bbw$. Generally, let $P_i$ be the information partition of a person $i$. If the true state is $\omega$, we let $P_i(\omega)$ be the element of the partition that contains $\omega$ and we interpret it as the set of states $i$ deems possible. An event is simply a set of states. We say that $i$ knows the event $E$ at state $\omega$, if $P_i(\omega)\subseteq E$. We let $K_i(E)$ be the set of states at which $i$ knows $E$. Note that $K_i(E)$ is an event itself. So, one can write things like $K_1(K_2(K_1(E)))$, which can be interpreted as $1$ knowing that $2$ knows that $1$ knows $E$.
Now in the puzzle, the true state is $www$. But a kid seeing two white hats does not tell her anything about the color of her own hat. Nobody knows the color of her hat, for otherwise she would say it. The event that nobody knows the color of her hat is $$E=\{www,wwb,wbw,bww\},$$ which is exactly the set of states at which no two kids wear a black hat. Everyone knows this and gets therefore a new partition in which this knowledge is incorporated. For example, $$P_2'=\big\{\{www,wbw\}, \{bww\},\{bbw\},\{wwb\},\{wbb\},\{bwb\}\big\}.$$ Formally, this is the coarsest partition that is at least as fine as the two partitions $P_2$ and $\{E,E^C\}$ and this is how the model is learning. Even with this partition, no kid knows the color of her hat. Everyone knows this, and this allows her to deduce that the state is not on in which the other two kids have white heads and she has black hats, for the other kids could then deduce that they have white hats and they did not. From this, every kid can deduce that the true state is $www$, or more formally $P''_i(www)=\{www\}$ for $i=1,2,3$, so this becomes a formal statement.
A survey of this kind of modeling has bee written by John Geanakoplos for the Handbook of Game Theory and Economic Applcations. The survey can be found here. It also discusses essentially the same puzzle. The article is somewhat technical, and a slightly simplified version can be found here.
A: The variations of this question that I've seen fall into two types:


*

*Time is very carefully quantized (e.g. every day at noon they gather to say something if possible), so that it is possible to make inferences of the sort "Nobody said anything during the last unit of time".

*The knowledge that the other people couldn't say anything with the knowledge immediately given is all that one needs, so one can patiently wait long enough that any reasonable person would have given an answer if they could to gain that information.


The question you state, I believe, is a bad one (at least as translated). Hesitation is, as you put it, too vague; without knowledge of how quickly the other people can make deductions (and knowledge of how quickly they think you can make deductions, et cetera), it becomes difficult to impossible to make reliable statements as the number of people grows.
A: These type of questions are analyzed in game theory/microeconomics and typically rely on probability filtrations (discrete or continuous time information updating) or algebraic topological methods. The hesitation, as suggested by comment above, is updated information over time; and it results from inaction as a different information set would have led to action. This is surprisingly hard stuff, but analyzing a similar problem made someone from my school his year's job market superstar (Sherlock Holmes - Dr. Moriarity puzzle, using hierarchies of beliefs) 
This isn't truly helpful to help you see how to model your particular problem. But you seem genuinely interested in understanding this better, and googling any of the above keywords (also Repeated Games; Bounded Rationality) should help. 
P.S.: The muddied children problem, say, would probably be modeled using hierarchies of beliefs, which are sequences of reasoning "You know x", "I know that you know x", "You know that I know that you know x"...., which are then (often) examined for fix points.
A: Suggestion regarding $\textbf{hesitation}$: The ostensible reason for the hesitation is that each is waiting to see if one of the others knows the color. So I would interpret the puzzle as saying that if any two do not know the color of their own hats, then the third one's hat is white. This version of the puzzle, with the quantifier "if any two do not" changed to "there exist two who do not", appears on the website
http://mathforum.org/library/drmath/view/55638.html
A no-frills version of it is as follows.
Three persons A, B and C are seated so that each can see only the other two. They know that either a black hat or a white hat will be placed on each one's head while they all close their eyes, and that the three hats will not all be black. After the hats are placed on their heads, they are allowed to open their eyes and each one will be asked the color of his own hat (looking only at the other two) but C first, B next and A last. When C opens his eyes, he admits he does not know. Then B opens his eyes and also says he does not know. Then A announces the color of his hat correctly without even opening his eyes. 
Question asked by the puzzle: What is the color of A's hat?
This puzzle can be solved to get the answer "white", while allowing for all four possibilities for B and C. The quantifier "any two" makes the situation symmetric and it follows that all three hats have to be white.  I figure that the puzzle in the booklet by Hua Luogeng is therefore a corollary to the version cited above from the mathforum website.
$\textbf{MY QUESTION:}$ Is the following a correct mathematical interpretation of the situation in the puzzle described here? Is there a better one?
Terminology: For a given class ℱ of functions from a set $X$ to a set $Y$, we shall say that a function in the class is determined within ℱ by (a subset) $S \subseteq$ $X$ if it is the unique function of the class ℱ that agrees with it on the subset $S$.
Claim: Consider the class ℱ of functions from a three element set $X$ = $\{A,B,C\}$ to a two element set $\{b,w\}$ such that the range is not $\{b\}$. In this class (which contains 7 functions), there is a subclass $\mathscr G$ of functions (there is only 1) that are each determined within ℱ by the subset $S$ = $\{A,B\}$ of $X$. In the complementary class ℋ of functions not in $\mathscr G$ (there are 6 of them), there is a subclass of functions (there are 2 of them) that are each determined within ℋ by $\{A,C\}$. In the subclass of functions of the remaining functions (there are 4 of them), each takes the value $w$ at the point $A$.
PROOF of the Claim: For the seven functions in ℱ, the respective values at $A,B,C$ can be tabulated as below.
$$
\{b,w,b\},   \{b,b,w\},   \{b,w,w\},   \{w,w,b\},   \{w,b,w\},   \{w,b,b\},   \{w,w,w\}.
$$
The second function forms the subclass $\mathscr G$, each of which is determined within ℱ by $\{A,B\}$. The first and third form a subclass ℐ in the complementary class ℋ = ℱ∖$\mathscr G$ of 6 functions, each of which is determined within ℋ by $\{A,C\}$. In the complementary class ℋ∖ℐ, which consists of the remaining four functions and are listed as fourth to seventh, each takes the value $w$ at $A$.
A: Chunking the time removes the need to model hesitation, as others have said.
Just give each person three options: black / white / don't know, and have two rounds for answers. Openly-declared < don't know > responses in the first round give the information for correct answers in the second round.  
