20-CS-110-001 Introduction to Computer Science Fall 2010

Solution to Lies Like a Dog Puzzle

   
  • Suppose parent 1 is male - males tell the truth so the kid said 'I am a boy'.
    Females alternate truth - there are two possibilities (TF) or (FT)
    1. kid is a girl and did not lie - this is inconsistent with 'I am a boy'
    2. kid is a boy and did lie - boys do not lie
    conclusion: parent 1 is female

  • Parent 2 must be male due to the heterosexual restriction - the statement of the female that the kid said it was a boy may be true or false - we must discount it.
    Males tell the truth so the kid is a girl and the kid lied. This is consistent with females alternating truth telling.

    This is the only possibility so the kid is a girl.