A professor thinks of two consecutive numbers between 1 and 10.
‘A’ knows the 1st number and ‘B’ knows the second number.
They both have a conversation:
A: I do not know your number.
B: Neither do I know your number.
A: Now I know.
There are four possible solutions to this. What are the numbers?
The four solutions are 2-3, 3-4, 9-8 and 8-7.
The trick is to understand that a person is able to determine the unknown consecutive number correctly only when there is only 1 possible choice.
After the 1st statement, when A says “I do not know your number”, it is clear that the number known to him is neither 1 nor 10, otherwise he would have known B’s number. So, now, B knows that A knows some number other than 1 or 10.
If the numbers known to B were 2 or 9, he could have immediately deduced the fact that the number known to A is 3 or 8. But since, he says “Neither do I know your number”, it means that B’s number is not 1, 2, 9, or 10. However, this does not mean that the numbers known to A can’t be 2 or 3.
From the 3rd statement, A now knows the number, therefore A’s number must be 2, 3, 8 or 9.
So, if A’s number is 2, then he can be sure that B’s number is 3,
if A’s number is 3, then he can be sure that B’s number is 4,
if A’s number is 9, then he can be sure that B’s number is 8,
if A’s number is 8, then he can be sure that B’s number is 7.