There are 2022 marked points on a straight line so that every two adjacent points are the same distance apart. Half of all the points are coloured red and the other half are coloured blue. Can the sum of the lengths of all the segments with a red left endpoint and a blue right endpoint be equal to the sum of the lengths of all the segments with a blue left endpoint and a red right endpoint?
Problem
Source: 44th International Tournament of Towns, Senior O-Level P3, Fall 2022
Tags: combinatorics, equal segments, Tournament of Towns
sn6dh
21.02.2023 18:53
Lemma: Suppose $S=\{s_1, s_2, \dots, s_n\}\subset\mathbb Z$ where $2\nmid n$, then $$\sum_{1\leq i<j\leq n}|s_i-s_j|\equiv0\pmod2$$
Proof:
WLOG suppose $s_1<s_2<\cdots<s_n$.
$\sum_{1\leq i<j\leq n}(s_j-s_i)=\sum_{j=1}^n(j-1)s_j-\sum_{i=1}^n(n-i)s_i=\sum_{i=1}^n(2i-n-1)s_i\equiv\sum_{i=1}^n0s_i\equiv0\pmod2$
WLOG suppose the $2022$ marked points are $0, 1, \dots, 2021$.
Let $A$ be the set of red points, $B$ be the set of blue points.
By the lemma:
The sum of the lengths of all the segments with any endpoints is $\sum_{0\leq i<j\leq2021}j-i=\sum_{i=1}^{2021}i+\sum_{1\leq i<j\leq2021}j-i\equiv\sum_{i=1}^{2021}i\equiv1\pmod2$.
The sum of the lengths of all the segments with both endpoints red is $\sum_{i, j\in A,\ i<j}j-i\equiv0\pmod2$.
The sum of the lengths of all the segments with both endpoints blue is $\sum_{i, j\in B,\ i<j}j-i\equiv0\pmod2$.
$\Rightarrow$ the sum of the lengths of all the segments with a red left endpoint and a blue right endpoint $+$ the sum of the lengths of all the segments with a blue left endpoint and a red right endpoint $\equiv1-0-0\equiv1\pmod2$.
$\therefore$ the sum of the lengths of all the segments with a red left endpoint and a blue right endpoint can't be equal to the sum of the lengths of all the segments with a blue left endpoint and a red right endpoint since both of them are integers.