According to the Bonferroni inequalities, the sum of the first k terms in the formula is alternately an upper bound and a lower bound for the LHS. This can be used in cases where the full formula is too cumbersome.
Applications
Perhaps the most well-known application of the inclusion-exclusion principle is to the combinatorial problem of counting all derangements of a finite set. A derangement of a set A is a bijection from A into itself that has no fixed points. Via the inclusion-exclusion principle one can show that if the cardinality of (number of elements in) A is n, then the number of derangements is
-
where * denotes the nearest integer function.
This is also known as the subfactorial of n, written .
It follows that if all bijections are assigned the same probability then the probability that a random bijection is a derangement quickly approaches 1/e as n grows.
In many cases where the principle could give an exact formula (in particular, counting prime numbers using the sieve of Eratosthenes), the formula arising doesn't offer useful content because the number of terms in it is excessive. If each term individually can be estimated accurately, the accumulation of errors may imply that the inclusion-exclusion formula isn't directly applicable. In number theory, this difficulty was addressed by Viggo Brun. After a slow start, his ideas were taken up by others, and a large variety of sieve methods developed. These for example may try to find upper bounds for the "sieved" sets, rather than an exact formula.
Counting intersections
The principle of inclusion-exclusion, combined with de Morgan's theorem, 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.
See also
Combinatorics
Prinzip von Inklusion und Exklusion | Principe d'inclusion-exclusion de Moivre | Principio di inclusione ed esclusione | עקרון ההכלה וההפרדה | Zasada włączeń i wyłączeń | Princíp zapojenia a vypojenia | Principen om inklusion/exklusion | 排容原理