I can read your mind
Think of a whole number from 1 to 100. I will find it in seven tries or fewer. Just tell me higher or lower.
My guess
?
Keep it secret. Every answer you give wipes out half of the grid.
Naija
MathGenesis assistant
Hi, I'm Naija, the MathGenesis assistant. I can help you find the right course, explain pricing or get your first session booked. What are you looking for?
Think of a number. Binary search finds it in seven tries or fewer.
Think of a whole number from 1 to 100. I will find it in seven tries or fewer. Just tell me higher or lower.
My guess
?
Keep it secret. Every answer you give wipes out half of the grid.
Each answer cuts the possible numbers in half. After one question, 100 numbers become 50, then 25, then 13, 7, 4, 2 and finally 1. That takes seven questions at most.
This is binary search, and it is closely tied to logarithms: the number of halvings it takes to get from 100 down to 1 is the base two logarithm of 100, a little under 7. With a million numbers you would only need 20 questions.
Computers use binary search to look up words, contacts and records in sorted lists, which is a big part of why search feels instant.
Every one of them runs on the math and physics we teach.
So, impressed?
Imagine what an hour a week with a patient tutor can do.