Toolkit 50
Principle of Inclusion–Exclusion (PIE): Fundamentals and Extensions
Inclusion–Exclusion Principle for two sets
For finite sets and :
Inclusion–Exclusion Principle for three sets
For finite sets , , and :
General Inclusion–Exclusion Principle for $n$ sets
For sets :
In compact form, the general principle is:
Counting elements in exactly one set
Let denote the number of elements that are contained in exactly one of the sets .
For two sets:
For three sets:
The coefficients here are different from the ordinary Inclusion–Exclusion formula.