We are going to play a regular “find my number” game, i.e. you announce your initial guess and following my answer ( limited to: “more “, “less” or “right!”) go on to your next guess.
Usually to reveal a number from 1 to N you need no more than log
2N guesses
in the worst case.
How many guesses are needed if I told you that my number
is a 4-digit palindrome divisible by 7 ?
Assume the worst case, of course.
(In reply to
Solution (Spoiler) by Steve Herman)
You err twice:
i. b could be either 0 or 7' so the list of candidates is 18 names long.
<br>ii. Now for 9 choices you resolve the problem in 3 guesses or less
1 st guess is 5 , might be answered by RIGHT, ending the process , you revealed the number on your first trial, If the response was other than RIGHT you go on with either 3 or 7 etc
Those choices enable you to reveal the hidden number after the 3rd trial in the worst case I.e one or nine.
There is no specific need to get RIGHT as a formal acknowledgemen
Other solvers mentioned it as a possible option.
Considering my text 31 potential answers are reduced to one correct choice in 4 steps or less: like 15, 7, 3, 1 or similar.
Edited on May 16, 2023, 3:17 am