Jon Webb's Blog

Wednesday, March 16, 2005

Math puzzle

Here is a puzzle I invented. It is based on a similar puzzle, but mine is more difficult and trickier.
Two smart mathematicians, S and P, are given the sum and product of two numbers between 1 and 1000 (inclusive), respectively. That is, S is told the sum of the two numbers, and P is told their product, and they each know that they have been given the sum (or product) of two numbers between 1 and 1000 inclusive, and they know that the other mathematician has been given the product (or sum) of the two numbers, but neither one is told what the two numbers are.
They then have a conversation like this:
S (or P, if P goes first): I don't know what the two numbers are.
P (or S, if P went first): Neither do I.
S: I still don't know.
P: Neither do I.
...
Eventually, one of the mathematicians says "Now I know what the two numbers are!" and then the other one says "Now I know, too!"
I won't tell you how many times S and P went back and forth saying they didn't know what the numbers were, because if I did tell you that, you'd be able to figure out the two numbers.
What are the two numbers?