Section 6.1 – Principal of Inclusion-Exclusion (PIE)¶
Example
Let $\mathcal U$ be the students in the first three rows. Let $C$ be the students in the first three rows who have owned a cat. Let $D$ be the students in the first three rows who have owned a dog. Let $N$ be the students in the first three rows who have owned neither a cat or a dog. So,
Claim,
in general this doesn't work, since a student could own a cat and a dog.
Theorem -- 2-PIE¶
For sets $A$ and $B$ of some universal set $\mathbb U$,
Example
Of $50$ feline contestants at the Ladysmith cat show, $40\%$ ($20$) are short-haired and $32$ like laser pointers.
A) Find a formula for the number roof long haired cats that don't like laser pointers.
Let,
So,
If $\left|S \cap L\right| = 2$ then $\left|S^C \cap L^C\right| = 0$ (the minimum). One the other hand if $|S \cap L| = 20$ then $\left|S^C \cap L^C\right| = 18$.
2-set Counting Principals¶
Let $A$ and $B$ be sets of the universal set $\mathcal U$.
- $\left| A \cup B \right| = \left| A \right| + \left| B \right| - \left| A \cap B \right|$
- $\left| A \cap B \right| \le \min(\left| A \right|,\left| B \right|)$
- $\left| A^C \right| = \left| \mathcal U \right| - \left| A \right|$
- $\left| A \setminus B \right| = \left| A \right| - \left| A \cap B \right|$
- $\left| A \oplus B \right| = \left| A \right| + \left| B \right| - 2\left| A \cap B \right|$
Recall¶
- $|A \cup B| = |A| + |B| - |A \cap B|$
- $|A \cup B \cup C| = |A|+|B|+|C|-|A \cap B|-|A \cap C| - |B \cap C| + |A \cap B \cap C|$
Example
On an exam there are 25 questions, of which 18 are "hard", 10 are Multiple Choice and 6 are proofs.
How many hard multiple choice could there be?¶
We have
"easy" multiple choice questions. We therefore can;t have zero hard multiple choice questions since that would imply we need 10 easy multiple choice questions.
We want to find,
How many easy, long, non-proof could there be?¶
We want,
PIE Theorem¶
Let $A_1,A_2,A_3,…,A_n$ be subsets of sue universal set $\mathcal U$, then,
Example
Find $\Phi(150)$ where phi is the Euler function, i.e. al numbers less than $150$ that are cop rime to $150$.
Solution
- $n$ is cop rime to $150$ if $n$'s prime decomposition does not contain a $2,3$ or $5$.
- Let $A$ be the set of $1 \le n \le 150$ that do contain a $2$ in it's prime decomposition.