Published Thursday 21. July 2011

One of the important – indeed central – aspects of mathematics is the idea of abstracting out interesting structures in order to study those structures in general. The study of groups, rings, fields, vector spaces, category theory, and so on, are examples of this. Other types of abstractions are general methods and principles, such as proof by induction or the Pigeonhole Principle. One such principle caught my attention recently, namely the Inclusion-Exclusion Principle.

I was looking at an expression of the form lcm( a1, …, an ), and realized that I could restate this using the gcd's of subsets of the a's, in a way similar to the Inclusion-Exclusion principle. This made me wonder if I could generalize the principle in a way that both the original principle and my lcm/gcd version would follow easily. This is what I came up with:

Theorem (General Inclusion-Exclusion Principle): Let (L, ∧, ∨) be a distributive lattice, let G be an abelian group, and let φ: L → G be a mapping that satisfies φ(a ∧ b) φ(a ∨ b) = φ(a) φ(b). Then, for a1, …, an ∈ L, the following equation holds:

φ( a1 ∨ … ∨ an ) = I: ∅ ≠ I ⊆ {1,…,n} φ(i∈ I ai )(-1)|I|-1

Proof by induction on n. For n = 1 the theorem is trivial, and for n = 2 the theorem reduces to the functional equation for φ. Let n > 1, and assume the theorem holds for smaller values of n. Using the functional equation for φ, the fact that L is distributive, and the induction hypothesis, we have:

φ( a1 ∨ … ∨ an )=φ( ( a1 ∨ … ∨ an-1 ) ∧ an )-1 φ( a1 ∨ … ∨ an-1 ) φ( an )
 =φ( ( a1 ∧ an ) ∨ … ∨ ( an-1 ∧ an ) )-1 φ( a1 ∨ … ∨ an-1 ) φ( an )
 =( ∏ I: ∅ ≠ I ⊆ {1,…,n-1} φ(i∈ I (ai ∧ an) )(-1)|I|-1)-1 ( ∏ I: ∅ ≠ I ⊆ {1,…,n-1} φ(i∈ I ai )(-1)|I|-1) φ( an )
 =( ∏ I: {n} ⊂ I ⊆ {1,…,n} φ(i∈ I ai )(-1)|I|-1) ( ∏ I: ∅ ≠ I ⊆ {1,…,n-1} φ(i∈ I ai )(-1)|I|-1) φ( an )
 = I: ∅ ≠ I ⊆ {1,…,n} φ(i∈ I ai )(-1)|I|-1.

Example 1: Take L to be the power set P(X), for some set X, with the usual subset ordering. The supremum and infimum operators will then just be the usual set union and intersection, and these are known to be distributive. Take G to be the integers with addition as operator, and define φ(S) = |S|, noting that |S ∩ T| + |S ∪ T| = |S| + |T|, then the conclusion of the theorem becomes:

|S1 ∪ … ∪ Sn| = I: ∅ ≠ I ⊆ {1,…,n} |∩i ∈ I Si| (-1)|I|-1

Which is what is traditionally known as the Inclusion-Exclusion Principle. If we reverse the ordering of L we will get the same equation, but with union and intersection exchanged:

|S1 ∩ … ∩ Sn| = I: ∅ ≠ I ⊆ {1,…,n} |∪i ∈ I Si| (-1)|I|-1

(These equations can be generalized a bit by replacing the counting measure, |⋅|, by any measure μ, requiring L to be a subset of the power set containing only measurable sets and to be closed under finite unions and intersections.)

Example 2: Take L to be the real numbers with the usual ordering, and G to be the real numbers with addition. With φ being the identity mapping – i.e. the mapping that takes every element to itself – we get:

max( a1, …, an ) = I: ∅ ≠ I ⊆ {1,…,n} (-1)|I|-1 min i ∈ I (ai)

As with Example 1 we can reverse the ordering to get a similar result, but with min and max exchanged.

Example 3: Let L be the natural numbers with "a divides b" as the ordering, and take G to be the positive rational numbers with multiplication. Note that the supremum and infimum operators become least common multiple and greatest common divisor respectively. With φ being the identity mapping, and noting that gcd(a, b) lcm(a, b) = a b, we get:

lcm( a1, …, an ) = I: ∅ ≠ I ⊆ {1,…,n} (gcd i ∈ I (ai))(-1)|I|-1

Example 4: The Möbius Inversion Formula. Let f be any function from the natural numbers into an abelian group G, and define g(n) = d|n f(d). Then the Möbius inversion formula states that f(n) = d|n μ(d) g(n/d), where μ is the Möbius function.

Let L be the power set of the natural numbers, ordered by inclusion, and define φ(S) = d∈S f(d). Let p1,…,pk be the distinct primes dividing n and set Si = {d: d | n/pi}. The inclusion-exclusion principle now gives:

    g(n) - f(n)=φ(S1 ∪ … ∪ Sk)   =    I: ∅ ≠ I ⊆ {1,…,k} φ(∩i ∈ I Si) (-1)|I|-1
 =d: 1<d|n -g(n/d) μ(d)

A little bit of rearranging now yields the Möbius inversion formula.