Recommended Books

Thursday 14 February 2013

A Mind Boggling IQ Question

Q. Two friends, a programmer and a mathematician, get together for drinks after work one day at the programmer’s house.  The mathematician asks the programmer how his three children are doing.  The programmer replies that one of his three children just had a birthday.  The mathematician asks, "How old are your children now?"  The programmer replies, "The product of their ages is 36."  The mathematician thinks for a moment and says, "That’s not enough information."  The programmer says, "OK, the sum of their ages equals my house address."  The mathematician steps outside to check the address number,
comes back inside, and says, "That’s still not enough information."  The programmer then says, "Well my oldest child has red hair."  The mathematician immediately responded, "Oh, now I know the ages."  What are the ages of the programmer’s three children?

Solution :


The children are aged 2, 2, and 9 years old.  The mathematician’s logic was that since there are three children whose ages multiply to 36, the possible combinations are:

1, 1, 36
1, 2, 18
1, 3, 12
1, 4, 9
1, 6, 6
2, 2, 9
2, 3, 6
3, 3, 4

Initially, any of these could be the correct ages.  After the programmer says that the sum of the ages is the same as the house address, the mathematician mentally computed the sum of each possible combination:

1, 1, 36 -> 38
1, 2, 18 -> 21
1, 3, 12 -> 16
1, 4, 9  -> 14
1, 6, 6  -> 13
2, 2, 9  -> 13
2, 3, 6  -> 11
3, 3, 4  -> 10

Notice that all the sums are different except for (1, 6, 6) and (2, 2, 9).  If the programmer’s address was anything except for 13, then the mathematician would know the ages, so the three ages must be one of those two combinations.  But after the programmer said that the oldest child has red hair, the mathematician knew that there was a single oldest child which eliminates the (1, 6, 6) combination which has oldest twins.