Partitioning a sequence of positive integers into two subsequences with equal sums

combinatoricspigeonhole-principle

Tried searching on this forum but haven't found a similar problem.

Use the pigeonhole principle to prove that, for all positive integers $n$, any sequence of $n+1$ positive integers whose sum is $2n$ can be partitioned into two subsequences, each with sum equal to $n$.

Best Answer

Suppose it is not true for some $n$, and a set of numbers $x_{1}\leq...\leq x_{n+1}$ for which $\sum^{n+1}_{i=1}x_{i}=2n$.

Let $$m=\min\{|\sum_{j\in J}x_{j}-\sum_{i\not\in J}x_{i}|:J\subset\{1,...,n+1\}\}>0$$ be the smallest difference the two sets can have, note $m$ is even, and let $J_{m}$ be such that $$\sum_{j\in J}x_{j}-\sum_{i\not\in J}x_{i}=m$$ and let $k=\min J$, i.e. the index such that $x_{k}=\min_{j\in J}x_{j}$. Clearly $x_{k}\geq m\geq 2$

Claim: $x_{1}=...=x_{x_{k}}=1$, suppose not, then $$2n=\sum^{n+1}_{i=1}x_{i}=\sum_{i=1}^{x_{k}-1}x_{i}+\sum_{i\in\{x_{k},...,n+1\}\setminus\{k\}}x_{i}+x_{k}\geq \sum_{i=1}^{x_{k}-1}1+\sum_{i\in\{x_{k},...,n+1\}\setminus\{k\}}2+x_{k}$$ $$=x_{k}-1+2(n+1-x_{k})+x_{k}=2n+1,$$ which is a contradiction. Now define $J'=(J\setminus\{k\})\cup\{1,...,\frac{2x_{k}-m}{2}\}$, then $$\sum_{j\in J'}x_{j}-\sum_{i\not\in J'}x_{i}=m-2x_{k}+\frac{2x_{k}-m}{2}\cdot2=0.$$