Two old friends, Ernie and Bernie, bump into each other in the street. It was more than twenty years since they last saw each other, so they decide to spend some time together in a nearby coffee shop, catching up. At some point, Bernie asks the inevitable: "So, you got married?"
"Well, yes!"—claims enthusiastically Ernie. "And I have three beautiful children!"
"That's great, Ernie! And how old are your kids?"—enquired Bernie.
"I know you are a sucker for puzzles, Bernie, so I will let you figure it out through a few clues. You should not have any trouble getting it. First clue: If you add the ages of my kids, the result is thirteen"
"Whoa! That doesn't help me much, does it?"—complains Bernie. "Couldn't you give me another clue?"
"Sure, a second clue: If you multiply their ages together, the result is the same as how much we payed for coffee."
Bernie scratches his head for a minute, and cannot figure it out yet… Before he complains again, Ernie realizes the mistake, apologizes, and offers Bernie the last clue: "My oldest plays the piano!"
Bernie had no trouble finding the ages of the children this time.
These are all the possible combinations of positive integers \( x \), \( y \), \( z \) that add up to thirteen, together with their product:
Notice that there are only two combinations that offer the same product: \( (x,y,z) = (1,6,6) \) and \( (x,y,z) = (2,2,9) \). The fact that Bernie did not know the answer to the riddle after the second clue, indicates that none of the other possibilities is right. He thus needs a third clue to decide between the two choices above.
I would not think of stealing the pleasure to solve the puzzle to my reader. What are the ages of Ernie’s children?