Hacker News new | ask | show | jobs
by malisper 445 days ago
if the three numbers are a, b, and c, then either a+b=c, a+c=b, or b+c=a
1 comments

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.

Why look for ambiguity that isn't there?