Algorithms & EmergenceAlgorithms

Guess My Number in 7 Tries

Binary search halves the possibilities to find your number fast

Think of a number from 1 to 100. Your phone will find it in 7 guesses or fewer. How, without reading your mind?

You'll find out

  • Why 7 guesses always do the trick
  • How many guesses a billion takes
  • How a search misses what's right there

Why it matters

Computers use the same trick to find one name among millions in a blink, as long as the list is sorted.

About 3 min6 interactive slides · 5 questionsLesson 39 · Zone 5

Play this lesson

Free to play in your browser or on iPhone

More in this zone

  1. 37Data CommunicationThe Packet PuzzleYour message is chopped up and rebuilt at the other end
  2. 38Digital ImagingRolling ShutterWhy your phone bends propellers into banana shapes
  3. 40Civil EngineeringWhy Concrete Needs SteelConcrete is strong under squeezing and weak under stretching
  4. 41ProbabilitySpot the Fake Coin FlipsPeople faking random flips almost never write long streaks
  5. 42Error DetectionYour Card's Last Digit Is a Lie DetectorThe final digit of a card number checks all the others
  6. 43Computing HistoryThe 1890 Census Ran on Punch CardsHoles in cardboard counted a nation, and IBM grew from it
  7. 44Quantum MechanicsThe Double-Slit SurpriseSingle particles build a pattern only waves should make
  8. 45Machine LearningNearest NeighborA new item can be classified by the examples most like it