Hacker News new | ask | show | jobs
by bbstats 454 days ago
Could you explain "The sum of two of the numbers is equal to the third"??
3 comments

I think:

Call the three numbers a, b, and c. This means c = a + b, but we still don’t know to which person each number belongs.

When person 1 (p1) is asked what his number is, he has no way to know whether he has a, b, or c, so he says he doesn’t know. Same goes for p2 and p3. Clearly p1 somehow gains information by p2 and p3 passing. Either he realizes that he must be either a or b, and such his number is the difference between p2 and p3’s numbers, or he realizes that he must be c and so his number is the sum of p2 and p3’s numbers.

That’s all I have so far. Anyone have other ideas?

The answer is online and it's clever.

P1 knows that P2 and P3 are not equal. So they know that the set isn't [2A, A, A].

P2 knows that P1 and P3 are not equal. So they know that the set isn't [A, 2A, A]. They also know that if P1 doesn't know, then they were able to make the same deduction. So they now know that both [2A, A, A] and [A, 2A, A] aren't correct. Since they know that [2A, A, A] isn't correct, they can also know that [2A, 3A, A] isn't correct either. Because they'd be able to see if P1 = 2A and P3 = A, and if that were true and P1 doesn't know their number, it would have to be because P2 isn't A. And if P2 isn't A, they'd have to be 3A.

P3 knows that P1 and P2 aren't equal. Eliminates [A, A, 2A]. Knows that [2A, A, A], [A, 2A, A], and [2A, 3A, A], are eliminated. Using the same process as P2, they can eliminate [2A, A, 3A], [A, 2A, 3A], and also [2A, 3A, 5A]. Because they can see the numbers and they know if P1 is 2A and P2 is 3A.

Now we're back at P1. Who now knows.

So P2 and P3 are in the eliminated sets. Which means we're one of these

[2A, A, A]; [3A, 2A, A]; [4A, 3A, A]; [3A, A, 2A]; [4A, A, 3A]; [5A, 2A, 3A]; [8A, 3A, 5A]

We know his number is 65. To find the set, we can factor 65: (5 * 13). We can check the other numbers 2(13) = 26. 3(13) = 39. And technically, you don't need to find the other numbers. The final answer is 5A * 2A * 3A or (A^3) * 30.

"Which means we're one of these [2A, A, A]; [3A, 2A, A]; [4A, 3A, A]; [3A, A, 2A]; [4A, A, 3A]; [5A, 2A, 3A]; [8A, 3A, 5A]"

Why? Couldn't it be an infinite number of 3 size arrays comprised of A where two elements sum to the third? [24A, 13A, 11A]? How did we deduce this set of arrays?

EDIT: Solved from another reddit comment. Tuples without a common factor like the one above are considered as a=1.

"They're not eliminated; they correspond to a = 1."

I think that answer was poorly phrased because those possibilities are eliminated in a sense. There is a better answer further in the thread that explains "If the solution was not one of the flipped triplets, then the first player would not have worked out the solution." Thus if it was one of your other infinite triplets (eg. 65, 12, 53) then round 2 player 1 would've still answered 'I don't know'. Since they did respond with a definitive answer it had to be one of the formula solutions, since those were the only solutions they could prove. And since the only formula with a factor in 65 is 5 the correct formula must be [5A, 2A, 3A] and thus [65, 26, 39].

You should be able to generate an infinite number of these problems just by multiplying the first formula factor by a prime number. Like the same question but the person answers '52' restricts you to either [4a, 3a, a] or [4a, a, 3a]. Since the question only asks for the product of all the terms the answer is 4 * 13 + 3 * 13 + 13 = 104.

Look at it this way: Person 1 sees the numbers 26 and 39, and has to guess his own number. It must be one of only 2 possibilities: 13 or 65. All he has to do is eliminate one of those possibilities.
I think it has something to do with applying the lower bound of 1.

If p1 KNOWS that he’s the largest then he has to have gained some other piece of information. Say the numbers he sees are 32 and 33. His number would have to be either 1 or 65. If p1 was 1 then the other two would have known p1 couldn’t be the sum of the other two

But p2 and p3 don't yet know what they are themselves just because they see a 1:

If p2 sees 1 and 33, s/he would wonder if s/he is 32 or 34.

P3 would consider 31 or 33.

if the three numbers are a, b, and c, then either a+b=c, a+c=b, or b+c=a
And they must all be positive integers.

So A + B = C and A + C = B. But we know that A + B = C, so we can replace C with (A + B). So we know that A + A + B = B.

So 2A + B = B. Or 2A = 0.

And this holds any way you slice it.

Even if you were to try and brute force it.

A = 1

B = 2

Then C = 3. But A + C has to equal B. That's 1 + 3 = 2? That's not true.

I don't see a case where you can add to the sum of two numbers one of the numbers and get the other number.

I'm guessing that's a misreading of the problem. Because it looks like the third number is the sum of the first two.

One of the cases has to be true, not all 3. (as you show, they're mutually exclusive for positive integers) i.e. "either" is important in the parent comment.
Which is why I indicated that it would be a misreading of the problem.

The original problem is a little ambiguously worded. You could say "one of their numbers is the sum of the other two" and it would be a little clearer.

> The original problem is a little ambiguously worded.

No it isn't. If it said "the sum of any two of the numbers is equal to the third", that would be a contradiction. What it says is "the sum of two of the numbers is equal to the third".

I have three items.

Buying two of the items gets you the third for free.

The implication is any two.

It’s ok that it’s ambiguous. It happens. In most cases, we clarify and move on. There’s no need to defend it.

Given #s x,y, and z, either x + y = z, x + z = y, or y + z = x.