Given seven points on the plane, the distance between them is expressed by numbers $a_1,a_2,...,a_{21}$. What is the maximal number of times that we may have the same number among those $21$ distances?
Solution. Let pairwise distances a (for the points $A_1,A_2,...,A_7$) are repeated at most $k$ times. Denote by $n_i$ the number of segments of length a starting from the point Ai. Without loss of generality, we can assume that $n_1 ≥ n_2 ≥ ··· ≥ n_7.$ Note that $n_1 + n_2 ≤ 9$, otherwise, on the circles with the centres $A_1 , A_2$ and with the radius a there are at least $n_1 + (n_2 − 2) ≥ 8$ points. This is impossible, as the total number of points is $7.$ Obviously, the distance between any two points $A1,A2,A3,A4$ is not equal to a. Let $A_iA_j\neq a, i\neq j.$ In this case, on the circles with the centres Ai,Aj and with the radius a, there are at least ni + nj − 2 points. As $A_i$ and $A_j$ are not on that circles, then $ni+nj−2+2≤7.$ Therefore $n3+n4 ≤ni+nj ≤7$,we deduce that $n4 ≤3.$ Hence, $n7 ≤ n6 ≤ n5 ≤ 3.$ We have that $k = 21((n1 +n2)+(n3 +n4)+n5 +n6 +n7) ≤ 21(9+7+3+3+3)$, therefore $k ≤ 12.$ Let us now give an example, where $k$ can be equal to $12.$ If we consider the vertices of a regular hexagon (with the side length a) and its centre, then for those points the same distance is repeated 12 times. Thus $k = 12.$
Can anyone explain how $n_1+n_2\leq 9$ is proved in the given solution. Thank you.