All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Numbers
Five numbers and Six sums (Posted on 2020-12-20) Difficulty: 4 of 5
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?

See The Solution Submitted by Brian Smith    
Rating: 5.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution Solution | Comment 1 of 5
I found two solutions.
The 5 numbers, followed by the 10 sums:
(20, 23, 25, 27, 31)
 [43, 45, 47, 48, 50, 51, 52, 54, 56, 58]

(21, 23, 24, 27, 31)
 [44, 45, 47, 48, 50, 51, 52, 54, 55, 58]

The fact that the middle 6 sums show no duplicates implies, and I'm fairly certain proves, that the set of 5 integers also has no duplicates, but for completeness I decided to search with the possibility of duplicates in mind.

If we number the 10 sums in order from 1 to 10, and call the set of 5 integers a,b,c,d,e from smallest to largest, then:
if a+d=b+c then 3,4 are same
if a+e=b+c then 4,5 are same
if a+e=b+d then 5,6 are same
if a+e=c+d then 6,7 are same
if b+e=c+d then 7,8 are same
I didn't do it, but I suspect that requiring all 5 equations to be false will prove that none of a,b,c,d,e are the same.

--- code follows ---

from itertools import combinations
from itertools import combinations_with_replacement

def testSums(aList):
    """ input is a list of integers
    returns a list of sum of any 2 of these integers,
    sorted in order from smallest to largest """
    ans = []
    for group_of_2 in combinations(aList,2):
        ans.append(sum(group_of_2))
    return sorted(ans)

match = [47, 48, 50, 51, 52, 54]

myList = [i for i in range(1,60)]

for group_of_5 in combinations_with_replacement(myList,5):
    middle6 = testSums(group_of_5)[2:8]
    if middle6 == match:
        print(group_of_5,'\n', testSums(group_of_5))

  Posted by Larry on 2020-12-20 10:24:57
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (1)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (17)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information