Inclusion–exclusion principle; what is $(-1)^{n+1}$

combinatoricselementary-set-theoryinclusion-exclusionprobabilitystatistics

could somebody kindly confirm that my understanding of inclusion-exclusion matches it's formula.

for a 3 sets example; we add 3 unions, subtract the total of all 3 pairwise intersections and add the triple-wise intersections as such;
$A_1\cup A_2\cup A_3= A_1+A_2+A_3-A_1\cap A_2 – A_1\cap A_3-A_2\cap A_3+A_1\cap A_2\cap A_3$

in summary, it is adding all sets, subtract the over-count and adding back the "over-subtract"

for multiple sets;
$ \bigcup_{i=1}^n A_i = \sum_{i=1}^n A_i – \sum_{i<j} A_i \cap A_j + \sum_{i<j<k} A_i \cap A_j \cap A_k – \dots + (-1)^{n+1} A_i \cap \dots A_n$

$\sum_{i=1}^n A_i $; Include the cardinalities of the sets

$\sum_{i<j} A_i \cap A_j $; Exclude the cardinalities of the pairwise intersections.

$\sum_{i<j<k} A_i \cap A_j \cap A_k $; Include the cardinalities of the triple-wise intersections.

$\dots$

$(-1)^{n+1} A_i \cap \dots A_n $; Include cardinality of the $n$-tuple-wise intersection.

If the above are correct, what does $(-1)^{n+1}$ represents?

kindly advise. Thank you

Best Answer

This $(-1)^{n+1}$ switches between $+1$ and $-1$ each time you increment $n$, starting with $+1$ when $n=1$. What it says about the counting is that you add the cardinalities of the $n$-fold intersections if $n$ is odd and subtract them if $n$ is even.

Related Question