WIPIVERSE All articles

Sum and Product Puzzle

The Sum and Product Puzzle, also known as the Impossible Puzzle or Freudenthal's Puzzle, is a logic puzzle first published by Hans Freudenthal in 1969 in the Nieuw Archief voor Wiskunde. It was popularized by Martin Gardner in his "Mathematical Games" column in Scientific American (December 1979).

Puzzle Statement The puzzle is typically stated as follows:

Two integers, x and y, are chosen such that 1 < x < y and x + y ≤ 100. Mr. S is given the sum S = x + y, and Mr. P is given the product P = x × y. The following dialogue takes place:

  1. Mr. P: "I do not know the two numbers."
  2. Mr. S: "I knew that you did not know the two numbers."
  3. Mr. P: "Now I know the two numbers."
  4. Mr. S: "Now I know the two numbers."

What are the two numbers?

Solution The unique solution to the puzzle, given the constraint x + y ≤ 100, is 4 and 13.

  • Sum (S) = 17
  • Product (P) = 52

Logical Derivation

  1. Statement 1 (P doesn't know): The product P cannot be the product of two primes (which would factor uniquely) nor the cube of a prime. P must have at least two valid factor pairs (x, y) satisfying the constraints.
  2. Statement 2 (S knew P didn't know): The sum S must be such that every possible pair (x, y) summing to S produces a product that satisfies Statement 1. This eliminates sums that can be written as the sum of two primes (Goldbach partitions), because if S = p1 + p2, P might have received p1p2 and known the numbers immediately. The possible sums (often called "S-allowed" sums) under 100 are: 11, 17, 23, 27, 29, 35, 37, 41, 47, 53.
  3. Statement 3 (P now knows): Mr. P looks at his product P and finds that among all its valid factor pairs, exactly one pair sums to an "S-allowed" sum. This allows him to deduce the pair.
  4. Statement 4 (S now knows): Mr. S looks at his sum S and finds that among all pairs summing to S, exactly one pair has a product that would have allowed P to deduce the numbers in Statement 3.

Only the pair (4, 13) satisfies all four conditions simultaneously under the x + y ≤ 100 constraint.

Variations and Generalizations

  • Upper Bound Changes: If the upper bound x + y ≤ N is increased, the solution (4, 13) remains valid for a significant range. However, for sufficiently large N (specifically N ≥ 1685), additional solutions appear, and the puzzle loses its uniqueness unless the bound is specified as part of the common knowledge.
  • Different Domains: Variants exist where x and y are chosen from different sets (e.g., primes only, or a specific range like 2–99).
  • Cheryl's Birthday: A widely circulated 2015 logic puzzle ("Cheryl's Birthday") shares a similar epistemic structure involving public announcements of knowledge states, though the mathematical mechanics differ.
Browse

More topics to explore

    Browse all articles