Bob: I'm thinking of a whole number between 10 and 1300.
Alice: Is it less than 500?
Bob answers her, but he lies.
Alice: Is it a perfect square?
Bob answers her, but he lies.
Alice: Is it a perfect cube?
Bob answers truthfully.
Alice: If I knew whether the second digit from the left was a 1, I would know your number. Is it?
Bob answers her truthfully and Alice announces what she thinks is the number. But she is wrong.
What is Bob's number?
based on her last question/statement, at that point she has narrowed it down to exactly two numbers based on the first 3 questions. This can be seen from the fact that if she had narrowed it down to 1 number then she wouldn't need to ask anymore questions and if there were more than 2 possible numbers then the question would not be sufficient to determine the number.
Now there are 8 different ways Bob could answer the first 3 questions, going through each one and assuming he told the truth, the only combination that results in 2 numbers left is no,no,yes. Thus before her final question she thought the number was greater than or equal to 500, not a perfect square, but a perfect cube. This only leaves 512 and 1000.
Since Bob lied in the first two and told the truth for the third, we know the real answers are yes, yes, and yes. Thus we need a perfect square and cube which is less than 500. This only leaves 64 as a possibility.
Thus his answer to the last question was no and the number sought is 64.

Posted by Daniel
on 20130727 14:43:40 