The Solution

Let's go through the problem step by step. We start when none of the agents has yet made an announcement and they have not even looked at each others numbers yet. All agents hold all worlds in which one of the numbers is the sum of the other two possible. This is a set of 166 possible worlds, ranging from <0,0,0>, <0,1,1>,.. to <10,9,1>,<10,10,0>.

Agent A says: "I do not know the numbers"

This implies the agent has seen two numbers, which can form a sum (agent A's number), or one of the numbers could sum to the other one, in combination with agent A's number. In the figure shown below, only the red possibilities remain.

Figure 1: the number of options agent A has depending on the numbers of the other two agents. If agent A says he does not know the numbers he is in doubt, and only the red area is possible.
  Number on visible agent #1 
 012345678910
 Number on visible agent #2011111111111
112222222221
212222222211
312222222111
412222221111
512222211111
612222111111
712221111111
812211111111
912111111111
1011111111111

This knowledge can be derived by all agents. Because agent A has announced his doubt about his own number, the other two agents know they have a number that leads to a spot within the red area of the figure. The implementation in DEMO calculates all worlds in which this situation can arise and this can be plotted using dot from the Graphviz project. This plot is shown in figure 2


Figure 2: The worlds in which agent A can claim he doesn't know the numbers. Click to enlarge.

Agent B says: "I do not know the numbers"

Again, this public announcement of ignorance can only occur in certain worlds. To show this, assume in the current world agents A, B and C have been assigned the numbers 2, 4 and 2 respectively. Agent A has announced that he doesn't know the numbers, because he thinks both <2,4,2> and <6,4,2> are possible worlds. Just by seeing the numbers 2 and 2, agent B would have doubts about his own number; he could be either 0 or 4. However, if he'd had the number 0, agent A would only have the option of being 2, and he wouldn't have said he doesn't know the numbers. Thus, in the world <2,4,2>, agent B would not make the announcement "I do not know the numbers" and therefore this particular world is not one of the solutions to our specific problem..

The new set of possible worlds is depicted in figure 3. This is common knowledge to all agents, because it can be inferred while only having the announcements.


Figure 3: The worlds after 2 agents have uttered their ignorance. Click to enlarge.

Agent C says: "I do not know the numbers"

Agent C already knew that only the worlds of figure 3 are accessible, based on the claims of agents A and B. He therefore has to discover which worlds are possible within these accessibility relations and on the basis of his perception. Because agent C states that he doesn't know the numbers, he implicitly updates the common knowledge that certain states can't be true and the corresponding worlds aren't accessible.

One of the worlds that could be possible until agent C makes his claim is <1,1,2>.

Proof by contradiction

Suppose world <1,1,2> is true. In this situation, agent A observed the values 1 and 2 and he therefore thought that two worlds are possible: <1,1,2> (agent A is a term-agent) and <3,1,2> (agent A is a sum-agent). He therefore correctly makes the claim "I don't know the numbers". Agent B observed 1 and 2 and therefore thinks of two worlds as being possible <1,1,2> (agent B is a sum-agent) and <1,3,2> (agent B is a sum-agent). If the situation of <1,3,2> was true, agent A still would make the claim "I don't know the numbers" (doubting between <1,3,2> and <5,3,2>) and therefore, agent B also doesn't know the numbers and makes the claim "I don't know the numbers".

After agents A and B made these claims, agent C observes the numbers, being 1 and 1. He thinks two worlds are possible, world <1,1,2> (agent C is the sum-agent) and world <1,1,0> (agent C is a term-agent). However, if agent C had number 0, then agent A and B would immediately have seen what number they were, because this combination of numbers only offers 1 possibility (according to figure 1). Agent C therefore has to know the number, but this is in contrast with the fact that he doesn't know the number he is. Therefore, our assumption isn't true.

Using this analogy, other possible worlds can also be eliminated. The new common knowledge is drawn in figure 4.


Figure 4: The common knowledge after agent C's claim

Agent A says: "I know the numbers"

Agent A can safely state this, because for every world left Agent A holds only that world as an option, there are no connections for A between the possible worlds. These worlds are:

  • <1,3,2>
  • <1,3,4>
  • <2,1,1>
  • <2,1,3>
Development of the common knowledge

Let us look at the first case, <1,3,2>.

Agent A observes values 3 and 2 and therefore thinks there are two options: <1,3,2> (he's a term-agent) and <5,3,2> (he's a sum-agent). On the basis of his observations he can't decide which number he is and he makes the claim "I don't know the numbers".

Based of his own observations, agent B thinks the following worlds are possible: <1,3,2> and <1,1,2>. Both options are consistents with agent A's claim "I don't know the numbers". Because, when <1,1,2> would be true, agent A would doubt between <1,1,2> and <3,1,2>. Consequently, agent B can't decide which number he is on the basis of his observations ánd on the basis of agent A's claim, thus Agent B states "I don't know the numbers".

Agent C observes the numbers 1 and 3 and therefore also thinks two worlds are possible: <1,3,2> and <1,3,4>. These doubts are consistent with the previous claims of agents A and B that they don't know the number: both have doubt when the situation is <1,3,2> and they would also have doubt in the case of <1,3,4>.

Agent C therefore announces that he doesn't know the numbers. As a consequence, agent A now does know the numbers. Remember that he had doubt between situations <1,3,2> and <5,3,2>. Suppose situation <5,3,2> was true. In this situation, agent C would have doubt between worlds <5,3,2> and <5,3,8>. However, if world <5,3,8> was the true world, agent B would have seen that he was number 3 (the term-agent), because agent B can't be the sum-agent (as 13 isn't in our domain). Agent C would therefore have known which number he was, <5,3,2> and had made the claim (note that in this situation, agent B would have doubts between worlds <5,3,2> and <5,7,2>). So because C claims that he doesn't know the answer, A knows that agent C didn't regard situation <5,3,2> as possible. Consequently, agent A knows that only the other option can be possible. He can therefore correctly make the claim "I know the numbers".

A similar reasoning can be made for other worlds mentioned above.

If someone would now ask agent B "do you also know what the numbers are?", he would also know this. Note that the 4 options that agent A thought of were common knowledge. Because the combinations of possible values for A and C are mutually exclusive, and B can always observe the values of A and C, he can always reason which value is corresponding to his current situation.

Note that agent C can't reason which number he has himself. This is because there are always two worlds possible on the basis of his observations. If agent C observes values 1 and 3 for agent A and B, he could have the value 2 or 4 himself. If he observes that agent A and B have values 2 and 1, agent C could have value 1 or 3. So it would be very social if agents A and B shared their knowledge and told agent C the value of his number ;-)