Inclusion-Exclusion Principle: Proof by Mathematical Induction
For Dummies
Vita Smid∗
December 2, 2009
Definition (Discrete Interval). [n] := {1, 2, 3, . . . , n}
Theorem (Inclusion-Exclusion Principle). Let A1 , A2 , . . . , An be finite sets. Then
n
\ [ X
(−1)|J|−1 Ai Ai =
i=1
i∈J
J⊆[n]
J6=∅
Proof (induction on n). The theorem holds for n = 1:
1
[ Ai = |A1 |
(1)
i=1
\
\ (−1)|J|−1 Ai = (−1)0 Ai = |A1 |
i∈{1} i∈J
J⊆[1]
X
(2)
J6=∅
For the induction step, let us suppose the theorem holds for n − 1.
!
n
[
n−1
[
Ai ∪ An =
Ai = i=1
(3)
i=1
We can use the formula |X ∪ Y | = |X| + |Y | − |X ∩ Y |.
!
n−1
n−1
[ [
=
Ai + |An | − Ai ∩ An =
i=1
(4)
i=1
Intersection of unions can be rewritten as a union of intersections.
n−1 n−1
[ [
=
Ai + |An | − (Ai ∩ An ) =
i=1
(5)
i=1
Let us define the substitution Bi := Ai ∩ An .
n−1
n−1
[ [ =
Ai + |An | − Bi =
i=1
i=1
S
S
We can now use the induction hypothesis on both Ai and Bi .
\ \ X
X
|J|−1 |K|−1 =
(−1)
(−1)
Bi =
Ai + |An | −
J⊆[n−1]
J6=∅
i∈J
K⊆[n−1]
K6=∅
∗ http://ze.phyr.us
1
i∈K
(6)
(7)
The expression (−1)
T
P
T
P
T
(−1)|K|−1 | Bi | is equivalent to (−1)(−1)|K|−1 | Bi | = (−1)|K| | Bi |.
\ \ X
X
(8)
Bi (−1)|K| (−1)|J|−1 Ai + |An | +
P
=
i∈J
J⊆[n−1]
J6=∅
i∈K
K⊆[n−1]
K6=∅
Since K 6= ∅, we can revert the substitution:
!
\
Bi =
i∈K
\
\
(Ai ∩ An ) =
i∈K
\
∩ An =
Ai
i∈K
Ai
i∈K∪{n}
(8) now becomes
X
\ |J|−1 (−1)
Ai + |An | +
i∈J
J⊆[n−1]
J6=∅
\
Ai (−1)|K| i∈K∪{n} K⊆[n−1]
X
(9)
K6=∅
Let us substitute K ∪ {n} with J. The expression |K| thus becomes |J| − 1 (with K defined as a
subset of [n − 1], K cannot contain n and thus |K ∪ {n}| = |K| + 1).
To replace the expression i ∈ K ∪ {n} with i ∈ J, we must impose several conditions on J as the
summation index:
• J 6= ∅ (the same condition that was imposed on K),
• J ⊆ [n] ∧ n ∈ J (n must be contained in every J, since J replaces K ∪ {n}),
• J 6= {n} (K ∪ {n} =
6 {n}, since K 6= ∅ and n 6∈ K ⊆ [n − 1]).
(9) now becomes
X
(−1)
|J|−1
\ Ai + |An | +
i∈J
J⊆[n−1]
J6=∅
X
|J|−1
(−1)
\ Ai (10)
i∈J
J⊆[n]
n∈J
J6=∅,{n}
The Inclusion-Exclusion Principle can be used on An alone (we have already shown that the theorem
holds for one set):
\ X
\
(−1)|J|−1 Ai = (−1)|{n}|−1 Ai = |An |
i∈{n} i∈J
J⊆{n}
J6=∅
(10) now becomes
X
(−1)
J⊆[n−1]
J6=∅
|J|−1
\ \ X
|J|−1 (−1)
Ai +
Ai +
i∈J
i∈J
J⊆{n}
J6=∅
X
J⊆[n]
n∈J
J6=∅,{n}
|J|−1
(−1)
\ Ai =
(11)
i∈J
For better readability, let us define
P1 := P([n − 1]) \ {∅}
P2 := P({n}) \ {∅} = {{n}}
P3 := P([n]) \ P([n − 1]) \ {∅, {n}}
and rewrite (11) in this way:
\ X
\ \ X
X
|J|−1 |J|−1 |J|−1 (−1)
=
(−1)
(−1)
Ai +
Ai +
Ai =
J∈P1
i∈J
J∈P2
i∈J
2
J∈P3
i∈J
(12)
Since the three sums consist of the same terms, we can combine them into one. As the sets P1 , P2 , P3
are disjoint, the summation condition now becomes
J ∈ (P1 ∪ P2 ∪ P3 ) = (P([n − 1]) \ {∅}) ∪ {{n}} ∪ (P([n]) \ P([n − 1]) \ {∅, {n}}) =
= (P([n − 1]) ∪ {{n}} ∪ (P([n]) \ P([n − 1]) \ {{n}}) \ {∅} = P([n]) \ {∅}
Finally, we can replace the logical condition J ∈ P([n])\{∅} by the equivalent statement J ⊆ [n], J 6= ∅.
The resulting formula is an instance of the Inclusion-Exclusion Theorem for n sets:
\ X
|J|−1 (13)
=
(−1)
Ai i∈J
J⊆[n]
J6=∅
Remark. It can be easily seen that every possible value of J is covered exactly once by the new summation condition
(J ⊆ [n], J 6= ∅):
∀J ⊆ [n], J 6= ∅
8
n 6∈ J
>
>
>
<
(⇔ J ⊆ [n − 1])
(
>
>
>
:n ∈ J
J = {n}
J 6= {n}
3
(⇔ J ⊆ {n})
(⇔ J ⊆ [n], n ∈ J, J 6= {n})
© Copyright 2026 Paperzz