Lesson 6: Advanced Principle of Inclusion & Exclusion (Pie)
Lesson 6: Advanced Principle of Inclusion & Exclusion (Pie)
- We learned that PIE allows us to calculate the number of objects that
are members of at least one group.
- But PIE is much more powerful than that. Today we will explore more
advanced uses of PIE.
6.1: REVIEW: WHAT IS PIE AGAIN?
If we have two sets, and , and we want to count the number of elements in
(that is, ), we can use this formula:
This formula ensures that for each of the following cases, an element is only
counted once:
1. Element is in neither nor
○ not counted at all
2. Element is in but not
○ counted only in term 1
3. Element is in but not
○ counted only in term 2
4. Element is in both and
○ added twice in terms 1 and 2, subtracted once in term 3
Review problem: SEM offers three languages for all of its 175 freshman, all of
whom must take at least one. 72 take Spanish, 48 take Latin, and 28 take
French. 30 students are taking both Spanish and Latin, 14 are taking Latin and
French, and 11 are taking French and Spanish. How many students are taking all
three?
Answer:
- It is very important to know how PIE applies to probability, as many
questions deal with probability instead of sets
- But as you see, these formulas are almost identical to what we saw for PIE
with sets earlier. So if you understood that, you should be good here.
- In questions, when they ask “what is the probability of X OR Y”... this
formula should come to mind
6.3: EXTENSION TO OTHER TYPES OF PROBLEMS
- Sometimes, there are PIE problems which are not just combinatorics and/or
probability. We aren’t going to look at a problem like this in the notes for
the sake of time, but there are a few problems in the challenge problems
section that extend the idea of PIE past combinatorics and probability. Just
remember that the general idea of PIE is to keep adding and subtracting more
and more intersections until you have counted everything exactly once.
our answer is .
Let’s analyze this a bit.
If a number is divisible by 2 and 3 but not 5, it is counted exactly once.
If a number is divisible by 3 and 5 but not 2, it is counted exactly once.
If a number is divisible by 2 and 5 but not 3, it is counted exactly once.
But what if a number is divisible by 2, 3, and 5? We add it thrice, and only
subtract it once! Thus it is double counted. To correct for this, we need to
subtract the count of numbers which are divisible by all 3 numbers twice, not
just once.
So our real answer is
Make sure you understand why!
There is no easy definitive way to know exactly how many times you are
over/undercounting something if you are looking for the number of elements
part of two or more sets. To solve a problem like this, you just have to think
carefully about how much you are over/undercounting each group of elements,
and ensure that in the end you only count each group that you want exactly
once.
CHALLENGE PROBLEMS:
1. My school now offers 3 new foreign languages: Arabic, Japanese, and
Russian. There are 50 students enrolled in at least one of the classes.
Suppose that 18 are taking both Arabic and Japanese. 15 are taking both Arabic
and Russian, 13 are taking both Japanese and Russian, and 7 are taking all
three languages. How many students are taking at least two languages?
2. What is the sum of all integers from 1 to 100 that are multiples of 2 or 3?
3. Is it possible that among a group of 20 9th graders, 15 play lacrosse, 12
play soccer, and 6 play both? Why or why not?
4. Dogs in the GoodDog obedience school earn a blue ribbon for learning how to
sit, a green ribbon for learning how to roll over, and a white ribbon for
learning how to stay. There are 100 dogs in the school. Suppose:
- 73 have blue ribbons, 39 have green ribbons, and 62 have white ribbons.
- 21 have a blue and green ribbon, 28 have a green and white ribbon, and
41 have a blue and white ribbon.
- 14 have all three ribbons.
How many dogs have no ribbons?
5. Five standard 6-sided dice are rolled. What is the probability that at
least 3 of them show a 6?
6. Sam can only remember 10-digit numbers if the first four digits are either
exactly the same as the next four digits or the last four digits of the number
(or both). For example, Sam can remember 1234123456 and 3444533444 but not
3344443334. How many 10-digit numbers can Sam remember?
7. 7 people are having a water-balloon fight. At the same time, each of the 7
people throws a water balloon at one of the other 6 people, chosen at random.
What is the probability that there are 2 people who throw balloons at each
other?
8. Prove that you can use PIE for probability using the properties of
probability you have learned.
HINT: Use both combinatorial and constructive probability in your proof.
5.
6.
7.