Quant Memo
Core

The Sum-and-Product Puzzle

A classic logic puzzle where two people are told only a sum and only a product of two unknown numbers, and — through statements about what they do and don't know — a room full of listeners can pin the numbers down exactly.

Prerequisites: How to Attack a Brainteaser

Two numbers xx and yy are chosen with 2xy2 \le x \le y and x+y100x + y \le 100. Mr Sum is told only x+yx+y; Mr Product is told only x×yx \times y. Neither can see the other's clue. In front of a room, this exchange happens:

  • Mr Product says: "I don't know the numbers."
  • Mr Sum says: "I knew you didn't know. I don't know them either."
  • Mr Product says: "Now I know the numbers."
  • Mr Sum says: "Now I know them too."

What are xx and yy? The puzzle looks like it needs more information than it's given — the trick is realizing that each statement is itself a piece of information, and everyone in the room, including you, can use it.

The core idea: statements are data

Every sentence spoken rules out possibilities, and — crucially — everyone hears every statement, so each person can re-run the other's reasoning. "I don't know" isn't a shrug, it's a precise claim: "my clue is consistent with more than one pair." "I knew you didn't know" is an even stronger claim: "every possible pair matching my clue would have made your clue ambiguous too." Solving the puzzle means translating each sentence into a filter on the set of candidate pairs, applying the filters one at a time, and watching the candidate set shrink.

Working the logic step by step

Statement 1 — Product doesn't know. This means x×yx \times y factors into at least two valid pairs (x,y)(x,y) with 2xy2 \le x \le y, x+y100x+y \le 100. This immediately rules out any product with a unique factorization into such a pair — for example if the product were 2×3=62 \times 3 = 6, no other valid pair gives 6, so Product would've known instantly. So the true pair's product must be "ambiguous."

Statement 2 — Sum knew Product didn't know, and doesn't know either. "Sum knew Product didn't know" means: for every way to split Sum's total x+yx+y into a valid pair, the resulting product is one of the ambiguous ones from Statement 1. This is a strong constraint on the sum — it rules out sums that have even one "clean" (uniquely-factoring) split. Then "Sum still doesn't know" removes sums that, after this filtering, are left with only one candidate pair (those would have been solved already).

Statement 3 — Product now knows. After Statement 2 has trimmed the surviving pairs, Product's number now matches only one of them.

Statement 4 — Sum now knows. After Statement 3's trimming, Sum's number also matches only one survivor.

Carried through by hand (or by a short program that just filters a table of all (x,y)(x,y) pairs against each statement in turn), this converges on the unique answer x=4x=4, y=13y=13. The exact numbers matter less than the method: a table of candidates, filtered four times, each filter derived from what a statement logically implies rather than what it literally states.

all valid pairs ~800+ after stmt 1 fewer after stmt 2 fewer still after statements 3 and 4, exactly one pair survives: (4, 13)
Each spoken statement filters the candidate table of (sum, product) pairs; four filters applied in sequence collapse hundreds of candidates down to one.

Each "I don't know" or "now I know" in a logic puzzle is a testable claim about the entire space of possibilities, not just a mood. Solve these puzzles by writing down every candidate pair and mechanically eliminating those inconsistent with each statement in sequence.

What this means in practice

Interviewers use this family of puzzle to see whether a candidate can hold a set of possibilities in mind and update it correctly on each new piece of information — precisely the skill needed to interpret a counterparty's quote, a trade's fill pattern, or a market's reaction as evidence rather than noise. The habit of writing out the candidate set explicitly, rather than trying to reason about it purely in your head, is the transferable skill: it's the same discipline as building a small table of scenarios in a probability question and crossing off the ones each new fact rules out.

If a sum-and-product-style puzzle stalls, build a literal table: list every valid (x,y)(x,y) pair, its sum, and its product. Apply one statement at a time as a filter on the rows. The answer falls out mechanically once you stop trying to do it purely in your head.

Related concepts

Practice in interviews

Further reading

  • Freudenthal, Formulating a Problem (1969) — the original puzzle statement
ShareTwitterLinkedIn