Inclusion Exclusion

advertisement
Inclusion-Exclusion Principle
See: Rosen, p.239 (Section 4.1)
Brualdi, Chapter 6 (p.153)
any decent reference
Possesses
Property
"A"
Possesses
Property
"B"
Very often it is easier to count “sub-categories” of some sort, then add up
these answers to find the total.
The ‘Addition Principle’ specifies that as long as the sub-categories don’t
overlap and our subcategories are extensive enough to include all the items we
need to count, the total count = the sum of the sub-counts.
For two subcategories, it is relatively easy to compensate for overlap
between the subcategories:
π‘‡π‘œπ‘‘π‘Žπ‘™ πΆπ‘œπ‘’π‘›π‘‘ =
(# π‘π‘œπ‘ π‘ π‘’π‘ π‘ π‘–π‘›π‘” "𝐴") + (# π‘π‘œπ‘ π‘ π‘’π‘ π‘ π‘–π‘›π‘” "𝐡") − (# π‘π‘œπ‘ π‘ π‘’π‘ π‘ π‘–π‘›π‘” 𝐴 𝒂𝒏𝒅 𝐡)
(Using set notation: |𝐴 ∪ 𝐡| = |𝐴| + |𝐡| − |𝐴 ∩ 𝐡|.)
Direct Example:
How many numbers between 1 and 30 are divisible by 3 or 5?
A list to let us check: 3, 5, 6, 9, 10, 12, 15, 18, 20, 21, 24, 25, 27, 30
Example related to the concept:
There are twelve dogs romping in a park. Seven of the dogs have some
white spots on them. Six of the dogs have some black spots on them.
If three dogs don’t have any spots at all, then how many dogs have both
black spots and white spots?
For more than two categories, the situation is a bit more complex:
"A"
"B" "C"
π‘‡π‘œπ‘‘π‘Žπ‘™ = ("A") + ("𝐡") + ("𝐢") − (𝐴&𝐡) − (𝐡&𝐢) − (𝐴&𝐢) + (𝐴&𝐡&𝐢)
Using set notation:
|𝐴 ∪ 𝐡 ∪ 𝐢| = |𝐴| + |𝐡| + |𝐢| − |𝐴 ∩ 𝐡| − |𝐴 ∩ 𝐢| − |𝐡 ∩ 𝐢| + |𝐴 ∩ 𝐡 ∩ 𝐢|
Download