Jump to content
Urch Forums

parseljc

Members
  • Posts

    2
  • Joined

Converted

  • My Tests
    No

parseljc's Achievements

Newbie

Newbie (1/14)

1

Reputation

  1. rbode got it right. this riddle is not solved by whipping up a quick formula. It requires brute force. First, create a list of all your Possible pairs and write them out with their sums and products as well. I believe there are (97*97 + 97)/2 = 4753 such pairs, right? (I am ignoring the "sum 2,2,4,4 2,3,5,6 2,4,6,8 2,5,7,10 2,6,8,12 ... 3,3,6,9 3,4,7,12 ... 4,4,8,16 4,5,9,20 ... etc. Step 1) We know it is not a pair of primes, or Mr. P would know them immediately from the product. So eliminate all those from the possibilities, but keep them in a new list of "Prime Pairs" for future reference. Step 2) We know it is not a pair whose sum could also come from a pair of primes, or S would not be sure that P doesn't know. So check the list of Prime Pairs and get a listing of all the sums. Now eliminate any pairs in the Possibilities that have a sum in that list. So here for example, you lose 3,4 because it has the same sum as the prime pair 2,5. Step 3) Now, we know that with this information and knowing the product, Mr. P knows the answer, so therefore the product must only have one pair of possible multiplicants whereby their sum can not be expressed as the sum of a pair of primes. So find the list of products that were eliminated in Step 2. Now find all the remaining Possibilities that share one of those same products and only have one pair left that makes that product. These are the only products Mr. P could have. Step 4) If there is more than one possibility left, your last step is to go through all the Possibilities eliminated in Step 3, and check their sums. Now find all the remaining Possibilities that share one of those same sums and only have one pair left that makes that sum. These are the only sums Mrs. S could have. Hopefully at this point you are left with only 1 possible pair, and that is your solution. (4,13) Math Forum Discussions Wish I could find that Matlab code... PS - I just realized that since you have an upper bound, there are other certain Products of non-Prime-Pairs that can be eliminated as possibilities because there is no other way to factor them with the given constraints. So they can be considered "Pseudo-Prime Pairs" for the purposes of this problem. For example, (95, 97) would give S=192 and P=9215 and there is only one way to factor this with two numbers between 1 and 99, so P would know right away. In fact, this might make a drastic cut in the possibilities left after Step 1, giving you approximately the same benefit of the "sum
  2. I think the riddle is stated wrong. There is no need to tell us that the sum is less than 99, even if it is. Giving away too much info! Plus, I think it goes like this: Mr. P: "I don't know the numbers." Mrs. S: "Hmmm, I don't either." Mr. P: "Now I know the numbers." Mrs. S: "Oh, now I know them, too!" Update: I was wrong, the one I heard went like this: Mr. P: "I don't know the numbers." Mrs. S: "I already knew you couldn't know them." Mr. P: "Now I know the numbers." Mrs. S: "Oh, now I know them, too!" Which is basically the same as what the one here posted. But telling us the sum is less than 99 is definitely an unnecessary hint.
×
×
  • Create New...