Week2 Session 1 Application Venn Diagram
Week2 Session 1 Application Venn Diagram
Session 1 and 2
Note that |A| + |B| counts each element that is in A but not in B or in B but not in A exactly
once and each element that is in both A and B exactly twice.
Thus, if the number of elements that are in both A and B is subtracted from |A| + |B|,
elements in A ∩ B will be counted only once.
Hence,
5
Principle of Inclusion/Exclusion
| A B |=| A | + | B | − | A B |
Also,
| A |=| A B | − | B | + | A B |
Principle of Inclusion & Exclusion
|A B| = |A| + |B| - |A B|
• The above equation represents the principle of
inclusion and exclusion for two sets A and B.
• The name comes from the fact that to calculate the
elements in a union, we include the individual
elements of A and B but subtract the elements
common to A and B so that we don’t count them
twice.
• This principle can be generalized to n sets.
1- n(AUB) = n(A) + n(B) - n(AnB)
2- n(AUBUC) = n(A)+n(B)+n(C)-n(AnB)-n(BnC)-n(AnC)+n(AnBnC)
n(AuB) = Total number of elements related to any of the two events A & B.
n(AnB) = Total number of elements related to both A & B
n(AuBuC) = Total number of elements related to any of the three events A, B & C.
Universal set U = 40
26
Exercise 2.2 pg # 136 from recommended book by Kenneth H. Rosen