Monday, July 03, 2006

Stumped

My apologies for the lack of recent updates; I've been somewhat busy with some overdue schoolwork and a stack of mind-numbing day-to-day chores. I'd meant to go to a mini-conference on quantum vacuums at my local university and report on it here, but apparently the lecture I'd planned to attend was moved due to the World Cup. If you're particularly interested in solution methods for the Shroedinger wave equation, you can check out this paper.

I've been brushing up some number theory recently, and ran across a problem which I'm pretty sure I've seen before. It goes something like this:
Two distinct numbers between 2 and 99 are chosen. Paul is given the product of these two numbers, and Steve is given the sum. At this point, the following conversation ensues:

Steve: "You don't know what the two numbers are."
Paul: "I do now."
Steve: "Now that you say that, so do I."
It's presented as the sort of question that one can solve with a pencil and paper and a bit of ingenuity, but I've got to admit that if there's a clever way of attacking this, I'm stumped. I solved it earlier today by iterating through all the possible sums from 5 on until I found the correct answer, but surely there must be a more clever way to solve it; has anyone got any ideas?

If you're having a little trouble understanding the question, or if you're just too lazy to work out the answer for yourself, I'll walk through the situation. As it turns out, the two numbers are 4 and 13, so that Steve is given the sum 17 and Paul sees the product 52. Steve considers the pairs of numbers which could add up to 17:
2 and 15, giving a product of 30;
3 and 14, giving a product of 42;
4 and 13, giving a product of 52;
5 and 12, giving a product of 60;
6 and 11, giving a product of 66;
7 and 10, giving a product of 70, and
8 and 9, giving a product of 72.
Steve sees that, regardless of which of these seven products Paul is seeing, there is at least one other way to form the product; in other words, none of these pairs consist of two prime numbers. Thus he says to Paul, "You don't know what the numbers are."

Paul, upon being told this, now knows that the two numbers must sum to a number such as 17, a number which is not the sum of two primes. He had already known from the product that the numbers must either be 2 and 26 or 4 and 13 -- there are no other ways to write the product. Now 2 + 26 = 28 = 5 + 23; if the numbers were 2 and 26, Paul reasons, then Steve would have seen the number 28. This would have left open the possibility that Paul was looking at the number 115, in which case he would have known the answer right off the bat. But Steve was absolutely certain that this was not the case, so Paul now knows that the numbers must be 4 and 13, and says so.

At this point Steve knows that the product must have been a number like 52: a product for which such information was sufficient. In other words, there must be only one way to break the number down into two factors so that the sum is a number like 17 (i.e. not the sum of two primes). The first few numbers which are not the sum of two primes are 11, 17, 23, 27, and 35. (Quick, can you name five or six more number which can't be expressed as the sum of distinct primes? It shouldn't take any testing on your part. See solution below.) Now, from above, Steve knows that the product is either 30, 42, 52, 60, 66, 70, or 72. We know that each of these can be factored into two numbers that sum to 17; therefore, if there's any way to break one of these into factors that sum to, say, 11 or 27, then it can't be that number. And as it turns out:
30 is 5 times 6, which sum to 11;
42 is 2 times 21, which sum to 23;
60 is 3 times 20, which sum to 23;
66 is 2 times 33, which sum to 35;
70 is 2 times 35, which sum to 37;
72 is 3 times 24, which sum to 27.
These being eliminated, the only remaining possibility is that the product is 52, which tells Steve that the numbers are 4 and 13. Oh, and mini-puzzle above? Well, if a given odd number is the sum of two primes, then one of those primes must be 2; if both primes were odd, their sum would be even. Therefore, if n is an odd number and n - 2 is composite, then n cannot be written as the sum of two primes. Now if n is any two-digit number ending in 7, then n - 2 is a two-digit number ending in 5, and therefore a composite number (since such numbers are divisible by 5). So none of 37, 47, 57, 67, 77, 87, and 97 can be written as the sum of two primes.

Anyway, if someone has an analytic solution, or even just some observations that would cut down on some of the testing, I'd be glad to hear it.

2 comments:

Tanya said...

Heres the solution
http://www.qbyte.org/puzzles/p003s.html

Jonathan said...

I tried to work it out myself for fun before peeking at tanya's solution, all I got was:

Goldbach's Conjecture has been tested for all relevant numbers, so Steve is given an odd number as the sum (otherwise it is possible - given Steve's information - that Paul has received a number which is the product of two primes). Moreover, the sum given to Steve cannot be two larger than a prime number. Only 55 possible sums remaining.

This is as far as I get analytically.

I also could have eliminated many possible products in a similar manner to things mentioned in the solution in the link but not in a wholly organized fashion.