Probability

Inclusion–Exclusion Principle

Counters sit in two overlapping chalk loops.

Inclusion–Exclusion Principle definition

The inclusion–exclusion principle counts a union by adding individual set sizes and then correcting for overlaps.

In Spanish
principio de inclusión y exclusión
Topic
Counting and combinatorics

Inclusion–Exclusion Principle in a picture

Inclusion–Exclusion Principle diagramAdd the two set sizes and subtract their shared part once.8 in AFirst set6 in B, 2 in bothThe shared 2 appear twice8 + 6 − 2 = 12Members in the union
Add the two set sizes and subtract their shared part once.

How it works

For two sets, compute |A ∪ B| = |A| + |B| − |A ∩ B|. For three sets, add the three sizes, subtract the sizes of the three pairwise intersections, and add the triple intersection once. Continue alternating signs for larger collections.

Worked examples

Twelve students play soccer, nine play tennis, and five play both. How many play either?

12 + 9 − 5 = 16.

Two sets have sizes 5 and 4 and are disjoint. What is their union size?

9, since the intersection contributes zero.

What do you do with a triple overlap after subtracting each pairwise overlap?

Add its size once, because each member was added three times and subtracted three times.

Common mistake

In a three-set problem, include members of the triple intersection in the pairwise intersection sizes unless the counts are explicitly given as pair-only regions.

Quick check

How often was a shared member counted when you first add two set sizes?

Show answer

Twice.

What operation represents belonging to either set?

Show answer

Union.

What operation represents belonging to both?

Show answer

Intersection.

Sources

Flashcard

Inclusion–Exclusion Principle

Reveal the definition

The inclusion–exclusion principle counts a union by adding individual set sizes and then correcting for overlaps.

Effortless Math. “Inclusion–Exclusion Principle.” Math Dictionary.