Pigeonhole and Inclusion-Exclusion - Examples and Constructions
Complex applications of the pigeonhole principle and inclusion-exclusion often require creative problem formulation. These examples illustrate sophisticated techniques for identifying appropriate "pigeons" and "holes" or for structuring inclusion-exclusion calculations.
In any sequence of distinct real numbers, there exists either an increasing subsequence of length or a decreasing subsequence of length .
Proof sketch: Label each element in the sequence with where is the length of the longest increasing subsequence ending at and is the length of the longest decreasing subsequence ending at .
If no increasing or decreasing subsequence has length , then all labels satisfy and . This gives only possible labels. With elements, by the pigeonhole principle, two elements and (with ) must have the same label.
But if , then (contradiction), and if , then (contradiction). Therefore, some sequence must have length .
In any graph with vertices and chromatic number , there exists an independent set of size at least .
Proof: In a proper -coloring of (where ), vertices are partitioned into color classes, each forming an independent set. By the pigeonhole principle, at least one color class contains at least vertices.
Euler's totient function , which counts integers from 1 to that are coprime to , can be computed using inclusion-exclusion. If , then:
This follows from inclusion-exclusion: let be the set of integers from 1 to divisible by . Then:
Applying inclusion-exclusion:
How many functions are there such that is onto (surjective)?
Using inclusion-exclusion, let be the set of functions that do not map to . We want , which by complement equals the total minus .
Total functions:
(functions using only 2 values)
(functions using only 1 value)
(impossible to map to no values)
By inclusion-exclusion:
Therefore, the number of onto functions is .
A powerful technique called the "pigeonhole principle in continuous settings" applies to continuous domains. For example, if is continuous with , then for any positive integer , there exist with and . This follows from considering the intervals and applying the intermediate value theorem with pigeonhole reasoning.
These examples demonstrate the versatility and power of these principles in advanced problem-solving contexts.