Number Logic
Two perfect logicians S and P are told that integers x and y are such that:
1 < x < y and that x + y < 100.
S and P are then given the values x+y and x*y respectively and privately. S and P know they have each been given the sum and product respectively. 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 they spoke the truth, what are the two numbers?
Dec 24, 5: 10 AM. I made a significant modification to the conditionals for x and y. The place I found this sneakily used computers in deriving the solution. Unfortunately, my modifications altered the situation too much and invalidated the conversation between S and P.
In fact x < 10 and y < 20; but S and P don't know that. Unfortunately, I doubt that extra info is going to usefully simplify the problem solution. So apologies in advance if this one has a high labour requirement.
1 < x < y and that x + y < 100.
S and P are then given the values x+y and x*y respectively and privately. S and P know they have each been given the sum and product respectively. 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 they spoke the truth, what are the two numbers?
Dec 24, 5: 10 AM. I made a significant modification to the conditionals for x and y. The place I found this sneakily used computers in deriving the solution. Unfortunately, my modifications altered the situation too much and invalidated the conversation between S and P.
In fact x < 10 and y < 20; but S and P don't know that. Unfortunately, I doubt that extra info is going to usefully simplify the problem solution. So apologies in advance if this one has a high labour requirement.
Labels: logic, mathemagic, mathschallenge





15 Comments:
Having done all my Christmas shopping (and sweltering in 30+ temperatures here in Oz) I was able to spend a bit more time than I usually do on these puzzles. But not, I think, with any greater success. I come up with several solutions, so perhaps someone in the other hemisphere up there can help me.
I assume (which is not stated) that P also knows that S has the sum, and S also knows that P has the product.
If P cannot determine the two numbers then they must be such as to make non-unique products, e.g. 36 can be either 2*18 or 3*12. The following products can be made up by more than one combination of x and y: 36, 48, 60, 72, 84, 90, 96, 108, 112, 126 and 144.
S says he knew that because his x+y can be split into values of x and y which make up one of these products. That means, when you go through the possibilities, that x+y must range from 15 to 26.
This is where I get stuck.
P now says that he can determine x and y. The way I see it he could only do so if there was just one sum x+y which was unique and that all other sums in the range 15 to 26 occurred more than once among the values of x and y making up the above products.
In fact I have five such unique sums: 15, 16, 17, 18 and 26. These correspond to 3+12, 4+12, 5+12, 6+12 and 8+18.
So, my answer is x = 3 to 6 or 8, and y = 12 or 18.
Merry Christmas to all of you up there in the freezing north (and also to any others on my side of the equator).
wizard...you make my ears bleed,but a merry chistmas to you(from the middle of Canada).
Randomness told me to say
X = 5
Y = 15
Random huh?
Hi all. My worst fears about mucking up the problem when trying to reduce the effort required to solve it, had spoilt the problem. So I've rewritten it.
Merry Christmas.
I saw S and P in the bar, having a brew. Sitting close to them, I overheard the (x+y) and (x*y) values being exchanged ... then I heard S say "this is driving them crazy" ... followed by boisterous laughter.
Hi amber_lws. With the original version of the problem, 5 and 15 don't work because x*y = 5*15 = 75 = 3*25. As P knew that y < 20, 5*15 would have been a unique combination, so P would know x = 5 and y = 15, so P's first statement would have been false.
Now I've modified the problem, 5 and 15 are eligible combinations as is 3 and 25.
I'm going to give any other clues as it would spoil the pleasure of doing it yourself.
I woke up this Christmas morning to find that Santa had moved the goalposts while I was asleep! Having some spare time this morning while Mrs Wiz wrestled with the turkey, I had another go at this with an expanded Excel spreadsheet.
There is now a much larger range of non-unique products ranging from 6 to 144. Within this group I looked for unique sums, and found five of them when I expected just one.
So, again I have five answers: (2,3), (2,4), (2,6), (6,18) and (8,18).
The last two would be eliminated if x could equal 10 (rather than be less than 10) and y could equal 20. That would at least reduce the possibilities to x = 2 and y = 3, 4 or 6.
So maybe my approach is all wrong.
I got 2 and 9 as an answer;
x+y=11
xy=18
P cannot determine as 18 is not the product of two primes.
S already knew this as x,y could be:
2&9,3&8,4&7,5&6 none of which are a pair of primes and so P could not have gotten the answer.
P knows that there are only two possible combinations for 18, 2&9 or 3&6 but 3+6 =7 which could be written as a combination of 2&7 so S could not have made the second staement, therefore P knows that 2&9 is correct.
S subsequent has enought information to deduce the samswer himself.
There could be more options this is just the first I found.
Merry Christmas
Chris,
I looked at this a while ago, and I ran some brief tests but have not deduced the final logic where S and P could figure it out.
If my logic was correct then P must have the product as 12, and S had the sum of either 7 or 8.
There are exactly two ways to get 12... 2*4 or 2*6 and only two ways to get 7.... 3+4 or 2+5 and two ways to get 8.. 3+5 or 2+6.
You said P said first that he could not determine x and y, so he thought S had either a 7 or 8.
Then S said he that he knew that.
Then P said he then knew the solution, but I have not figured out how he would know which pairs were x and y.
Must have had a brain snap this morning. 6 and 8 are, of course, unique products so cannot be part of the solution.
The answer therefore is x = 2, y = 6.
Hi. Gotta go for Christmas lunch, but well spotted Wiz, 8 is a unique product - what about 16?
No-one has the answer yet.
Number Logic
1 < x < y and x+y <100
*1) P: I cannot determine the two numbers.
*2) S: I knew that.
*3) P: Now I can determine them.
*4) S: So can I.
First we translate:
*1) I have a product with more than two factors (excluding 1), thus x and y are not both prime
*2) My sum cannot be created with two prime numbers, so I already knew that
*3) If I eliminate all possible combinations of factors that equal my product, but add up to sums that can be created with two prime numbers, I am left with only one possible combination
*4) If I look at all possible combinations of forming my sum, I find a combination, that yields a product that, if I eliminate all possible combinations of factors that equal that product, but add up to sums that can be created with two prime numbers, I am left with only one possible combination. Furthermore, no other possible combinations of forming my sum share this property.
Find ranges:
-smallest x is 2,
largest y is when x is smallest, x+y<100 so 2+y<100, y<98
-largest y=97
-smallest sum is 5
-largest sum is 99
-smallest product is 6
-largest product is 49*50=2450
List of Prime Numbers 2-97
2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97
For all possible sums (5-99)
Remove the sums created from adding two primes together
e.g.
Remove the following sums for 2+prime x:
5, 7, 9, 13, 15, 19, 21, 25, 31, 33, 39, 43, 45, 49, 55, 61, 63, 69, 73, 75, 81, 85, 91, 99
3+ prime x:
8, 10, 14, 16, 20, 22, 26, 32, 34, 40, 44, 46, 50, 56, 62, 64, 70, 74, 76, 82, 86, 92
repeat for all prime numbers
Remaining Sums:
6, 11, 17, 23, 27, 29, 35, 37, 41, 47, 51, 53, 57, 59, 65, 67, 71, 77, 79, 83, 87, 89, 93, 95, 97
Possible x,y:
For 6:
(2,4) Unique thus invalidates that S and P didn’t immediately know x and y
For 11:
(2,9) P=18 possible x,y for P=18 (2,9)(3,6).
-(3,6) can be composed of two primes (sum of 9 is not on remaining sums list). P would know x,y is (2,9).
(3,8) P=24 possible x,y for P=24 (2,12)(3,8)(4,6)
-eliminate (2,12)(4,6) 14,10 not on sums list. P would know x,y is (3,8).
(4,7) P=28 possible x,y for P=28 (2,14)(4,7)
-eliminate (2,14) 16 not on sums list. P would know x,y is (4,7).
(5,6) P=30 possible x,y for P=30 (2,15)(3,10)(5,6)
-eliminate (3,10) 13 not on sums list. 2 remaining combos. P can not determine x,y.
Multiple P values allow P to determine x,y. Thus S can not identify x,y.
For 17:
17
(2,15) P=30 possible x,y for P=30 (2,15)(3,10)(5,6)
-eliminate (3,10) 13 not on sums list. 2 remaining combos. P can not determine x,y.
(3,14) P=42 possible x,y for P=42 (2,21)(3,14)(6,7)
-eliminate (6,7) 13 not on sums list. 2 remaining combos. P can not determine x,y.
(4,13) P=52 possible x,y for P=52 (2,26)(4,13)
-eliminate (2,26) 28 not on sums list. P would know x,y is (4,13)
(5,12) P=60 possible x,y for P=60 (2,30)(3,20)(4,15)(5,12)(6,10)
-eliminate (2,30)(4,15)(6,10)32,19,16 not on sums list. 2 remaining combos. P can not determine x,y.
(6,11) P=66 possible x,y for P=66 (2,33)(3,22)(6,11)
-eliminate (3,22) 25 not on sums list. 2 remaining combos. P can not determine x,y.
(7,10) P=70 possible x,y for P=70 (2,35)(5,14)(7,10)
-eliminate (3,22) 25 not on sums list. 2 remaining combos. P can not determine x,y.
(8,9) P=72 possible x,y for P=72 (2,36)(3,24)(4,18)(6,12)(8,9)
-eliminate (2,36)(4,18)(6,12) 38,22,18 not on sums list. 2 remaining combos. P can not determine x,y.
Only one value,of P, P=52, for S=17, allows P to determine x,y (4,13). Thus S can also identify x,y.
One possible Answer:
x=4,y=13,S=17,P=52
Other answers may exist..... The remaining sums >17 would be treated in the same manner to find additional solutions, if they exist.
Lots of work and lots of steps, so I may have made a mistake at some point.
Cam
Bravo Cam. I'm impressed. 4 and 13 are the numbers. I've read enough to know that you know that the full treatment is probably horribly tedious.
I haven't read enough to know if you noticed that if the product was a prime^3 or a prime^4 that it would have unique factors.
I haven't had a chance to look at it myself.
Chris,
Can't say I noticed that property of prime^3, or prime^4.
It does, however, make sense.
if P is prime P^3 has only factors of:
1,P,P^2,P^3
1,P^3 eliminated leaves P,P^2
(1,P^3 eliminated since y>x>1)
if P is prime. P^4 has only factors of:
1,P,P^2,P^3,P^4
1,P^4 and P^2 eliminated leaves P,P^3. (P^2 eliminated since y>x)
for values <100
2^3=8,3^3=27,4^3=64
2^4=16,3^4=81
Sums, 6,12,20 are eliminated for prime^2
Sums, 10,30 are eliminated for prime^3
So the only number which was on the remaining sums list is 6. Which was identified as unique, and eliminated.
The *1 and *2 translations should be revised to.
*1) I have a product with more than two non-equal factors (excluding 1 and the product), thus x and y are not both prime. Additionally, my product is not prime^3 or prime^4.
*2) My sum cannot be created with two prime numbers, and my sum is not the sum of the non-equal factors (excluding 1 and its matching factor), of prime^3 (i.e. prime+prime^2) or prime^4(i.e. prime+prime^3) so I already knew that
Cam
I just ran a program following my method and confirmed that only
x=4,y=13,S=17,P=52 works for 1 < x < y and x+y <100
Cam
Post a Comment
Links to this post:
Create a Link
<< Home