Sort the two dimension vectors separately into ascending order, and . Then return true exactly when for every . Sorting costs and the coordinate comparisons cost .
Sufficiency follows by matching corresponding ranks and translating that rank matching back to the original axes. For necessity, suppose for some . The dimensions must all be assigned to strictly larger target dimensions. None of the first sorted target dimensions is large enough, leaving at most eligible slots. The pigeonhole principle gives a contradiction. This proves the sorted-coordinate criterion for box containment, including ties: equality fails the required strict fit.
There are entries in , which contains possible integers. If , then . Therefore some value in is missing, again by the pigeonhole principle. This is an existence conclusion in the chosen interval, not a claim that all missing values lie there; both sides can contain missing values when duplicates occur.
If , the upper side contains the whole permitted range and hence a missing value. If , the condition is impossible. Outside the internal-pivot range this conclusion therefore supplies no improved localization.
For an integer pivot , exactly entries lie in . That interval contains possible integers. If , the pigeonhole principle implies that some value in is missing. Counting occurrences rather than distinct entries only strengthens this argument: occurrences cannot cover more than distinct values.
For completeness, if the lower side contains the entire permitted value range, which already has a missing value. If , the condition is impossible. Thus the general conclusion is a missing permitted value below ; an internal pivot gives useful localization.
Fix any seven-element subset . Its power set supplies pigeons. Map each subset to its integer sum. Since the elements are positive, all such sums lie between and . The latter is at most the sum of the seven largest available elements,
There are therefore at most possible sums, fewer than the subsets. The pigeonhole principle forces two distinct subsets to have the same sum. Every seven-element subset has the two-sum property. This is the subset-sum pigeonhole bound. The weaker estimate would also suffice, since .
The pigeonhole principle states that if more than objects are placed in boxes, with , at least one box contains two or more objects. Equivalently, a function from a finite set of more than elements to a set of elements cannot be injective: if every box held at most one object, there would be at most objects altogether.
For five points, partition the unit square into four squares of side . Assign boundary points to just one neighbouring piece. By the pigeonhole principle, two of the points lie in one piece, whose diameter is its diagonal, .
For eight points, use seven smaller-diameter pieces rather than eight rectangles. Start with the convex pentagon
Take its four reflected copies at the corners of the square. The remaining pieces are the left triangle with vertices , its right-hand reflection, and the central diamond with vertices . These seven polygons cover the square with disjoint interiors. To verify coverage directly, for the two bottom pentagons split the horizontal section at . For , the five successive sections have endpoints and belong respectively to the left triangle, bottom-left pentagon, diamond, bottom-right pentagon and right triangle. Reflection gives the top half.
The diameter of a finite convex hull is the greatest distance between its vertices: if two points are convex combinations of vertices, their difference is a convex combination of vertex differences, and the triangle inequality bounds its norm by the largest such distance. Checking the five vertices of gives diameter ; reflections preserve that value. Each remaining triangle and the diamond has diameter , which is smaller. After assigning shared boundaries to one piece, eight points in these seven pieces force a pair in a common piece. Hence some pair is at distance at most .
Figure 1.
Four and seven regions give the two distance bounds by the pigeonhole principle
. Details.
Both arguments are instances of a pigeonhole distance bound from a partition.
Prove the stronger statement with a nonempty subset. Order the integers as , and form the prefix sums
There are such sums but only residue classes modulo . The pigeonhole principle gives indices with . Their difference satisfies
The selected elements form a nonempty subset of , proving the claim. Neither positivity nor distinct values in a general ordered sequence are needed for the consecutive sum divisible by the sequence length argument; distinctness merely makes the present input a set.
Read the initial universal quantifiers as governing the conjunction of irreflexivity and transitivity. Explicitly, the intended first-order sentence asserts
Thus is an irreflexive relation, a transitive relation, and a serial relation.
Suppose a first-order model had a finite nonempty domain of cardinality . Choose . Seriality supplies successive elements with . By the pigeonhole principle, for some . Repeated transitivity along that part of the chain gives , contradicting irreflexivity. Hence there is no finite nonempty model. This is the infinite-model property of a serial strict partial order.
An infinite model exists: take domain and to mean . It is irreflexive and transitive, and witnesses seriality for every .
The quantifier-scope convention matters: giving each printed universal quantifier only the immediately following atomic scope would leave the transitivity implication with free variables and would not express the claimed theorem. The explicit parenthesisation above records the reading under which the source's requested assertion is valid.
Suppose a subset of a metric space is covered by sets, each of diameter at most . Assign each point to one covering set containing it, choosing a single set at shared boundaries. Among points, the pigeonhole principle puts two in a common set, and their distance is at most . The pieces need not be equal or congruent. This freedom permits better distance bounds than dividing a region only into equal rectangles.
Pigeonhole principle Created 2026-09-24 Updated 2026-10-18
Place objects into boxes, assigning each object to exactly one box. Here is a nonnegative integer and is a positive integer. The pigeonhole principle says that if , some box contains at least two objects. Equivalently, a function from an -element finite set to an -element finite set cannot be an injective function when . The boxes may stand for categories rather than physical containers. [ref]
For thirteen objects and twelve boxes, a box containing at least two is unavoidable. Thinking of thirteen people and their birth months gives the same conclusion: at least two share a birth month. Twelve people could occupy the twelve months one apiece, so thirteen is the smallest number that forces a shared month. The generalized pigeonhole principle quantifies how many objects must share a box when there are still more objects.
The useful surprise is that the pigeonhole principle proves existence without needing to locate the objects involved. Choosing a good assignment rule is often the creative step: equal labels can mean equal remainders, nearby points, or repeated states of an algorithm. Once the rule is chosen, a short count can force a relationship among a much larger collection of objects. The pigeonhole principle itself does not name the crowded box. When the objects and their assignments are explicitly available, a simple algorithm finds one: scan the objects, keep the first object seen in each box, and stop when a later object enters an occupied box. At most scanned objects are needed when .
A geometric example. Any five points in a square of side one contain two whose Euclidean distance is at most . Give each point Cartesian coordinates . Divide both ranges into the intervals and , making four cells. Thus belongs to the left half and to the right half; belongs to the lower half and to the upper half. This convention assigns every boundary point to exactly one cell.
The pigeonhole principle puts two of the five points in the same cell. Their differences in Cartesian coordinates have magnitude at most , so the Pythagorean theorem gives their Euclidean distance the bound
For the plotted points , , , and , the first two occupy the lower-left cell and have Euclidean distance . These Cartesian coordinates exhibit the forced pair; the argument applies to every placement of five points.
Figure 1.
The pigeonhole principle places two of five points in one of four cells of a square, bounding their Euclidean distance by
. Details.
An arithmetic example. Assign eight integers to their seven residue classes modulo the integer modulus . The pigeonhole principle gives two with the same residue class, so is an integer divisor of their difference. In , for example, and satisfy the integer congruence , and . Likewise, assigning fractional parts to short intervals gives the Dirichlet approximation theorem; its existing article explains the approximation bound.
For fixed positive density , every sufficiently large of size at least has a long arithmetic progression in its triple sumset. Embed it in , where its density is at least . A translated Bohr neighborhood in a triple sumset has bounded rank and fixed positive radius depending only on . A torus pigeonhole principle argument supplies a nonzero step whose small multiples stay in the Bohr set, with polynomially many multiples. All resulting residues have representatives in , an interval shorter than half the modulus, so their successive ordinary integer differences agree and give an actual integer arithmetic progression. The positive constant prefactor is absorbed by reducing the exponent for sufficiently large .
Represent a finite simple graph by a domain of vertices and a symmetric, irreflexive binary relation for graph adjacency. Introduce three unary second-order relation variables , one for each fixed named colour. Define the following abbreviations for first-order formulas in this expanded first-order signature:
Then the existential second-order logic sentence
asserts that every vertex receives exactly one of the three colours and adjacent vertices receive different colours. The first clause gives coverage and pairwise disjointness of the three subsets; the second makes each subset an independent set. Empty colour classes are allowed, so expresses existence of a proper vertex coloring using at most three colours.
For the complete graph on the fixed vertices , one witness is , , . Each vertex satisfies exactly one predicate, and each of the three edges joins different predicates. Every valid witness assigns different colours to all three vertices; there are witness triples with these fixed vertex labels and fixed named colours. We are counting assignments, without identifying them under colour permutations or graph isomorphisms. For the complete graph , the pigeonhole principle forces two of its four vertices to share a colour, and those vertices are adjacent. Thus it has no witness triple. This calculation illustrates a complexity certificate without requiring the reader to reconstruct a machine computation.
Figure 1.
Six relation witnesses for the labeled complete graph K3, and why K4 has none
. Details.
Reproduce the diagram by running python ../second-order-coloring-witness.py from the repository's _media directory. The script checks all witness triples for these two complete graphs before drawing them.
Siegel's lemma 2026-10-14
Let be a number field of degree , and let be linear forms in variables with coefficients in and projective height at most . There is a nonzero satisfying every and
For , this follows by applying the pigeonhole principle to the images of the integer box under . Expanding coefficients in a rational basis of gives the factor in the general count.
Choose any vertex of a red-blue colored complete graph . Its five incident edges go to the other five vertices. By the pigeonhole principle, at least three have the same color. Call their other endpoints and, after swapping color names if needed, suppose are red.
If any of is red, it completes a red triangle in a graph with . If none is red, all three are blue, so themselves form a blue triangle in a graph. Both possibilities force a monochromatic triangle in a graph. This proves the upper bound for the Ramsey number for triangles using only five incident edges and the three pairs among the selected neighbors; the colors of the other edges cannot defeat the argument.
Figure 1.
The two cases after choosing three red neighbors in a complete graph on six vertices
. Details.
Both panels show all 15 edges of a complete graph on six vertices. Faint colored edges are example choices outside the decisive argument; bold edges exhibit the forced triangle in a graph. The selected neighbor color could instead be blue, giving the same argument with the color names exchanged.
Let and be the separately sorted dimension vectors. Matching corresponding ranks proves the forward construction when every . Conversely, if , then the source dimensions from rank onward require distinct targets strictly larger than , but only the last target ranks could qualify. The pigeonhole principle rules out such a permutation. Strict inequality matters: equal side lengths do not fit under this convention. Sorting and checking gives an decision algorithm.
Let be a finite set of positive integers and let . Every sum of a subset is an integer in . If , the pigeonhole principle forces two distinct subsets to have equal sums. Thus cannot be a dissociated set.
Cancelling their common intersection even produces two disjoint subsets with the same sum. Positivity means neither remaining subset can be empty. Conversely, equality of two distinct subset sums gives a nonzero relation with coefficients in , exactly the obstruction to being a dissociated set.
For an -element subset of , the largest possible is . Therefore
is a sufficient condition forcing a collision for every such subset. This counting bound is sufficient rather than necessary. Powers of two show how a collision-free collection can instead use the binary representation to make all sums different.
Turán graph Created 2026-09-29 Updated 2026-10-14
The Turán graph is a complete multipartite graph with independent sets of sizes differing by at most one, with every cross edge present. Empty parts are allowed when .[ref]
Figure 1.
The Turán graph has three independent sets of sizes , giving edges and no four-vertex clique
. Details.
In this example, the independent sets are , and . Count the edges between each pair of parts:
Any four vertices put at least two in the same independent set, by the pigeonhole principle, so they cannot form . Conversely, every choice of one vertex from each part is a triangle in a graph, giving triangles in a graph. Clique exclusion here does not mean triangle-free.
For the exact count, Euclidean division writes , where uses the floor function and is the remainder, with . There are parts of size and of size . For any part sizes summing to , count cross edges by expanding the square:
Therefore
For , we have , giving . The Quadratic Turan edge bound gives instead: the exact correction subtracts .
Balancing is an integer optimization with a simple reason. If two part sizes satisfy , moving one vertex from the larger part to the smaller decreases their contribution to the sum of squares by
so it increases the edge count by . For eight vertices, parts give edges; moving one vertex produces and edges. The most symmetric permitted sizes pack the most cross edges, which explains the sharp construction in Turán's theorem.
If , expand its power . By the pigeonhole principle, each monomial contains some . Collecting terms expresses as a linear combination of these powers. This lets one use a common denominator exponent in localization arguments.
Fix . There is no injective function from all length- binary strings to binary strings of length strictly less than . There are possible inputs, but even allowing the empty string gives only
possible shorter outputs. The finite geometric series and pigeonhole principle leave at least two inputs sharing an output, which prevents exact decoding. For , eight inputs compete for the empty string and the six strings 0, 1, 00, 01, 10, 11.
This counting argument includes any file header or other information sent to the decoder. An algorithm chosen separately for each input must also be identified to the receiver; its description is not free. A useful compressor saves space on some inputs while leaving others unchanged or making them longer. Lossy compression avoids the exact-recovery requirement by deliberately allowing several inputs to share an output.