[net.math] Word problem <duke.4546>

pizer@ecsvax.UUCP (07/26/84)

Well, after 5 hours, I think I have a solution.  I am not sure whether I am
solving it right, but I'll let it run all night and see if I come up with
another possible answer.  My solution goes as follows; the first statement
made tells you almost nothing, except for the fact that the numbers are not
2 and 2 or 2 and 3 or 99 and 99 or 99 and 98 (these would be the only cases
where there is only one pair of integers for a possible sum).  The second
statement gives a little more if you look closely, if the person (P) who knows
what the product is does not know the two numbers, then both the numbers can't
be prime, ie the product can't be 14, since the person P would know the numbers
to be 2 and 7.
Next, it gets a little more complicated.  Since S knows that P didn't know,
that means that all the possible pairs of integers that would add up to S must
also contain one non-prime number (if S was 24 then the two numbers could be
7 and 17, and if such was the case, person P could be able to know the two
numbers).  If that confused you, you'd better not go on.  Next, since person
S's statement that he knew person P didn't know allowed person P to figure out
the two numbers, we now know that of all the possible factor combinations of
P, only one will make S's statement "I knew you didn't know" true.  For example
if we tried to let 42 be P, both 2*21 and 3*14 will give you 42; but since
2+21 is 23, which could be a possible S, and 3+14 is 17, which could also be
a possible S, we know that P cannot be 42 because the statement "I knew you
didn't know" by S wouldn't help P because the sum could be either 17 or 23.

Finally, we get to the clincher, S's statement that "In that case, so do I".
What this means, is that for all the possible combinations of integers such
that added together they give S, only one pair multiplied together will give
you one and only one (not zero or two) possible P's.  This has all gotten
incredibly complicated to the point where I am not sure what I am trying to
say, so let me explain my answer, 4 and 13.

S = 17, P = 52

S says he doesn't know what the numbers are (for him, they could be (2,15),
  (3,14),(4,13),(5,12),(6,11),(7,10), or (8,9))
P says he doesn't know either (for him, they could be (4,13) or (2,26))
S says he already knew this (each pair mentioned above contains at least one
  non-prime number, thus every possible product has more than two factors)
P says he now knows the answer (he knows the sum is either 17 or 28, if it was
  28, making (5,23) a possible pair, S wouldn't know for sure that P didn't
  already know the numbers)
S says he now knows the answer (knowing the product is 30,42,52,60,66,70 or 72,
  he knows it must be a product that would allow P to solve the problem, thus
  it must be a product whose factor combinations contain only one with a sum
  that would make S's previous statment true; 30's factor sets (2,15),(3,10)
  and (5,6) contain two sets (2+15=17 and 5+6=11) that give a possible sum
  that would let P solve the problem, so it can't be 30; 52 on the other hand
  has only one set (4,13) that give a sum, 17, that could be a possible sum for
  P, so it must be the answer)

If you understand this, you deserve a pat on the back; I'll let my program run
all night and see if there is another possible combination.

Billy Pizer
(pizer@ecsvax)
-- "I hate word problems!"