Home > Riddles > Sum and product (two mathematicians)

Sum and product (two mathematicians)

Numerical territoryLevel 5 · Expert · ●●●●●

Two different integers $x,y$ satisfy $2 \le x < y \le 99$. You say to one person $S=x+y$ (they only know the sum) and to another $P=xy$ (they only know the product).

Conversation:

  1. Product: "I don't know what $x,y$ are."

2.

Suma: "I already knew you couldn't know."

  1. Product: "Now I know."

4.

Suma: "So now I know them too."
What are $x,y$?

Hints

Show hints
  1. By F1, $P$ was not unique at first. For F3, after knowing F2, among its factorizations there must be only one whose sum is in $\mathcal{S}_2$.
  2. From sum 17, review each pair and ask: for which products, after filtering by $\mathcal{S}_2$, is there a single factorization left?
  3. In the domain $2\le x<y\le99$, the sums supported by F2 are $\mathcal{S}_2=\{11,17,23,27,29,35,37,41,47,53\}$.

Solution

Show full solution

Final answer:

$$ (x,y)=(4,13). $$

1) Formalization
Domain:

$$ 2\le x

with

$$ S=x+y,\qquad P=xy. $$

Each sentence eliminates candidates.

  • F1 (Product): "I don't know."
  • F2 (Sum): "I already knew that you couldn't know."
  • F3 (Product): "Now I know."
  • F4 (Suma): "So now I know them too."

2) Accurate interpretation of F2 (role of primes)
The person who knows $S$ states that, for all decomposition

$$ S=a+b,\quad 2\le a

product $ab$ could not be uniquely identified in phrase F1.
When could you immediately identify the person of the product? When your product has only one valid factorization in the domain.
Classic example: $2\cdot p$ with $p$ prime (only pair $(2,p)$).
Therefore, if a sum $S$ could be written as:

$$ S=2+p\quad (p\ \text{primo}), $$

the sum person would not be able to assert F2 (because in the case $(2,p)$, Product would know immediately).
Doing the full finite check in the domain $[2,99]$, the sums compatible with F2 are exactly:

$$ \mathcal S_2=\{11,17,23,27,29,35,37,41,47,53\}. $$

3) Apply F3 (what the person sees of the product)
By F1, $P$ was not unique at first.For F3, after knowing F2, among its factorizations there must be only one whose sum value is in $\mathcal S_2$.
Let's take:

$$ P=52. $$

Its valid factorizations are:

  • $(2,26)$ with sum $28$,
  • $(4,13)$ with sum $17$.

Now we filter by F2:

  • $28\notin\mathcal S_2$,
  • $17\in\mathcal S_2$.

Thus, for those who know $P=52$, after F2 there is only one possible pair:

$$ (4,13). $$

That explains F3: "Now I know."
4) Check F4 from the sum $S=17$ (without jumps)
With $S=17$, the possible pairs are:

$$ (2,15),(3,14),(4,13),(5,12),(6,11),(7,10),(8,9). $$

The addition person, after hearing F3, calculates for each addition pair 17 how many options would be left for Product after applying the $\mathcal S_2$ filter:

Couple Product F2 compatible pairs for that product
$(2,15)$ 30 $(2,15),(5,6)$
$(3,14)$ 42 $(2,21),(3,14)$
$(4,13)$ 52 only $(4,13)$
$(5,12)$ 60 $(3,20),(5,12)$
$(6,11)$ 66 $(2,33),(6,11)$
$(7,10)$ 70 $(2,35),(7,10)$
$(8,9)$ 72 $(3,24),(8,9)$

Only $P=52$ leaves uniqueness for Product.
Therefore the addition person can also conclude the exact pair, as stated by F4.5) Didactic conclusion
It does not appear "out of the hat": it comes from a double logical pruning.

  1. F2 imposes arithmetic restrictions on sums (with prime importance).
  2. F3 selects products whose factorizations collapse to a single option after that pruning.
  3. F4 confirms that the corresponding sum also collapses to a single pair.

Unique result:

$$ \boxed{(4,13)}. $$


Related riddles

Keep practicing

If you enjoyed this one, try more pure-logic riddles, explore this theme, browse the full archive, or read the riddle-solving guide.

← Previous: The Bus Wizard (Conway) · Next: The switches and the million light bulbs →