![1 2 3 4 5 to 100 1 2 3 4 5 to 100](https://cdn.acidcow.com/pics/20190412/design_fails_18.jpg)
"Is the number between 34 and 66 inclusive?" So your ranges go from size 100 to 34 (in the worst case) to 12 to 4 to 2 to 1. Basically, I just split the 1-100 range into ranges of 33, 33, and 34 numbers and ask about the middle one. If I get to ask about ranges in general, I push the number of questions down to five. But of course that's 6 questions, not 6 guesses as to the actual number.Įdit: Taking it a step further, asking about the left digit means asking about a 10 number range. I repeat the process to get the second digit in 3 guesses, for 6 total, max.
![1 2 3 4 5 to 100 1 2 3 4 5 to 100](https://cdn.rios.hu/dl/uad/2022-08/5671605/img_0511_1.jpeg)
I've found the first digit to be 1 in three guesses. Then I ask about zero and the answer comes back "higher". Say I asked about 2, and the answer again comes back "lower". If I am allowed to ask about individual digits, I can do it in 6.įirst question: Where X is the number from 1 to 100 inclusive, if X - 1 is left padded with zeros (00-99), is the left digit 5? (Sorry I wanted to comment on skywalker's answer but I don't have enough points for that) I think this single step ahead is the reason why this answer is the one the riddler is looking for.ĮDIT: It is true that you can "only" be certain of the number to be guessed after 6 question instead of giving the right solution on the 6th guess.īut the more naive approach actually leads to the conclusion hat you should be allowed to speak an 8th time to say the number you were certain of after the 7th guess. V(n+1) = 2*V(n) + 1 (with regard to the additionnal information)Īs you can see the (Vn) suite is one step ahead of (Un) thanks to the additionnal info. U(n+1) = 2*U(n) ("naive" answer without regard to the additionnal information) In his answer the notion of a 3rd outcome for a guess "that's the number" is being considered.Ĭonsider the following sequences (Un) and (Vn) I think skywalker's answer is the one that the riddler seeks.