You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pick an example $\sum_{i,j \in \binom{[n]}{2}}1_{v \in A_i \cap A_j}$, whenever $i > k$ or $j > k$, the indicator function $1_{v\in A_i \cap A_j}$ gives us 0. Then the term: $\sum_{i,j \in \binom{[n]}{2}}1_{v \in A_i \cap A_j}$ counts the number of unordered pairs $(i, j)$ such that $i, j \leq k$, which is $\binom{k}{2}$. This works for other terms as well. Also notice that the left side of this equation must be 1.Now the equation becomes:
$$
\begin{align*}
1 &= \binom{k}{1} - \binom{k}{2} + \binom{k}{3} - \ldots + (-1)^{k+1}\binom{k}{k}\
\binom{k}{0} + \binom{k}{2} + \binom{k}{4} \ldots &= \binom{k}{1} + \binom{k}{3} + \binom{k}{5} + \ldots
\end{align*}
$$
The second line must be true by a binomial identity we have seen before. This means that the inclusion-exclusion principle can be derived from this identity, thus the principle is true. $\blacksquare$
I am not 100% sure this proof is correct. Please read book / other prooves if possible.
There is another form:
Let $A_1, \ldots A_n$ be a sequence of finite subsets of a finite set then:
$$
|\bar A_1 \cap \bar A_2 \cap \cdots \cap \bar A_n| = |S| - | A_1 \cup A_2 \cup \cdots \cup A_n|
$$
$$
\begin{align*}
x \in |\bar A_1 \cap \bar A_2 \cap \cdots \cap \bar A_n|\\
\implies x \not \in A_i, \forall i\\
\implies x \not \in \bigcup A_i
\end{align*}
$$
$\supseteq$
$$
\begin{align*}
x \in |\bar A_1 \cup \bar A_2 \cup \cdots \cup \bar A_n|\\
\implies x \not \in A_i, \forall i\\
\implies x \not \in \bigcap A_i
\end{align*}
$$
Or by DeMorgan's rules.
Exercise
How many permutations of the letters M, A, T, H, I, S, F, U, N are there such that none of the words MATH, IS, and FUN occur as consecutive letters?
Solution:
Let $\mathcal{P} = $ set of all permutations.
$A_M = \set{\text{permutations in } \mathcal{P} \text{ with MATH occurring as continuous letters}}$
$A_I = \set{\text{permutations in } \mathcal{P} \text{ with IS occurring as continuous letters}}$
$A_F = \set{\text{permutations in } \mathcal{P} \text{ with FUN occurring as continuous letters}}$
Bad permutations $= A_M \cup A_I \cup A_F$. Then by the inclusion-exclution principle:
$$
\begin{align*}
|A_M \cup A_I \cup A_F| &= |A_M| + |A_I| + |A_F| \
&- |A_M \cap A_I| - |A_M \cap A_F| - |A_F \cap A_I|\
&+ |A_M \cap A_I \cap A_F|
\end{align*}
$$
The rest is to put MATH, IS, and FUN as group respectively. Putting MATH as a group gives us $|A_M| = 6!$. Putting MATH and FUN as group at the same time gives us $|A_M \cap A_F| = 4!$.
None of them occurs is: $9! - |A_M \cup A_I \cup A_F|$. Done.
Combinations with repetition
Previously, we have learned $\binom{n}{r}$ and Theorem 2.5.1 $\binom{r+k-1}{r}$. What happens in between?
Problem
Determine the number of 10-combinations of the multiset $T = \set{3\cdot a, 4\cdot b,5\cdot c}$.
Solution:
It is not easy to apply inclusion-exclution on this directly. But we can do some trick.
Define $S$ to be the set of $n$-combinations of the set $\set{10 \cdot a, 10 \cdot b, 10 \cdot c}$.
$|S| = \binom{10+3-1}{10} = \binom{12}{2}$ by theorem 2.5.1. Then, we want to find the bad combinations.
Note that every combination in the set $T$ has at most $3a, 4b, 5c$. Whenever all of these three conditions are not satisfied, we put it into the "bad combination".
$A_1 = $ combinations in $S$ with $\geq 4 $ a's
$A_2 = $ combinations in $S$ with $\geq 5 $ b's
$A_3 = $ combinations in $S$ with $\geq 6 $ c's
Then, the number of 10-combinations of $T = |S| - |A_1 \cup A_2 \cup A_3|$.
$|A_1| = $ number of solutions of $x_1 + x_2 + x_3 = 10$ with $x_1 \geq 4$. This is equivalent to: number of solutions of $x_1 + x_2 + x_3 = 6$. Apply theorem 2.5.1, we get $\binom{6+3-1}{6} = \binom{8}{6}$
Similarly, $|A_1 \cap A_2| = $ number of solutions of $x_1 + x_2 + x_3 = 10$ with $x_1 \geq 4, x_2 \geq 5$. This is equivalent to: number of solutions of $x_1 + x_2 + x_3 = 1$. There are 3.
Suppose a class of eight boys takes a walk every day. The students walk in a line of eight so that every boy except the first is preceded by another. In order that a child not see the same person in front of him, on the second day the students decide to switch positions so that no boy is preceded by the same boy who preceded him on the first day. In how many ways can they switch positions?
Theorem
Let $Q_n$ denote the number of permutations of $\set{1, 2, \ldots, n}$ in which none of the patterns $12, 23, \ldots, (n-1)n$ occurs. Then,
$$
Q_n = n! + \sum_{j=1}^{n-1}(-1)^j \binom{n-1}{j}(n-j)!
$$
Proof
We want to find the bad sets: For $i \in \set{1, \ldots, n-1}$, define $A_i = $ permutations of $[n]$ so that the pattern $i,i+1$ shows up. Our goal is to use the inclusion-exclusion principle to calculate $n! - |\bigcup_{i=1}^{n-1}A_i|$.
Question: What is $|A_i|$? Ans: $(n-1)!$ if we group $i, i+1$ together, then there are $n-1$ objects.
Questions: What is $|A_i \cap A_j|$? Ans: there are two situations: (1) If they intersect, such as $123$, then we have one object of size three. This is $(n-2)!$. If they don't, we should have two objects of size two, so also $(n-2)!$
Then, let $\set{i_1, \ldots, i_k} \in \binom{[n-1]}{k}$, then we want to show: $|A_{i_1} \cap \cdots \cap A_{i_k}| = (n-k)!$
Suppose that $\set{i_a, i_a+1} \cap \set{i_b, i_b+1} = \varnothing, \forall a \neq b$. Then there are $n-k$ objects.
Suppose some block has more than two objects, we lose the elements that intersets, but the same amount of elements are set free to be outside the block. (Consider the case (1234) and (5678) becomes (123456)).
Now, the expression:
$$
\sum_{\set{i_1, \ldots, i_k} \in \binom{[n-1]}{k}}
|A_{i_1} \cap \cdots \cap A_{i_k}| = (n-k)! \cdot \binom{n-1}{k}
$$
Then apply the inclusion-exclution:
$$
\left|\bigcup_{i=1}^{n-1}A_i\right| = \sum_{j=1}^{n-1}(-1)^j \binom{n-1}{j}(n-j)!
$$
Another application:
The Euler Function
For $n \in \mathbb{N}$, define $\varphi(n)$ to be the number of positive integers not exceeding $n$ that are relatively prime to $n$. We have:
$$
\varphi(n) = n\prod_{p \mid n}\left(1 - \frac{1}{p}\right)
$$
Note that the $p$ are the primes that divides $n$.
Example: $\varphi(6) = |\set{1, 5}| = 2$
Proof
Let $n = p_1^{\alpha_1} p_2^{\alpha_2} \cdots p_k^{\alpha_k}$ where $p_i$ is prime and $\alpha_i \geq 1$
$A_i = \set{m \in [n] : p_i \mid m}$
$\varphi(n) = n - \left|\bigcup_{i=1}^{k} A_i \right|$