# Determine the number $r$ from the statements

Alice and Bob are perfectly logical and super intellegent. Their professor decides to play a game with them, and he tells them: "I have chosen two numbers (integers) $x$ and $y$ with $2\le y \le x\le 100$. I will tell Alice the value of their difference $d=x-y$ and Bob the value of their ratio $r=x/y$. I stress that the ratio $r$ is an integer, too."

After the professor has told the difference to Alice and the ratio to Bob, the following exchange occurs:

1. Alice: I don't know the numbers.
2. Alice: You might though. Do you know them?
3. Bob: No, I don't know them.
4. Alice: Too bad, if you did I would know them too.
5. Alice: I still don't know them though.
6. Bob: Me neither.
7. Alice: Oh really? Then I do.
8. Bob : Dang it; I still don't.

What is the value of $r$?
What are the possible values for $x$ and $y$?

• I wanted to include a question on here like this that works well as I like these types of question and more recent ones did not fair well. This is an original puzzle. Please let me know if you have any questions (especially on wording) and I will clarify as best I can. Oh and the $2-100$ is inclusive. – kaine Feb 25 '15 at 18:17
• I would appreciate a reason for the downvote... not for the rep but i think i need this question to work well so these become better received. I need to know where i made a mistake if i did. – kaine Feb 25 '15 at 20:06
• Are x and y (and thus also d) integers? Since "numbers" can refer to both real and natural numbers. – fibonatic Feb 25 '15 at 23:08
• @fibonatic yes, these are all real integers. There is no "trick" in this question. – kaine Feb 25 '15 at 23:15
• @Thirler This is not a constraint but you can determine from the question that they are greater or equal to 0 and 1 for d and r respectively, Both x and y are positive so r is too and for r to be an integer $y\le x$ so $0 \le d$. – kaine Feb 26 '15 at 11:46

This is how I reasoned:
There are 382 sets with 2 ≤y≤x≤100 where x/y is an integer.

Statement 1 says Alice doesn't know the numbers.
This means that we can eliminate all sets that have a difference d that only appears once.
357 remain.

Statements 2 & 3 say that Bob doesn't know them,
so we can eliminate sets that have a ratio r that only appears once.

Statement 4 however says, if it had been one of those sets, then Alice would know the numbers, because in all those sets, y=2.
So d must be one of the d's that appeared in one of the sets just eliminated.
Only 49 other sets have one of those d's.

5: Alice still doesn't know the numbers, so we can again eliminate sets with a unique d.
46 remain.

6: Bob still doesn't know, so we can eliminate sets with a unique r.
34 remain.

7: Now, suddenly Alice knows the numbers, so d must be unique among the remaining sets.
Only 4 sets remain:
{x=85, y=17, r=5, d=68}
{x=95, y=19, r=5, d=76}
{x=91, y=13, r=7, d=78}
{x=100, y=4, r=25, d=96}

8: Bob still doesn't know x and y, so r is still not unique.
Only 2 sets remain:
{x=85, y=17, r=5, d=68}
{x=95, y=19, r=5, d=76}
So r is 5 and x,y is either 85,17 or 95,19. Alice knows, but we don't.

• correct, the explanation is very easy to follow, and you get (for all the numbers I've recorded) the same numbers as I get the whole way through. – kaine Feb 26 '15 at 15:45
• The more I think about it the more I believe that the solution is any of the 4 solutions in step 7. I believe it is totally irrelevant whether r is unique is in those 4. Step 8 only tells us that step 7 has more than than 1 result. If the correct solution was for example {x=91, y=13, r=7, d=78} the conversation was exactly the same I believe because then there also in step 8 it was unknown for Bob what the answer was. – Ivo Beckers Feb 28 '15 at 21:46
• Lets pretend we have a 4th person named Carla who knew nothing but followed along the explanation until the end of step 7. She then knew the options were one of the 4 listed. If bob told her r then and it was 7 or 25, she would know the rest. If he told he 5 she wouldnt know. Bob cant know less than her. This thought experiment is in favor of this answer. I think it follows.....that being said bovs answers would be the same if he was just an idiot – kaine Feb 28 '15 at 23:05
• @IvoBeckers Bob knows r. If r was 7, there would be only one possible set, so he would know x and y too. He would have said so in step 8. He says he still doesn't know the numbers, so there must be more than one possibility for r, hence r = 5. I don't see how it would be any different. – Dennis_E Mar 3 '15 at 9:29
• Now I understand – Ivo Beckers Mar 3 '15 at 9:31

The values are:

r = 5, d = 76 or 68, so x,y = 95,19 or 85,17

Reasoning:

Step 1 tells us there must be multiple solutions for d. This rules out large primes such as d=89, and also numbers like d=91 (which must have x,y=98,7 and r=14).
Step 3 tells us that r <= 32, because otherwise the only possible value for y would be 2 and Bob would know the solution.
Step 4 tells us that r could have been >= 33, otherwise Alice would not have had a solution if it was. So d must be >= 66.
Step 5 further limits the solutions. Suppose by way of example, that d = 92. Then x,y,r must be 94,2,47 or 96,4,24. If d were 92, Alice would now know the answer because r < 33, but she does not. We can eliminate all solutions with r >= 33.
Step 6 eliminates more solutions: for example d=84 could mean x,y,r = 84,4,22, and this is the only solution with r=22 and d >= 66. Since Bob still doesn't know the answer, it can't be 84, and r can't be 22.
Step 7 means that the solution must be a d value where only one of its possible solutions shares an r-value with another d-value. The only way to find these is to write them all down, and they are d,r=96,25; 92,24; 76,5; 68,5.
Step 8 means that the solutions must share r values, or Bob would know which one to choose, so r=5 and d=76 or 68.

• Your reasoning isn't exactly the same as mine but you received the correct answer. I get that $d=92$ is eliminated at step 5 and I don't eliminate $r=7$ until step 8. I will give it more time than accept. – kaine Feb 26 '15 at 14:35

first I list all possible solutions that satisfy 2 <= y < x <= 100 where y is a divisor of x

x   y   d   r
100 50  50  2
98  49  49  2
96  48  48  2
94  47  47  2
92  46  46  2
90  45  45  2
88  44  44  2
86  43  43  2
84  42  42  2
82  41  41  2
80  40  40  2
78  39  39  2
76  38  38  2
74  37  37  2
72  36  36  2
70  35  35  2
68  34  34  2
99  33  66  3
66  33  33  2
96  32  64  3
64  32  32  2
93  31  62  3
62  31  31  2
90  30  60  3
60  30  30  2
87  29  58  3
58  29  29  2
84  28  56  3
56  28  28  2
81  27  54  3
54  27  27  2
78  26  52  3
52  26  26  2
100 25  75  4
75  25  50  3
50  25  25  2
96  24  72  4
72  24  48  3
48  24  24  2
92  23  69  4
69  23  46  3
46  23  23  2
88  22  66  4
66  22  44  3
44  22  22  2
84  21  63  4
63  21  42  3
42  21  21  2
100 20  80  5
80  20  60  4
60  20  40  3
40  20  20  2
95  19  76  5
76  19  57  4
57  19  38  3
38  19  19  2
90  18  72  5
72  18  54  4
54  18  36  3
36  18  18  2
85  17  68  5
68  17  51  4
51  17  34  3
34  17  17  2
96  16  80  6
80  16  64  5
64  16  48  4
48  16  32  3
32  16  16  2
90  15  75  6
75  15  60  5
60  15  45  4
45  15  30  3
30  15  15  2
98  14  84  7
84  14  70  6
70  14  56  5
56  14  42  4
42  14  28  3
28  14  14  2
91  13  78  7
78  13  65  6
65  13  52  5
52  13  39  4
39  13  26  3
26  13  13  2
96  12  84  8
84  12  72  7
72  12  60  6
60  12  48  5
48  12  36  4
36  12  24  3
24  12  12  2
99  11  88  9
88  11  77  8
77  11  66  7
66  11  55  6
55  11  44  5
44  11  33  4
33  11  22  3
22  11  11  2
100 10  90  10
90  10  80  9
80  10  70  8
70  10  60  7
60  10  50  6
50  10  40  5
40  10  30  4
30  10  20  3
20  10  10  2
99  9   90  11
90  9   81  10
81  9   72  9
72  9   63  8
63  9   54  7
54  9   45  6
45  9   36  5
36  9   27  4
27  9   18  3
18  9   9   2
96  8   88  12
88  8   80  11
80  8   72  10
72  8   64  9
64  8   56  8
56  8   48  7
48  8   40  6
40  8   32  5
32  8   24  4
24  8   16  3
16  8   8   2
98  7   91  14
91  7   84  13
84  7   77  12
77  7   70  11
70  7   63  10
63  7   56  9
56  7   49  8
49  7   42  7
42  7   35  6
35  7   28  5
28  7   21  4
21  7   14  3
14  7   7   2
96  6   90  16
90  6   84  15
84  6   78  14
78  6   72  13
72  6   66  12
66  6   60  11
60  6   54  10
54  6   48  9
48  6   42  8
42  6   36  7
36  6   30  6
30  6   24  5
24  6   18  4
18  6   12  3
12  6   6   2
100 5   95  20
95  5   90  19
90  5   85  18
85  5   80  17
80  5   75  16
75  5   70  15
70  5   65  14
65  5   60  13
60  5   55  12
55  5   50  11
50  5   45  10
45  5   40  9
40  5   35  8
35  5   30  7
30  5   25  6
25  5   20  5
20  5   15  4
15  5   10  3
10  5   5   2
100 4   96  25
96  4   92  24
92  4   88  23
88  4   84  22
84  4   80  21
80  4   76  20
76  4   72  19
72  4   68  18
68  4   64  17
64  4   60  16
60  4   56  15
56  4   52  14
52  4   48  13
48  4   44  12
44  4   40  11
40  4   36  10
36  4   32  9
32  4   28  8
28  4   24  7
24  4   20  6
20  4   16  5
16  4   12  4
12  4   8   3
8   4   4   2
99  3   96  33
96  3   93  32
93  3   90  31
90  3   87  30
87  3   84  29
84  3   81  28
81  3   78  27
78  3   75  26
75  3   72  25
72  3   69  24
69  3   66  23
66  3   63  22
63  3   60  21
60  3   57  20
57  3   54  19
54  3   51  18
51  3   48  17
48  3   45  16
45  3   42  15
42  3   39  14
39  3   36  13
36  3   33  12
33  3   30  11
30  3   27  10
27  3   24  9
24  3   21  8
21  3   18  7
18  3   15  6
15  3   12  5
12  3   9   4
9   3   6   3
6   3   3   2
100 2   98  50
98  2   96  49
96  2   94  48
94  2   92  47
92  2   90  46
90  2   88  45
88  2   86  44
86  2   84  43
84  2   82  42
82  2   80  41
80  2   78  40
78  2   76  39
76  2   74  38
74  2   72  37
72  2   70  36
70  2   68  35
68  2   66  34
66  2   64  33
64  2   62  32
62  2   60  31
60  2   58  30
58  2   56  29
56  2   54  28
54  2   52  27
52  2   50  26
50  2   48  25
48  2   46  24
46  2   44  23
44  2   42  22
42  2   40  21
40  2   38  20
38  2   36  19
36  2   34  18
34  2   32  17
32  2   30  16
30  2   28  15
28  2   26  14
26  2   24  13
24  2   22  12
22  2   20  11
20  2   18  10
18  2   16  9
16  2   14  8
14  2   12  7
12  2   10  6
10  2   8   5
8   2   6   4
6   2   4   3
4   2   2   2


Now I list all solutions that can be removed after step 1 because there is only a single entry with that specific d

x   y   d   r
100 2   98  50
100 5   95  20
96  2   94  48
96  3   93  32
98  7   91  14
90  3   87  30
88  2   86  44
90  5   85  18
84  2   82  42
76  2   74  38
94  47  47  2
86  43  43  2
82  41  41  2
74  37  37  2
62  31  31  2
58  29  29  2
46  23  23  2
38  19  19  2
34  17  17  2
26  13  13  2
22  11  11  2
14  7   7   2
10  5   5   2
6   3   3   2
4   2   2   2


Now I list all solutions that can be removed after step 3 because there is only a single entry with that specific r

x   y   d   r
98  2   96  49
94  2   92  47
92  2   90  46
90  2   88  45
86  2   84  43
82  2   80  41
80  2   78  40
78  2   76  39
74  2   72  37
72  2   70  36
70  2   68  35
68  2   66  34
64  2   62  32
60  2   58  30


Now I list all solutions after step 6 because there is only a single entry with that specific d

x   y   d   r
96  4   92  24
93  31  62  3
87  29  58  3


I guess I made a mistake somewhere since I have 2 different r values in there but I assume that the correct ones would be with r=3 because there are two of those

• Good attempt. Please note that at line 2, Alice thinks Bob might know what x and y are. This means that her value of $d$ corresponds with at least one value of $r$ which is unique. A unique value for $r$ would tell Bob what the solutions are and Alice thinks that is possible. – kaine Feb 26 '15 at 14:41
• @kaine aargh.. I missed that. I don't bother spending more time on this since Callidus has the right answer. nice puzzle though! – Ivo Beckers Feb 26 '15 at 14:51

EDIT: This answer is wrong but is kept in case someone thinks the same!

I think this question is flawed. This is my thought process:

From statement 1 we only know that $d$ is not $98$ with $x = 100$ and $y = 2$ because that is the only $d$ that has one solution.

Now we need to find what are the possible values of $r$ which only has one solution. This is only the case when $r > 33$ and $r < 50$ because if $r <= 33$ then there are at least two solutions taking $y = 2$ or $y = 3$ because $3 * 34 > 100$.

So $r <= 33$ according to statement 3.

Statement 4 is true but doesn't make sense to say. This statement is something that Bob also knew because if Bob knows the solution in statement 3 than $y$ is always $2$ and $x = d + 2$. And he knows how Alice thinks.

Statement 5 also has no added value because it follows from statement 4.

Statement 6 is also logically true because no information is gained since statement 3

Statement 7 can't possibly be true then

• Your third sentence is wrong. Please note that if (for example) $d=74$ then $(y+74)/y=r=1+74/y$. As $74$ is only divisible by 2 and 37, and $(74+37)> 100$ then $y=2$ and $x=76$. – kaine Feb 26 '15 at 11:11
• hmmm.. i see. You are right, there are more conclusions to be made from statement 1. Should I delete my answer? – Ivo Beckers Feb 26 '15 at 11:15
• This flawed answer could prevent others from going down the same path. It is up to you. – kaine Feb 26 '15 at 11:16
• ok. i keep it here but I will edit at the top that it is wrong – Ivo Beckers Feb 26 '15 at 11:17