Let $n$ be odd natural number and $x_1,x_2,\cdots,x_n$ be pairwise distinct numbers. Prove that someone can divide the difference of these number into two sets with equal sum. ( $X=\{\mid x_i-x_j \mid | i<j\}$ )
Problem
Source: Iran 2nd-round MO 2018 - P2
Tags: combinatorics, Iran
26.04.2018 12:14
Surprisingly easy using induction.
26.04.2018 12:26
Really? I used graph and algorithms :*
26.04.2018 12:58
We'll use induction on odd $n$. The base case is trivial. For inductive step, say we've $2m+3$ distinct numbers $x_1<x_2<\cdots <x_{2m+3}$. We just want to partition the collection $$\{ x_i-x_j\mid i\in \{ 2m+2,2m+3\} ,j\leqslant 2m+2,i\neq j \}$$into two parts with equal sum. This is easy by noting that $$(x_{2m+2}-x_{2k})+(x_{2m+3}-x_{2k-1})=(x_{2m+3}-x_{2k})+(x_{2m+2}-x_{2k+1})$$for all $1\leqslant k\leqslant m$ and $$(x_{2m+2}-x_1)+(x_{2m+3}-x_{2m+2})=x_{2m+3}-x_1.$$
26.04.2018 14:25
My graphical solution is just a simple algorithm: Consider a $n\times n$ matrix remove down-diagram cells (containing the main diagram) Then Start from top-left cell and put $1$ and $0$ respectively and move in rows. A cell like $(i,j),\quad$ in this up-diagram matrix means $\mid x_i-x_j\mid $. Now we just constructed two sets, i's not hard to prove that it works. (It's trivial but It must be proved) Example for $n=3$ and $n=5$: x10 xx1 xxx x1010 xx101 xxx01 xxxx0 I have an inductive solution for this algorithm such that jumps from $4k+3$ to $4k+1$ and conversely.
28.04.2018 21:56
This solution is a bit different, yet again solved by induction.For the base case $n=3$ we say : $(x-y)+(y-z)=(x-z)$ where we ( without loss of generality) assumed that $x>y>z$ . Now, Let us solve the problem for $2k+3$ numbers $x_{2k+3}>...>x_2>x_1$ . Using induction on $2k+1$ numbers $x_{2k+2}>...>x_3>x_2$ , we know that we can partition the differences in to two sets $A$ and $B$ with equal sum. Also, all differences that are left are $x_{2k+3}-x_1$ and $x_{2k+3}-x_i$ and $x_i-x_1$ for all $2\leq i\leq 2k+2$ . Now, consider $2k+1$ boxes; in every box there are differences $x_{2k+3}-x_j$ and $x_j-x_1$ where $j$ is fixed for every box , ( but different for every two boxes ) so the sum of the differences in every box is $x_{2k+3}-x_1$ . Also , consider the $(2k+2)$th box where it has only $x_{2k+3}-x_1$ . As you can see, we divided all other differences in to $2k+2$ boxes where the sum of the differences in every box is equal to $x_{2k+3}-x_1$. It is just enough to send $k+1$ of these boxes to set $A$ and the other $k+1$ boxes to set $B$ . Thus , our proof is complete.
19.04.2020 02:20
My solution revisited. Edit: W.L.O.G we can suppose that the list is sorted.
Attachments:
Sol_Iran_Oly_2nd_Rnd_P2.pdf (105kb)
13.01.2021 21:48
we apply induction on $n$ since $n$ is odd one can write it as $2k+1$ for the case $k=1$ it is pretty obvious that it works so we can consider that $k$ satisfies the condition then we prove the problem statement for $k+1$. sort the numbers like this $x_1<x_2<\cdots<x_{2k+3}$ the thing we should actually care about is what differeces added when we move from $2k+1$ to $2k+3$ these differences are: \[x_{2k+3}-x_{2k+1},x_{2k+3}-x_{2k},x_{2k+3}-x_{2k-1},\cdots,x_{2k+3}-x_1\]and \[x_{2k+2}-x_{2k+1},x_{2k+2}-x_{2k},x_{2k+2}-x_{2k-1},\cdots,x_{2k+2}-x_1\]and \[x_{2k+3}-x_{2k+2}\]now our mission is to divide this numbers to $2$ sets of numbers such that they have the same sum. which is really simple just consider these two sets(also considering the thing that ThE-dArK-lOrD mentioned): \[({x_{2k+3}-x_{2k+1},x_{2k+3}-x_{2k},\cdots,x_{2k+3}-x_{k+2}}) \thickspace {\cup}\thickspace ({x_{2k+2}-x_{k+1},\cdots,x_{2k+2}-x_1})\]and \[(x_{2k+3}-x_{2k+2})\thickspace {\cup}\thickspace ({x_{2k+2}-x_{2k+1},x_{2k+2}-x_{2k},\cdots,x_{2k+3}-x_{k+2}})\thickspace {\cup} \thickspace({x_{2k+3}-x_{k+1},\cdots,x_{2k+3}-x_1})\]easy to check that they have the same sum, as desired.
06.01.2022 08:46
Really easy with induction. Let's assume for n distinct numbers we're True then prove for n+2 numbers. assume X1,X2,...,Xn+1,Xn+2 are our numbers and we can divide X1,...,Xn in two sets as wanted. Note that for any couple (Xi , Xj) we have : |Xn+2 - Xi| + |Xn+1 - Xj| = |Xn+2 - Xj| + |Xn+1 - Xi| we're Done.
04.07.2022 16:59
WLOG let $x_{1}<x_{2}<\ldots<x_{n}$, where $n$ is odd. Now consider $x_{i}-x_{j}$ for $i>j$. If $i \equiv j \pmod{2}$ we put it in $A$. While if $i \neq j \pmod{2}$ put it in $B$. We prove the following lemma: The coefficient of $x_{i}$ in the sum of numbers in $A$ is equal to the coefficient of $x_{i}$ in the sum of numbers in $B$. Clearly, this suffices. Suppose it is even. (The other case is similar). Consider the differcess $x_{n-1}-x_{i}, x_{n-3}-x_{i}, \ldots, x_{i+2}-x_{i}$. These are in $A$. So the coefficient of $x_{i}$ in the sum of numbers in $A$ is equal to $$\frac{i-2}{2}-\frac{n-i-1}{2}=\frac{2 i-n-1}{2}.$$Similarly considering the differences $x_{i}-x_{i-1}, x_{i}-x_{i-3}, \cdots, x_{i}-x_{1}$ and $x_{n}-x_{i}, x_{n-2}-x_{i}, \ldots, x_{i+1}-x_{i}$ we see that they belong to $B$. This means that the coefficient of $x_i$ the sum of numbers in $B$ is equal to $$\frac{i}{2}-\frac{n-i+1}{2}=\frac{2 i-n-1}{2}.$$Thus the two are equal, finishing the proof.