Go back
Another Magic of Logic

Another Magic of Logic

Posers and Puzzles

Clock

[The title of the thread is intentionally ungrammatical; it's based on a classic RHP thread from many years ago.]

There are two positive integers: n1, and n2. Both are greater than 1, but less than 100.

Mr. Product knows the product of the two numbers. Mr. Sum knows the sum of the two numbers.

They have a conversation:

Mr P: I know the product of n1 and n2, but I don't know either number.
Mr S: I know their sum, and I knew you did not know either n1 or n2.
Mr P: Interesting. Armed with that information, I now know the values of n1 and n2.
Mr S: Given what you have just said, I also now know the values of n1 and n2.

[I need not add that both gentlemen are math whizzes and impeccable logicians.]

The two men found the values of the two numbers during their short conversation. Can you?

Clock

@BigDogg

4 and 13?

Clock

@blood-on-the-tracks said
@BigDogg

4 and 13?
Yes sir.

Clock
Vote Up
Vote Down

@bigdogg said
Yes sir.
Care to explain?

Clock

@venda said
Care to explain?
Mr P: I know the product of n1 and n2, but I don't know either number.
This means n1 and n2 are not both prime.

Mr S: I know their sum, and I knew you did not know either n1 or n2.
There is no combination of prime + prime that makes the sum.

Mr P: Interesting. Armed with that information, I now know the values of n1 and n2.
Considering all possible n1 and n2 that make the product, only one of the sums is 'acceptable' - where 'acceptable' means 'not reachable by prime + prime'.

Mr S: Given what you have just said, I also now know the values of n1 and n2.
Mr S considers all possible combinations of n1 and n2 that make the sum.
He then makes products out of them.
Then he puts himself in Mr P's shoes and tries all combination of n1 and n2 that make the product.
And if exactly one possible product makes exactly one acceptable sum, then he can logically deduce both n1 and n2.

As far as I know, there is no elegant way to solve the problem. One must use a spreadsheet or write a program.

For further attempts at explanation, see the original thread from 17 years ago.

https://www.redhotpawn.com/forum/posers-and-puzzles/another-magic-of-logic.17714

Clock

Clock

-Removed-
As he says there is no elegant way to solve the problem it must be trial and error.
I believe public key cryptography is a similar thing and the same principals apply to bitcoin, but obviously a lot more complex in that case.
As an aside, I read a while ago that 50% of the output of the national grid is taken up by bitcoin algorithms.
Surely it can't be that much can it?
If it is true, I think I may have a partial solution to the countries energy problems.
Make crypto currencies illegal !!

Clock
Vote Up
Vote Down

@BigDogg

While Immanuel Kant asked how it is possible that we do know, the present puzzle makes use of the question of how it is possible that the other one does not know.

Clock
1 edit

@divegeester

I could answer that, but surely that would mean that I have something interesting to say,which you have, on several occasions, opined is not the case.

Almost a 'magic of logic' to decline your demand, wouldn't you say?

I suggest you reread Dogg's perfectly 'logical' explanation above

Clock
Vote Up
Vote Down

@bigdogg said

And if exactly one possible product makes exactly one acceptable sum, then he can logically deduce both n1 and n2.
Can you explain this part?

Clock
Vote Up
Vote Down

Clock
Vote Up
Vote Down

Clock
Vote Up
Vote Down

@damionhonegan said
Can you explain this part?
Maybe an example will help.

If sum = 11,

The product could be 2*9=18, or 3*8=24, or 4*7=28, etc.

Possible n1, n2 for a product of 18 are 2*9 and 3*6. Making sums with the same two numbers: 11 is acceptable, while 18 is not.

Using the method above, a product of 24 leads back to sums of 10, 11, and 14. Only 11 is acceptable.

This is a problem, because from sum's perspective, there are two possible products, and thus he cannot deduce the values of n1 and n2.

Cookies help us deliver our Services. By using our Services or clicking I agree, you agree to our use of cookies. Learn More.