This has since become one of my favorite logic puzzles! I highly recommend that you make an effort to solve this one first. It's a lot of fun.
We know the kids' ages must multiply to 72. Therefore, we need to find all combinations of three numbers that multiply to 72. 72 has the prime factors 2*2*2*3*3. For convenience, I've added a list of their sums for the student's house number.
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
Here we see a list of possible ages and house numbers. Now, of course, we know that the student comes back and tells the teacher "I need more information." If the student didn't need more information, then the student's house number would appear once in this list.
However, because the student needs more information, we know that the student's house number must appear more than once in this list. The only combinations for which this is the case are 2+6+6=14
and 3+3+8=14
.
The teacher tells the student that the oldest plays piano, implying that there must be just one oldest child. Therefore, the answer can't be 2, 6, and 6, because there is no oldest. The answer must, therefore, be 3, 3, and 8.