Quant Memo
Core

Deducing From What Other People Do Not Know

Sometimes the most useful sentence in a puzzle isn't a stated fact — it's someone announcing they *can't* figure something out. That single admission of ignorance rules out entire branches of possibility for everyone listening.

Two numbers xx and yy, both integers between 2 and 20 inclusive, are chosen. Sam is told their sum x+yx+y; Peter is told their product xyxy. Neither is told the other's number. The following conversation happens: Peter says, "I don't know the numbers." Sam says, "I knew you didn't know." Peter says, "Now I know the numbers." Sam says, "Now I know them too." What are xx and yy?

This looks unsolvable at first — nobody states a single fact about the numbers, only facts about their own state of knowledge. Try to see why Peter's very first sentence already eliminates a large set of possibilities before reading on.

The trap: assuming "I don't know" carries no information

It's tempting to think a statement like "I don't know the answer" is a null statement — pure absence of content. It isn't. Peter knows the product xyxy; the only way he could fail to know xx and yy is if that product factors into more than one valid pair within the allowed range. So "Peter doesn't know" secretly reveals: the product is one that factors ambiguously. Everyone listening — Sam included — can now cross off every sum whose every possible pair has an unambiguous product.

A statement of ignorance ("I don't know X") is exactly as informative as its logical negation would be — it eliminates every world in which the speaker would have known X. Working through a sequence of such statements means repeatedly shrinking the set of possible worlds, one admission at a time, until only one world survives.

Working the puzzle step by step

Step 1 — Peter doesn't know. This tells everyone the product xyxy has more than one factorisation into two integers from 2–20. So Sam, who knows the sum x+yx+y, can now ask: for every pair (x,y)(x,y) that gives my sum, does the product always factor ambiguously? If some pair with my sum has a product that factors only one way, Peter would already have known — and Sam's next statement says he was certain Peter didn't know, so every possible pair matching Sam's sum must have an ambiguous product.

Step 2 — Sam knew Peter didn't know. This is a strong claim: not just "Peter happens not to know," but "I (Sam) could already predict that." That's only possible if every pair of numbers 2–20 that adds up to Sam's sum has a product with multiple factorisations — in particular, Sam's sum cannot be expressible as (prime) + 2, since a prime times 2 sometimes factors uniquely enough to tip Peter off. Careful case-checking (the actual textbook version of this puzzle) narrows Sam's sum to a short list — famously, in the standard version with range 2–100, this narrows the sum down enormously; in smaller ranges it can pin down just one or two candidate sums.

Step 3 — Now Peter knows. Given that the sum is restricted to Sam's now-narrower candidate list, Peter reconsiders his product. If his product factors into two pairs, but only one of those pairs has a sum on Sam's restricted list, Peter can now deduce the numbers.

Step 4 — Now Sam knows too. Given that Peter's statement in step 3 pins down the numbers, Sam checks: among the pairs with my sum, is there only one pair whose product would let Peter succeed at exactly this stage? If so, Sam now knows the answer as well.

Each step is the same operation repeated: take the current set of possible worlds, intersect it with "everyone's public statement must be consistent with this world," and see how much the set shrinks. After four rounds of shrinking, a well-posed version of this puzzle converges to a single surviving pair.

start: all pairs

after "Peter doesn't know"

after "Sam knew that"

after both "now know" unique pair

Each statement — even a negative one — removes an entire subset of remaining possible worlds; four rounds of shrinking is enough to isolate a single answer.

The classic error is processing only the content of each statement and ignoring the order. "Sam knew Peter didn't know" is not the same fact as "Peter didn't know" — it's a claim about Sam's prior certainty, which constrains Sam's sum far more tightly than the bare fact of Peter's ignorance constrains it. Always ask precisely which agent is speaking, what they privately know, and what the statement implies was already true before they spoke, not just at the moment they spoke.

The transferable technique

Puzzles built from a dialogue of "I know" / "I don't know" statements are all instances of the same procedure: model the full set of possible worlds consistent with the puzzle's setup, and treat every spoken statement — including a flat admission of ignorance — as a filter that removes every world where that statement would have been false. Iterate the filter once per statement, in order, and the surviving set usually collapses to a single answer. This is the identical machinery behind Cheryl's birthday, the muddy children puzzle, and the blue-eyed islanders — recognise "public statement narrows the set of possible worlds" and the rest is bookkeeping.

Related concepts

Practice in interviews

Further reading

  • Fagin et al., Reasoning About Knowledge, ch. 1
ShareTwitterLinkedIn