All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Numbers
Two numbers (Posted on 2002-10-15) Difficulty: 4 of 5

Alan and Bob are trying to figure out two numbers. They know that both numbers are integers between 1 and 100 (but not 1 or 100). Alan knows the product of the numbers, and Bob knows the sum. Their conversation goes as follows:

Alan: I can't tell what the two numbers are.
Bob: I knew you couldn't.
Alan: Ok, now I know the numbers.
Bob: Now I know them, too.

What are the two numbers?

  Submitted by Happy    
Rating: 3.8000 (15 votes)
Solution: (Hide)

The first person can't work out the numbers, hence at least one of the numbers is not a prime number

The second person knew that the first couldn't work out the numbers, hence the sum of the numbers is such that it cannot be represented as a sum of two prime numbers. Let's call the possible sums, i.e. numbers that cannot be represented as a sum of two prime numbers, "Good sums", and number pairs that sum up to a "Good Sum", "Good Pairs".

Now the first person can work out the numbers, hence if the number that he know is represented as a product of two numbers in all possible ways, only one pair is a "Good Pair". Let's call all such products "Good Products".

The second person now can tell the numbers, hence if the sum is represented as a sum of two numbers in all possible ways, and the product of all these ways is calculated, only one of these products is a "Good Product".

Now we are ready for some calculations

It's easy to check that only the following numbers cannot be represented as sums of two prime numbers:

11, 17, 23, 27, etc. These are all odd numbers X so that X-2 is not a prime number.

Now that we have all "Good Sums", we'll have to check each of those to satisfy the other statements.

Checking 11

We are now checking if 11 is a possible sum of the numbers sought. Possible ways of representing 11 as a sum of two numbers are: 2+9, 3+8, 4+7 and 5+6.

Corresponding products are: 18, 24, 28 and 30

Let?s see if 18 is a "Good Product". It can be represented as a product of two numbers in the following ways: 2x9 and 3x6. 2+9 is a "Good Sum" according to the "Good Sums" slide, and 3+6 is not a "Good Sum", hence 18 is a "Good Product"

24 can be represented as a product of two numbers in the following ways: 2x12, 3x8 and 4x6. 2+12 is not a "Good Sum", 3+8 is a "Good Sum" and 4+6 is not a "Good Sum", hence 24 is a "Good Product" as well.

Thus we have at least two pairs (2,9) and (3,8) so that their sum is 11 and their product is a "Good Product", hence 11 cannot be the sum of the sought numbers, as the person knowing the sum couldn't make his final statement.

Checking 17

We are now checking if 17 is a possible sum of the numbers sought. Possible ways of representing 17 as a sum of two numbers are: 2+15, 3+14, 4+13, 5+12, 6+11, 7+10 and 8+9.

Corresponding products are: 30, 42, 52, 60, 66, 70 and 72.

Let's see if 30 is a "Good Product". It can be represented as a product of two numbers in the following ways: 2x15, 3x10 and 5x6. 2+15 is a "Good Sum" according to the "Good Sums" slide, 3+10 is not a "Good Sum", 5+6 is a "Good Sum", hence 30 is not a "Good Product" (because of the two "Good Sums")

42 can be represented as a product of two numbers in the following ways: 2x21, 3x14 and 6x7. 2+21 is a "Good Sum", 3+14 is a "Good Sum", hence 42 is not a "Good Product" either.

52 can be represented as a product of two numbers in the following ways: 2x26 and 4x13. 2+26 is not a "Good Sum", and 4+13 is a "Good Sum", hence 52 is a "Good Product".

60 can be represented as a product of two numbers in the following ways: 2x30, 3x20, 4x15, 5x12 and 6x10. 2+30 is not a "Good Sum", 3+20 is a "Good Sum", 4+15 is not a "Good Sum", 5+12 is a "Good Sum", 6+10 is not a good sum. Here we have two good sums (3,20) and (5,12) hence 60 is not a "Good Product".

Continuing with the same logic we'll find that 66, 70 and 72 are not "Good Products" either. Thus, for the sum of 17 we found only 1 "Good Product": 52. Thus, the pair (4,13) is a possible solution to the problem.

Checking other "Good Sums"

We won't check all other "Good Sums" here, however the by applying the logic described in the previous slides you can see that there is no other "Good Sum" so that one and only one of the corresponding products is a "Good Product" within the limitations of the problem (i.e. numbers less than 100).

Thus the final answer is: 4 and 13.

(source: Tech Ed )

Comments: ( You must be logged in to post comments.)
  Subject Author Date
answerK Sengupta2007-03-08 12:12:53
DunnoTim Axoy2003-03-30 07:49:19
Some Thoughtsattempt..Cheradenine2002-10-18 03:13:47
QuestionHuh?TomM2002-10-16 07:46:04
re(2): guessCheradenine2002-10-16 06:49:37
re: guessTomM2002-10-16 04:46:13
Some ThoughtsguessCheradenine2002-10-16 02:54:56
Some Thoughtsre(2): between 1 and 100..TomM2002-10-15 17:28:00
re: between 1 and 100..Happy2002-10-15 10:31:31
between 1 and 100..Cheradenine2002-10-15 07:39:44
Hints/Tipsre: My guessTomM2002-10-15 04:05:09
Some ThoughtsFirst thoughtsTomM2002-10-15 03:50:31
SolutionMy guessfriedlinguini2002-10-15 03:44:34
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (14)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information