A set contains four numbers. The six pairwise sums of distinct elements of the set, in no particular order, are 189, 320, 287, 264, x, and y. Find the greatest possible value of: x + y.
Call the set A, B, C and D, from smallest to largest.
We can assume that x and y are B+D and C+D.
If that's the case, the smallest value we're given is A+B = 189 and the next smallest is A+C = 264. The question remains:
Do we have:
B+C = 320, A+D = 287
or
B+C = 287, A+D = 320
?
We try both:
syms a b c d
eqns=[a+b==189,a+c==264,b+c==320,a+d==287];
s=solve(eqns,[a b c d]);
[s.a s.b s.c s.d]
>> s.c+2*s.d+s.b
ans =
761
eqns=[a+b==189,a+c==264,b+c==287,a+d==320];
s=solve(eqns,[a b c d]);
[s.a s.b s.c s.d]
>> s.c+2*s.d+s.b
ans =
761
Each results in the same total for C + D: 761.
The respective values of A, B, C and D are
133/2, 245/2, 395/2, 441/2
and
83, 106, 181, 237
As further verification, other set of assumptions about the relations of the given sums results in an empty solution set.
Edited on November 30, 2020, 10:40 am

Posted by Charlie
on 20201130 10:28:10 