Puzzle 2 | (Find ages of daughters)

2.8

Alok has three daughters. His friend Shyam wants to know the ages of his daughters. Alok gives him first hint.

1) The product of their ages is 72.

Shyam says this is not enough information Alok gives him a second hint.

2) The sum of their ages is equal to my house number.

Shyam goes out and look at the house number and tells “I still do not have enough information to determine the ages”.

Alok admits that Shyam can not guess and gives him the third hint

3) The oldest of the girls likes strawbarry ice-cream.

Shyam is able to guess after the third hint. Can you guess what are the ages of three daughters?

netball-cartoon_2508047b
This image is taken from here.

 
 
 
 
 

Answer:
1) Product of ages is 72

Below are all possibilities to get 72 from product of three different ages:

1 * 1 * 72 = 72

1 * 2 * 36 = 72

1 * 3 * 24 = 72

1 * 4 * 18 = 72

1 * 6 * 12 = 72

1 * 8 * 9 = 72

2 * 2 * 18 = 72

2 * 3 * 12 = 72

2 * 4 * 9 = 72

2 * 6 * 6 = 72

3 * 3 * 8 = 72

3 * 4 * 6 = 72

2) Sum of the ages is given

1 + 1 + 72 = 74

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

All sums are unique except 14. So the age sum must have been 14, otherwise Shyam would have guessed the ages from hint 1 only.

So we have two possible combination to get sum 14

2 + 6 + 6 = 14

3 + 3 + 8 = 14

3) Alok has an oldest girl (not two!!). So the ages must be 3, 3 and 8.

Source: http://www.geeksforgeeks.org/forums/topic/ages-of-daughters/

Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above

GATE CS Corner    Company Wise Coding Practice

Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.

Recommended Posts:



2.8 Average Difficulty : 2.8/5.0
Based on 55 vote(s)










Writing code in comment? Please use ide.geeksforgeeks.org, generate link and share the link here.