Inclusion–Exclusion Through Indicator Functions

Alternating counts of intersections compute a union exactly. Each object contributes a binomial cancellation determined by how many sets contain it.

Source
Anbloq
Language
English
Created
Updated
Chapters
1
Reading time
1 min

For an object lying in \(r>0\) of \(m\) finite sets, the alternating sum counts it \(\sum_{k=1}^r(-1)^{k+1}\binom rk=1\). For an object in none of the sets the contribution is zero. This proves the union formula by summing objectwise.

\[\left|\bigcup_{i=1}^m A_i\right| =\sum_{\varnothing\ne J\subseteq[m]}(-1)^{|J|+1}\left|\bigcap_{j\in J} A_j\right|.\]

Derangements

For permutations of \(n\) labels, let \(A_i\) require a fixed point at \(i\). Requiring \(k\) particular fixed points leaves \((n-k)!\) permutations. Subtracting the union gives \(n!\sum_{k=0}^n(-1)^k/k!\), about \(n!/e\). The divisor version is an elementary prime sieve.[1]

References

  1. Alexander Postnikov, 18.212 Algebraic Combinatorics ↩