|
-
Apr 17th, 2001, 01:50 PM
#1
I'll admit I only copied and pasted this and i don't actually understand the question but here it is:
Two integers, m and n, each between 2 and 100 inclusive, have been chosen. The product, mn, is given to mathematician X. The sum, m + n, is given to mathematician Y. Their conversation is as follows:
X: I don't have the foggiest idea what your sum is, Y.
Y: That's no news to me, X. I already knew that you didn't
know.
X: Ahah, NOW I know what your sum must be, Y!
Y: And likewise X, I have surmised your product !!
Find the integers m and n.
If you solve this you ARE a genius
-
Apr 17th, 2001, 03:02 PM
#2
Guru
X: I don't have the foggiest idea what your sum is, Y.
Translation:
I know mn, but from my knowledge of mn and this knowledge alone, it is impossible to deduce what m+n is.
Y: That's no news to me, X. I already knew that you didn't know.
Translation:
I know m+n, and from this knowledge I have been able to deduce that it is impossible to know m+n by just knowing mn.
X: Ahah, NOW I know what your sum must be, Y!
Translation:
I know mn, and I know that it should be impossible for me to find out m+n, but there is only one sum of two integers between 2 and 100 which make this impossible (which Yonatan didn't figure out yet), so I now know this sum!
Y: And likewise X, I have surmised your product !!
Translation:
Well, you figured them out! That means with your knowledge of mn and your knowledge that it's impossible to find m+n, there is only one possible sum - and with my knowledge of the sum and the knowledge that you have been able to figure it out, I have deduced that there is only one possible product, which I now know!
Now to think a lot. If someone can find the sum AND the product (this shows that it's possible), then it's easy to find both integers by using the equations:
Very interesting riddle
-
Apr 17th, 2001, 03:20 PM
#3
very interesting riddle
Thanks I try my best!
-
Apr 17th, 2001, 11:38 PM
#4
Frenzied Member
A SWAG.
For those unfamiliar with technical jargon, a WAG is a Wild Ass Guess with little thought behind it. A SWAG is a sophisticated Wild Ass Guess, which has some possible merit.
My SWAG is 2 & 9, with product 18 and sum 11, which might fit the conditions here, but I am not really sure.
What is known by both is the following.- If X had a product like 15 (3*5), 35 (5*7), 143 (11*13), or the product of any other two primes, he would know the sum given to Y, namely the sum of the two prime factors.
- If Y had a sum like 20, which could be the sum of 7 and 13, he could not be certain that X did not know his sum.
Product 18 (2*9) and sum 11 (2 + 9) seem to have some merit. I found them by noting that 11 was the smallest sum with the correct properties.
X knows product of 18, which could be 3*6 or 2*9, so his statement that he does not have the foggiest notion is a bit of an exaggeration, but he cannot know whether Y has 11 or 9 as a sum. See below for examples of products
Now if Y had 11 as a sum, the possible products are 2*9, 3*8, 4*5, 5*6, none of which is the product of a pair of primes. With such a sum, he would know that X could not tell what the sum was.
Now when Y says I already knew you were in the dark, X considers the possible sums 9 & 11. 9 could be 2 + 7, which is the sum of two primes. Y could not have that sum, else he could not be sure that X was in the dark. Therefore, he knows that Y has 11 as the sum, which is not the sum of a pair of primes.
At this point, I do not know how Y deduces the product given to X.
Perhaps my answer is wrong. Perhaps there is a way for Y to deduce what product X has.
Live long & prosper.
The Dinosaur from prehistoric era prior to computers.
Eschew obfuscation!
If a billion people believe a foolish idea, it is still a foolish idea!
VB.net 2010 Express
64Bit & 32Bit Windows 7 & Windows XP. I run 4 operating systems on a single PC.
-
Dec 19th, 2006, 11:52 AM
#5
Fanatic Member
Re: If you can solve this your a genius
I think the answer is 2 and 6. I have modified some code from http://www.urch.com/forums/lounge/19...en-1-99-a.html
VB Code:
Option Explicit
Function P_knows(Product As Long) As Boolean 'Does P know the numbers?
Dim t As Long
Dim I As Long
t = 0
For I = 2 To roundUp(Sqr(Product)) 'Sqr to exclude the same numbers (e.g. 8 = 2 * 4 and 4 * 2)
If Product Mod I = 0 Then t = t + 1 'P doesn't know if you can divide it by more then one number
If t > 1 Then Exit For 'no need to check futher
Next
P_knows = t = 1
End Function
Function S_knows_that(Sum As Long) As Boolean 'Does S know that P can't know the numbers?
Dim iKnow As Long
Dim I As Long
For I = 2 To Sum \ 2 ' 2 to exclude the same numbers (e.g. 17 = 2 + 15 and 15 + 2)
If P_knows(I * (Sum - I)) Then 'for all the possible sums P should not be able to know the combination
'S_knows_that = False
'Exit Function
Else
iKnow = iKnow + 1
End If
Next I
If iKnow >= 2 Then
S_knows_that = True
Else
S_knows_that = False
End If
End Function
Function P_knows_now(Product As Long) As Boolean 'Does P know the two numbers after S knows that P can't know them?
Dim t As Long, I As Long
t = 0
For I = 2 To roundUp(Sqr(Product))
If Product Mod I = 0 Then 'P can only say that if there is just one combination
If I + (Product \ I) < 100 Then If S_knows_that(I + (Product \ I)) Then t = t + 1
If t > 1 Then Exit For 'no need to check futher
End If
Next I
P_knows_now = t = 1
End Function
Private Function roundUp(dblValue As Double) As Double
On Error GoTo PROC_ERR
Dim myDec As Long
myDec = InStr(1, CStr(dblValue), ".")
If myDec > 0 Then
roundUp = CDbl(Left$(CStr(dblValue), myDec)) + 1
Else
roundUp = dblValue
End If
PROC_EXIT:
Exit Function
PROC_ERR:
'MsgBox Err.description, vbInformation, "Round Up"
roundUp = CLng(dblValue)
End Function
Function S_knows_now(Sum As Long) As Boolean 'Does S know the two numbers too after P knows them?
Dim t As Long
Dim I As Long
t = 0
For I = 2 To Sum \ 2 'S can only say that if there is just one combination
If P_knows(I * (Sum - I)) = False Then
If P_knows_now(I * (Sum - I)) Then t = t + 1
End If
If t > 1 Then Exit For 'no need to check futher
Next I
S_knows_now = t = 1
End Function
Private Sub Form_Load()
Dim a As Long, b As Long
For b = 2 To 98
For a = 2 To 98
If a = 2 And b = 6 Then Stop
If a + b < 100 Then
' Debug.Print a; b,
If Not P_knows(a * b) Then
' Debug.Print "P knows not",
If S_knows_that(a + b) Then
' Debug.Print "S knows that",
If P_knows_now(a * b) Then
' Debug.Print "P knows now",
If S_knows_now(a + b) Then
' Debug.Print "S knows now",
MsgBox Format(a) + ", " + Format(b)
End If: End If: End If: End If: End If
' Debug.Print
' DoEvents
Next a, b
End Sub
The good people at microsoft say it is 4,13 :http://research.microsoft.com/aboutm...ns/2_XandY.htm
I think 2 and 6 work.
P = 12, S = 8
P => 12 = 3x4, 2x6 - so he doesn't know
S => 8 = 2+6, 3+5, 4+4 - so he doesn't know
P now knows because it can't be 3x4, if it was 3x4, the sum is 7
7 => 2+5, 3+4 But it can't be 2+5 or 3+4 because the Product guy would have known.
Now the Sum guy knows because it can't be 3+5. That is 15 and the Product guy would have know the first time. It also can't be 4+4, bacause the Product still wouldn't know. So it is 2,6
My secretary hopes that I will pay her, her landlord hopes that she will produce some rent, the Electricity Board hopes that he will settle their bill, and so on. I find it a wonderfully optimistic way of life. [Dirk Gently]
-
Dec 19th, 2006, 12:27 PM
#6
Re: If you can solve this your a genius
Two points:
1) The question given in post #1 and the one on the Microsoft page to which you have linked are not the same.
2) In your example, the fact that Y says that he knows X doesn't know does not then allow X to deduce what the numbers are.
-
Dec 20th, 2006, 08:00 AM
#7
Addicted Member
Re: If you can solve this your a genius
 Originally Posted by Yonatan
Translation:
I know mn, but from my knowledge of mn and this knowledge alone, it is impossible to deduce what m+n is.
X has 52 but m + n could be 4 + 13 = 17 or 2 + 26 = 28
Translation:
I know m+n, and from this knowledge I have been able to deduce that it is impossible to know m+n by just knowing mn.
Y has 17 and knows that every addition m + n that can make 17 gives an mn which could be found by multiplying together two different numbers (property 1)
Translation:
I know mn, and I know that it should be impossible for me to find out m+n, but there is only one sum of two integers between 2 and 100 which make this impossible (which Yonatan didn't figure out yet), so I now know this sum!
Y couldn't have 28 because I could have 23 and 5 which are both primes and in that case I would know what m + n is, therfore Y has 17
Translation:
Well, you figured them out! That means with your knowledge of mn and your knowledge that it's impossible to find m+n, there is only one possible sum - and with my knowledge of the sum and the knowledge that you have been able to figure it out, I have deduced that there is only one possible product, which I now know!
Out of my possibilities all but one could lead to another number similar to 17 (has property 1)
So if you know my number m and n must be 4 and 13 and therefore you have 52
Solution needs checking!
Last edited by Glaysher; Dec 20th, 2006 at 09:33 AM.
Vaiyo A-O
A Home Va Ya Ray
Vaiyo A-Rah
Jerhume Brunnen G
Vaiyo A-Rah
Jerhume Brunnen G
-
Dec 21st, 2006, 08:11 AM
#8
Fanatic Member
Re: If you can solve this your a genius
 Originally Posted by Glaysher
Y couldn't have 28 because I could have 23 and 5 which are both primes and in that case I would know what m + n is, therfore Y has 17
Yes but P knows he has 52, S can still have 28 which was made up from 2+26, 3+25, 4+24, 6+22, 7+21, 8+20, 9+19, 10+18 ...
My secretary hopes that I will pay her, her landlord hopes that she will produce some rent, the Electricity Board hopes that he will settle their bill, and so on. I find it a wonderfully optimistic way of life. [Dirk Gently]
-
Dec 21st, 2006, 04:57 PM
#9
Re: If you can solve this your a genius
 Originally Posted by THEROB
Yes but P knows he has 52, S can still have 28 which was made up from 2+26, 3+25, 4+24, 6+22, 7+21, 8+20, 9+19, 10+18 ...
But the point is that S knows that P doesn't know. He is certain of the fact. He couldn't be certain if there was the possibility that the number in question could be made up of two primes.
In the instance below, if S had 28 then P could have 23 x 5 = 115, and if P had been given 115 then he would know what m+n was. Hence if S had 28, he couldn't be sure that P didn't already know what the two numbers were.
-
Dec 22nd, 2006, 03:00 AM
#10
Addicted Member
Re: If you can solve this your a genius
 Originally Posted by zaza
But the point is that S knows that P doesn't know. He is certain of the fact. He couldn't be certain if there was the possibility that the number in question could be made up of two primes.
In the instance below, if S had 28 then P could have 23 x 5 = 115, and if P had been given 115 then he would know what m+n was. Hence if S had 28, he couldn't be sure that P didn't already know what the two numbers were.
Exactly and I have checked the solution though have not proved it's unique as that will be time consuming without a computer
Vaiyo A-O
A Home Va Ya Ray
Vaiyo A-Rah
Jerhume Brunnen G
Vaiyo A-Rah
Jerhume Brunnen G
-
Dec 24th, 2006, 10:42 AM
#11
Hyperactive Member
Re: If you can solve this your a genius
So basically if the sum given to Y can be expressed as the sum of two primes then that sum is excluded from the set of possible values satisfying the situation..
So math guy X looks at his product and considers the possible sum of its factors.. If one of those sums could not 'possibly' be expressed as a sum of 2 primes (eg 2+7=9) then he takes special note of that thought because it is actually a pretty rare condition..
Now math guy Y slips the info that this rare condition is actually fulfilled by his sum, tipping off math guy X that the factoral sum he took special note of is indeed valid..
Meanwhile, math guy Y had taken special note that for one of the possible products, none of one of the possible sumations adding to his number could be expressed as the sum of two primes (the same rare condition)..
So when math guy X shoots off his mouth that he had the problem solved, he confirms to math guy Y that the special possible product he had taken note of was the only possible product X could have..
Edit: The true flaw in the logic I figure is the fact that one must assume another person has not made a mistake... Thats something I never like to do..
Last edited by triggernum5; Dec 24th, 2006 at 10:46 AM.
-
Dec 25th, 2006, 03:55 PM
#12
Addicted Member
Re: If you can solve this your a genius
Sounds right.
Of course you have to assume X and Y are all knowing and logically sound
Vaiyo A-O
A Home Va Ya Ray
Vaiyo A-Rah
Jerhume Brunnen G
Vaiyo A-Rah
Jerhume Brunnen G
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|