Artificial intelligent assistant

"Does everyone want coffee?" propositional logic problem > When three professors are seated in a restaurant, the hostess asks them: “Does everyone want coffee?” The first professor says: “I do not know.” The second professor then says: “I do not know.” Finally, the third professor says: “No, not everyone wants coffee.” The hostess comes back and gives coffee to the professors who want it. How did she figure out who wanted coffee? The solution is that the first two professors who say they don't know if everyone wants coffee are the ones who want coffee. However, I don't understand the logic. For example, the first professor may not want coffee, but does not know if the other professors want coffee, and thus can answer "I do not know." So how can the hostess take an answer of "yes" from that?

Suppose the first professor did _not_ want coffee. Then, they would know that it is _not_ the case that "everyone wants coffee" - so, when asked "Does everyone want coffee?," they would answer "no."

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 3e6df6a592671bdb315100890389ba4a