How to prove this proposition about finite sequences?

41 Views Asked by At

Here are two sequences of $m$ items:$a_1,a_2\cdots ,a_m$and $b_1,b_2\cdots ,b_m$.We also know that $\forall i\in \left \{ 1,2,\cdots,m\right \},a_i,b_i\in \left \{ 1,2,\cdots,m\right \}$.The problem needs to prove is :$\exists p,q,r,s;1\leq p\leq q\leq m,1\leq r\leq s\leq m$ suppose that $\sum_{i=p}^{q}a_i=\sum_{j=r}^{s}b_j $.I have tried to use The Pigeonhole principle to solve this problem. It has $m^2-m$ possible sums but $a$ or $b$ has $\frac{m^2+m}{2}$possible sums. Then I failed to solve this problem like this way. I also tried to define $r_k=max\left \{ j|\sum_{i=1}^{j}a_i\leq\sum_{i=1}^{k}b_i \right \} $ and tried to use the principle to $r_1$to $r_n$, but I stucked at here. P.S. The hint of this problem is to invite $r_k$but I could not continue...