Three logical mathematicians enter a cafeteria and the waitress who asks:
-Do you all want coffee?
"I don't know," replies the first.
"I don't know," replies the second.
-Yes -answered the last.
What will the first two mathematicians take?
You will find this and other mathematical jokes on this page.
the key is in the word everybody. The waitress asks if everybody They want coffee.
What do the 3 logical mathematicians do?
The first wants a coffee since otherwise your answer would be NO but since you do not know if others want it, answer that you do not know if the 3 want a coffee.
Following the same logic we know that the second mathematician also wants a coffeeIn addition, he knows that the first also wants a coffee since he has not answered no, but since he does not know what the third wants, he answers I do not know. Again, if I didn't want coffee, I would have said no since in that case everybody They wouldn't have had coffee.
Finally the third, after the answers of his two companions, he deduces that they both want coffee and as he also wants, he can answer yes.