d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > Fun Interview Question > For A Software Engineer Job
Prev123
Add Reply New Topic New Poll
Member
Posts: 10,812
Joined: Oct 15 2009
Gold: Locked
Warn: 20%
Mar 16 2016 02:11am
Quote (Minkomonster @ Mar 15 2016 11:40pm)
Tom knows the address. Which means the sum of the ages doesn't help him. This means that off all the possible sums of x y z, the answer will be selected from the subset of summations which are not distinct. From these selections, Bob points out that you can tell who the oldest is by her hair color. Meaning the highest number of the set is distinct. The oldest is not a set of twins, because Bob says his oldest singular.
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

And now you have two candidates: 1 6 6 and 2 2 9. But we already know that the oldest is distinct. So the answer is Bob has 2 year old twins and a 9 year old.


Why not say: 1 1 36?
Member
Posts: 14,631
Joined: Sep 14 2006
Gold: 575.56
Mar 16 2016 04:55am
Quote (Azrad @ Mar 16 2016 02:11am)
Why not say: 1 1 36?

because bob says that logically you need more than the sum of the ages
what tom knows and what you logically need to know aren't the same thing
Quote (Minkomonster @ Mar 16 2016 12:40am)
Tom knows the address. Which means the sum of the ages doesn't help him. This means that off all the possible sums of x y z, the answer will be selected from the subset of summations which are not distinct. From these selections, Bob points out that you can tell who the oldest is by her hair color. Meaning the highest number of the set is distinct. The oldest is not a set of twins, because Bob says his oldest singular.
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

And now you have two candidates: 1 6 6 and 2 2 9. But we already know that the oldest is distinct. So the answer is Bob has 2 year old twins and a 9 year old.


ping pong have some fg haha
Member
Posts: 10,812
Joined: Oct 15 2009
Gold: Locked
Warn: 20%
Mar 16 2016 05:09am
Quote (Ideophobe @ Mar 16 2016 03:55am)
because bob says that logically you need more than the sum of the ages
what tom knows and what you logically need to know aren't the same thing
Still don't get it. Can you explain exactly why 2, 2, 9 is a viable solution while 1, 1, 36 is not. If you can explain this in detail, I think I'll understand.

Member
Posts: 10,812
Joined: Oct 15 2009
Gold: Locked
Warn: 20%
Mar 16 2016 05:13am
Quote (Azrad @ Mar 16 2016 04:09am)
Still don't get it. Can you explain exactly why 2, 2, 9 is a viable solution while 1, 1, 36 is not. If you can explain this in detail, I think I'll understand.


OK I get it now. You guys are assuming Tom was correct when he said he said the problem isn't solvable in its initial presentation. You really think that assumption is warranted ? :P
Member
Posts: 14,631
Joined: Sep 14 2006
Gold: 575.56
Mar 16 2016 05:19am
Quote (Azrad @ Mar 16 2016 05:13am)
OK I get it now. You guys are assuming Tom was correct when he said he said the problem isn't solvable in its initial presentation. You really think that assumption is warranted ? :P


bob says it is
Member
Posts: 10,812
Joined: Oct 15 2009
Gold: Locked
Warn: 20%
Mar 16 2016 05:57am
Quote (Ideophobe @ Mar 16 2016 04:19am)
bob says it is


yes i guess so!
Member
Posts: 1,995
Joined: Jun 28 2006
Gold: 7.41
Mar 16 2016 08:04am
Quote (Azrad @ Mar 16 2016 06:13am)
OK I get it now. You guys are assuming Tom was correct when he said he said the problem isn't solvable in its initial presentation. You really think that assumption is warranted ? :P


It's a logic puzzle. These are the premises you are given to solve it. It wouldn't be much of a puzzle if you just said "well what if Tom was an idiot?" or "the answer is Bob lied and actually has no children."
Member
Posts: 10,812
Joined: Oct 15 2009
Gold: Locked
Warn: 20%
Mar 16 2016 09:02am
Quote (Minkomonster @ Mar 16 2016 07:04am)
It's a logic puzzle. These are the premises you are given to solve it. It wouldn't be much of a puzzle if you just said "well what if Tom was an idiot?" or "the answer is Bob lied and actually has no children."


premises should be stated explicitly. Such as address is a natural number, ages are natural numbers, etc, etc. But I know it wouldn't be as fun then.
Go Back To Programming & Development Topic List
Prev123
Add Reply New Topic New Poll