← Back to home

Pigeonhole Principle

In mathematics, the pigeonhole principle establishes a fundamental truth: if you attempt to place more items than there are available containers, at least one container is bound to hold more than a single item. It’s a rather obvious concept, isn’t it? Like trying to fit ten pigeons into nine holes; one hole will inevitably become a bit crowded. The principle, though seemingly elementary, wields surprising power in demonstrating results that might not be immediately apparent. Consider this: if the population of a city like London surpasses the maximum conceivable number of hairs on any single human head, then, by the pigeonhole principle, there must exist at least two individuals in that city who share the exact same number of hairs. A rather unsettling thought, if you ask me.

While the principle’s roots can be traced back to as early as 1622, appearing in a work by Jean Leurechon, it’s more commonly associated with Peter Gustav Lejeune Dirichlet. Dirichlet, in 1834, gave it a formal treatment under the rather charming German moniker "Schubfachprinzip," which translates to the "drawer principle" or "shelf principle." It’s a fitting name, conjuring images of meticulously organized, yet ultimately overwhelmed, drawers.

The principle isn't a one-trick pony; it boasts generalizations and can be expressed in various ways. A more quantified version states that if you distribute n = km + 1 objects into m containers, at least one container will inevitably house k + 1 or more objects. For any n and m, this can be elegantly expressed using the floor and ceiling functions: k + 1 = ⌊(n - 1) / m⌋ + 1 = ⌈n / m⌉. It’s a mathematical statement that acknowledges the inevitability of overlap when resources (objects) outstrip capacity (containers).

While its most intuitive applications involve finite sets – the pigeons and the holes, the people and the handshakes – the pigeonhole principle extends its reach to infinite sets as well. In this context, it's formally stated as: there cannot exist an injective function whose codomain is smaller than its domain. It's a more abstract, yet equally powerful, assertion about the fundamental nature of mappings between sets. Advanced mathematical constructs, such as Siegel's lemma, even build upon this generalized concept.

Etymology

The nomenclature surrounding this principle is, shall we say, a bit convoluted. Dirichlet himself used both German and French terms, "Schubfach" and "tiroir" respectively, both translating to "drawer." He spoke of distributing pearls among drawers, a rather quaint image. Over time, these terms evolved, morphing into the more visually striking "pigeonhole." This likely stems from the idea of small compartments, like those found in desks or cabinets, used for sorting letters or papers, and by extension, the structures designed to house pigeons.

Given that furniture featuring pigeonholes was commonly used for sorting and categorizing, the translation to "pigeonhole" might actually be a more apt representation of Dirichlet's original "drawer" concept. However, the literal interpretation, involving actual pigeons and holes, has gained traction, leading to the somewhat whimsical German back-translation "Taubenschlagprinzip," meaning "dovecote principle."

Beyond the original German and French, the principle is known by various literal translations across languages: "مبدأ برج الحمام" in Arabic, "принцип на чекмеджетата" in Bulgarian, "抽屉原理" in Chinese, and so on, each reflecting the core idea of drawers, boxes, or, indeed, pigeonholes.

Examples

The pigeonhole principle, despite its abstract nature, finds concrete expression in a multitude of everyday scenarios. It’s the silent arbiter of certainty in situations where randomness might suggest otherwise.

Sock Picking

Imagine a drawer filled with black and blue socks. You’re blindly pulling them out. The question is, how many socks must you pull to guarantee you have a matching pair? It’s simple combinatorics, really. With only two colors (the "holes"), and by the pigeonhole principle, the third sock you pull must complete a pair. So, three socks are all it takes. You’ll either have three of one color, or two of one and one of the other. No escape.

Handshaking

Consider a group of n people. If everyone shakes hands with everyone else, the pigeonhole principle guarantees that there will always be at least two people who have shaken the same number of hands. The "holes" here are the possible number of handshakes a person can make, ranging from 0 to n-1. However, a crucial detail emerges: it’s impossible for one person to shake hands with everyone (n-1 handshakes) and for another person to shake hands with no one (0 handshakes) simultaneously, if n > 1. This effectively reduces the number of available "holes" to n-1. With n people (pigeons) and at most n-1 possible handshake counts (holes), the principle dictates that at least two people must share the same handshake count. This is directly analogous to stating that in any graph with more than one vertex, there must be at least two vertices with the same degree.

Hair Counting

This is a classic demonstration of the principle's power. It’s often cited to prove that in London, with its millions of inhabitants, at least two people must share the same number of hairs on their heads. We establish an upper bound for the number of hairs on a human head – say, one million. If we consider each possible number of hairs as a "hole," and each person in London as a "pigeon," then if the number of people exceeds the number of possible hair counts, a collision is inevitable. Assuming London has, say, 9.002 million people, and each possible hair count from 0 to 1,000,000 represents a hole, then even if each of the first 9 million people had a unique hair count, the 9,000,001st person must share a hair count with someone already accounted for. In fact, it implies at least ten Londoners share the same number of hairs, as 9 million people would fill 9 holes each in the 1 million available. It's a stark reminder that even in vast populations, certain attributes are not infinitely unique.

The satirical undertones of this example can be traced back to early discussions on the principle, with early texts pondering whether any two individuals could possess an identical number of hairs.

The Birthday Problem

While the birthday problem itself delves into probabilities, the pigeonhole principle provides a definitive answer for a certainty case. With only 366 possible birthdays (including leap day), any group of 367 people must contain at least two individuals who share the same birthday. It’s a simple application: 367 "pigeons" (people) and 366 "holes" (birthdays).

Team Tournament

Suppose seven individuals are looking to join a tournament with only four available teams. The pigeonhole principle immediately tells us that it's impossible for each person to be on a unique team. At least one team will have to accommodate two or more players. The formula ⌊(n - 1) / m⌋ + 1 confirms this: ⌊(7 - 1) / 4⌋ + 1 = ⌊6 / 4⌋ + 1 = 1 + 1 = 2. This means at least one team will have at least two players.

Subset Sum

Consider the set of integers from 1 to 9, S = {1, 2, 3, ..., 9}. If you select any subset of size six from this set, the pigeonhole principle guarantees that two of the selected numbers will add up to 10. We can group the numbers into pairs that sum to 10: {1, 9}, {2, 8}, {3, 7}, {4, 6}, and the lone element {5}. These five pairs/groups act as our "holes." When you choose six numbers (the "pigeons"), at least one of these groups must contain two of your chosen numbers, and since these groups are defined by their sum to 10, those two numbers will, of course, sum to 10.

Hashing

In the realm of computer science, hashing is a technique for mapping large data sets to smaller, fixed-size values. This is crucial for efficient data retrieval, often implemented in "hash tables." The pigeonhole principle is inherently at play here. If the number of unique data items (n) exceeds the number of available hash codes (m), it’s mathematically impossible to avoid collisions – that is, multiple data items mapping to the same hash code. Hashing, by its very nature when n > m, cannot guarantee uniqueness.

Uses and Applications

The pigeonhole principle, despite its foundational simplicity, underpins numerous theoretical and practical applications across various fields. It’s not just about pigeons and holes; it’s about the inevitable consequences of distribution.

One significant application lies in proving the limitations of lossless compression algorithms. If a compression algorithm guarantees that some inputs are made smaller, it logically follows – by the pigeonhole principle – that some other inputs must be made larger. Otherwise, if all inputs were compressed without exception, you’d be mapping a larger set of possible inputs to a smaller set of outputs without any collisions, which is precisely what the principle forbids.

In the context of the no-three-in-line problem, which asks for the maximum number of points that can be placed on an n x n lattice without any three being collinear, the pigeonhole principle provides an upper bound. For instance, it suggests that on a regular chessboard, one can place at most 16 pawns without any three forming a straight line.

A particularly elegant use of the principle emerges in mathematical analysis. For any given irrational number a, we can demonstrate that the set of its fractional parts, denoted as {[na] : n ∈ ℤ}, is dense within the interval [0, 1]. The core idea is to show that for any small positive number e, there exist integers n and m such that |na - m| < e. By strategically choosing a large integer M such that 1/M < e, and then distributing the fractional parts [na] for n = 1, 2, ..., M+1 into M intervals of length 1/M, the pigeonhole principle guarantees that at least two of these fractional parts must fall into the same interval. This proximity is then leveraged to prove the density property. This demonstrates how the principle can be used to establish the existence of arbitrarily close approximations, a cornerstone of analysis.

The principle also manifests in variations. In the proof of the pumping lemma for regular languages, a version that blends finite and infinite sets is employed: if infinitely many objects are placed into finitely many boxes, then at least one box must contain an infinite number of objects. Conversely, in Fisk's solution to the Art gallery problem, a related idea is used: if n objects are distributed into k boxes, then at least one box must contain no more than n/k objects.

Alternative Formulations

The pigeonhole principle, in its essence, can be articulated in several equivalent ways, each offering a slightly different perspective on its core logic.

  • If n objects are distributed among m places, and n > m, then at least one place must contain more than one object. This is the most straightforward and commonly cited form.
  • An equivalent formulation of the first: If n objects are distributed among n places such that no place receives more than one object, then every place must receive exactly one object. This highlights the complementary nature of the principle when resources perfectly match capacity under a specific constraint.
  • A more abstract generalization: If S and T are sets, and the cardinality of S is greater than the cardinality of T, then no injective function exists from S to T. This frames the principle in the language of set theory and functions.
  • Another variation: If n objects are distributed among m places, and n < m, then at least one place must receive no objects. This is the inverse scenario, where capacity exceeds the number of items.
  • Complementary to the above: If n objects are distributed among n places such that no place receives zero objects, then each place must receive exactly one object. This again emphasizes the perfect distribution scenario.
  • Generalizing the previous point: If S and T are sets, and the cardinality of S is less than the cardinality of T, then no surjective function exists from S to T. This is the set-theoretic counterpart to the "empty place" formulation.

Strong Form

The principle can be strengthened to provide more specific quantitative information. Let q₁, q₂, ..., qn be positive integers. If you distribute q₁ + q₂ + ... + qn - n + 1 objects into n boxes, then at least one of the boxes must contain at least qi objects for some i from 1 to n.

A common instance of this is when all qi are equal to some integer r. This leads to the quantified version: If n(r - 1) + 1 objects are distributed into n boxes, then at least one box must contain r or more objects. This can also be expressed using the ceiling function. If k discrete objects are to be allocated to n containers, then at least one container must hold at least ⌈k/n⌉ objects. Conversely, at least one container must hold no more than ⌊k/n⌋ objects, where ⌊x⌋ is the floor function.

Generalizations of the Pigeonhole Principle

The pigeonhole principle can be extended beyond its basic form to encompass probabilistic and infinite scenarios.

A probabilistic generalization suggests that if n pigeons are randomly assigned to m pigeonholes with equal probability, the probability of at least one pigeonhole containing more than one pigeon is 1 - (m)n / mⁿ, where (m)n is the falling factorial. Even when the number of pigeons doesn't exceed the number of holes (n ≤ m), random assignment can still lead to a significant chance of collisions, a phenomenon explored in depth by the birthday paradox.

Furthermore, the principle can be generalized to infinite sets. If an uncountably infinite number of pigeons are placed into a countably infinite number of pigeonholes, then at least one pigeonhole must contain an uncountably infinite number of pigeons. This, however, is not a direct extension of the finite pigeonhole principle, as it doesn't hold true for finite sets in the same way.

Quantum Mechanics

Intriguingly, there have been discussions and theoretical arguments suggesting that quantum mechanics might appear to violate the pigeonhole principle under certain interpretations. Researchers have proposed interferometric experiments to probe these claims. However, subsequent analyses, employing standard quantum mechanical principles and wave function analysis, suggest that such apparent violations are more a matter of interpretation and the difficulty of distinguishing between very weak interactions and no interaction at all, rather than a fundamental breach of the principle itself. The standard pigeonhole principle, it seems, holds even in the quantum realm, though its manifestation might be subtler.

See Also

For those who wish to delve deeper into the mathematical landscape surrounding the pigeonhole principle, a wealth of related concepts and theorems exist:

Notes

The historical and mathematical underpinnings of the pigeonhole principle are supported by various academic works, including foundational texts on algebra and combinatorics, as well as specialized articles and historical mathematical journals. These references provide the detailed proofs and historical context for the statements and applications discussed.