IMO (Maths Olympiad) /Combinatorics

Basic and Strong Form of PHP

Pigeonhole Principle · free study notes

𝐈𝐓𝐈−𝐉𝐄𝐄 / 𝐂𝐨𝐦𝐩𝐞𝐭𝐢𝐭𝐢𝐯𝐞 𝐂𝐨𝐦𝐛𝐢𝐧𝐚𝐭𝐢𝐨𝐧

Basic and Strong Form of the Pigeonhole Principle (Dirichlet’s Principle)

Pigeonhole Principle (PHP)
If (n) objects are put into (m) boxes and (n>m), then at least one box contains at least two objects.


1. Basic Pigeonhole Principle

1.1 Formal statement

Let (S) be a finite set of (n) elements and let
[ f : S \longrightarrow {1,2,\dots ,m} ] be any function (i.e. “putting each element of (S) into one of (m) boxes”).
If (n>m) then there exist (x,y \in S) with (x\neq y) such that (f(x)=f(y)).

1.2 Intuition & Proof

Proof by contradiction

Assume no box contains two elements, i.e. each box contains at most one element.
Then the total number of elements is at most (m), contradicting (n>m).

Proof by counting

Number of elements in box (i) is (a_i) with (0\le a_i\le n).
[ \sum_{i=1}^{m} a_i = n \quad\text{and}\quad a_i\le 1 ;\forall i ;\Rightarrow; n\le m. ]

Thus at least one (a_i\ge 2).


2. Strong (Dirichlet) Pigeonhole Principle

2.1 Formal statement

If (n) objects are placed into (m) boxes, then some box contains at least

[ \left\lceil \frac{n}{m}\right\rceil ] objects.

2.2 Proof (using the basic PHP)

Let (q=\left\lfloor \frac{n}{m}\right\rfloor).
Suppose every box had at most (q) objects.
Then

[ n \le q m \le \left(\frac{n}{m}\right)m = n, ]

so equality must hold, meaning each box has exactly (q) objects.
If (n) is not divisible by (m), write (n = qm + r) with (1\le r < m).
Then at least (r) boxes must contain (q+1) objects; hence one box contains at least (q+1 = \left\lceil \frac{n}{m}\right\rceil).


3. Applications & Problem‑Solving Strategies

Situation Which PHP to use? Typical trick
Need any collision Basic PHP Count boxes + objects
Need minimum load Strong PHP Compute (\lceil n/m\rceil)
Boxes have different capacities Generalized PHP Compare totals
Weighted objects Weighted PHP Use averages
Graph theoretic problems PHP + counting Consider degrees, edges

3.1 Common pitfalls

  1. Miscounting boxes – e.g., “intervals of length 1” vs “intervals of length 1.5”.
  2. Ignoring divisibility – forgetting the ceiling function.
  3. Assuming uniqueness – e.g., “all numbers in a set are distinct” when the set is constructed from a larger set.
  4. Overlooking adjacency – for problems involving consecutive numbers or intervals.

3.2 Typical proof pattern

  1. Define boxes – intervals, residue classes, color classes, etc.
  2. Map each object to a box via a clear function.
  3. Apply PHP – note whether basic or strong, and compute the bound.
  4. Interpret the result in terms of the original problem.

4. Generalizations

4.1 Generalized Pigeonhole Principle (With Different Box Sizes)

Let the boxes have capacities (c_1,c_2,\dots ,c_m) with (\sum c_i = C).
If (n > C) then at least one box has more than its capacity.

4.2 Weighted Pigeonhole Principle

Given weights (w_1,w_2,\dots ,w_n) placed in (m) boxes, if

[ \sum_{j=1}^{m} \max_{i \in B_j} w_i \le W, ]

then (\sum w_i\le mW).
This is useful for problems involving sums or averages.

4.3 PHP in Graph Theory

  • Degree version: In a graph with (n) vertices and more than (\frac{n(k-1)}{2}) edges, there is a vertex of degree at least (k).
    Proof: Suppose all degrees (\le k-1); then total edges (\le\frac{n(k-1)}{2}).

  • Edge‑colouring: In a complete graph (K_n) with edges coloured with (k) colours, there exists a monochromatic subgraph of size at least (\lceil \frac{n}{k}\rceil).


5. Important Formulae

Context Formula
Strong PHP \

Your note

Page 1

Doubt hai is topic me?

Free AI teacher se poocho — 24/7, step by step.