Anna and Bob play a game with the following rules: they both receive
a positive integer number. They do not know each other’s numbers, but
they do know that their numbers come one after another – they do not
know which one is larger. (If Anna gets \(n\), Bob gets either \(n-1\) or \(n+1\)). Anna then asks Bob – “do you know
what number I have?” If Bob does know, he has to say Anna’s number and
he wins the game. If he does not, he has to say that he does not. Then,
he asks Anna if she knows his number. If Anna does not know, she asks
Bob. This continues until one of them finds out what is the other’s
number. Assuming that both Anna and Bob know mathematics sufficiently
well to be able to solve this problem, find out who wins the game and
how.
For simplicity let’s assume Bob always gets the odd number and Anna
always gets the even number - two consecutive numbers have opposite
parity!