Go Back   TestMagic Forums > Freestyle forum > Lounge
Register Forum Rules FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
LinkBack (1) Thread Tools Search this Thread Display Modes
Old 2002 November 29th, 05:12 PM   1 links from elsewhere to this Post. Click to view. #1 (permalink)
I JUST got here.
 
Join Date: Nov 2002
Posts: 2
anabolik has disabled reputation
if you solve this, please email me at anabolikfrolik@yahoo.com..............

a man comes up with two numbers between 1 and 99 (meaning not 1 or 99 but from 2 to 98). The sum of these two numbers is under 99. He tells one person the sum of these numbers and another person the product of these numbers. The person with the product comes up to the person with the sum and says "i don't know the two numbers". The person with the sum replies with "i know that you don't know the two numbers". Immediately, the man with the product says "now i know the two numbers" and the man with the sum says "now i know the two numbers too". What are the two numbers? There is no word play involved.. it is a real problem with a real answer. Feel free to find the answer any way possible. Thanks! my email is anabolikfrolik@yahoo.com
anabolik is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Google Bookmark this Post!Reddit!
Reply With Quote
Old 2002 November 30th, 02:52 AM   #2 (permalink)
Within my grasp!
 
Join Date: Oct 2002
Location: Thailand
Posts: 403
AmigoRo is on the way!
Quote:
Originally posted by anabolik

if you solve this, please email me at anabolikfrolik@yahoo.com..............
a man comes up with two numbers between 1 and 99 (meaning not 1 or 99 but from 2 to 98). The sum of these two numbers is under 99. He tells one person the sum of these numbers and another person the product of these numbers. The person with the product comes up to the person with the sum and says "i don't know the two numbers". The person with the sum replies with "i know that you don't know the two numbers". Immediately, the man with the product says "now i know the two numbers" and the man with the sum says "now i know the two numbers too". What are the two numbers? There is no word play involved.. it is a real problem with a real answer. Feel free to find the answer any way possible. Thanks! my email is anabolikfrolik@yahoo.com
Let's call the product p, and the guy who has it P,
and the sum s and the guy who has it S.

For P to know the answer, p=axb
where a and b are primes ( not necessariliy distinct).

So if P doesn't know the answer, then a and b are not obviously primes.

For S to know that P doesn't know the answer, S must know that

no primes a and b exists such that s=a+b

The list of primes from from 2 to 98 inclusive are:

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

using the list we can calculate all the sums obtainable by adding two primes. There are only few sums not obtainable by that method. They are:

27 41 51 57 71 83 87 93 97

Now, we know that the value can't be a prime for it to be a product too. So we eliminate the primes, and are left with

27 57 87

However, some of these are the products of two primes. If they were, then P would've known the answer. So we eliminate them too. And we are left with just

27

So 27 can be obtained only by 9 x 3

so our numbers are
9 and 3


This is the only method I can think of. Maybe there is an easier method. Or am I totally wrong?

AmigoRo


AmigoRo is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Google Bookmark this Post!Reddit!
Reply With Quote
Old 2002 November 30th, 03:35 AM   #3 (permalink)
Within my grasp!
 
Join Date: Oct 2002
Location: Thailand
Posts: 403
AmigoRo is on the way!
Mea Culpa !

9 and 3 are not the answers. If there were, then the product guy would have known the two numbers straight off. I am stumped.
AmigoRo is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Google Bookmark this Post!Reddit!
Reply With Quote
Old 2002 November 30th, 02:31 PM   #4 (permalink)
Within my grasp!
 
Join Date: Oct 2002
Location: Thailand
Posts: 403
AmigoRo is on the way!
Trying again

Quote:
Let's call the product p, and the guy who has it P,
and the sum s and the guy who has it S.

For P to know the answer, p=axb
where a and b are primes ( not necessariliy distinct).

So if P doesn't know the answer, then a and b are not obviously primes.

For S to know that P doesn't know the answer, S must know that

no primes a and b exists such that s=a+b

The list of primes from from 2 to 98 inclusive are:
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
Here is where I made a mistake:

using the list we can calculate all the sums obtainable by adding two primes. There are only few sums not obtainable by that method. They are:

27 41 51 57 71 83 87 93 97 <--- wrong

11 17 23 27 29 35 41 47 51 57 59 65 71 77 79 87 89 93 95 97 <--right

So these are the possible sums.

But if a and b are the two numbers, then what is the minimum a x b for a + b that makes 97?
It's 95 and 2, but
95 x 2 = 190 which is bigger than 99

Only numbers less than 51 can be made by adding a to b, without a x b exceeding 99. So we can eliminate all numbers greater than 51. And we are left with:

11 17 23 27 29 35 41 47 51 <-- Our A list.

Those are the possible sums.

For 51 we get
2 x 49 = 98

If 98 is the product, it could be either 2 x 49 or 7 x 14
so P doesn't know the numbers. But for S to know that P doesn't know, it has to be 2 and 49. The sum of 7 and 14, i.e., 11, is not in our A list. So P and S both realise that the numbers are 49 and 2.

For 47
2 x 45 = 90
Hmmm... it could 2 and 45 too, 'cos 19 nor 21 are in our A list.

For 41
2 x 39 = 78


For 35
2 x 33 = 66
3 x 32 = 96

For 29
2 x 27 = 54
3 x 26 = 78

For 27
2 x 25 = 50
3 x 24 = 72
4 x 23 = 92

For 23
2 x 21 = 42
3 x 20 = 60
4 x 19 = 76
5 x 18 = 90

For 17
2 x 15 = 30
3 x 14 = 42
4 x 13 = 52
5 x 12 = 60
6 x 11 = 66
7 x 10 = 70
8 x 9 = 72

For 11
2 x 9 = 8
3 x 8 = 24
4 x 7 = 28
5 x 6 = 30


Stumped again. Is there more than one answer ?
AmigoRo is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Google Bookmark this Post!Reddit!
Reply With Quote
Old 2003 January 17th, 02:54 AM   #5 (permalink)
I JUST got here.
 
Join Date: Jan 2003
Posts: 1
Julben has disabled reputation
The answer is 47 and 4 I believe
Julben is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Google Bookmark this Post!Reddit!
Reply With Quote
Old 2003 March 3rd, 09:39 PM   #6 (permalink)
I JUST got here.
 
Join Date: Mar 2003
Posts: 1
Adel Mardelli has disabled reputation
as far as I can tell, we can only hope to get families of pairs, and not a definite answer.

here's the best that I could come up with: any pair of numbers of the form:
2^n, prime number
will do. try it?!

if S knows that P cannot have the answer, then P must be looking at an odd sum, since if the sum was en even number, it could be broken down into a sum of two primes (among other pairs). In that case, S cannot know FOR SURE that P will not be looking at a product that only breaks down into two primes. Since S is sure, the P must know that the sum S is an odd number.

With that in mind, we now look at the product. Any number, the product P in particular, should be broken down into its prime divisors. In general, this can be expressed as:
P = 2 x 2 x 2 x .... x p1 x p2 x p3 x...
where it breaks down into a certain number of 2's and a certain number of odd primes.

It can be easily checked that only those combinations with one odd prime divisor will yield to number that add to an odd sum, which S must have seen in order to ascertain that P cannot possibly hope to find the numbers (our starting statement). We can also rule out the Products P that can be divided by a single 2, since in that case 2xp can be immediately recognized by Mr. P.

As a generalization, any pair of numbers of the form 2^n and prime number will satisfy the conversation.

I hope this is anywhere near accuracy.

Adel
Adel Mardelli is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Google Bookmark this Post!Reddit!
Reply With Quote
Old 2003 September 19th, 02:24 PM   #7 (permalink)
I JUST got here.
 
Join Date: Sep 2003
Location: Netherlands
Posts: 2
rbode has disabled reputation
Is the answer 4 and 13?

I have heard this riddle a long time ago and tried to program is but didn't finnish it. Today I found the riddle back on this forum and programmed it again. My program comes with 4 and 13 (as the only solution), is this correct ?

-Ronald

This is the program:

Code:
Sub main()

    For b = 2 To 98
        For a = 2 To 98
            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

Function P_knows(Product As Integer)                    'Does P know the numbers?

    t = 0
    
    For I = 2 To 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)                              'Does S know that P can't know the numbers?

    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
        End If
    Next i
    
    S_knows_that = True
        
End Function

Function P_knows_now(Product)                           'Does P know the two numbers after S knows that P can't know them?

    t = 0

    For I = 2 To 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

Function S_knows_now(Sum)                               'Does S know the two numbers too after P knows them?

    t = 0

    For I = 2 To Sum  2                                'S can only say that if there is just one combination
        If P_knows_now(i * (Sum - i)) Then t = t + 1
        If t > 1 Then Exit For                          'no need to check futher
    Next i
    
    S_knows_now = t = 1
            
End Function
rbode is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Google Bookmark this Post!Reddit!
Reply With Quote
Old 2003 September 29th, 07:25 AM   #8 (permalink)
I JUST got here.
 
Join Date: Sep 2003
Location: New Zealand
Posts: 11
ro68hteqhd3 has disabled reputation
totally fainted
ro68hteqhd3 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Google Bookmark this Post!Reddit!
Reply With Quote
Old 2003 November 10th, 04:16 PM   #9 (permalink)
I JUST got here.
 
Join Date: Aug 2003
Location: United Kingdom
Posts: 7
VSam has disabled reputation
I think the numbers are 3 & 4.

Here goes the explanation:

Lets assume that the numbers are a & b and the product is p and the sum s.

p=a*b
s=a+b

let the person who knows the product be P and the person who knows the sum be S.

P doesn't know the numbers so both a & b cannot be prime. Given that both a & b are not prime there is one more info that P can have abt the product. The lowest possible product is 12. This is the only info that can put restrictions on the number of possible sums.

When S says that he knows that P doesn't know the numbers, it means S also knows that both the numbers are not prime. How does he know that?

The sum of two prime numbers will always be even unless one of the numbers is 2. If S is so sure that both the numbers are not prime, that means the sum must be odd. But then how is S so sure that one of the numbers is not 2. The only reason can be, the sum is such that subtracting 2 from it gives a prime number. So S is sure that both the numbers are not prime (however one can be prime and one can be non-prime) and one of the numbers is not 2.

Now when S tells P that he knows that P doesn't know the numbers, P guesses the numbers. So by this time P had already narrowed the number of possible sums. This is only possible if product given to him is 12.

If the product is 12, possible combinations are 2*6 and 3*4. But from S's statement its clear that he has ruled out 2 as one of the numbers. Also if the numbers are 2 and 6, the sum will be even and S cannot confidently say that both the numbers are not prime. So the only combination remaining would be 3*4. P figures this out. When P figures this out, S also realises that P had narrowed the number of sums down and that means the product must be 12. Hence he also figures that the numbers are 3 and 4.

This is the solution I came out with. Not sure whether correct.

Sam
VSam is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Google Bookmark this Post!Reddit!
Reply With Quote
Old 2003 November 11th, 06:08 AM   #10 (permalink)
I JUST got here.
 
Join Date: Sep 2003
Location: Netherlands
Posts: 2
rbode has disabled reputation
Hello Sam,

I can't follow your reasoning but I am quiet sure it can't be 3 and 4 because in that case the person with the sum is not able to reply with "i know that you don't know the two numbers"; he would get 7 (3+4). From his perspection the numbers could then be 3+4 or 2+5 in the case of 2+5, the person with the product has 10 and should be able to know the combination as 10 can only be made out of 2x5 (both 2 and 5 are prime numbers).

Best regards,
Ronald
rbode is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Google Bookmark this Post!Reddit!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

What you can do
You cannot post new threads
You cannot post replies
You cannot post attachments
You cannot edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

LinkBacks (?)
LinkBack to this Thread: http://www.urch.com/forums/lounge/1990-hard-math-riddle-two-numbers-between-1-99-a.html
Posted By For Type Date
:: &#924;&#1059; riddles thread :: - Page 19 - Starcraft Dream This thread Refback 2008 May 6th 08:03 PM


All times are GMT. The time now is 11:26 PM.

Contact TestMagic   TestMagic Forums      Archive   Privacy Statement

TestMagic Locations   Legal   Privacy


SEO by vBSEO 3.2.0
Copyright © 2009 TestMagic
Ad Management by RedTyger

Scroll Up