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.
Today, we're going to talk about the principle of inclusion-exclusion. This principle helps us calculate the size of unions of sets, especially when they overlap. Can anyone guess why we need this principle?
Is it because simply adding sets doesn't give the correct count if they share elements?
Exactly! When we add the sizes of two sets, if they have common elements, we inadvertently count those twice. The solution? We subtract the intersection. Now, what if I had three sets?
We would subtract the intersections of each pair of sets and then add the triple intersection back, right?
Correct! That’s a critical step in ensuring we count everything just once. Let's summarize this: for two sets, the formula is |A ∪ B| = |A| + |B| - |A ∩ B|. Any questions before we move on?
Let’s extend our discussion to three sets – say A, B, and C. Can anyone tell me the formula for |A ∪ B ∪ C|?
It’s |A| + |B| + |C| - |A ∩ B| - |A ∩ C| - |B ∩ C| + |A ∩ B ∩ C|!
Right! We add their sizes, subtract the sizes of each pairwise intersection, but then we have to add back the intersection of all three sets since those elements were subtracted too many times.
How can we ensure that works for any number of sets?
Great question! We can generalize the formula to n sets using a summation notation that alternates between addition and subtraction based on the size of the intersections. The power of PIE is in its ability to systematically address the overlaps!
Now let’s apply what we’ve learned by solving a problem. Suppose we want to count the number of ways to arrange three students where none can sit next to each other. How would we use PIE here?
Maybe we can first count all arrangements and then subtract the cases where at least two are together?
Exactly! You’d find all arrangements, then apply PIE by counting arrangements that violate your condition. Let’s calculate those cases step-by-step.
Could we also summarize each step as we go?
Absolutely! As we solve, we’ll keep a running summary to reinforce our understanding. We note the total arrangements, then calculate how many pairwise arrangements violate the rule, ensuring we've accounted for any overlaps correctly.
Now let’s talk about proving our formula. Can anyone remember how we might prove the inclusion-exclusion principle?
By induction? We can start with the base case of two sets and then assume it’s true for k sets!
Well done! If we can show that it holds for k+1 sets using the assumption that it’s true for k, then we prove it for all n sets. The strategy is critical!
That makes sense. It’s a nice way to build up our reasoning logically!
Exactly! This logical buildup forms the backbone of many mathematical proofs, reinforcing our understanding of the concepts!
Inclusion-exclusion, we add and subtract, all overlaps captured, that’s a fact!
Imagine a community garden where flowers bloom in sections. Some flowers grow in multiple sections. Counting them without overlap is like using inclusion-exclusion.
Use 'U-S-I' to remember: Union minus Size of Intersection for every overlap.
I.E. for the principle: 'In Every set, count It Once – add, subtract pairs, then add triples!'
Term
Inclusion-Exclusion Principle
Click to flip
Term
Cardinality
Click to flip
Term
Union
Click to flip
Term
Intersection
Click to flip
A formula that calculates the size of the union of multiple sets by considering overlaps among them.
The number of elements within a set.
A set that contains all elements that are in any of the given sets.
A set that contains all elements that are common to the given sets.
The intersection considered for each pair of sets.
This section introduces the principle of inclusion-exclusion as a method for counting the cardinality of sets and their combinations.
The section elaborates on the principle of inclusion-exclusion, explaining how to compute the size of unions of multiple sets by addressing overlaps between them. It provides proofs and examples, extending the principle to n sets and discussing applications in various counting problems.
In this section, we delve into the principle of inclusion-exclusion (PIE), which is a fundamental concept in counting that allows us to determine the size of unions of sets while accounting for overlaps. The principle states that to find the cardinality of the union of two sets, we sum their individual cardinalities and subtract the cardinality of their intersection:
If A and B are two sets, then the formula for their union is:
|A ∪ B| = |A| + |B| - |A ∩ B|
This principles extends to three sets and beyond, encompassing n sets.
Extending to three sets, the formula is:
|A ∪ B ∪ C| = |A| + |B| + |C| - |A ∩ B| - |A ∩ C| - |B ∩ C| + |A ∩ B ∩ C|
The general formula for n sets takes into account combinations of intersections:
|A₁ ∪ A₂ ∪ ... ∪ Aₙ| = Σ |Aᵢ| - Σ |Aᵢ ∩ Aⱼ| + Σ |Aᵢ ∩ Aⱼ ∩ Aₖ| - ... + (-1)ⁿ |A₁ ∩ A₂ ∩ ... ∩ Aₙ|
The section provides proof of the effectiveness of this principle by considering how each element contributes to the count based on its membership in the sets. It emphasizes that the formula effectively counts each element in the union exactly once.
Follow-up examples use inclusion-exclusion to solve practical problems, such as calculating the number of valid solutions to equations under restrictions and counting onto functions. We tackle these examples to highlight the principle’s utility in combinatorial scenarios.