01 / 21

Inclusion-Exclusion
Principle

Learn how to count elements in overlapping sets without double-counting, using the foundational formula of combinatorics.

Finite Mathematics

Why Counting Gets Tricky

In a class of 30 students, 20 play soccer and 18 play basketball. If 8 students play both, how can we find the total number of students playing sports? Simply adding the groups gives \( 20 + 18 = 38 \), which is wrong because the students who play both are counted twice.

Soccer
only: 12
Basketball
only: 10
Both
8
Class = 30 students

What Is Inclusion-Exclusion?

The Inclusion-Exclusion Principle is a counting technique that corrects for over-counting when sets overlap. The core idea: include each set, then exclude the overlap.

Include
Add the sizes of every individual set together
Exclude
Subtract the sizes of every pairwise intersection
Correct
For three or more sets, add back triple intersections, and so on

Key Vocabulary

Union: \( A \cup B \)
Everything in \( A \), in \( B \), or in both. "A or B."
Intersection: \( A \cap B \)
Only the elements that belong to both \( A \) and \( B \). "A and B."
Cardinality: \( |A| \)
The number of elements in set \( A \).
Disjoint Sets
Sets with no overlap: \( A \cap B = \emptyset \), so \( |A \cup B| = |A| + |B| \).

The Two-Set Formula

For any two finite sets \( A \) and \( B \):

A
only A
B
only B
\( A \cap B \)
overlap
\( +|A| \)
\( +|B| \)
\( -|A \cap B| \)

We add both sets, then subtract the intersection once to undo the double-count.

Extending to Three Sets

For three finite sets \( A \), \( B \), and \( C \):

A
B
C
\( A \cap B \cap C \)

Pattern: add singles, subtract pairs, add back the triple intersection.

Disjoint vs. Overlapping Sets

Disjoint Sets Overlapping Sets
Intersection \( A \cap B = \emptyset \) \( A \cap B \neq \emptyset \)
Union formula \( |A| + |B| \) \( |A| + |B| - |A \cap B| \)
Double-counting? No Yes: must subtract overlap
When to use I-E Not needed (addition rule suffices) Always needed

How to Apply the Principle

1
Identify the sets. What groups are you counting? Label them \( A \), \( B \), (and \( C \) if needed).
2
Find each cardinality. Write down \( |A| \), \( |B| \), and every intersection: \( |A \cap B| \), etc.
3
Plug into the formula. Two sets: \( |A| + |B| - |A \cap B| \). Three sets: add the extra terms.
4
Verify. Check that each region in the Venn diagram adds up to the total, or that the answer makes logical sense.

Example 1: Two-Set Problem

In a survey of 100 people: 60 like coffee, 45 like tea, and 20 like both. How many like coffee or tea?

Coffee
40
Tea
25
20
n = 100

Example 2: Finding the Intersection

A gym has 200 members. 120 use the weight room, 90 use the pool, and 160 use at least one. How many use both?

Example 3: Three-Set Problem

In a school of 50 students: 25 take Art, 20 take Band, 18 take Choir. Pairwise overlaps: \( |A \cap B| = 8 \), \( |A \cap C| = 6 \), \( |B \cap C| = 5 \). Triple: \( |A \cap B \cap C| = 3 \). How many take at least one?

So 47 students take at least one activity, and \( 50 - 47 = \textbf{3} \) take none.

The Complement Shortcut

Sometimes it is easier to count those outside the union. If the universal set has \( N \) elements:

1
Compute the union using inclusion-exclusion.
2
Subtract from the total to find the complement.

Reading a Venn Diagram

Each region of a two-set Venn diagram represents a distinct group. All four regions must sum to the total.

Universal set U
Only A
Only B
\( A \cap B \)
Neither
\( |A| - |A \cap B| \)
\( |B| - |A \cap B| \)
\( |A \cap B| \)
\( N - |A \cup B| \)

The Alternating Sign Pattern

For \( n \) sets, the general inclusion-exclusion formula alternates signs:

+ Singles
Add all individual set sizes: \( \binom{n}{1} \) terms
- Pairs
Subtract all pairwise intersections: \( \binom{n}{2} \) terms
+ Triples
Add back all triple intersections: \( \binom{n}{3} \) terms

The pattern continues: +, -, +, -, ... alternating with each layer.

Common Mistakes

✕ Forgetting to Subtract
Simply adding \( |A| + |B| \) without subtracting \( |A \cap B| \) counts overlapping elements twice.
✕ Subtracting Too Much
For three sets, subtracting all pairs removes the triple intersection too many times: you must add \( |A \cap B \cap C| \) back.
✕ Wrong Sign for Layer
Mixing up which terms are added and which are subtracted. Remember: intersections of an odd number of sets (singles, triples) are added, while intersections of an even number of sets (pairs) are subtracted.

Summary Table

Scenario Formula # of Terms
Two disjoint sets \( |A| + |B| \) 2
Two overlapping sets \( |A| + |B| - |A \cap B| \) 3
Three overlapping sets \( |A|+|B|+|C| - (|A \cap B|+|A \cap C|+|B \cap C|) + |A \cap B \cap C| \) 7
Complement (neither) \( N - |A \cup B| \) 2

Question 1 of 5

In a group of 80 students, 50 study French and 40 study Spanish. If 15 study both, how many study at least one language?

Question 2 of 5

Sets \( A \) and \( B \) have \( |A| = 30 \), \( |B| = 25 \), and \( |A \cup B| = 45 \). What is \( |A \cap B| \)?

Question 3 of 5

If \( |A| = 20 \), \( |B| = 15 \), \( |C| = 18 \), \( |A \cap B| = 6 \), \( |A \cap C| = 5 \), \( |B \cap C| = 4 \), and \( |A \cap B \cap C| = 2 \), what is \( |A \cup B \cup C| \)?

Question 4 of 5

150 households were surveyed. 85 have a dog, 60 have a cat, and 25 have both. How many have neither a dog nor a cat?

Question 5 of 5

Which term is missing from this incorrect formula?
\( |A \cup B \cup C| = |A| + |B| + |C| - |A \cap B| - |A \cap C| - |B \cap C| \)