Math Fun

Just first shot at it…[tab]nah … screwed up again[/tab]

[tab]I thought I was well on my way to solving it–I had just reasoned out what I considered the final key to the solution–, when I suddenly realised a very basic fact had escaped my attention. The fact that the numbers are between 2 and 99 means their product cannot be a prime number. But then it’s completely superfluous for Peter to say he doesn’t know the numbers (which he could, from the information given him, only know if the product was a prime number). But then it’s just as superfluous for Sarah to say she knew he didn’t know the numbers. For then Peter could have known Sarah could have known he didn’t know the numbers! So their saying those things need not give either of them any new information. So if Peter knows the numbers after those things have been said, he could have known them as soon as he was informed of the product. In fact, he would have known them, considering that he’s great at math. So the problem has now become completely obscure to me, and I suspect that it doesn’t add up.[/tab]

[tab]

Ugh, I now suppose the above just makes solving the problem require one extra step–an even more tedious one than the one I previously considered the last step. The Washington Post says, “This problem took a little more brute force to solve than seems elegant to me[.]” Here’s what I have thus far:

The fact that both numbers are between 2 and 99 means the product cannot be a prime number. The first thing Peter says, then, tells us the product is not a number that can only be divided by one or two other numbers than 1 and itself (for instance, 9 only by 3, and 8 only by 2 and 4).

Drinking some wine with my food also didn’t help.[/tab]

[tab]July 16[/tab]

MOD EDIT: edited to entab the response, so as not to spoil for others - Carleas

Sauwelios:
[tab]It also can’t be any product greater than 198.[/tab]

phoneutria, don’t you mean the sum?

lol I read the problem incorrectly, never mind.

Is scripting allowed? Math majors use scientific calculators, right?

I can see how he knows from what she said. But I’m not seeing how she could know from what he said.

Suspecting a possible wording issue. But gunna have to ponder this one.

I’m using excel.
[tab]The linked post said that some brute force was involved, so I think it’s a question of reasoning about what you’re looking for and then finding the things that match those criteria.[/tab]

I think the wording in the problem is missing the information that the numbers have to be integers.
They have to, right?

I think so.

[tab]Also, that the numbers can be 2 and 99 (“between” in the inclusive sense), and that Peter knows Sarah is given the sum and Sarah that Peter is given the product. It seems problems like this are usually poorly worded.[/tab]

EDIT: Also, [tab]it’s implied that it’s not required to be able to tell which number is a and which is b, for if it were, Peter would know the numbers as soon as he was given the product.[/tab]

That’s where I am, too:

[tab]The fact that both numbers are between 2 and 99 means the product cannot be a prime number. The first thing Peter says, then, tells us the product is not a number that can only be divided by one or two other numbers than 1 and itself (for instance, 9 only by 3 and 8 only by 2 and 4). The second thing Sarah says tells us that she didn’t know the numbers yet when she said the first thing she said. The first thing she said, then, tells us the sum is a number that can be arrived at by multiple sets of two numbers (e.g., 8, by 2 and 6 and by 4 and 4). The second thing Peter says then tells us that the sums of the possible numbers of which he knows the product contain only one number for which that goes (for instance, if the product is 12 the sum can only be 7 or 8, and 8 is the only number of the two for which the aforesaid goes (the product 10 was already precluded by the first thing Peter said)). Now if the numbers are 2 and 6, Peter knows they are as soon as Sarah tells him she knows that he didn’t know the numbers (for then the sum must be 8 and not 7).[/tab]

Not the answer, but might reveal more information that people want to know:
[tab]I got it with heavy reliance upon Excel tables, formulas, and conditional formatting to simplify the brute force parts. The brute force seems to be inescapable, as the problem statement at the Post suggests.[/tab]
The answer and how I got there:
[tab]Peter’s statement that he doesn’t know doesn’t tell us much. There are actually a lot of numbers that are ruled out immediately:


This is a table of all the possible products (zoomed way out, the big picture is what’s important here). Along the top and left are numbers 2-99, and the product of any two numbers is at the intersection of the respective row/column(2x2 is in the upper left, 99x99 is in the lower right). For simplicity, I only filled in the upper half of the table, since the lower half is identical. Cells highlighted in red appear more than once; those in white are unique. From Peter’s statement, we know that it’s none of the unique values (otherwise he would know immediately), but that doesn’t get us very far.

Sarah’s statement, “I knew you didn’t know” tells us that whatever sum she has, every product of every pair of integers that sums to that is non-unique. If there were two numbers that added to the number she knows, and multiplied to a unique product, then she wouldn’t know whether or not Peter knew.


This table shows the number of times each product appears in the entire set. Red cells appear once, white cells twice, and the bluer the more the appear from there. This chart wasn’t necessary, it was the result of what turned out to be a dead end, but it makes it a little easier to see some patterns and it’s just s’damn pretty, I didn’t want it to go to waste.

For any sum, there will be a diagonal line sloping up and right that has the same sum (because, e.g., 6+5 = 7+4 = 8+3 = 9+2 = 11). So in this chart, I was looking for the sloping lines that don’t contain unique values, i.e. that had no reds. This immediately eliminates everthing to the right of the solid red column around the middle of the chart (53xY): every diagonal line that extends beyond that column will have at least 1 unique product, and we need diagonal lines that have no unique products. There are relatively few lines, and we can take the list of sums corresponding to those lines: 11,17,23,27,35,37,41,47,53. We know the sum is one of those numbers.

Peter’s next answer tells us that, among the pairs that sum to 11,17,23,27,35,37,41,47, or 53, his number must be unique: if it appeared in two of the diagonally sloping lines, he wouldn’t know from Sarah’s statement which line it was in, i.e. what the sum of the numbers is. So I made this chart:


This shows only the products that correspond to the available sums, and it’s highlighted to show duplicates (pink if a number appears more than once, white if not). Peter’s number is one of the numbers in white.

Finally, we look at Sarah’s last statement. Peter knows because his product is one of the values in white on the previous chart, that is, there is only one combination of numbers that falls along the diagonally sloping lines that has a product equal to the one he knows. This is enough to tell Sarah what number it is only if it is the only value in white with the sum she knows. And if we look along the diagonal lines, we see that 52, at the intersection of 4 and 13, is the only white number in its line (the line of numbers that sum to 17), and that no other line has such a number.

And so, because Sarah knows the answer, we know the answer. QED[/tab]

Well, okay. I couldn’t see that very last step of yours, Carleas (and still digesting it). Otherwise I had the exact same process (although my colors were better :sunglasses: ).

The very first thing that threw me off was that I was concerned about the order of the numbers proposed, later deciding that they weren’t bothering with which order, but merely which two numbers.

[tab]I had that thought too, and I considered (and fortunately rejected) focusing on the square numbers (since if we actually had to say which number is A and which is B, we could only do that if they were the same number), especially since the problem statement made explicit that they could be the same number.

I haven’t spent too much time on it, but I don’t think the problem is solvable with that assumption.[/tab]

[tab]It just didn’t occur to me that she could choose which number he had chosen simply by the sum that she already had, thus I was checking out every possible combination of potential confusion.

But you got it right. She could chose which that he had chosen because she knew the necessary sum … simple enough.
Congrats.[/tab]

Prime numbers between 3 and 99:

5      7     11     13     17     19     23     29 
 31     37     41     43     47     53     59     61     67     71 
 73     79     83     89     97

Why can’t they be prime?

Eh?

Is that in the problem?

No matter what the solution to this one, the distintion between a and b is mute. Once again - badly worded, as not matter how cleverly you come up with some two numbers that work, without a subtraction in the mix, you can’t determine which of the numbers is a and which is b.