wu :: forums « wu :: forums - Variation to the sum - product riddle » Welcome, Guest. Please Login or Register. Jan 23rd, 2022, 4:09am RIDDLES SITE WRITE MATH! Home Help Search Members Login Register
 wu :: forums    riddles    hard (Moderators: SMQ, ThudnBlunder, Icarus, towr, Eigenray, Grimbal, william wu)    Variation to the sum - product riddle « Previous topic | Next topic »
 Pages: 1 Reply Notify of replies Send Topic Print
 Author Topic: Variation to the sum - product riddle  (Read 4517 times)
Altamira_64
Junior Member

Posts: 116
 Variation to the sum - product riddle   « on: Jun 12th, 2012, 4:38am » Quote Modify

In our case the numbers are integers from 3 to 100.
One of the two friends (A) knows the sum and the second knows the product.
Their dialog is as follows:
A: I know u can't find the numbers. Unfortunately, neither can I.
B: But now I can!
A: So do I!

 IP Logged
Grimbal
wu::riddles Moderator
Uberpuzzler

Gender:
Posts: 7517
 Re: Variation to the sum - product riddle   « Reply #1 on: Jun 15th, 2012, 3:59pm » Quote Modify

Can the numbers be equal?
 IP Logged
Altamira_64
Junior Member

Posts: 116
 Re: Variation to the sum - product riddle   « Reply #2 on: Jun 17th, 2012, 1:53am » Quote Modify

Yes
 IP Logged
Grimbal
wu::riddles Moderator
Uberpuzzler

Gender:
Posts: 7517
 Re: Variation to the sum - product riddle   « Reply #3 on: Jun 17th, 2012, 3:12pm » Quote Modify

I find 2 solutions:
(5,8) and (13,16)
But I am not 100% confident with my program.
 « Last Edit: Jun 17th, 2012, 3:12pm by Grimbal » IP Logged
0.999...
Full Member

Gender:
Posts: 156
 Re: Variation to the sum - product riddle   « Reply #4 on: Jun 18th, 2012, 8:25pm » Quote Modify

I believe (13,16) is the only solution. (Verified arduously by hand )

That (5,8 ) is not a solution follows from the following reasoning:
Suppose A makes the first statement seeing the sum 13. The statement is indeed correct.

If B sees 40, then clearly we get a true second statement.

I claim that if B sees 30, the second statement is still true!
30 = 5*6 = 3*10
If the pair was (5,6), then A's first statement would be false with 11 = 4+7 ruled out since 4*7 uniquely factors into integers greater than 3. Thus, B determines that (3,10) is the only possible pair.

On the third statement, therefore, A cannot determine whether it is (3,10) or (5,8 ).
 « Last Edit: Jun 18th, 2012, 8:45pm by 0.999... » IP Logged
Altamira_64
Junior Member

Posts: 116
 Re: Variation to the sum - product riddle   « Reply #5 on: Jun 19th, 2012, 3:29pm » Quote Modify

Can anyone briefly explain the reasoning??
How did you get to this result?
 IP Logged
0.999...
Full Member

Gender:
Posts: 156
 Re: Variation to the sum - product riddle   « Reply #6 on: Jun 19th, 2012, 9:26pm » Quote Modify

Let S be the set of all sums we would rule out due to A's first statement.
S contains 7 and 199 because A would know their summands.
S contains all even numbers 6-200 because they can be written as a sum of two primes and so A would not be sure that B cannot know their factors.
S contains all sums p+4 where p is odd and prime, because p*4 is the only way to factor that product into integers greater than or equal to 3.

Now, for any remaining sum r:
If r = a+b = x+y where all other factorizations (a',b') of a*b and (x',y') of x*y sum to elements of S, then B's statement will be true, but A cannot deduce the pair, falsifying A's second statement.

What we have left are the sums such that there is exactly one pair (a,b) with all other factorizations of a*b summing to elements of S.

For instance,
13 = 3+10 = 5+8;
30 = 3*10 = 6*5 (= 15*2) where 6+5 = 11 = 7+4 an element of S.
40 = 5*8 = 10*4 (= 20*2) where 10+4 is even and so in S.
So 13 can be ruled out.

On the other hand,
29 = 3+26 = 4+25 = 5+24 = 6+23 = 7+22 = 8+21 = 9+20 = 10+19 = 11+18 = 12+17 = 13+16 = 14+15
78 = 3*26 = 13*6; 29 and 19 are both not in S.
100 = 4*25 = 20*5
120 = 5*24 = 3*40
138 = 6*23 = 3*46
154 = 7*22 = 11*14
168 = 8*21 = 7*24
180 = 9*20 = 45*4
190 = 10*19 = 5*38
198 = 11*18 = 9*22
204 = 12*17 = 51*4
(*)208 = 13*16 = even*even
210 = 14*15 = 7*30
 « Last Edit: Jun 19th, 2012, 9:55pm by 0.999... » IP Logged
Altamira_64
Junior Member

Posts: 116
 Re: Variation to the sum - product riddle   « Reply #7 on: Jun 20th, 2012, 2:42am » Quote Modify

Great, many thanks to all of you!
 IP Logged
Grimbal
wu::riddles Moderator
Uberpuzzler

Gender:
Posts: 7517
 Re: Variation to the sum - product riddle   « Reply #8 on: Jun 20th, 2012, 2:03pm » Quote Modify

on Jun 18th, 2012, 8:25pm, 0.999... wrote:
 I believe (13,16) is the only solution. (Verified arduously by hand )

Yo are correct, indeed.  And my program was wrong.
I corrected the program and made it run a 100 times as a punishment.
 IP Logged
0.999...
Full Member

Gender:
Posts: 156
 Re: Variation to the sum - product riddle   « Reply #9 on: Jun 22nd, 2012, 9:08am » Quote Modify

on Jun 20th, 2012, 2:03pm, Grimbal wrote:
 Yo are correct, indeed.  And my program was wrong. I corrected the program and made it run a 100 times as a punishment.

Oh no, you must write that program in 100 different (programming) languages.
 « Last Edit: Jun 22nd, 2012, 9:18am by 0.999... » IP Logged
Altamira_64
Junior Member

Posts: 116
 Re: Variation to the sum - product riddle   « Reply #10 on: Jun 24th, 2012, 12:39pm » Quote Modify

on Jun 19th, 2012, 9:26pm, 0.999... wrote:
 78 = 3*26 = 13*6; 29 and 19 are both not in S.

What do you mean by this? 29 is the sum of the two numbers 13 + 16; how can they not be in S?
 IP Logged
Altamira_64
Junior Member

Posts: 116
 Re: Variation to the sum - product riddle   « Reply #11 on: Jun 25th, 2012, 4:24am » Quote Modify

Sorry, my mistake, I just realized that S contains the ones we rule out, not the ones we keep!
 IP Logged
 Pages: 1 Reply Notify of replies Send Topic Print

 Forum Jump: ----------------------------- riddles -----------------------------  - easy   - medium => hard   - what am i   - what happened   - microsoft   - cs   - putnam exam (pure math)   - suggestions, help, and FAQ   - general problem-solving / chatting / whatever ----------------------------- general -----------------------------  - guestbook   - truth   - complex analysis   - wanted   - psychology   - chinese « Previous topic | Next topic »

Powered by YaBB 1 Gold - SP 1.4!
Forum software copyright © 2000-2004 Yet another Bulletin Board