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 and are chosen with and . Mr Sum is told only ; Mr Product is told only . 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 and ? 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 factors into at least two valid pairs with , . This immediately rules out any product with a unique factorization into such a pair — for example if the product were , 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 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 pairs against each statement in turn), this converges on the unique answer , . 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.
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 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