Principle of Inclusion/Exclusion

Overview

The principle of inclusion/exclusion (PIE) refers to the process of adding and subtracting, used to find the cardinality of potentially overlapping sets. Given finite sets A1,A2,,An the following identity captures the concept:

|k=1nAk|=k=1n(1)k+1(1i1<<ikn|Ai1Aik|)

For example, given finite sets A, B, and C,

|AB|=|A|+|B||AB||ABC|=|A|+|B|+|C||AB||AC||BC|+|ABC|

The number of terms containing one set, two sets, three sets, etc. match the binomial coefficients.

Probability

The principle of inclusion-exclusion also holds in probability. Let A1,A2,,An be a number of events in a shared sample space. Then

P(k=1nAk)=k=1n(1)k+1(1i1<<iknP(Ai1Aik)).

For example, given events A, B, and C,

P(AB)=P(A)+P(B)P(AB)P(ABC)=P(A)+P(B)+P(C)P(AB)P(AC)P(BC)+P(ABC)

Minimum/Maximum

The min and max operations respect the principle of inclusion/exclusion. In particular,

min(a1,,an)=k=1n(1)k+1(1i1<<iknmax(ai1,,aik))max(a1,,an)=k=1n(1)k+1(1i1<<iknmin(ai1,,aik))
Powered by Forestry.md