1. Standard memberBigDogg
    Secret RHP coder
    on the payroll
    Joined
    26 Nov '04
    Moves
    155080
    12 Oct '21 04:40
    [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?
  2. Joined
    11 Nov '14
    Moves
    34223
    14 Oct '21 23:14
    @BigDogg

    4 and 13?
  3. Standard memberBigDogg
    Secret RHP coder
    on the payroll
    Joined
    26 Nov '04
    Moves
    155080
    14 Oct '21 23:48
    @blood-on-the-tracks said
    @BigDogg

    4 and 13?
    Yes sir.
  4. Subscribervenda
    Dave
    S.Yorks.England
    Joined
    18 Apr '10
    Moves
    83457
    16 Oct '21 09:04
    @bigdogg said
    Yes sir.
    Care to explain?
  5. Standard memberBigDogg
    Secret RHP coder
    on the payroll
    Joined
    26 Nov '04
    Moves
    155080
    16 Oct '21 17:33
    @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
  6. Joined
    16 Feb '08
    Moves
    116436
    17 Oct '21 08:30
    @blood-on-the-tracks said
    @BigDogg

    4 and 13?
    How did you get to those two specific numbers?
  7. Subscribervenda
    Dave
    S.Yorks.England
    Joined
    18 Apr '10
    Moves
    83457
    17 Oct '21 09:00
    @divegeester said
    How did you get to those two specific numbers?
    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 !!
  8. Tallinn
    Joined
    08 Oct '21
    Moves
    2518
    17 Oct '21 12:07
    @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.
  9. Joined
    11 Nov '14
    Moves
    34223
    17 Oct '21 21:161 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
  10. Joined
    08 Dec '06
    Moves
    28383
    18 Oct '21 16:45
    @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?
  11. Joined
    16 Feb '08
    Moves
    116436
    19 Oct '21 01:53
    @blood-on-the-tracks said
    @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
    Right.

    It’s a year old puzzle and you googled the solution.
  12. Joined
    16 Feb '08
    Moves
    116436
    19 Oct '21 01:53
    @damionhonegan said
    Can you explain this part?
    Ask blood on the tracks.

    Nicely though.
  13. Standard memberBigDogg
    Secret RHP coder
    on the payroll
    Joined
    26 Nov '04
    Moves
    155080
    20 Oct '21 17:35
    @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.
Back to Top

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