Section2.6Principles of counting
¶It is often useful in both pure and applied mathematics to count the sizes of finite sets. In this section we prove some basic theorems of this sort. If \(A\) is a set, let \(\abs{A}\) denote the number of elements in \(A\text{.}\) Note that \(\emptyset\) is a finite set with \(\abs{\emptyset} = 0\text{.}\)
Theorem2.6.1Sum Rule
If \(A,B\) are disjoint finite sets then \(\abs{A \cup B} = \abs{A} + \abs{B}\text{.}\) More generally, if \(A_1, \ldots, A_n\) is a pairwise disjoint collection of finite sets, then
\begin{equation*}
\abs{ \bigcup_{j=1}^n A_j } = \sum_{j=1}^n \abs{ A_j }.
\end{equation*}
Obvious, but we omit the technical proof until we have a proper discussion of the definition of the number of elements in a set, which won't occur until Chapter 5.
Theorem2.6.2
For finite sets \(A, B\text{,}\) which are not necessarily disjoint,
\begin{equation*}
\abs{ A \cup B } = \abs{A} + \abs{B} - \abs{A \cap B}.
\end{equation*}
Obvious when you look at a Venn diagram, but we omit the technical proof for similar reasons.
Theorem2.6.3Inclusion–Exclusion Principle
Let \(A_1, \ldots, A_n\) be a collection of finite sets. Then
\begin{equation*}
\abs{ \bigcup_{j=1}^n A_j } = \sum_{j=1}^n \left( (-1)^{j+1} \sum_{1 \le n_1 \lt \cdots \lt n_j \le n} \abs{ \bigcap_{k=1}^j A_{n_k} } \right).
\end{equation*}
In the above formula the sum is taken over all subcollections of \(j\) different sets from among \(A_1, \ldots, A_n\text{.}\) In particular, when \(n = 3\text{,}\) the above becomes
\begin{align*}
\abs{ A_1 \cup A_2 \cup A_3 } &= \quad \big( \abs{A_1} + \abs{A_2} + \abs{A_3} \big)\\
&\quad - \big( \abs{A_1 \cap A_2} + \abs{A_1 \cap A_3} + \abs{A_2 \cap A_3} \big)\\
&\quad + \abs{A_1 \cap A_2 \cap A_3}
\end{align*}
By induction and using Theorem 2.6.3.
Theorem2.6.4Product Rule
If \(A,B\) are disjoint finite sets then \(\abs{A \times B} = \abs{A} \cdot \abs{B}\text{.}\) More generally, if \(A_1, \ldots, A_n\) is a pairwise disjoint collection of finite sets, then
\begin{equation*}
\abs{ A_1 \times A_2 \times \cdots \times A_n } = \prod_{j=1}^n \abs{ A_j }.
\end{equation*}
Using induction and the Sum Rule.
Definition2.6.5Permutation (combinatorics)
A permutation of a finite set is an arrangement of the elements in a particular order.
For the next theorem, recall that the factorial of a positive integer \(n\) is defined inductively by
\begin{gather*}
0! = 1\\
n! = n(n-1)!
\end{gather*}
Equivalently, \(n! = n(n-1)(n-2)\cdots 1\text{.}\)
Theorem2.6.6
The number of permutations of a set with \(n\) elements is \(n!\)
By induction on the number of elements in the set.
Theorem2.6.7
If \(n \in \mathbb{N}\) and \(r \in \mathbb{Z}\) with \(0 \le r \le n\text{,}\) then the number of permutations of any \(r\) distinct objects from a set of \(n\) objects is
\begin{equation*}
\frac{n!}{(n-r)!} = n(n-1)(n-2)\cdots(n-r+1).
\end{equation*}
By induction on \(r\) and Theorem 2.6.6.
Definition2.6.8Combination
For \(n \in \mathbb{N}\) and \(r \in \mathbb{Z}\) with \(0 \le r \le n\text{,}\) a combination of \(r\) elements from a set of size \(n\) is just a subset of size \(r\text{.}\)
The number of combinations is called the binomial coefficient and is denoted \(\binom{n}{r}\text{.}\) We read this symbol as “\(n\) choose \(r\text{.}\)”
Theorem2.6.9Combination Rule
We have the following formula for the binomial coefficients:
\begin{equation*}
\binom{n}{r} = \frac{n!}{r!(n-r)!}.
\end{equation*}
Note that the number of permutations of any \(r\) distinct objects from a set of \(n\) objects is necessarily the number of subsets of size \(r\) (i.e., the number of combinations, the binomial coefficient) times the number of ways to arrange those \(r\) elements (i.e., permutations of a set of size \(r\)). Therefore, by Theorem 2.6.6 and Theorem 2.6.7, we have
\begin{equation*}
\binom{n}{r} r! = \frac{n!}{(n-r)!}
\end{equation*}
thereby proving the result.
Note: the above theorem guarantees \(\binom{n}{r} = \binom{n}{n-r}\text{.}\)
Theorem2.6.10Binomial Theorem
If \(n \in \mathbb{N}\) and \(a,b \in \mathbb{R}\text{,}\) then
\begin{equation*}
(a+b)^n = \sum_{r=0}^n \binom{n}{r} a^r b^{n-r}.
\end{equation*}
By induction and using the fact that when \(r \ge 1\text{,}\)
\begin{equation*}
\binom{n}{r} = \binom{n-1}{r} + \binom{n-1}{r-1},
\end{equation*}
which you should prove. This displayed equation essentially says that Pascal's triangle generates the binomial coefficients.