The Inclusion--Exclusion Principle: Counting by Alternating Sums
We prove the inclusion--exclusion principle and apply it to derive the formula for the number of derangements D_n, Euler's totient function, the relationship between surjections and Stirling numbers of the second kind, and the M\"{o}bius inversion formula.
1 The Inclusion–Exclusion Principle
2 Derangements
3 Euler's Totient Function
4 Surjections and Stirling Numbers of the Second Kind
5 The Möbius Inversion Formula
Mathematics "between the lines" — exploring the intuition textbooks leave out, written in LaTeX on Folio.