Home
Testing the best method to find a number
- Details
- Written by: Super User
- Category: Random ideas
- Hits: 3459
Younger, i used to play to this game where you have to guess a number between 1 and 1000 by giving a proposal. If you are wrong, you are being told if the number you are looking for is higher or lower.
The usual method to find the answer is usually to divide by 2 to make two collections of the same amount of numbers:
Example: The number you are looking for is 702 and is supposed to be between 1 and 1000.
500: higher (1000+0)/2 = 0
750: below (1000+500)/2= 750
625: higher (500+750)/2= 625
687: higher (625+750)/2= 687.5
718: below (687+750)/2= 718.5
702: right (687+718)/2 = 702.5
Page 7 of 7