25
$\begingroup$

Carol is playing a game with Alice and Bob. She secretly chooses two integers between 1 and 10 and gives the sum to Alice and the product to Bob. After some time, the following discussion occurs:

Alice: You can't know my sum.
Bob: Thanks to you, I know your sum.
Alice: Then, I know your product.

Can you guess the two starting integers?

Source: Strongly inspired by diophante.fr
If you liked this one, make sure to check I don't know the two numbers... but now I do, Product and Sum and Sum, Product and Difference too. Enjoy!

$\endgroup$
  • 2
    $\begingroup$ Is it between 1 and 10 inclusive or exclusive? $\endgroup$ – Keelhaul Apr 13 '18 at 14:20
  • 5
    $\begingroup$ obligatory xkcd reference $\endgroup$ – Kepotx Apr 13 '18 at 14:26
  • $\begingroup$ This is inclusive! $\endgroup$ – Untitpoi Apr 13 '18 at 15:01
  • $\begingroup$ Did you come up with this? If so, fantastic job! You got the size of the search space just right so that it tricky but not tedious to find the solution. This is a gem of a sum/product puzzle. $\endgroup$ – Mike Earnest Apr 13 '18 at 20:20
  • $\begingroup$ Well thanks, the website was proposing A 1 to 40. And i have seen 1 to 100 variant. But without computer those are too difficult... $\endgroup$ – Untitpoi Apr 13 '18 at 22:02
26
$\begingroup$

The numbers are

$1$ and $4$, the sum is $5$, and the product is $4$.

Alice: You can't know my sum.

Alice knows that Bob cannot know the sum, because the possibilities of the numbers as far as Alice knows are $\{1,4\}$ and $\{2,3\}$. If the numbers are $1,4$, then Bob cannot know whether the numbers are $\{1,4\}$ or $\{2,2\}$, which give different sums. If the numbers are $2,3$, then Bob cannot know whether the numbers are $\{1,6\}$ or $\{2,3\}$, giving different sums. So in either case, Alice knows that Bob cannot know the sum.

Bob: Thanks to you, I know your sum.

Now Bob, knowing the product is $4$, knows the sum is either $1+4=5$ or $2+2=4$. But if the sum was $4$, then it would have been possible from Alice's perspective for the numbers to be $1$ and $3$, in which case Bob would know the sum for sure. So now Bob knows that the sum is $5$.

Alice: Then I know your product.

Now Alice knows that the product could not have been $6$, because then Bob would've had two possible choices for the sum: $1+6=7$ or $2+3=5$. Note that he wouldn't be able to rule out the possibility of $7$ being the sum: If the sum was $7$, Alice still would've been able to conclude that Bob could not know the sum in the beginning. Therefore Alice knows the product can only be $4$.

EDIT: While I show the consistency of the two numbers with the provided statements, please see Mike Earnest's answer for a proof that this is the only possible pair of numbers consistent with the conversation.

$\endgroup$
14
$\begingroup$

Riley's answer proves that the numbers

1 and 4

are consistent with the conversation. I will prove that these are the only possible numbers.

After Alice's first statement,

We know the sum is either 5 or 7.

  • Her sum cannot be any number between 8 and 17. If she was given 7 + x, for any x between 1 and 10, then for all Alice knew the number could be 7 and x, in which case Bob could deduce the numbers (7x can only be factored into 7 and x while having both factors be 10 or less).
  • Similarly, her sum cannot be 18, 19 or 20, as then these could be written, 9 + 9, 9 + 10, and 10 + 10, and all of the products 9 • 9, 9 • 10 and 10 • 10 have unique factorizations.
  • Finally, the sums 2, 3, 4, and 6 are impossible because they could be 1 + 1, 1 + 2, 1 + 3 and 1 + 5, whose products are 1 or prime.

After Bob's statement:

The only possibilities for the numbers are (1,4), (1,6), (2,3), (2,5), and (3,4). The products are 4, 6, 6, 10, 12. If Bob had the product 6, then he could not distinguish between (1,6) and (2,3), so Bob must have 4, 10 or 12.

After Alice's second statement:

The possibilities have been narrowed down to (1,4), (2,5) and (3,4). The sums are 5, 7 and 7. Only 5 is unique, so the numbers must be 1 and 4.

$\endgroup$
  • $\begingroup$ Thanks for this, I was puzzling for a while if there were any other solutions. $\endgroup$ – RothX Apr 13 '18 at 16:33
  • $\begingroup$ OK, on the one hand, I agree that the sum must be $5$.  I don’t entirely understand how you reached that conclusion, but I believe that I can prove it. On the other hand, I don’t see why the numbers can’t be $2$ and $3$. Can you provide a clear argument why that’s impossible? $\endgroup$ – Peregrine Rook Apr 14 '18 at 5:07
  • $\begingroup$ @PeregrineRook If the numbers were 2 and 3, Bob could not make his deduction after just Alice's first statement. Bob sees just a number 6, so he knows the original numbers are either (1,6) or (2,3). So Bob knows Alice's number is either 1+6=7 or 2+3=5. Bob imagines Alice might have number 5: she knows that no matter whether the numbers were (1,4) or (2,3), either Bob has 1*4=4 and can't tell yet if the numbers are (1,4) or (2,2), or Bob has 2*3=6 and can't tell yet if the numbers are (1,6) or (2,3)... $\endgroup$ – aschepler Apr 14 '18 at 5:56
  • $\begingroup$ ... But Bob also imagines Alice might have number 7: she knows that no matter whether the numbers were (1,6), (2,5), or (3,4), Bob has either 6 or 10 or 12. Since 6=1*6=2*3, 10=1*10=2*5, and 12=2*6=3*4, this also seems possible to Bob. So Bob can't finish the puzzle at that point, and would have to say "I still don't know your sum" instead. $\endgroup$ – aschepler Apr 14 '18 at 5:58
  • $\begingroup$ D’oh!  I was thinking that, if Bob had 10, he would know that the numbers were 2 and 5.  Somehow I completely overlooked the possibility that they could also be 1 and 10.   Time for more coffee.  Or something.   Thanks for responding. $\endgroup$ – Peregrine Rook Apr 14 '18 at 6:06
2
$\begingroup$

Both answers are too complicated for me to understand. So I am going to use excel

![enter image description here

Basically there are numbers that Bob cannot have. Bob cannot possibly have numbers like 100. Because if Bob have numbers like 100, then Bob would know the 2 numbers are and hence the sum. We need numbers for Bob that are products of multiple numbers between 1 and 10.

We need numbers that show up more than 1 on the above tables. Those numbers are

4,6,8,9,10,12,16,18,20,24,30,36,40 . Let's call them ambiguous product number.

All other numbers show up once.

So that's 0th step. Bob didn't know the number.

That means possible numbers that Bob may have is

Bob

![enter image description here

![enter image description here

Alice numbers can be

![enter image description here

The first step is Alice knows that Bob didn't know. So Alice must have gotten a number where for all possible sum, Bob got product ambiguous numbers.

In other word, Alice got a number where all the diagonals are filled. Alice cannot possibly got 11 as a number. Because 11 can be 7+4. That means Bob may have 28 and 28 is not a product ambiguous number.

The only possibility is 5 and 7 (like what all other answers says)

So these are Alice possible numbers ![enter image description here

Bob possible numbers are ![enter image description here

Here number 6 shows up twice. So Bob's number can't be 6. We need numbers that show up only once. Basically Bob has a number where Alice's sum is obvious. So he needs a number that shows up once. That means Bob can have 4, 10, and 12

![enter image description here

So Bob number can be 4, 10, and 12. Alice says now he knows the product. So by saying so, Alice reveals that her number is such that the down left to right top diagonal contains only one number. So we need to pick a diagonal with only one number. That means 4 (1, 4).

If Bob's number is 10 or 12, Alice number would be 7. But that means Alice wouldn't know the sum.

I think the first step, figuring out Alice sum can be simplified.

Bob has a number and Alice knows that Bob doesn't know her sum.

Hence, Alice sum would be x, where for all x, there does not exist a and b where a+b=x 0

So we need x, where for all a and b, if a+b = x, a*b is an ambiguous product number.

This is what's difficult to understand.

x cannot be 2. if x is 2, then a and b can be (must be in this case), 1 and 1 and that have a unique number. x cannot be 3, because then a and b can be 1 and 2 (must be) x cannot be 4, because a and b can be 1 and 3.

x must be something where all the sum have ambiguous factorization. Only 5 and 7 satisfy this.

$\endgroup$
  • $\begingroup$ Next time, make sure you put >! before your text to make it spoiler $\endgroup$ – lolad Apr 14 '18 at 19:31
  • $\begingroup$ ? If you don't want spoiler you just solve it yourself I guess. It's hard enough for me to understand the answers even after 2 answers that I got to to do this. $\endgroup$ – user4951 Apr 15 '18 at 2:56
  • $\begingroup$ This answer is my way of trying to understand the 2 answers actually. Sorry. My IQ is not high enough to understand them. People with IQ as low as mine don't need spoiler tags. $\endgroup$ – user4951 Apr 15 '18 at 3:03
  • $\begingroup$ Spoiler tags hide pieces of information so that other people have a chance to figure out the answer themselves without loading the page. You do need spoiler tags. $\endgroup$ – lolad Apr 29 '18 at 18:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.