Skip to content
Gioi Toan
Start learning
A thick book and a smiling magnifying glass

What is Inclusion-exclusion principle?

Short answer

The inclusion-exclusion principle is a rule for counting the number of elements of the union of two sets by taking the sum of the elements of the two sets and subtracting the number of common elements.

Type
Definition
First learned
Grade 7
Also called
nguyên lý bù trừ, quy tắc bù trừ
In English
inclusion-exclusion principle

Formulas

∣A∪B∣=∣A∣+∣B∣−∣A∩B∣|A \cup B| = |A| + |B| - |A \cap B|

Explanation

The inclusion-exclusion principle is used to count the number of elements of the union of two sets: if you add the number of elements of each set, the common elements are counted twice, so you must subtract the number of common elements once.

Formula: ∣A∪B∣=∣A∣+∣B∣−∣A∩B∣|A \cup B| = |A| + |B| - |A \cap B|. For three sets, the formula extends to adding each set, subtracting the pairwise intersections, then adding back the triple intersection.

This principle is often used in counting problems and real-life problems, such as counting the number of students who join at least one club.

Examples

Example 1

A class has 20 students who like football, 15 students who like basketball, and 8 students who like both. How many students like at least one sport?

See the solution to example 1

The number of students who like at least one sport is 20+15−8=2720 + 15 - 8 = 27 (students).

Common mix-ups

  • Do not add the number of elements of the two sets while ignoring the intersection, because then the common elements are counted twice.

Skills