Let $n$ be a positive integer and let $z_1,z_2,\dots,z_n$ be positive integers such that for $j=1,2,\dots,n$ the inequalites $z_j \le j$ hold and $z_1+z_2+\dots+z_n$ is even. Prove that the number $0$ occurs among the values \[z_1 \pm z_2 \pm \dots \pm z_n,\]where $+$ or $-$ can be chosen independently for each operation. (Walther Janous)
Problem
Source: Austrian MO 2024, Final Round P5
Tags: combinatorics, combinatorics proposed, algebra, algebra proposed
02.06.2024 19:10
We do it by induction on $n$. It could be made as a constructive algorithm actually. Consider $z_{n-1}$ and $z_n$. If they are equal, we cancel them (by taking them with different signs) and proceed with the first $n-2$ numbers. If $z_{n-1}<z_n$ we take $z_{n-1}$ with different sign as $z_n$ (though the sign of the $z_n$ is still undetermined). This, virtually results in cancelling $z_{n-1}$. After that we move the number $z_n-z_{n-1}$ in $n-1$-th position and proceed further. If $z_n<z_{n-1}$ we "cancel" $z_n$ and proceed with $z_{n-1}-z_n$ on the $(n-1)$-th position.
21.09.2024 19:49
Let the sum of the elements be $2S$. We want to prove there exists some subset of elements with sum exactly equal to $S$. W.L.O.G assume that $z_i \leq z_{i+1}$ for all $i < n$. This obviously preserves the condition that $z_i \leq i$. Claim: $z_n \leq S$. Assume for the same of contradiction, that $z_n > S$. Then it follows that $z_n > \sum_{i=0}^{n-1}z_i$. If $n$ is odd, then the sum of the other elements is at most equal to $n-1$. However, since $z_n$ is at most equal to $n$ and $n$ is odd, we cannot create the desired sum. If $n$ is even, then it follows that either the sum is even and the same case holds or that the sum is odd, in which case it is at least equal to $n$, in which case we cannot exceed it. Lemma: Among the first $k$ elements of the sequence, we may find a subset whose sum is exactly equal to k. Proof: We proceed by induction. The case $k = 1$ is trivial. Now assume that for the first $k$ elements that we may find a subset with a sum of $k$. If we consider the $k+1$-th term, this is at most $k+1$. The difference $k+1 - z_k+1$ is at most $k$, which we may construct with the first $k$ elements, meaning we can construct the sum $k+1$ with the first $k+1$ elements, concluding our inductive step. We now consider the following arrangement: if there exists an index $k$ such that: $ S \geq \sum_{i=k+1}^n z_i \geq S - k $ then we may complete the sum with the remaining first $k$ elements, to reach exactly a sum of $k$. Define $P(k) := \sum_{i=k+1}^n z_i$. Note that $P$ is decreasing. It is clear that $P(n-1) \leq S$ and $P(0) \geq S$. We will show that there exists an index $k$ for which the value lies within the desired interval. Let $k$ be the minimal index such that $P(k) < S - k$. We consider $P(k-1)$. Assume for the same of contradiction hat $P(k-1) > S$. We know however: $ S < P(k-1) = z_k + P(k) < z_k + S - k $ $ k < z_k $ This is however a contradiction, meaning that we can always find a desireable index $k$, for which the problem statement holds.