Let E refer to the propositions expressed by the sentence:
“Everyone wants beer”
“everyone” refers to the three people on the right. Let’s call them “a”, “b”, “c” from left to right. Let “Wx” =df “x wants beer”.
We could try to show this but let’s just take it intuitively that the following holds:
Everyone wants beer ↔ a wants beer and b wants beer and c wants beer
Formalizing we get:
Now, assume that to begin with, a, b, c does not know whether the two others want beer or not. This is technically ‘left open’ in the comic, but it is not irrelevant.
Now, assume every person knows if he wants beer or not, or rather, he either knows that he wants beer, or he knows that he does not want beer. Without this, it doesn’t work either. Introducing “Kx(P)” to mean “K knows that P” and formalizing:
Now, interpreting “logicians” to be a group of people being perfect at making inferences in at least this case. Such people are sometimes called “ideally rational” or similar. They never make a wrong inference and never miss an inference.
Let’s think about a’s position as he is first to answer the question. If he knows that he wants beer, then he does not know the truth of E. But if he knows that he does not want beer, he can know that E is false. Because: he is part of everyone, so if he does not want beer, it is not the case that everyone wants beer. If a is being truthful etc., he has to answer either “I don’t know” or “No”.
Now b is in almost the same position as a. Obviously, if a has already answered “No”, there is no reason to respond or at least he should respond the same. If a’s answer is “I don’t know”, b still lacks information about whether or not c wants beer [Wc or ¬Wc1]. Likewise, b knows his own state, so he knows either that he wants beer or that he doesn’t want beer. If he knows that he doesn’t, he can infer that E is false, similarly to a. If he knows that he does, then he can’t infer anything about E, and has to answer “I don’t know”.
Now, c has all the information he needs to answer either “Yes” or “No”. Obviously, if any of the previous answers are “No”, then he should also answer “No” or simply not answer. If both earlier answers are “I don’t know”, he can infer that both a and b want beer. He also knows his own state. If he does not want beer, he will answer “No”. If he does, he can infer that E is true, and thus answer “Yes”.
Pretty similar comic which does need set theory to properly formalize: http://mrburkemath.blogspot.com/2011/05/coffee-logic.html
1Which could also be interpret as: To go to the bathroom or not go to the bathroom? :D