Wednesday, September 5, 2018

logical deduction - I don't know the two numbers... but now I do


Two perfect logicians, Summer and Proctor, are told that integers $x$ and $y$ have been chosen such that $1 < x < y$ and $x+y < 100$. Summer is given the value $x+y$ and Proctor is given the value $x \cdot y$. They then have the following conversation.



  • Proctor: "I cannot determine the two numbers."

  • Summer: "I knew that."

  • Proctor: "Now I can determine them."

  • Summer: "So can I."


Given that the above statements are true, what are the two numbers?



You may want to use a computer to assist you.



Answer



Let $P = x \cdot y$ and $S = x + y$.


If Proctor could not determine the two numbers offhand, then there must be at least two valid factorizations of $P$, which means that $P$ cannot be the product of two primes.


And if Summer knew that Proctor could not determine the two numbers, then every possible pair of $x$ and $y$ that add up to $S$ must have a product that is not a product of two primes - i.e. no two primes can sum to $x$ and $y$. This gives $11$, $17$, $23$, $27$, $29$, etc. (in general, every odd composite number plus 2) as possible values of $S$, because odd prime numbers plus 2 have $2$ and $S-2$ as the prime numbers that sum to it, and any even number greater than or equal to 4 can be represented as the sum of two primes, by the Goldbach conjecture which has been verified up to 100.


Proctor knows this as well. If he can now determine the two numbers, then out of all of $P$'s factorizations, only one of them add up to one of those possible values of $S$. For example, if $P = 24$, then only $3$ and $8$ add up to a number in that list. (The other factorizations give $1 + 24 = 25$, $2 + 12 = 14$, and $4 + 6 = 10$, none of which are in the list.)


Summer knows this as well. But if Summer can also figure out what $P$ is, then the number of $S$ must also have a unique $P$ for which a unique $S$ exists. Our value of $P = 24$ above gives $S = 11$, which is not the right answer because $P = 18$ gives $(2, 9)$ as another solution to $S = 11$, and so our value of $P$ is not unique.


With some brute-force searching by going through all possible values of $P$ and checking their respective unique values of $S$, we find that only $S = 17$ has only one corresponding $P$ value, which is $P = 52$.


So, $S = 17$ and $P = 52$, and $x = 4$ and $y = 13$.


No comments:

Post a Comment

classical mechanics - Moment of a force about a given axis (Torque) - Scalar or vectorial?

I am studying Statics and saw that: The moment of a force about a given axis (or Torque) is defined by the equation: $M_X = (\vec r \times \...