A set of five numbers are added in all 10 possible pairs like in some of the
Pumpkins puzzles.
When sorted the middle six sums are 47, 48, 50, 51, 52, and 54. The two largest sums and two smallest sums are not given, similar to
Permuted Sums.
What are the possible sets of the five original numbers?
for a=1:53
s(1)=a;
for b=a:53
s(2)=b;
for c=b:53
s(3)=c;
for d=c:53
s(4)=d;
for e=d:53
s(5)=e;
comb=nchoosek(s,2);
for i=1:length(comb)
t(i)=sum(comb(i,:));
end
tOrig=t;
t=sort(t);
test=t(3:8);
if test==[47 48 50 51 52 54]
disp(s)
disp(tOrig)
disp(t)
disp(" ")
end
end
end
end
end
end
finds
20 23 25 27 31
43 45 47 51 48 50 54 52 56 58
43 45 47 48 50 51 52 54 56 58
21 23 24 27 31
44 45 48 52 47 50 54 51 55 58
44 45 47 48 50 51 52 54 55 58
as the two possibilities for the set of five original numbers listed in numeric order. Each is followed by the sums in the order found, and then in sorted order, the original order being a+b, ..., a+e, b+c, ..., b+e, ..., c+d, ..., c+e, d+e.
|
Posted by Charlie
on 2020-12-20 11:22:22 |