The Inclusion-Exclusion Principle
Explore the inclusion-exclusion principle to accurately find the cardinality of unions of sets. Learn how to account for overlapping elements in two or three sets, apply this method to solve practical problems, and understand its generalization for any number of sets.
The inclusion-exclusion principle
The inclusion-exclusion principle is a counting technique used to count the number of elements in a union of sets so that each element is counted only once.
Case of two sets
Remember that the relation between the cardinalities of two arbitrary sets,
If
In general,
Let’s look at the reason behind why this equation holds. Here,
Example 1
In a class, 30 students are enrolled in physics, and 25 students are enrolled in mathematics. If 15 students are enrolled in both physics and mathematics, what is the total number of students in that class? Let’s assume that there is no student in the class who is not enrolled in either of these subjects.
To solve this problem, let the set of students in the class be