Donate SIGN UP

A Variation On The "when Is Cheryl's Birthday?" Problem

Avatar Image
jim360 | 17:54 Wed 15th Apr 2015 | Science
43 Answers
I was just given this nasty-sounding variation on the birthday problem that's been bugging the internet for the last few days. It goes like this:

Person A chooses a pair of numbers between and including 2 and 99, and finds their sum (S) and Product (P). He then tells one person only the product f the two numbers, and nothing else, and the other person is only toldtheir sum.

Person P says: I do not know what the two numbers are.
Person S says: I already knew that.
Person P says: Oh, then I know what the two numbers are now.
Person S says: Then so do I, now.

What are the two numbers?
Gravatar

Answers

21 to 40 of 43rss feed

First Previous 1 2 3 Next Last

Best Answer

No best answer has yet been selected by jim360. Once a best answer has been selected, it will be shown here.

For more on marking an answer as the "Best Answer", please visit our FAQ.
Why are there not 9,604 possible pairings then?

2,2 to 2,98… 99,2 to 99,99 (98 sets of 98)

I only got as far as working out that S, by knowing that the sum is more or less than a particular value, would be empowered to eliminate one side of an ambiguity and so on. His answer then helps P's conclusion to gel.

Question Author
Order doesn't matter, Hypo, so 2,99 and 99,2 are the same pair. Their produce is 198, their sum is 101, and so they're identical pairs. Hence you need to (almost) half that total to find the full possible parameter space -- and then a few steps in logic help to squeeze that down rapidly to a mere handful.

This is driving me nuts. Each time I think I make progress I seem to loop back and feel I've not achieved anything at all. I may leave it for a while as it's making me feel stupid at the moment.
O_G I realised most of what jim pointed out about six seconds after pressing the 'submit' button, so I feel stupider.

It's the old Permutations versus combinations thing.

I similarly missed the significance of primes and had only got as far as the realisation that

odd + odd = even
even + even = even
even + odd = odd

So some S lead to ambiguity

odd x odd = odd
odd x even = even
even x even = even

So some P lead to ambiguity.

This should help narrow down possibilities for O_G

Oh yes, I was looking at this one yesterday wasn't I.

Thoughts based on hypos comments:

Primes tend to be odd. If the answer were 2 primes then the sum would (probably) be even.
If S knew that P didn’t know the numbers can I take this to mean that the sum was odd ? And that we are looking for one odd and one even number ? Or am I assuming too much ? It seems a lot to check for sure.

*IF* that is true (and I’m unsure how to check) then that implies a probable prime and even number is involved.

I may look at this for a short while longer then.
Question Author
"Primes tend to be odd. If the answer were 2 primes then the sum would (probably) be even. "

Indeed! This is known as Goldbach's Conjecture, and while still unproven for all even numbers, it's been tested for all small ones (up to something like 10^100 or more). If the sum is even, then there is a chance that the two numbers were both prime. Hence the sum has to be odd -- and, as established earlier, this means that the two numbers must include one prime number and one even number.

You can go a bit further still, as additionally all odd numbers that are 2 more than prime numbers (eg 5 = 3+2, 13=11+2, 25=23+2 etc) could also be made from a sum of two primes. This means that the sum is not only odd but also from the restricted set {11, 17, 23, 27, 29, 35, 37, 41, 47...}.

The next question to try and answer would be: how large can the sum be? This question is answerable by considering how large the prime number can be.
The number two?
The largest prime is 97. The largest non-prime is 98. I think my table wasn't larger than that already :-) 9506 then. I'm needing to get on with something else at the moment but I'll read your post in detail a little later.
If the sum is even, then there is a chance that the two numbers were both prime. And so by definition, presumably, there is a chance that they were not ? Or is that really ‘for sure’ there has to be a pair of prime factors ?

I’m not presently comfortable one can go in the reverse direction like that, a *chance* both prime, therefore *must *include one prime and one even. Willing to accept it for now, but I’m not feeling it’s obvious.

Ah the +2 stuff is interesting. We have switched from looking at what the products tell us to what the sums tell us then. Believing it isn’t 2 primes, let's see what we can eliminate from the sum table.

So we are saying if we can sum 2 primes to get a value, then without checking if there is another way to get to the same value we can eliminate it anyway ? I have to say I’m beginning to feel as I used to at the start of the college year; where everything is unclear and one needs to go down the pub and revisit it later in the term. Usually “pennies dropped” a week before the exam, months later :-)
Question Author
The reason it's OK is because Sum person can only know that Product person doesn't know if he knows that there is no chance that there was a unique solution to factorising his product. This is only possible if the numbers are prime (or large enough to give no chance for ambiguity, eg choosing 97 and 99 to start with gives a product of 9603, which admits a few different factorisations but only one where both numbers are less than 100). Hence if there is any chance that the two numbers could be both prime, Sum person can say nothing. It follows that he can only say what he says if there is no chance that the two numbers were prime, ie if the sum is even or is 2 more than a prime.

This leaves us with the possible sums I have given below, and a continuation of the list to larger numbers.

To reduce the options still further, you could note that if the prime number is 53 or larger, then it would stick out like a sore thumb -- e.g 53*12 = 636 obviously has several possible pairs of factors, but only if 53 appears on its own will the two numbers be below 100. As a result, the prime factor must be odd and less than 50. And, in turn, for sum guy to now this, his own sum has to be less than 55 -- because 53+2 = 55 would again mean that there was some chance that Product guy could have known.

So that gives us finally a set of possible sums from {11, 17, 23, 27, 29, 35, 37, 41, 47, 51, 53} -- nothing else would allow Sum guy to know anything about what product guy knew or didn't know -- and possible answers of primes less than 50 along with an even number to make up the sum. I think this limits the parameter space to:

3, 8; 4, 7; 5, 6 (prime + even = 11)
3, 14; 4, 13; 5, 12; 6, 11; 7, 10 (prime + even = 17)

etc. To cut down the options still further is a bit tricky, and requires us to try and find some way of constraining the even numbers.


//Person A chooses a pair of numbers between and including 2 and 99, and finds their sum (S) and Product (P). He then tells one person only the product of the two numbers, and nothing else, and the other person is only told their sum.

Person P says: I do not know what the two numbers are.
Person S says: I already knew that.
Person P says: Oh, then I know what the two numbers are now.
Person S says: Then so do I, now.

What are the two numbers?//

Doesn’t this imply that both P and S are aware that there is but one unique set of two numbers 2-99 whose values can be shown to relate to only one specific product under the condition that their sum also relates to more than one set of values?
Question Author
If you mean that P and S are good at arithmetic, then yes it probably does imply that. On the other hand we can safely assume that they'd not encountered this problem before.
So there is one set of numbers within the specified range whose product is unique but whose sum is not?
Question Author
I'm not sure I understand what you're getting at.
Some products are unique to 2 specific values within the specified range (2-99) whereas only one of these particular pairs of values does not have a sum unique to only those two values.
Well for starters, contrary to the premise posed, in addition to having been provided with the product of two numbers, P must also have been inform that the product he has been given is that of two unspecified whole number factors within the specified range (2-99). Likewise S must also have been informed that the sum he's been given is that of two whole numbers within the specified range (2-99). And P and S must both know that each other has been informed of those essential facts, and that their purpose is to derive the two numbers in question through deduction without directly stating the values each has been given to each other from which those values could be more easily be ascertained.
I think a grammatical problem precedes the matematical one. When person S says 'i already knew that' does he mean that he knew that person P didn't know the 2 numbers or that he already knew the 2 numbers? The other point that is not clear is whether or not the two numbers can be the same.,.
Question Author
I was going for too much brevity, it seems.

the People P and S are given the information necessary to know what is going on -- in that the number they are given is the product/ sum of two numbers between and including 2 and 99, and that the other person has been given the sum/ product of the same two numbers. They are then invited to speak, in turn.

The numbers may well be the same. However, it can be deduced that they are not, from the chain of reason that runs: the numbers cannot be both primes; S knew this and therefore the sum cannot be even; hence the numbers cannot be the same -- for, if they were, the sum would be twice that number and 2*anything is always even. Ergo, they are different.

When Person S first speaks and says "I already knew that", he has made a logical deduction based on the properties of the sum he has been given.

I hope this clarifies things.
I still don't understand the insistence on the involvement of primes (your explanations seemed to 'leap' to primes with no intermediate step. What, specifically discards the numbers which are odd but divisible by things
other than 1?

Back onto the problem itself: S knows, from the outset, that P's product has ambiguous factors. Would I be right in concluding that this neccesitates the product being above a certain threshold and thus eliminates number pairs where both numbers are small?

Or, phrasing it the other way around, at what level does the product begin to have ambiguous factors? (But it has to be in such a way that S can also deduce this).
Question Author
The point is that the only unambiguous factors are prime numbers -- thus, if the two numbers are 13 and 17, then the product is 221 which can only be refactorised as 13*17 again -- no other way to do it. This is true for all other pairs of exclusively prime numbers, with the conclusion that if the product can be factorised into two prime numbers then person P would know this and so know the two numbers straightaway.

Hence, the two numbers are not both prime.

21 to 40 of 43rss feed

First Previous 1 2 3 Next Last

Do you know the answer?

A Variation On The "when Is Cheryl's Birthday?" Problem

Answer Question >>

Related Questions

Sorry, we can't find any related questions. Try using the search bar at the top of the page to search for some keywords, or choose a topic and submit your own question.