15. AN AGE-OLD PROBLEM
‘I hear you have three children, Fred,’ said George in conversation. ‘What are their ages?’
‘Well,’ said Fred mysteriously, ‘the product of their ages is 72, and they add up to your house number.”
George thought for a moment.
‘You haven’t given me enough information,’ he said.
‘You’re right,’ laughed Fred. ‘I’ll tell you this: my eldest child is learning the oboe.’
‘That ill woodwind that nobody blows any good!’ smiled George wryly. ‘But at least I now know the answer to my question.’
Do you?
Hint 1
Try to sort out the given information. How many ages are there? What is their product? What possible ages are there? How can we use the information about the sum of the ages? And what is the significance of the eldest child?
Solution
This is one of those intriguing problems where there seems to be almost no given information. We know that there are three ages with a product of 72. We know that 72 = 2 x 2 x 2 x 3 x 3. Let us list the possible ages. Writing them down systematically in non-decreasing order, we get the first three columns at right:
Let us now see what each set of ages adds up to. These totals are listed in column 4 of the table.
Now if for example George’s house number is 13, he can tell the three ages immediately. Since there is some doubt, the sum must be 14, and the ages 2, 6, 6 or 3, 3, 8.
1
|
2
|
36
|
39
|
1
|
3
|
24
|
28
|
1
|
4
|
18
|
23
|
1
|
6
|
12
|
19
|
1
|
8
|
9
|
18
|
2
|
2
|
18
|
22
|
2
|
3
|
12
|
17
|
2
|
4
|
9
|
15
|
2
|
6
|
6
|
14
|
3
|
3
|
8
|
14
|
3
|
4
|
6
|
13
|
Extensions
Notice that the mathematics behind this problem is in finding two triplets of numbers (2,6,6) and (3,3,8) which have the same sum and the same product. There are other such triplets: for example (1,6,6) and (2,2,9).
Write a short program to find all such triplets with sum less than 100. Invent your own problem using one of these pairs.
Hint 1
Solution
Extensions