Question:
If you were asked to guess a number between 1 and 895?
anonymous
2011-04-11 10:16:31 UTC
If you were asked to guess a number between 1 and 895, and after each guess you were told if your guess was "too high" or "too low". Assuming you are guessing smartly what is the maximum number of guesses you could possibly have before guessing the correct number?
Three answers:
Morningfox
2011-04-11 10:22:46 UTC
Ten guesses is all I would need. Assuming that the number is a whole number (an integer). Also assuming that that I would be told if I guessed the number, so the answer after each guess is "too high", "to low", or "correct".
mtakroosta
2011-04-11 17:29:14 UTC
log2 (895 - 1 + 1) + 1 = log2 (895) + 1 = 9.80 + 1 = 10



You can guess the number with just 10 times!



;-)



You can also ask your Question at Engeeniering >> Computer
lancearmstrong1313
2011-04-11 17:19:33 UTC
895 guesses is the max.



The correct number could be 895 and you could guess 1,2,3....and so on.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...