Thank you for your contribution.

You may not be aware that this site is really intended for discussion of programmed solutions using Python.

Of course, analysis as a part of the process of producing a program is fine but purely analytic solutions are more likely to be appreciated by users of this site:

https://sites.google.com/site/sundaytimesteasers/

which I run for people who prefer not to use programs.

]]>1,2,4,5,7,8,10,11,13,14,16=91 giving us the minimum value of the first half team as 100 and taking into account of the fact that the maximum diffrerence in the sum of the teams for both halfs cannot be larger than 21(22-1) which gives us the sum of the second half half team as 121.The minimum sum of the first half team numbers can be found by trial and error.:

]]>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# place a player in the team or as a reserve def place(team, resv): lt, lr = len(team), len(resv) # we are done - the team and the reserves each have 11 players if lt == lr == 11: # do the teams numbers add to form a perfect square? t = sum(team) if round(t ** 0.5) ** 2 != t: return # if so we have a possible solution yield tuple(team) else: # the next number to place nxt = lt + lr + 1 # this number can be in the team or in the reserves provided # that it does not form three consecutive values with the two # previous values in these sequences if lt < 11 and (lt < 2 or nxt != team[-2] + 2): yield from place(team + [nxt], resv) if lr < 11 and (lr < 2 or nxt != resv[-2] + 2): yield from place(team, resv + [nxt]) for sol in place([], []): team = set(sol) # select a substitute from the reserves for the second ha for sub in set(range(1, 23)) - team: # select the player that leaves the team for pl in team: # form the second half team new_team = (team - set((pl,))) | set((sub,)) # and check that the numbers sum to a larger perfect square sq = sum(new_team) if round(sq ** 0.5) ** 2 == sq and sq > sum(team): print('Players in the first half have numbers', sol) |