[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference rusure::math

Title:Mathematics at DEC
Moderator:RUSURE::EDP
Created:Mon Feb 03 1986
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:2083
Total number of notes:14613

110.0. "The 2 numbers again" by HARE::STAN () Mon Jul 30 1984 00:24

From:	ROLL::USENET       "USENET Newsgroup Distributor" 26-JUL-1984 22:08
To:	HARE::STAN
Subj:	USENET net.math newsgroup articles

Newsgroups: net.math
Path: decwrl!decvax!mcnc!duke!bek
Subject: sum product puzzle
Posted: Tue Jul 24 12:17:53 1984

I have a puzzle (an old unsolved favorite of mine) which was
rumored to have been discussed recently here.  I don't mean
to restart the discussion, but my news log doesn't go back far
enough to find it, and I would like very much to see a solution.
(If the puzzle is not in fact old to this group, then you all
can just take a crack at it now.)
 
Person A thinks of two integers between (but not including) 1 and
100.  A hands the sum of the two numbers to a person we shall
call S, and the Product to a person we shall call P.  The following
conversation takes place:
S: I don't know what the numbers are.
P: I don't know what the numbers are, either.
S: I knew you didn't know.
P: Oh, well, in that case, I DO know what they are.
S: In that case, so do I.

The question is, what were the two numbers?

Barry Koster      duke!bek
T.RTitleUserPersonal
Name
DateLines
110.1HARE::STANMon Jul 30 1984 00:2464
From:	ROLL::USENET       "USENET Newsgroup Distributor" 27-JUL-1984 22:12
To:	HARE::STAN
Subj:	USENET net.math newsgroup articles

Newsgroups: net.math
Path: decwrl!decvax!mcnc!ecsvax!pizer
Subject: Re: Word problem <duke.4546>
Posted: Wed Jul 25 19:52:47 1984

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!"
110.2HARE::STANMon Jul 30 1984 00:2548
Newsgroups: net.math
Path: decwrl!decvax!mcnc!ecsvax!pizer
Subject: Re: sum product puzzle <duke.4546> SOLUTION
Posted: Sat Jul 28 17:17:44 1984

I posted a early answer to this problem <ecsvax.2995> and this is just to
clarify that my solution is correct.  After modifying my program, and letting
it run seven and one-half hours, I discovered that my solution must be correct,
since I didn't get another possible answer and it makes sense.

The problem is as follows, person A thinks of two integers (2-99), gives the
product of the two numbers to person P and the sum of the numbers to person S.
Then, the following conversation takes place;

S:  I don't know what the numbers are.
P:  I don't know what the numbers are, either.
S:  I knew you didn't know what the numbers are.
P:  Well, in that case I DO know what the numbers are.
S:  In that case, so do I.

The problem, of course is to find the two numbers.  Without explaining how I
arrived at the numbers, as I tried before, I will simply explain my solution,
that the numbers were 4 and 13.

With the sum being 17, the first statement is obviously true, since there are
7 possible combinations, (2,15),(3,14),(4,13),(5,12),(6,11),(7,10),(8,9).  The
second statement is also true, with the product being 56, there are two
possible combinations (4,13),(2,26).  The next statement, by S, is also true,
every possible product of the combinations listed above has more than one
possible factor combinations, therefore S knows that whatever the product, P
cannot know what the numbers are.  The next statement, by P, is more difficult.
If the numbers were 2 and 26, the sum would be 28, which has (5,23) as a
possible combination; making S' statement false (S wouldn't know for sure that
P didn't know).  The combination 4 and 13 obviously makes sense since that is
what S was talking about.  The final statement is the clincher, of all the
possilbe sum combination, only (4,13) would allow P to discover the answer from
what S said, allowing S to discover the answer also.  To be more specific, if
S thought the combination was (5,12), he would know the product to be 60; which
has both (5,12) and (3,20) as factors.  Both of those combinations would
make S' earlier statement true, and P would not know which combination the
numbers were.

You might think that there would be another combination like 4 and 13 less than
100, however, after 7 1/2 hours, I would tend to disagree.  Conflicts an
criticism accepted.

Billy Pizer
(pizer@ecsvax)
110.3SPRITE::OSMANFri Feb 01 1985 15:237
Please clarify an important point:  Did the program EXHAUST the 
possibilities in the 7 1/2 hours, thus claiming that there are no more
solutions ?  Or did the programmer become exhausted waiting, and stop
the program ?  If the latter, the problem may still need more work, since
a less tired programmer might run a program that DOES find another "solution",
in which case S and P are liars, since there would be no way they could have
solved it with the given information.
110.4SPRITE::OSMANWed Feb 06 1985 10:1726
As explained already, the statement "P:  I don't know what the numbers are
either" indicates that p is not of the form p1*p2 where p1 and p2 are 
primes (because if p=p1*p2, then P would know what the numbers were!)

What I've observed, that perhaps people didn't catch before, is that
the statement also tells us that p is not of the form p1^3 (p1*p1*p1).
This is because such a p would indicate "two" products of (p1*p1)*p1
"and" p1*(p1*p1).  These are of course really only ONE product, so P
would know the two numbers in this case.

So, in summary, the statement "P:  I don't know what the numbers
are either" rules out at least THREE kinds of numbers:

	1)  p		actually ruled out by the fact that 1 isn't a
			possible answer.
	2)  p1*p2

	3)  p^3

Perhaps there's a 4) ?

p.s.	I'm tempted to write a program myself, because 7 1/2 hours is
	just too gross.  I can't imagine it need take this long.

	Of course it would still be nice to see a "mathematical" solution.
	Anyone have one ?
110.5HARE::STANWed Feb 06 1985 13:366
A mathematical proof appears by the Bern Problem Solving Group in

Mathematics Magazine, vol 50 (1977) page 268, solution to problem 977.

Related problems appearing in the American Mathematical Monthly:
problems E776, E1126, and E1156.