Tuesday, April 19, 2011

The Survey

A census taker rings the doorbell and a woman opens. She informs the census taker that she lives in the house with her three sons. “What are the ages of your boys, please?” the census taker asks.
“When you multiply all their ages, the result is 72,” the woman cryptically informs him.

The census taker has a confused look on his face, so the woman adds: “The sum of their ages is the same as the housenumber of the house next door.”
He finds this rather odd, but walks to the house next door, only to return shortly after. “I still don't know, can you give me another hint?”

“Sure,” the woman says, “my oldest son likes strawberries.”
The census taker nods and writes down the ages. What are they?


Solution
The first hint is that the product of the ages of the three sons is 72. The number of unique combinations for this is actually not that large.

CombinationSum
1 × 1 × 7274
1 × 2 × 3639
1 × 3 × 2428
1 × 4 × 1823
1 × 6 × 1219
1 × 8 × 918
2 × 2 × 1822
2 × 3 × 1217
2 × 4 × 915
2 × 6 × 614
3 × 3 × 814
3 × 4 × 613

The next step is to eliminate some of these possible answers, for which the next hint can be examined. The sum (written in the second column) matches the number of the house next door, but the riddle does not state that number! Read on though: apparently this clue is not sufficient for the census taker to find the correct answer. The only reason that would happen is if there are multiple combinations with the same sum. As you can see that's only the case for 2 + 6 + 6 and 3 + 3 + 8 (both sum to 14). If it was one of the other combinations, the census taker would have known right away after this hint.

So on to the last hint, which is rather cheeky. The strawberries have nothing to do with anything. The useful information is that the woman has an oldest son instead of two eldest twins. Thus the answer must be ages 3, 3 and 8!

No comments:

Post a Comment