Enter your email address:


April 24, 2015

Sum and Product Puzzle

X and Y are two different integers, greater than 1, with sum less than or equal to 100. S and P are two mathematicians; S knows the sum X+Y, P knows the product X*Y, and both are perfect logicians. Both S and P know the information in these two sentences. The following conversation occurs:

S says "P does not know X and Y."
P says "Now I know X and Y."
S says "Now I also know X and Y!"

What are X and Y?

3 comments:

Josh D. said...

The integers are 4 and 13.
The Sum is 17, The Product is 52.

I created a full list of all possible combinations of numbers and eliminated ones based on the various criteria.

S's first statement means that for the sum he knows, there are no sets of integers that both sum to that known number and create a unique product. This means that the sum has to be one of these:
11,17,23,27,29,35,37,41,47,53

The next two statements go together. P claims he knows, and then S claims he also knows!

Based on the list of numbers above, I looked at all the cases where P would then know the integers -- there were quite a few. But there was only one of the original sums that only had one case where P knows it, and that was for a sum of 17. If the sum is 17 and P knows it, then the numbers are 4 and 13.

Checking the answer...

Statement 1: S says that P does not know the integers.
This is correct. A sum of 17 yields products of 30, 42, 52, 60, 66, 70, and 72. Each one of those products can be generated by more than one set of valid integers.

Statement 2: P knows the product is 52. This can be be generated by 2*26, 4*13 only. These sum to 28 and 17 respectively. 28 is not a valid sum based on the first statement, so they must sum to 17. P knows that it must be 4 and 13.

Statement 3: S knows his sum is 17, and his product is one of those (30, 42, 52, 60, 66, 70, 72). He looks at the factorization for each of those. Each of those have at least two valid factorizations except for 52.
30 = 5*6, 2*15 -- sums of 11 and 17
42 = 3*14, 2*21 -- sums of 17 and 23
52 = Just one factorization - 4*13 -- sum of 17
60 = 5*12, 3*20 -- sums of 17 and 23
66 = 6*11, 2*33 -- sums of 17 and 35
70 = 7*10, 2*35 -- sums of 17 and 37
72 = 8*9, 3*24 -- sums of 17 and 27

Since P has already declared he knows it, then S knows it is the product with only one valid factorization...52. Thus, the integers are 4 and 13.

Jerry Critter said...

Nice solution, Josh.

Josh D. said...

Thank you, Jerry.

This one took me awhile (and I messed it up on my first attempt), so it was gratifying to finally get the answer.