6

Given $n$ integers $a_1, a_2,\cdots,a_n,$ such that for each $1\leq i \leq n$, it holds that $1 \leq a_i \leq n$. The problem is to prove that there exists a nonempty subsequence (not necessarily consecutive) of these integers, whose sum is equal to the sum of their indices.

Formally, it is to prove that there exists a nonempty subset $S \subseteq [n]$ that $\sum_{i\in S}a_i = \sum_{i \in S}i$, where $1 \leq a_i \leq n$.

The idea for the proof might be the pigeonhole principle, but I am stuck on how to construct the appropriate pigeons and pigeonholes.

Zephry
  • 63
  • 3
    Hint: Let $b_i = a_i - i $. Show that $ |b_i | \leq n-1 $. Apply PHP (hopefully in an obvious way) to conclude that .... – Calvin Lin May 22 '24 at 05:31
  • @CalvinLin Thanks very much for your kind help. I made the following attempt: By letting $b_i = a_i - i$, the problem transforms into proving that there exists a subsequence of $b_i$'s, whose sum is $0$. If there exists a $b_i=0$, then we have a solution. Otherwise, by applying PHP we know there exists two integers $|b_i|=|b_j|$, with $i \neq j$. If $b_i=-b_j$, we then reach another solution. However, it is also possible that $b_i=b_j$. I would really appreciate it if you could give me further hints. – Zephry May 22 '24 at 09:50
  • Oh good point. I can't push through from here. Let me think if PHP could work here. – Calvin Lin May 22 '24 at 15:25
  • Your question is a special case of this puzzle, which can be solved with PHP. – Mike Earnest May 22 '24 at 15:53
  • 2
    @MikeEarnest Thank you! I carefully read the answer in the provided link. It is a very nice proof, but I think it cannot be directly applied to this problem. In the above problem, we expect the selected elements of the two subsets to be in the same "positions" in the original sets ${i}$ and ${a_i}$; whereas in the linked problem $k$ and $k′$ are often different. – Zephry May 23 '24 at 03:44
  • I stand corrected! – Mike Earnest May 24 '24 at 01:52

1 Answers1

6

Translate this problem into directed graph terminology.
Namely consider the associated graph with $[n]$ vertices, and we have an edge $ a \rightarrow b$ if $ f(a) = b$.
We can allow for self-loops (Else notice that if we have a self-loop then we are done.)
By definition, each vertex has out-degree 1 (no control over in-degree).

Lemma: Such a (finite) graph must have a cycle.

Proof of lemma: Start with any vertex. Follow the edge leading out of it. Since each vertex has an out degree of 1, we can create an infinite list of vertices $ v_1 \rightarrow v_2 \rightarrow v_3 \ldots $.
Since there are only finitely many vertices, hence this list must eventually repeat. Stop the process when vertex $V$ is first repeated, and then we have the cycle $ V \rightarrow \ldots \rightarrow V$ (with distinct vertices in the chain).

Corollary: We have the stronger result that $ \{ a_i \} = \{ f(a_i ) \}$ for vertices in this cycle.
Hence $ \sum a_i = \sum f(a_i) $

Calvin Lin
  • 77,541