Originally posted by BigDoggProblem
Now I think I see your error. 29*36 also equals 9*116, which you did not list. 9+116=125, which is an acceptable sum, thus giving [b]two acceptable sums (65 and 125)--thus Mr. SUM knows (29, 36) cannot be a solution.
To everyo ...[text shortened]... oblem. I hope there is a more elegant method than using a program.[/b]
Yes, There indeed is an elegant way of solving this puzzle. This puzzle was posed by our mathematics professor in our class, in Bombay University, way back in the late eighties when i was astudent. It has a unique solution (4,13)
The way to solve it involves guided application of logic as well as number theory, and thereby narrowing down the possible candidates for solution. By applying the properties of prime numbers and combining them with the conditions at step no. 1, 2,3, and step 4. you arrive at the unique solution.
Step 1( First statement of PRODUCT) implies that the product P (P=n1*n2) is factorisable in at least two ways.That is P is not a simple product of 2 primes. Step 2( First statement of SUM) implies that the sum S(S=n1+n2) cannot be expressed as a sum of 2 primes. This in turn implies that S will be odd and S-2 must be composite number.(Let us call these twin conditions, the acceptability criterion of the sum.).
Thus one of the two factors is even & the other is odd. Without loss of generality let us take n1 as the even factor and n2, the odd factor.
Step 3(second statement of PRODUCT) implies that of all the different ways of factorisations of P, in only one case the sum of factors satisfies the acceptibility criterion above.
It further implies that n1 is not just even, it will have to be evenly even, that is n1 cannot be oddly even. Thus n1 must be a multiple of 4 i.e.of the type 4k where k is some natural number.
While examining the possible factorisations of the product ( known to PRODUCT), he considers only such factorisations where both factors are below hundred and from among such possible factors, if in only one factorisation, the sum of factors satisfies the accebility criterion of the sum , he knows this is it.
Step 4(second statement of SUM) he examines all products
P1,P2,P3,.... of the type 4*(S-4), 8*(S-8), 12(S-12)....
where Pi = 4i*(S-4i); i = 1,2,3,........
For each such products Pi, he considers all possible factorisations.(Pi is not P*i, it is just sub-cased i th product under examination).
Pi = 4k*(Pi/4k); k= 1,2,3....taking only the possible values of k and also taking care that both factors are <100.
If in only one Pi , only one sum satisfies acceptability criterion and for all other Pi's more than one sum satisfies such acceptibility criterion, then only SUM could have validly made his second statement.
Appying the above , considerably reduces the possible domain of search and it can be done on a spreadsheet.
I didn't give the solution ,earlier, on the thread , hoping that other smart guys might try and come up with some smarter solution. I too hope that some still better and smarter way to solve it can definitely be found.
By the way the logic applied by Plumber is not accurate.