Does the following statement hold for any positive integer ?
For any set that consists of integers, there exists a non-empty subset such that the sum of its elements is divisible by .
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
This is an application of the pigeonhole principle.
Say the numbers in the set are a 1 , a 2 , … , a n . If any of these is divisible by n , we're done; so assume from now on that none of them are.
Consider the n sums s 1 = a 1 , s 2 = a 1 + a 2 , s 3 = a 1 + a 2 + a 3 ,..., s n = a 1 + a 2 + ⋯ + a n . Again, if any of these sums happens to be divisible by n , we're done, so we can assume that no s n is a multiple of n .
Now, there are n sums, and exactly n − 1 non-zero remainders upon division by n . So (by the pigeonhole principle), for some i < j we must have that s i ≡ s j ( m o d n )
But this means that n divides s j − s i = a i + 1 + a i + 2 + ⋯ + a j , which gives us a subset that works.
Therefore there must always be a subset whose sum is divisible by n .