# Alice knows a+b, Bob knows a×b. Can we find (a,b)?

There are two distinct positive integers $$a,b$$ (i.e. $$a\neq b$$) such that $$a < 7$$ and $$b < 7$$.

Alice has been told the sum of $$a$$ and $$b$$. Bob has been told the product of $$a$$ and $$b$$.

Both Alice and Bob are aware of all the information mentioned above.

This is their conversation:

Alice says, "I am not sure if you know the sum that I have been told."

Bob says, "Actually, even before you spoke, I knew the sum that was told to you."

What are the possible values of $$a$$ and $$b$$ ?

Inspired by a Ted-ed video that I saw.

• I think one can go one small step further. Alice and Bob now know the exact values of $a$ and $b$. Soppose it was Ximena who had told sum and product of the (different) values $a$ and $b$ to Alice and Bob respectively. She tells the entire story to You (say: you are Yves or Yvette) and adds: if You would know the value of the difference between $a$ and $b$,I am sure you would know the unique values for $a$ and $b$. What are these values? Aug 27 at 13:02
• @OP we can assume Alice and Bob reason perfectly, right? So Alice could as well have said "I don't know if you know the sum that I have been told.". Right? Or am I missing something? Aug 28 at 0:29
• @OP would you mind, for reference, provide Ted-ed video URL Aug 28 at 22:31
• @FirstNameLastName , this is the ted ed puzzle. youtu.be/iNgJCYPdmdQ?si=zf3JXBDr8cyxBA_X the statement, " I don't know if you know the sum that I have been told." is the same as the statement, "I am not sure if you know the sum that I have been told." Aug 29 at 8:21

I believe the solution is

that the possible values of $$(a,b)$$ are $$(1,4), (2,5), (3,5)$$ (or swapping their orders).

First, we narrow down the solution space by observing that after Alice's statement

the only possible sums are $$5, 7$$ or $$8$$.

Then among these candidates, only the above solutions satisfy Bob's statement.

Detailed method

The following tables lists sums and the possible products corresponding to each sum. The starred products indicate that they appear in more than one row.


sum=3: 2
sum=4: 3
sum=5: 4, 6*
sum=6: 5, 8
sum=7: 6*, 10, 12*
sum=8: 12*, 15
sum=9: 18, 20
sum=10: 24
sum=11: 30


We see that the only rows with a mixture of starred and nonstarred products are 5, 7, 8, which Alice observes. Within these rows, if Bob observes a non-starred product, then he may logically make his statement.