You are given a set of 10 numbers that represent all possible pairwise sums of certain five numbers.
Devise a strategy to find the original five numbers.
Provide a numerical example.
Charlie's solution will not always work. The problem is that the 3rd largest pairwise sum might not be the 3rd plus the 4th original number. It will sometimes be the 2nd plus the 5th original number.
But the 2nd largest pairwise sum is always the 3rd + 5th original number. So, a correct solution is:
Start with an example:
60 83 85 87 89 100 102 112 125 129
These add up to 972. As each number is counted four times, the total of the five numbers is 972/4 = 243.
The largest of the ten is 129 and the smallest is 60. These are the sums of the largest two and the smallest two of the five, respectively, so subtracting the total of these two, representing four of the five, from the total of the five, 243, will give the value of the middle of the five: 243 - (129+60) = 54.
The second largest of the ten will be the middle plus the largest (of the five). So in this case 125 = 54 + 71, making 71 the largest number. Then 129 - 71 gives you the 2nd largest number, 58.
Symmetrically with the preceding paragraph, the second smallest of the ten will be the middle plus the smallest of the five. In this case 83 = 54 + 29, making 29 the smallest of the five. Then 60 - 29 gives you 31, the second smallest of the five.
In this case we have figured out
29 31 54 58 71
/*********************************************/
An example of a set which will not work with Charlie's method is:
10 11 12 19 20 21 21 29 30 31
The solution is 1 9 10 11 20.
Charlie's method gives an incorrect solution,
2 8 10 12 19
Edited on July 30, 2018, 12:03 pm