Principle of inclusion and exclusion

Let be a finite universe.
.
Let be an index set.
, .

Theorem 1(Principle of inclusion and exclusion).

Proof
Let .
Contribution of to the LHS:

  • contributes 0
  • contributes 1.

Let be the largest index set such that that (observe that such a set is unique). Let . Then, contribution of to the RHS is equal to

Number of surjections

Let be the set of all functions from .
Let be the set of all functions from to such that is not covered.
Then, the number of surjections is equal to

Derangements

Let be the set of all permutations on . Let be the set of all permutations which map to . Then, the number of derangements is equal to

The Euler function

Let . Let be distinct prime factors of . The “bad elements” are the multiples of the s. Let .

Linear algebraic formulation

Let . Consider the collection . This forms a dimensional vector space over . Then, for , the following two statements are equivalent.

Think of it this way: Let the elements of be different “properties” of elements of another set . An element of can have any number of properties . For , Let be the set of all which have each property (Note that all the properties of may be a super set of ). Think of as counting the number of elements in which have properties (), and as counting the number of elements in which have exactly the properties ().

Proof of :

is true since for any finite set, the number of subsets of odd cardinality is equal to the number of subsets of even cardinality.

Proof of :