Census taker knocking on the door.

A census taker approaches a house and asks the woman who answers the door “How many children do you have, and what are their ages?” The woman says, “I have three children; the product of their ages is 36, and the sum of their ages is equal to the address of the house next door.” The census taker walks next door, comes back and says, “I need more information.” The woman replies, “I have to go, my oldest child is sleeping upstairs.” The census taker says, “Thank you, I now have everything I need.”
 
What are the ages of the three children?



Answer:

The key to this question is realizing that by knowing that the product of the ages is 36, there are only and handful of possible ages of the children and that once the census taker goes next door, he or she should be able to figure out what the ages are because most of the possibilities sum to different amounts. For example, the children could be 1, 4, and 9 (which sums to 14) or 2, 4, and 4 (which sums to 10). If the census taker is not able to determine the ages after looking at the house next door, it’s because there must be more than one combination of ages that sums to the same number (and this number must be the number on the house). If you consider all of the possibilities, you will see that only 2, 2, and 9 and 1, 6, and 6 both multiply to equal 36 and sum to the same amount (13). So when the woman tells the census taker that her oldest child is sleeping upstairs, the census taker can then infer there is an oldest child, so her children must be 2, 2, and 9.