\documentstyle[12pt,twoside,amsfonts,eepic,psfig]{article}
\input{macros-course-lectures}
\parskip1.5ex
\parindent0pt


\begin{document}
\lecture{notes16}{Notes 16}{October 31, 1996}

\newcommand{\binom}[2]{{#1 \choose #2}}

Readings:  Section 4-3, 5-4 \\
Next: 4-6, 4-7 \\
\\
Last time, we introduced the {\em binomial coefficients} 
$${n \choose r} = \frac{n!}{r!(n-r)!}$$ \\
These represent the number of ways to
choose $r$ elements from a set of $n$ elements, where the order does
not matter.  \\
{\em Combinations}, as opposed to {\em permutations}, where the order
does matter.  \\
(There are $$\frac{n!}{(n-r)!}$$ of those.) \\
\\
Today, we study basic properties of binomial coefficients, \\
Then an important theorem called the {\em Binomial Theorem}, \\
And finally revisit the principle of inclusion and exclusion, using
binomial coefficients to prove it. 

\section{Basic Properties of Binomial Coefficients}

Let $n$ and $r$ be naturals, $0 \leq r \leq n$. \\
Then 
$${n \choose r} = \frac{n!}{r!(n-r)!}.$$ \\
Special cases: \\
$${n \choose 1} = n$$
$${n \choose 0} = 1$$ 
(uses the convention that $0! = 1$), \\
$${n \choose n} = 1$$ (note symmetry with previous), \\
$${n \choose n-1} = n$$ (symmetry). \\
\\
There are infinitely many interesting identities involving binomial
coefficients. \\
You can't learn them all, but you can learn the basic ones and look
others up/derive them as needed. \\
Can prove them by algebra, or by ``thought experiments'' that
establish a combinatorial meaning for the LHS and RHS and argue that
they are the same. 

\begin{theorem}
Suppose $0 \leq r \leq n$. \\
Then 
$${n \choose r} = {n \choose n-r}.$$
\end{theorem}

\begin{proof}
(Algebraic) \\
$$\frac{n!}{r!(n-r)!} = \frac{n!}{(n-r)!(n-(n-r))!}.$$
\end{proof}

\begin{proof}
(Combinatorial thought experiment) \\
LHS is number of ways to choose $r$ from $n$. \\
RHS is number of ways to choose $n-r$. \\
Choosing a set of $r$ is equivalent to choosing a set of $n-r$ \\
(the elements {\em not\/} in the first chosen set) \\
-- so there are just as many ways to choose either. 
\end{proof}

The next theorem gives the ratio between successive binomial
coefficients (same $n$, successive $r$):

\begin{theorem}
\label{bin-coeff-2}
Suppose $1 \leq r \leq n$. \\
Then 
$${n \choose r} / {n \choose r-1} = (n-r+1)/r.$$
\end{theorem}

\begin{proof}
(Algebraic) \\
LHS = 
$$\frac{n!}{r!(n-r)!} \times \frac{(r-1)!(n-(r-1))!}{n!} = (n-r+1)/r.$$
\end{proof}

Note that this ratio is $> 1$, which means the successive
coefficients are increasing, as long as $r < \frac{n+1}{2}$. \\
Also, the ratio is $<1$, which means the coefficient are decreasing,
when $r > \frac{n+1}{2}$. \\
This says that the coefficients increase, then decrease, i.e., they
are {\em unimodal}. \\
Form a bell-shaped curve:

\begin{figure}[htbp]
\centerline{\psfig{figure=bell.ps,height=2in}}
\caption{Bell Curve}
\label{fig:bell}
\end{figure}

In fact, the binomial coefficients form a real {\em bell curve}. \\
Like on tests: \\
Suppose that an SAT test has $n$ questions. \\
Then the bell curve describes, for every $r$, the number of ways the
student can get exactly $r$ of the questions right, that is, 
$${n \choose r}.$$ 
If we suppose that each student taking the test is equally likely to
get each of the $n$ questions right or wrong, $\frac{1}{2}$ for each,
then these coefficients
turn out to be proportional to the number of students that get those
numbers of questions right. \\
(See this when we do probability.) \\
\\
Another identity: 

\begin{theorem} 
Suppose $1 \leq r \leq n$. \\
Then 
$${n \choose r} = \frac{n}{r} {n-1 \choose r-1}.$$
\end{theorem}

\begin{proof} 
(Algebraic)
\begin{eqnarray*}
{n \choose r} &= &\frac{n!}{r!(n-r)!}\\
&= &\frac{n}{r}\frac{(n-1)!}{(r-1)!(n-r)!}\\
&= &\frac{n}{r}\frac{(n-1)!}{(r-1)!((n-1)-(r-1))!}\\
&= &\frac{n}{r}{n-1 \choose r-1}
\end{eqnarray*}
\end{proof}

\begin{proof}(Combinatorial) \\
Consider choosing a committee of size $r$ and a leader, from $n$
people. \\
One way is to pick the leader first ($n$ ways), then pick the other
$r-1$ committee members from the remainder (${n-1 \choose r-1}$ ways). \\
Another way is to pick the $r$ committee members first 
(${n \choose r}$ ways) and then pick a leader from among them ($r$
ways). \\
This implies that:
\[
n{n-1 \choose r-1} = {n \choose r} r.
\]
Now divide both sides by $r$.
\end{proof}

Now an important theorem due to Pascal:

\begin{theorem}[Pascal]
Suppose $1 \leq r \leq n-1$. \\
Then 
$${n \choose r} = {n-1 \choose r} + {n-1 \choose r-1}.$$
\end{theorem}

\begin{proof} (Algebraic)
\begin{eqnarray*}
{n-1 \choose r} + {n-1 \choose r-1} & = & \frac{(n-1)!}{r!(n-1-r)!} +
 \frac{(n-1)!}{(r-1)!(n-r)!} \\
&= &(n-r)\frac{(n-1)!}{r!(n-r)!} + r\frac{(n-1)!}{r!(n-r)!}\\
&= &n\frac{(n-1)!}{r!(n-r)!}\\
&= &\frac{n!}{r!(n-r)!}\\
&= &{n \choose r}
\end{eqnarray*}
\end{proof}

\begin{proof} 
(Combinatorial) 
Let $S = \set{1,\ldots,n}$. \\
Let $A$ be the set of $r$-element subsets of $S$. \\
Let $B$ be the set of $r$-element subsets of $S$ that contain $1$. \\
Let $C$ be the set of $r$-element subsets of $S$ that don't contain $1$. \\
\\
Then $A = B \cup C$, and $B$ and $C$ are disjoint. \\
So $|A| = |B| + |C|$, by sum rule. \\
But now can get expressions for $|A|$, $|B|$ and $|C|$ as numbers of
combinations:
\begin{itemize}
\item 
$|A| = {n \choose r}$. \\
\item 
$|B| = {n-1 \choose r-1}$. \\
This is because $r-1$ other elements must be chosen from the remaining $n-1$.
\item 
$|C| = {n-1 \choose r}$. \\
This is because $r$ elements must be chosen from the remaining $n$. 
\end{itemize}
So 
$${n \choose r} = |A| = |B| + |C| = {n-1 \choose r-1} + {n-1 \choose r}.$$
\end{proof}

Pascal's theorem has a nice pictorial representation: \\
Row represents $n$, starting with $0$ in top row. \\
Successive elements represent $r$, starting with $0$ at left. 
\begin{figure}[htbp]
\centerline{\psfig{figure=pascal.ps,height=2in}}
\caption{Pascal's triangle.}
\label{fig:pascal}
\end{figure}

This triangle has lots of nice properties.  \\
Experiment with it. \\
E.g., what happens if we add the coefficients in one row?
\begin{theorem}
Suppose $n$ is any natural. \\
Then 
$$\sum_{r=0}^n {n \choose r} = 2^n.$$
\end{theorem}

\begin{proof} 
(Algebraic) \\
Induction on $n$. \\
Let $P(n)$ be:
\[
\sum_{r=0}^n {n \choose r} = 2^n
\]
BASE: $n=0$.
\[
\sum_{r=0}^0 {0 \choose r} = {0 \choose 0} = 1 =  2^0
\]
INDUCTIVE STEP: Assume $P(n)$, show $P(n+1)$, where $n \geq 0$.
\begin{eqnarray*}
\sum_{r=0}^{n+1} {n+1 \choose r} & = {n+1 \choose 0} + \sum_{r=1}^{n}{n+1 \choose r} + {n+1 \choose n+1} \\
= 2 + \sum_{r=1}^n{n+1 \choose r} \\
= 2 + \sum_{r=1}^n ({n \choose r} + {n \choose r-1}) & \mbox{ by
Pascal's identity} \\
= 2 + 2 \sum_{r=1}^{n-1} {n \choose r} + {n \choose 0} + {n \choose n} \\
= 2 \sum_{r=0}^{n} {n \choose r} \\
= 2 \cdot 2^n & \mbox{ by inductive hypothesis}, \\
= 2^{n+1}.
\end{eqnarray*}
\end{proof}

\begin{proof} 
(Combinatorial) \\
There are $2^n$ different subsets of a set of $n$ elements. \\
Decompose this collection based on the sizes of the subsets. \\
There are ${n\choose r}$ subsets of size $r$, for $r=0,1,\ldots,n$. \\
Hence the theorem follows.
\end{proof}

\begin{theorem}[Vandermonde]
Suppose $0 \leq r \leq m,n$. \\
Then 
\[
{m+n \choose r} = \sum_{k=0}^r {m \choose r-k}{n\choose k}
\]
\end{theorem}

\begin{proof}
(Combinatorial) \\
Suppose there are $m$ red balls and $n$ blue balls, all distinct.  \\
There are ${m+n \choose r}$ ways to choose $r$ balls from the two
sets combined. \\
That's the LHS. \\
Now decompose this collection of choices based on how many of the
chosen balls are blue. \\
For any $k$, $0 \leq k \leq r$, there are ${m \choose r-k}$ ways to
choose $r-k$ red balls, and ${n \choose k}$ ways to choose $k$ blue
balls. \\
By the product rule, that makes ${m \choose r-k} {n\choose k}$
ways to choose $r$ balls such that $k$ of them are blue. \\
Adding up these numbers for all $k$ gives the RHS.
\end{proof}

It is also possible to prove this algebraically, using Pascal's
identity. \\
To do this, it's useful to generalize the notion of binomial
coefficient a little bit: \\
If $r > n$, define ${n \choose r}$ to be $0$. \\
Makes some kind of sense informally, because there aren't any ways to
choose more elements than there are in a set! \\
\\
We can then observe that some of the binomial identities are still
correct with this extension. \\
E.g., Pascal's theorem is still true if $r > n$ (reduces
trivially). \\
So we will prove Vandermonde's theorem without the restriction $r \leq
m,n$. \\
This means that some of the terms in the statement of the theorem
could be trivial terms, e.g., ${n \choose k}$ could occur, where 
$k > n$ (value taken as $0$). 

\begin{proof}
(Algebraic) \\
Induction using Pascal's identity: \\
Let $P(n)$ be 
\[
\forall m, r, {m+n \choose r} = \sum_{k=0}^r {m \choose r-k}{n\choose k}
\]
BASE: $n =0$.  Then
\[
{m+0 \choose r} = {m \choose r} = \sum_{k=0}^r {m \choose r-k}{0\choose k}.
\]
This latter equation is true because the only value of $k$ for which
the last factor isn't $0$ is $k = 0$. \\
Hence $P(0)$ is true.\\
\\
INDUCTIVE STEP: Assume $P(n)$ is true, show $P(n+1)$.
We have:
\begin{eqnarray*}
{m+(n+1) \choose r} & = &{m+n \choose r} + {m+n \choose r-1} \quad
\mbox{ by Pascal's identity (don't have to worry about bounds)} \\
& = &\sum_{k=0}^r {m \choose r-k}{n\choose k} 
  + \sum_{k=0}^{r-1} {m \choose r-1-k}{n\choose k}  \quad \mbox{ by
inductive hypothesis (don't have to worry about bounds)}\\
& = &\sum_{k=0}^r {m \choose r-k}{n\choose k} 
  + \sum_{k=1}^r {m \choose r-k}{n\choose k-1}  \quad \mbox{ by change of vars}\\
& =  &{m \choose r}{n\choose0} + \sum_{k=1}^r {m \choose r-k}({n\choose k} + {n\choose k-1})  \\
& =  &{m \choose r}{n\choose 0} 
  + \sum_{k=1}^r {m \choose r-k}{n+1\choose k}  
  \quad \mbox{ by Pascal's identity}\\ 
& =  &{m \choose r}{n+1\choose 0} 
  + \sum_{k=1}^r {m \choose r-k}{n+1\choose k} \\ 
& = &\sum_{k=0}^r {m \choose r-k}{n+1\choose k} 
\end{eqnarray*}
Hence, $P(n+1)$ is true. So $P(n)$ is true for all $n$.
\end{proof}

\section{The Binomial Theorem}

An important theorem giving the coefficients in the expansion of
powers of binomial expressions. \\
Turns out they are binomial coefficients. 

\subsection{The Theorem}

\begin{theorem}
Suppose $n \in \naturals$. 
Then
$$ (x+y)^n = \sum_{k=0}^n \binom{n}{k}x^ky^{n-k} .$$
\end{theorem}

\begin{example}
$(x+y)^4 = 1x^4+4x^3y+6x^2y^2+4xy^3+1y^4$
\end{example}

\begin{proof}
(Algebraic) \\
By induction (HW)
\end{proof}

\begin{proof}
(Combinatorial) 
$$ (x+y)(x+y)(x+y)(x+y)\ldots$$
$n$ factors. \\
Each $x^ky^{n-k}$ term selects $k$ binomials from the $n$ to have
$x$, rest $y$. \\
$\binom{n}{k}$ ways of choosing the binomials to have $x$.
\end{proof}

\subsection{Identities via Binomial Theorem }

The binomial theorem can be used to give slick proofs of some binomial
identities, e.g.: 

\begin{theorem}
$$\sum_{k=0}^n \binom{n}{k} = 2^n.$$
\end{theorem}

\begin{proof}
Plug $x = 1$, $y = 1$ into binomial theorem.
\end{proof}

\begin{theorem}
\label{bin-coeff-3}
$$\sum_{k=0}^n (-1)^k\binom{n}{k} = 0.$$
\end{theorem}

\begin{proof}
Plug $x = -1$, $y=1$ into binomial theorem.
\end{proof}

Combinatorial interpretation: number of ways of selecting an even
number of elements from a set of $n$ equals the number of ways of
selecting an odd number. \\
This may be somewhat surprising -- works whether $n$ is even or odd. \\

\begin{example}
$n = 5$: \\
Choosing odd is ${5 \choose 1} + {5 \choose 3} + {5 \choose
5} = 5 + 10 + 1 = 16$.  \\
Choosing even is ${5 \choose 0} + {5 \choose 2} + {5 \choose 4} = 1 +
10 + 5 = 16$.
\end{example}

\begin{example}
$n = 6$: \\
Choosing odd is $6 + 20 + 6 = 32$. \\
Even is $1 + 15 + 15 + 1 = 32$.
\end{example}

\begin{theorem}
$$\sum_{k=0}^{\lfloor \frac{n}{2} \rfloor} \binom{n}{2k} = 2^{n-1}.$$
\end{theorem}

\begin{proof}
(Algebraic) \\
Add the equations in the two previous theorems. \\
Get 
$$\sum_{k=0}^n (\binom{n}{k} + (-1)^k\binom{n}{k}) = 2^n.$$ \\
Odd terms cancel out, even terms double, so get: \\
$$2 \sum_{k=0}^{\lfloor \frac{n}{2} \rfloor} \binom{n}{2k} = 2^n.$$ \\
Then divide by 2.
\end{proof}

\begin{proof}
(Combinatorial) \\
LHS represents number of ways to pick an even number of elements from
a set of $n$ elements. \\
The number of ways to pick an even number is equal to the number of
ways to pick an odd number of elements.  \\
Since the total number of ways is $2^n$, the number of ways to pick
even is half this, or $2^{n-1}$.
\end{proof}

A new proof of Pascal's identity:

\begin{proof}
$(x+y)^n = x(x+y)^{n-1} + y(x+y)^{n-1}$. \\
Consider coefficient of $x^r y^{n-r}$. \\
LHS: ${n \choose r}$. \\
RHS: Obtained by adding coefficient of $x^{r-1} y^{n-r}$ in the
first term, plus the coefficient of $x^r y^{n-1-r}$ in the second
term. \\
These are ${n-1 \choose r-1}$ and ${n-1 \choose r}$, respectively.
\end{proof}

Vandermonde:

\begin{proof}
$(1+t)^{m+n} = (1+t)^m(1+t)^n$. \\
Consider coefficient of $t^r$. \\
LHS: ${m+n \choose r}$. \\
RHS: Obtained by adding up, for all $k$, the product of the
coefficient of $t^k$ in the second factor and the coefficient of
$t^{r-k}$ in the first factor. \\
This is 
$$\Sigma_{k=0}^r {n \choose k} {m \choose r-k}.$$
\end{proof}

\subsection{General Binomial Theorem}

Can generalize binomial coefficients once again, allowing the first
argument to be any real number:

\begin{defin}
{\bf General binomial coefficient} $\binom{\alpha}{k}$ for $\alpha
\in \reals$ and $k\in \naturals$:
  \begin{eqnarray*}
    \binom{\alpha}{k} &= \frac{1}{k!}\prod_{j=0}^{k-1}(\alpha-j)\\ & =
    &\frac{\alpha(\alpha-1)\cdots(\alpha-k+1)}{k!} \\
    \binom{\alpha}{0} &= 1
  \end{eqnarray*}
\end{defin}

This doesn't have the same kinds of combinatorial meaning as before,
but works out nice mathematically.  \\
In particular, a version of the binomial theorem holds: 

\begin{theorem}
Let $\alpha \in \reals$ and $\left| \frac{x}{y} \right| <1$. Then
$$(x+y)^\alpha=\sum_{k=0}^\infty \binom{\alpha}{k}x^ky^{\alpha - k}$$
\end{theorem}

\begin{proof}
Calculus.
\end{proof}

\begin{example}
Approximate $\sqrt{2}$ using binomial theorem. 
$$\sqrt{2} = (x+y)^{\frac{1}{2}}, \; \mbox{where} \; x=1,y=1$$
However, can't use b.t. directly, because 
$$\left| \frac{x}{y} \right| \not < 1$$.
\\
However,
$$ \sqrt{2} =
2\frac{\sqrt{2}}{2}=2\sqrt{\frac12}=2(1-\frac12)^{\frac12}=2(x+y)^{\frac12},
  \; \mbox{where} \; x=1, y=-\frac12 $$ \\
  $$(1-\frac12)^{\frac12} = \sum_{k=0}^\infty \binom{\frac12}k
  \left(-\frac12 \right)^k $$
    $$ \binom{\frac12}0=1, \binom{\frac12}1=\frac12,
    \binom{\frac12}2=\frac{\left( \frac12 \right)\left(-\frac12
    \right)}{2!}=-\frac18, \binom{\frac12}3=\frac{\left( \frac12
  \right)\left(-\frac12\right)\left(-\frac32\right)}{3!}=\frac1{16},
etc. $$
\begin{eqnarray*}
  \sqrt{2} &= 2\left(
  1+\frac12\left(-\frac12\right)+\left(-\frac18\right)
  \left(\frac14\right)+\left(\frac1{16}\right)
    \left(-\frac18\right)+\cdots\right) \\
&= 2\left(1-\frac14-\frac1{32}-\frac{1}{128}-\cdots\right) \\
&\approx 2(.7109375) = 1.421875
\end{eqnarray*} 
\end{example}

\section{Principle of Inclusion and Exclusion}

Finally, we return to the principle of inclusion-exclusion from last
lecture. \\
Use binomial coefficients to help prove this. \\
Recall (for general $m$):

\begin{theorem}
$|\cup_i A_i| = 
\Sigma_i |A_i| 
- \Sigma_{i,j \mbox{ distinct }} |A_i \cup A_j|
+ \Sigma_{i,j,k \mbox{ distinct }} |A_i \cup A_j \cup A_k|
- \ldots + (-1)^{m+1} |\cap A_i|$
\end{theorem}

Can be proved by induction on the number of sets -- LTTR. \\
Now we will give a combinatorial proof using binomial coefficients. 

\begin{proof}
(Combinatorial) \\
Each term in the summation counts certain elements in $\cup_i A_i$. \\
We prove that every element of this union is counted exactly once. \\
So, consider any particular element $a$, and suppose it is in exactly
$r$ of the sets $A_i$. \\
We see how many times $a$ is counted by each term. \\
\\
In the first term, $a$ is counted $r = {r \choose 1}$ times, once for
each of the sets that contains it. \\
In the second term, $a$ is counted ${r \choose 2}$ times, once for
each of the pairs of sets that contain it. \\
In the third term, $a$ is counted ${r \choose 3}$ times, ..., \\
and in the $r$th term, $a$ is counted ${r \choose r} = 1$ times. \\
The terms alternate signs, so the total number of times $a$ is counted
is: \\
$${r \choose 1} - {r \choose 2} + {r \choose 3} - \ldots - (-1)^r{r
\choose r}.$$ \\
But Theorem \ref{bin-coeff-3} implies that 
$$\sum_{k=0}^r (-1)^k\binom{n}{k} = 0.$$ \\
This implies that the sum above is equal to ${r \choose 0} = 1$. \\
That is, $a$ is counted exactly once, as needed.
\end{proof}

\end{document}
