Quote:
Original post by phresnel
Quote:
Original post by Programmer One
A waiter comes up to a table of computer programmers and asks, "do any of you like any water?"
The first programmer says, "I don't know."
The second programmer says, "I don't know."
...this goes on around the table until finally, the last programmer at the table says, "No."
But the last programmer seems to access violate his synapserie or has an off by one error in his mouth. How can he know the answer, if the others only gave undefined answers regarding the boolean datatype of the original question?
It assumes that all the programmers are truthful and that all the programmers know wheter or not they like water.
Then, if the first programmer said "Yes," it is solved, because the programmers translate the question as
"return (programmer1likeswater OR programmer2likeswater OR ...)".
He cannot say "No" since he only knows he doesn't like water but he has no information about the others.
If he says "I don't know", the programmers assume (correctly) that he doesn't like water because he didn't respond Yes. The question is now
"return (false OR programmer2likeswater OR ...)".
And it finally resolves as:
"return (false OR false OR ... OR false) = return false)"