This Demonstration generates a puzzle about logicians who derive conclusions from given assumptions and previous statements.

There are logicians in a room, all wearing jackets with on the front as labels. On the back of at least one of the jackets is a big letter X. This fact is known to all. Each of the logicians can see everyone else's back, but not their own. The problem for each of them is to figure out whether they have an X or not.

They do this in the course of several rounds. In each round, the logicians who have not yet decided if they have an X on their back speak in order of their labels. Each logician says one of the following statements:

A: "I don't know whether I have an X on my back."

B: "I don't have an X on my back."

C: "I do have an X on my back, and at least one other logician does also, but has not said so yet."

D: "I do have an X on my back, and all other logicians who do have already said so."

A logician takes part in the next round only if he or she makes statement A. Of course, they are perfect logicians and never lie.

The Demonstration is an adjustment of a puzzle by D. Shasha. Suppose there is only one logician with an X. Then he or she knows that they are the only one with an X.

Suppose there are two logicians with an X. The first of the two will not decide in the first round. But the second will. His or her argument is: If I don’t have an X, the other logician won’t see an X, so they will know they have an X. But the other logician didn’t decide, therefore I have an X.

Reference

[1] D. Shasha, The Puzzling Adventures of Dr. Ecco, New York: W. H. Freeman, 1988 pp. 113–114.