Definition
Generalised Pigeonhole Principle
Let be a finite set of objects and let . If a function assigns every object to one of bins, define the load of bin by
Since every object is assigned to exactly one bin,
Therefore at least one bin contains at most the floor of the average load, and at least one bin contains at least the ceiling of the average load:
The two bins need not be the same.
Proof
Generalised Pigeonhole Principle
Let
Every load lies between these extremes, so for every . Summing these inequalities gives
Dividing by establishes the relation between the minimum, the average, and the maximum load:
Since and are integers, the left inequality gives , while the right inequality gives . Thus a bin attaining has at most objects, and a bin attaining has at least objects.
Average and Extremes
The principle is an integer version of the general fact that an average cannot lie outside the range of the values being averaged:
Consequently:
- a lower bound on the average gives a lower bound on the maximum load;
- an upper bound on the average gives an upper bound on the minimum load.
The floor and ceiling appear because loads are whole numbers. The average itself need not be an integer, but every load is.
The ordinary pigeonhole principle is the special case in which . Then
so some bin contains at least two objects. Two objects in the same bin are precisely a collision under the assignment function .
Examples
Eleven objects in three bins
Suppose the loads are . Their average is
The largest load is , and the smallest load is . The theorem does not predict which bins have these loads; it guarantees only that both kinds of bin exist.