Muddy Children — Puzzle for Interview rounds
A mother tells her two children, a boy and a girl, to play without getting dirty.
However, while playing, both children get mud on their foreheads.
The mother says “At least one of you has a muddy forehead”. She then asks the children to answer “Yes” or “No” to the question: “Do you know whether you have a muddy forehead?”
The mother asks this question twice.
What will the children answer each time this question is asked, assuming that a child can see whether his/her sibling has a muddy forehead, but cannot see his or her own forehead? Assume that both children are honest and that the children answer each question simultaneously.
Let s be the statement that the son has a muddy forehead and let d be the statement that the daughter has a muddy forehead. When the mother says that at least one of the two children has a muddy forehead, she is stating that the disjunction s ∨ d is true.
Both children will answer “No” the first time the question is asked because each sees mud on the other child’s forehead. That is, the son knows that d is true, but does not know whether s is true, and the daughter knows that s is true, but does not know whether d is true.
After the son has answered “No” to the first question, the daughter can determine that d must be true. This follows because when the first question is asked, the son knows that s ∨ d is true, but cannot determine whether s is true. Using this information, the daughter can conclude that d must be true, for if d were false, the son could have reasoned that because s ∨ d is true, then s must be true, and he would have answered “Yes” to the first question. The son can reason in a similar way to determine that s must be true. It follows that both children answer “Yes” the second time the question is asked.