Search the courses, subjects, tracks, games and features, or jump straight to a page.
Learn it your way
A short class with Sarah and her students. The other ways are under More.
Sign up free to listen. Transcripts are free to read.
Welcome, everyone! Today, we will explore the principle of inclusion-exclusion. Let's start with the union of two sets. Can anyone tell me what we would need to calculate this?
Is it just adding the sizes of both sets?
That's a great starting point, but we have to subtract the intersection, which counts some elements twice. Hence, the formula is |A ∪ B| = |A| + |B| - |A ∩ B|.
Why do we have to subtract the intersection?
Good question! Imagine we have common elements in both sets; counting both sets would count those elements twice. Thus, we subtract once to correct our total.
I see! So we avoid over-counting.
Exactly! Now, let’s summarize: we always add the individual sets and subtract the intersection to find the union.
Now that we have the basics down, what do you think changes when we add a third set, say C?
Do we just add |C|?
Yes, but we also need to account for the intersections among all three sets. So the formula becomes |A ∪ B ∪ C| = |A| + |B| + |C| - |A ∩ B| - |B ∩ C| - |A ∩ C| + |A ∩ B ∩ C|.
Ah, this seems more complicated!
It may seem that way, but just follow the pattern: we add, subtract the pairwise intersections, and then add back the intersection of all three.
So it’s like balancing the counts?
Correct! And this principle guides us as we will generalize to n sets.
Let's take it further—if we have n sets, how can we express the union?
Do we just keep adding terms?
Sort of! We use summation notation. The formula will be |A_1 ∪ A_2 ∪ ... ∪ A_n| = ∑ |A_i| - ∑ |A_i ∩ A_j| + ... + (-1)^{n+1} |A_1 ∩ A_2 ∩ ... ∩ A_n|.
So we have alternating positive and negative signs?
Exactly! This alternation is crucial for balancing the counts. Does anyone remember why we alternated?
To correct for over-counting at different levels of intersection?
Spot on! Now let's apply this understanding to some examples.
Add with speed, but oh beware, subtract the overlap with care!
Imagine you have two friends inviting guests to a party. If both invite a friend in common, counting each invitation twice means trouble. So you recall to remove that duplicate invitation!
For n sets: A, B, C we can remember: Add |A|, |B|, |C| then subtract intersections one and two, alternating back and forth through.
UVI - Union (U), Intersections (I), Versatility (V) - for understanding how to manage multiple sets in counting.
Term
Inclusion-Exclusion Principle
Click to flip
Term
Cardinality
Click to flip
Term
Union of Sets
Click to flip
This section introduces the principle of inclusion-exclusion for counting elements in the union of n sets and discusses its generalization.
The section elaborates on the principle of inclusion-exclusion, which is crucial for calculating cardinalities of the union of multiple sets. It explains how to extend this principle from two and three sets to n sets, including detailed examples and explanations of how to avoid over counting.
In this section, we delve deep into the principle of inclusion-exclusion (PIE), a fundamental concept in combinatorics used to count the number of elements in the union of multiple sets without over-counting. We start with the case of two sets, where the cardinality of the union can be expressed simply as:
The cardinality of the union of two sets A and B is given by:
This formula ensures that the elements counted in both A and B (the intersection) are not double-counted.
Building on the two-set example, we can extend this to three sets A, B, and C:
Here, we subtract the pairwise intersections to adjust for double-counting and add back the intersection of all three sets since it was subtracted thrice.
The principle can be generalized for n sets. If we have sets A_1, A_2, ..., A_n, the cardinality of their union is given by:
This alternating sum accurately counts occurrences of elements within the union of all sets without duplication.
The principle of inclusion-exclusion has numerous applications in counting problems, such as finding derangements, solving equations with restrictions, and characterizing functions between sets, thereby providing a powerful combinatorial tool.