Wednesday, March 14, 2007

solution to the puzzle

Solution to puzzle: Two logicians
Two perfect logicians, S and P, are told that integers x and y have been chosen such that 1 < x < y and x+y < 100. S is given the value x+y and P is given the value xy. They then have the following conversation.
P: I cannot determine the two numbers.S: I knew that.P: Now I can determine them.S: So can I.


Given that the above statements are true, what are the two numbers?
First of all, trivially, xy cannot be prime. It also cannot be the square of a prime, for that would imply x = y.
We now deduce as much as possible from each of the logicians' statements. We have only public information: the problem statement, the logicians' statements, and the knowledge that the logicians, being perfect, will always make correct and complete deductions. Each logician has, in addition, one piece of private information: sum or product.
P: I cannot determine the two numbers.
P's statement implies that xy cannot have exactly two distinct proper factors less than 100.Call such a pair of factors eligible.
For example, xy cannot be the product of two distinct primes, for then P could deduce the numbers. Likewise, xy cannot be the cube of a prime, such as 33 = 27, for then 3×9 would be a unique factorization; or the fourth power of a prime.
Other combinations are ruled out by the fact that the sum of the two factors must be less than 100. For example, xy cannot be 242 = 2×112, since 11×22 is the unique eligible factorization; 2×121 being ineligible. Similarly for xy = 318 = 2×3×53.
S: I knew that.
If S was sure that P could not deduce the numbers, then none of the possible summands of x+y can be such that their product has exactly one pair of eligible factors. For example, x+y could not be 51, since summands 17 and 34 produce xy = 578, which would permit P to deduce the numbers.
We can generate a list of values of x+y that are never the sum of precisely two eligible factors.
genSum(100);
eligiblesums: 11, 17, 23, 27, 29, 35, 37, 41, 47, 53.
(We can usegold bach conjecture ie. even integer greater than 2 can be expressed as the sum of two primes, to deduce that the above list can contain only odd numbers. Although the conjecture remains unproven, it has been confirmed empirically up to 3×1017.)
P: Now I can determine them.
P now knows that x+y is one of the values listed above. If this enables P to deduce x and y, then, of the eligible factorizations of xy, there must be precisely one for which the sum of the factors is in the list. The table below, , shows all such xy, together with the corresponding x, y, and x+y. The table is sorted by sum and then product.
Note that a product may be absent from the table for one of two reasons. Either none of its eligible factorizations appears in the above list of eligible sums (example: 12 = 2×6 and 3×4; sums 8 and 7), or more than one such factorization appears (example: 30 = 2×15 and 5×6; sums 17 and 11.)
S: So can I.
If S can deduce the numbers from the table below, there must be a sum that appears exactly once in the table. Checking the table, we find just one such sum: 17.Therefore, we are able to deduce that the numbers are x = 4 and y = 13.

n.b. i am sorry the table could be published as some error is occuring but i think u will be able to figure out the solution after this....

No comments: