Follow your curiosity

What discovery has been shared with you?

Start with one fact. Explore it, go deeper, then follow whichever branch catches your imagination.

Choose subjects for a surprise

Exploring any topic

Begin your discovery

Your next discovery is one click away.

Choose one or more subjects above, or leave Any Topic selected and let curiosity decide.

Mathematics

Pigeonhole Principle in Combinatorial Number Theory

Quick fact

The pigeonhole principle, a seemingly trivial observation, is a cornerstone of combinatorial number theory. It directly implies that among any 10 random integers, two must have the same remainder when divided by 9—a fact with far-reaching consequences, such as proving that any set of 5 integers contains 3 that sum to a multiple of 3, and it underlies the Erdős–Ginzburg–Ziv theorem that any 2n−1 integers contain n whose sum is divisible by n.

Why this is interesting

You know that if you put 10 socks into 9 drawers, at least one drawer has more than one sock. But did you know that a mathematical version of this trick guarantees that among any 10 numbers, two must have the same remainder when divided by 9?

Read the full explanation

Understanding Pigeonhole Principle in Combinatorial Number Theory

Imagine you have more objects than containers. If you try to place each object into a container, common sense tells you that one container must end up with at least two objects. This is the pigeonhole principle, and it’s almost too obvious to be useful. Yet in combinatorial number theory, this simple counting idea becomes a powerful tool for proving that certain number-theoretic patterns must exist. Here’s the key step: you reformulate a number-theory problem as a distribution of objects into containers. For example, to prove that among any n integers there are two whose difference is divisible by n, you look at the remainders when each integer is divided by n. There are only n possible remainders (0 to n−1), but you have n integers. If all remainders were distinct, you’d have n distinct remainders—exactly filling all n containers. But wait: you have n integers and n containers, so the pigeonhole principle doesn’t apply directly. However, if you consider the partial sums instead, you can guarantee a repetition. Let’s make this concrete: take any n integers, say a₁, a₂, …, aₙ. Compute the partial sums Sₖ = a₁ + a₂ + … + aₖ for k = 1, …, n. If any Sₖ is divisible by n, we’re done—that sum itself is a multiple of n. If not, each Sₖ has a nonzero remainder when divided by n. There are only n−1 possible nonzero remainders, but there are n partial sums. By the pigeonhole principle, two partial sums, say Sᵢ and Sⱼ (with i < j), must have the same remainder. Their difference Sⱼ − Sᵢ = aᵢ₊₁ + … + aⱼ is then divisible by n, giving us a consecutive block of the original numbers whose sum is a multiple of n. This is the essence of applying the pigeonhole principle in number theory: you map your numbers to remainders (or other equivalence classes), and then you count. If the number of objects exceeds the number of classes, collisions are inevitable, and each collision encodes a number-theoretic property.

A deeper explanation

The pigeonhole principle works because of the fundamental fact that a function from a larger finite set to a smaller finite set cannot be injective. When you assign each integer its remainder modulo n, you create a function from a set of size m to a set of size n. If m n, injectivity fails, so at least two integers share the same remainder. Their difference is then divisible by n—an algebraic consequence of the equality of remainders. The power lies in choosing the right 'containers'. Often, the containers are not the numbers themselves but some derived quantity, like remainders of partial sums, or the parity of sums, or the size of subsets. For instance, a classic problem asks: among any five integers, can you always find three that sum to a multiple of 3? The answer is yes. The proof uses the pigeonhole principle with three containers based on remainders modulo 3 (0, 1, 2). If one remainder class has at least three numbers, their sum is divisible by 3. Otherwise, the five numbers must be distributed with at most two in each class, forcing at least one number in each of the three classes. Then picking one from each class yields a sum that is 0+1+2 = 3 mod 3, again divisible by 3. Going further, the pigeonhole principle is the engine behind the Erdős–Ginzburg–Ziv theorem: any 2n−1 integers contain n whose sum is divisible by n. The proof (for prime n) uses a clever pigeonhole argument on partial sums of a subsequence, and it generalizes the idea we saw earlier. This theorem is a cornerstone of combinatorial number theory. Why does this matter? The principle provides a method to prove existence without constructing the object explicitly. It shows that 'enough' numbers force certain arithmetic patterns, a theme that ramps up in Ramsey theory, where the pigeonhole principle is the foundational case (R(2,2)=2). In number theory, it underpins results about sums, differences, and multiplicative structures. Understanding this mechanism helps you recognise when a problem can be tackled by counting remainders or other equivalence classes, turning a seemingly intractable existence question into a trivial counting statement.

Keep FACTREE close

Internet access is required. Updates arrive when you reopen or reload the app. You may need to sign in again in the installed app.