# Thread: Guess a random number from 1-100 in 5 tries

1. ## Guess a random number from 1-100 in 5 tries

Hi! I am reading a book on game theory and am wondering about one specific minute detail to a game they demonstrate in it.

The game is as follows; You have to try and guess a number from 1-100 in 5 guesses, and after each guess you are told whether the number is higher or lower than your guess.

The optimal way to guess, according to Steven Ballmer is to guess 50, 25, 37, 42... Assuming the number we are looking for is 48.

My question about this is why is the number 42 not 43 here?

Starting from the top we guess 50, then we go lower. So now we know the number is 1-49.
We guess 25, and we are told the number is higher, so we know that the number is 26-49.
Then after that the middle value between these numbers could be 43 or 44, not 42.

So why does it say in the book that it is 42?

2. ## Re: Guess a random number from 1-100 in 5 tries

Mr. Ballmer is wrong; you are right; go to work for Apple.

3. ## Re: Guess a random number from 1-100 in 5 tries

I meant to say the numbers 38-49* there. A little hiccup. The middle number there would be 43,44, not 42. Still correct?

4. ## Re: Guess a random number from 1-100 in 5 tries

Originally Posted by magiclink93
I meant to say the numbers 38-49* there. A little hiccup. The middle number there would be 43,44, not 42. Still correct?
Correct as correct can be.

38, 39, 40, 41, 42, 43,

44, 45, 46, 47, 48, 49

43 and 44 are the middle pair.

With an even number of distinct integers, you cannot identify a single integer as the middle such that there are the same number of integers greater than the middle as the number less than the middle. The reason is that once a middle integer is proposed the number of integers remaining are odd and so cannot be divided evenly. But you can identify a middle pair of integers.