principle of inclusion-exclusion
The principle of inclusion-exclusion provides a way of methodically counting the union of possibly non-disjoint sets.
Let be a finite collection of finite sets
. Let represent the set of -fold intersections
of members of (e.g., contains all possible intersections of two sets chosen from ).
Then
For example:
The principle of inclusion-exclusion, combined with de Morgan’s laws, can be used to count the intersection of sets as well. Let be some universal set such that for each , and let represent the complement of with respect to . Then we have
thereby turning the problem of finding an intersection into the problem of finding a union.