# How to fill up the numbers in a set of empty discs drawing a pentagon? The target sum is 10 [duplicate]

Can anyone explain to me the math behind the problem? I want to convert the mathematical solution into an efficient algorithm. The target sum can be any given number. For reference please check the following link out- (solution found) How to fill up the numbers in a set of empty discs drawing a pentagon?

• If someone is informed enough to explain to me the math it will be really helpful. Downvoting the question does not help anybody. Commented Apr 9, 2022 at 22:05
• Does this answer your question? How to fill up the numbers in a set of empty discs drawing a pentagon? - the first answer already explains its math Commented Apr 9, 2022 at 22:22
• Where is the math? The numbers are arranged with the help of a trial and error method based on guesses. Is there a formulated way to arrange the numbers? Or do you have to cherry-pick them? Here the target sum is not the issue, the technique to arrange the numbers matters. Commented Apr 9, 2022 at 22:35
• There may be no generic math to directly target a generic solution, but there sure may be some math to help the search for a solution. Sometimes it's just like so. Proving in this case there is no such generic math is another challenge :-) Have a nice day. Commented Apr 9, 2022 at 23:48
• Well is it possible to solve the problem for a target sum of 10? I really need to work on the algorithm. :( Commented Apr 10, 2022 at 20:17

Sum of all 10 numbers is $$2+4+...+20=110$$. Minimum sum of 5 numbers is $$2+4+...+10=30$$, maximum sum of 5 numbers is $$110-30=80$$. Let sum of angles is $$2k$$, then sum of side middles is $$110-2k$$. The sum of all sides is $$2\cdot 2k+110-2k=110+2k$$ (every angle participates in two sides). This number must be multiple of 5 (because every of 5 sides has equal sum), then $$2k$$ must be multiple of 5. Then maximum $$2k$$ is 80, which corresponds to sum of all sides equal $$\frac{110+2k}{5}=38$$.
Now we need to check existence of solution with sum of all sides equal $$38$$. When sum of angles is $$80$$ then angles must be 12, 14, 16, 18, 20 and side middles must be 2, 4, 6, 8, 10. Numbers adjacent to 2 must add up to $$38-2=36$$, then these numbers are 20 and 16. Numbers adjacent to 10 must add up to $$38-10=28$$, then these numbers are 12 and 16. Then we have sequence 20-2-16-10-12. Then two next numbers after 12 must add up to $$38-12=26$$, and one number must be not greater than 8 and other must be not greater than 18. Then these numbers are 8 and 18. Then we have sequence 20-2-16-10-12-8-18. Two next number must add up to $$38-18=20$$ and one of the numbers must be not greater than 6 and other must be not greater than 14. Then these numbers are 6 and 14. Then we have sequence 20-2-16-10-12-8-18-6-14. The only remaining number 4 closes the circle and $$20+4+14=38$$. This is the only possible solution (excluding reversing and shifting).
• If we consider numbers from 1 to 10, then minimum sum of each side is 14. It can be obtained from my answer if we take minimum possible $2k=30$, calculate $\frac{110+2k}{5}=28$ and divide result by 2, as all numbers are two times less. Commented Apr 11, 2022 at 17:16