Using The Pigeon-Hole Principle

5.8k Views Asked by At

Let n be a positive integer. Show that in any set of n consecutive integers there is exactly one divisible by n.

Here is the solution:

Let $a,~a+1,...,a+n-1$ be the integers in the sequence. The integers $(a+i)\mod n$, $i=0,1,2,...,n-1$, are distinct, because $0 < (a+j) - (a+k) < n$ whenever $0 \le k < j \le n -1$. Because there are n possible values for $(a+i)\mod n$ and there are n different integers in the set, each of these values is taken exactly once. It follow that there is exactly one integer in the sequence that is divisible by n.

Few things I don't quite understand:

Why is the sequence of integers $a,~a+1,...,a+n-1$, instead of being $a,~a+1,...,a+n$?

How does $0 < (a+j) - (a+k) < n$ make the values calculated from the modulus distinct? Also, what is the motivation for $0 < (a+j) - (a+k) < n$? Why are we allowed to use this fact?

1

There are 1 best solutions below

3
On BEST ANSWER

There are $n$ integers. $a = a+0$, so if you had $\{ a, a+1, \ldots, a+n\}$, then you have a "$+0$", "$+1$", and so on up to "$+n$" -- the $a+0$ term counts, so you would have $n+1$ terms.

If $0 \le k < j < n-1$, then $j > k$, and $(a+j)-(a+k) = a+j-a-k = a-a+j-k = j-k > 0$. But since $j-k < j$, and $j \le n-1$, then $j-k < n$.

So the moduli must be distinct simply by definition of how modular arithmetic works. You can't have something divisible by $n$ more frequently than once every $n$ terms!