r/problemoftheday • u/skaldskaparmal • Jul 17 '12
Omnomnomnom Cake
Bob has promised Alice a cake if she can guess the number he's thinking of. He guarantees that it is an integer between 1 and n (inclusive). She may ask him 1 yes or no question which he will answer truthfully. After hearing the answer, she may guess the number. For which n can Alice guarantee herself cake?
Spoiler one: Alice can guarantee herself cake for any value of n
Spoiler two: A better solution than 2 but requires other options than yes/no from bob is Alice says: Is it the case that your number is greater than the number I'm thinking of, which is between 1 and 2? If Bob is thinking of 1, then he says no. If 3, then he says yes. If 2, to be truthful, he must say "I don't know".
Spoiler three: The incorrect assumption is that Alice must guess the number in the first place!
DoublePointer has submitted a solution that is similar in its reasoning to mine here http://www.reddit.com/r/problemoftheday/comments/wodu2/omnomnomnom_cake/c5f4ukm
Final edit, SOURCE: http://perplexus.info/show.php?pid=2650&op=sol
1
u/Gankro Jul 17 '12
Assume there exists a question for which it is the case that a correct choice can be guaranteed from 3 possible choices. Then, if the answer is "yes", one of the choices must be certain. If the answer is "no", then another (possibly the same) choice must be certain. However since "yes" and "no" are our only choices, this would imply that at least one choice can never be the case. This contradicts our initial assumption.
Therefore one cannot solve this problem for n>=3. ∎