The Inclusion-Exclusion Principle is a fundamental counting technique in combinatorics that allows us to calculate the size of the union of multiple sets by considering their intersections. The principle helps avoid overcounting elements that belong to more than one set.
General Formulation
For two sets ( A ) and ( B ), the principle states:
[
|A \cup B| = |A| + |B| - |A \cap B|
]
This means the total number of elements in either ( A ) or ( B ) is the sum of the sizes of ( A ) and ( B ) minus the size of their intersection (since those elements are counted twice).
For three sets ( A, B, ) and ( C ), the formula extends to:
[
|A \cup B \cup C| = |A| + |B| + |C| - |A \cap B| - |A \cap C| - |B \cap C| + |A \cap B \cap C|
]
Examples
Example 1: Two Sets
Suppose:
- ( |A| = 10 ) (Set ( A ) has 10 elements)
- ( |B| = 8 ) (Set ( B ) has 8 elements)
- ( |A \cap B| = 3 ) (3 elements are common to both ( A ) and ( B ))
Then, the number of elements in ( A \cup B ) is:
[
|A \cup B| = 10 + 8 - 3 = 15
]
Example 2: Three Sets
Let:
- ( |A| = 20 )
- ( |B| = 15 )
- ( |C| = 10 )
- ( |A \cap B| = 5 )
- ( |A \cap C| = 4 )
- ( |B \cap C| = 3 )
- ( |A \cap B \cap C| = 2 )
Then, the size of the union is:
[
|A \cup B \cup C| = 20 + 15 + 10 - 5 - 4 - 3 + 2 = 35
]
Example 3: Counting Students in Courses
Suppose in a university:
- 50 students take Mathematics,
- 40 take Physics,
- 30 take Chemistry,
- 10 take both Mathematics and Physics,
- 8 take both Mathematics and Chemistry,
- 5 take both Physics and Chemistry,
- 3 take all three subjects.
The total number of students taking at least one of these subjects is:
[
50 + 40 + 30 - 10 - 8 - 5 + 3 = 90
]
Key Idea
The inclusion-exclusion principle ensures that elements in overlapping regions are counted correctly by alternately adding and subtracting intersections. This method is widely used in probability, number theory, and computer science.
Would you like a more advanced example or an application in probability?