在n个整数里,它们的某些子集和能被$n$整除

Read · 1 min

Let your set of nn integers be Y=a1,a2,...,anY = {a_1, a_2, ..., a_n}. We will prove that there is some nonempty subset X⊆YX\subseteq Y such that the sum of the elements of XX is divisible by nn.

Let Sk=a1+a2+...+akS_k = a_1+a_2+...+a_k, for 1≤k≤n1\le k\le n. If any one of S1,S2,...,SnS_1, S_2, ..., S_n is divisible by nn, then we are already done.

If this is not the case, then by the Pigeonhole Principle, there must exist 1≤i<j≤n1\le i\lt j\le n such that Si≡Sj(modn)S_i\equiv S_j\pmod{n}. Then, Sj−Si≡0(modn)S_j-S_i\equiv 0\pmod{n}. But Sj−Si=ai+1+ai+2+...+ajS_j-S_i=a_{i+1}+a_{i+2}+...+a_j, meaning that Sj−SiS_j-S_i is also the sum of the elements in some nonempty subset of YY. This completes the proof.

It is interesting to note that the method above will give you a subset of YY that has the sum of its elements divisible by nn, no matter which ordering of the elements of YY you use. This doesn't mean that the statement that we have just proved is weak or trivial, but it does mean that finding a subset that satisfies the desired condition is actually quite easy.

Type a concept, like “slope” or “photosynthesis”.

↑ ↓ to choose · Enter to openSearch explanations and problems