Real World Maths Busters

The Maths Behind Everyday Life

The story, the formula and a worked example — see exactly where this maths shows up in the world around you.

Back to all stories
Games & Chance 4 min read

Guess Who Binary Search

How to win in 5 questions or fewer.

With 24 characters, a perfect halving strategy needs at most ceil(log₂(24)) = 5 questions.

Information theory bound

Each yes/no answer provides 1 bit of information. You need enough bits to distinguish 24 people.

⌈log⁡224⌉=⌈4.585⌉=5\lceil \log_2 24 \rceil = \lceil 4.585 \rceil = 5

Why 5 questions suffice

  1. 1

    Step

    2⁴ = 16 < 24

  2. 2

    Step

    2⁵ = 32 ≥ 24

Answer

5 bits can distinguish up to 32 items

Optimal question strategy

Ask questions that split the remaining pool as close to 50-50 as possible. “Does your person wear glasses?” might eliminate only 5 of 24 — not efficient.

Ideal split=n2\text{Ideal split} = \frac{n}{2}

The formula behind it

Logarithm

log⁡bx=y  ⟺  by=x\log_b x = y \iff b^y = x
See the full formula, variables and more examples

The takeaway

Guess Who is really about information theory — every question should halve the search space.

Back to all stories