\documentclass[numbers=enddot,12pt,final,onecolumn,notitlepage]{scrartcl}%
\usepackage[headsepline,footsepline,manualmark]{scrlayer-scrpage}
\usepackage[all,cmtip]{xy}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{framed}
\usepackage{comment}
\usepackage{color}
\usepackage[breaklinks=True]{hyperref}
\usepackage[sc]{mathpazo}
\usepackage[T1]{fontenc}
\usepackage{needspace}
\usepackage{tabls}
\usepackage{tikz}
\usepackage{bbding}
%TCIDATA{OutputFilter=latex2.dll}
%TCIDATA{Version=5.50.0.2960}
%TCIDATA{LastRevised=Monday, December 12, 2022 20:40:21}
%TCIDATA{SuppressPackageManagement}
%TCIDATA{<META NAME="GraphicsSave" CONTENT="32">}
%TCIDATA{<META NAME="SaveForMode" CONTENT="1">}
%TCIDATA{BibliographyScheme=Manual}
%TCIDATA{Language=American English}
%BeginMSIPreambleData
\providecommand{\U}[1]{\protect\rule{.1in}{.1in}}
%EndMSIPreambleData
\usetikzlibrary{arrows.meta}
\usetikzlibrary{chains}
\usetikzlibrary{shapes}
\usetikzlibrary{decorations.pathmorphing}
\newcounter{exer}
\newcounter{exera}
\theoremstyle{definition}
\newtheorem{theo}{Theorem}[subsection]
\newenvironment{theorem}[1][]
{\begin{theo}[#1]\begin{leftbar}}
{\end{leftbar}\end{theo}}
\newtheorem{lem}[theo]{Lemma}
\newenvironment{lemma}[1][]
{\begin{lem}[#1]\begin{leftbar}}
{\end{leftbar}\end{lem}}
\newtheorem{prop}[theo]{Proposition}
\newenvironment{proposition}[1][]
{\begin{prop}[#1]\begin{leftbar}}
{\end{leftbar}\end{prop}}
\newtheorem{defi}[theo]{Definition}
\newenvironment{definition}[1][]
{\begin{defi}[#1]\begin{leftbar}}
{\end{leftbar}\end{defi}}
\newtheorem{remk}[theo]{Remark}
\newenvironment{remark}[1][]
{\begin{remk}[#1]\begin{leftbar}}
{\end{leftbar}\end{remk}}
\newtheorem{coro}[theo]{Corollary}
\newenvironment{corollary}[1][]
{\begin{coro}[#1]\begin{leftbar}}
{\end{leftbar}\end{coro}}
\newtheorem{conv}[theo]{Convention}
\newenvironment{convention}[1][]
{\begin{conv}[#1]\begin{leftbar}}
{\end{leftbar}\end{conv}}
\newtheorem{quest}[theo]{Question}
\newenvironment{question}[1][]
{\begin{quest}[#1]\begin{leftbar}}
{\end{leftbar}\end{quest}}
\newtheorem{warn}[theo]{Warning}
\newenvironment{warning}[1][]
{\begin{warn}[#1]\begin{leftbar}}
{\end{leftbar}\end{warn}}
\newtheorem{conj}[theo]{Conjecture}
\newenvironment{conjecture}[1][]
{\begin{conj}[#1]\begin{leftbar}}
{\end{leftbar}\end{conj}}
\newtheorem{exam}[theo]{Example}
\newenvironment{example}[1][]
{\begin{exam}[#1]\begin{leftbar}}
{\end{leftbar}\end{exam}}
\newtheorem{exmp}[exer]{Exercise}
\newenvironment{exercise}[1][]
{\begin{exmp}[#1]\begin{leftbar}}
{\end{leftbar}\end{exmp}}
\newenvironment{statement}{\begin{quote}}{\end{quote}}
\newenvironment{fineprint}{\begin{small}}{\end{small}}
\iffalse
\newenvironment{proof}[1][Proof]{\noindent\textbf{#1.} }{\ \rule{0.5em}{0.5em}}
\newenvironment{convention}[1][Convention]{\noindent\textbf{#1.} }{\ \rule{0.5em}{0.5em}}
\newenvironment{question}[1][Question]{\noindent\textbf{#1.} }{\ \rule{0.5em}{0.5em}}
\fi
\let\sumnonlimits\sum
\let\prodnonlimits\prod
\let\cupnonlimits\bigcup
\let\capnonlimits\bigcap
\renewcommand{\sum}{\sumnonlimits\limits}
\renewcommand{\prod}{\prodnonlimits\limits}
\renewcommand{\bigcup}{\cupnonlimits\limits}
\renewcommand{\bigcap}{\capnonlimits\limits}
\newcommand\arxiv[1]{\href{http://www.arxiv.org/abs/#1}{\texttt{arXiv:#1}}}
\setlength\tablinesep{3pt}
\setlength\arraylinesep{3pt}
\setlength\extrarulesep{3pt}
\setlength\textheight{22.5cm}
\setlength\textwidth{14.8cm}
\newenvironment{verlong}{}{}
\newenvironment{vershort}{}{}
\newenvironment{noncompile}{}{}
\excludecomment{verlong}
\includecomment{vershort}
\excludecomment{noncompile}
\newcommand{\defn}[1]{{\color{darkred}\emph{#1}}}
\newcommand{\CC}{\mathbb{C}}
\newcommand{\RR}{\mathbb{R}}
\newcommand{\QQ}{\mathbb{Q}}
\newcommand{\NN}{\mathbb{N}}
\newcommand{\ZZ}{\mathbb{Z}}
\newcommand{\KK}{\mathbb{K}}
\newcommand{\set}[1]{\left\{ #1 \right\}}
\newcommand{\abs}[1]{\left| #1 \right|}
\newcommand{\tup}[1]{\left( #1 \right)}
\newcommand{\ive}[1]{\left[ #1 \right]}
\newcommand{\floor}[1]{\left\lfloor #1 \right\rfloor}
\newcommand{\are}{\ar@{-}}
\newcommand{\arebi}[1][]{\ar@{<-}@/_/[#1] \ar@/^/[#1]}
\newcommand{\of}{\text{ of }}
\definecolor{darkgreen}{rgb}{0,.5,0}
\newtheoremstyle{plainsl}
{8pt plus 2pt minus 4pt}
{8pt plus 2pt minus 4pt}
{\slshape}
{0pt}
{\bfseries}
{.}
{5pt plus 1pt minus 1pt}
{}
\theoremstyle{plainsl}
\ihead{Lecture 18, version \today}
\ohead{page \thepage}
\cfoot{}
\begin{document}
\section*{Math 222 Fall 2022, Lecture 18: Binomial coefficients}

\textbf{website:}
\texttt{\href{https://www.cip.ifi.lmu.de/~grinberg/t/22fco}{\texttt{https://www.cip.ifi.lmu.de/\symbol{126}%
grinberg/t/22fco}}}

\setcounter{section}{1}

\section{Binomial coefficients (cont'd)}

\setcounter{subsection}{5}

\subsection{Combinatorial proofs}

\textbf{Combinatorial proofs} are proofs using combinatorial reasoning (which,
in this course here, usually means counting). The word is used mostly for
contrast with algebraic proofs (which rely on manipulation of sums and
products, or properties of polynomials, or similar algebraic tools). We have
seen many combinatorial proofs in the previous lectures; today we will see
some more.

Here are the two most frequent types of combinatorial proofs:

\begin{itemize}
\item A \textbf{proof by double counting} establishes an identity of the form
$x=y$ by showing that $x$ and $y$ answer one and the same counting problem
(i.e., by finding a set $S$ such that $\left\vert S\right\vert =x$ and
$\left\vert S\right\vert =y$). For instance, our proof of Theorem 1.4.12 in
Lecture 10, as well as our partial proof of Proposition 2.2.1 in Lecture 14,
are proofs by double counting.

\item A \textbf{bijective proof} is a proof using the bijection
principle\footnote{Recall that the bijection principle says the following: If
there is a bijection from some set $X$ to some set $Y$, then $\left\vert
X\right\vert =\left\vert Y\right\vert $.}. The proof of Proposition 1.4.8 in
Lecture 9 is an example of a bijective proof.
\end{itemize}

Today, we will see more examples of both types. (Actually, the boundary
between the two types is rather blurry; often, a bijective proof can be
translated into a proof by double counting or vice versa.) Note that this
lecture is just a taste; many more combinatorial proofs can be found in
\cite{BenQui03} and \cite{Loehr-BC}.

\subsubsection{The symmetry of Pascal's triangle}

Recall the symmetry of the binomial coefficients (Lecture 6, Theorem 1.3.9):

\begin{theorem}
\label{thm.combpf.symmetry}Let $n\in\mathbb{N}$ and $k\in\mathbb{R}$. Then,%
\[
\dbinom{n}{k}=\dbinom{n}{n-k}.
\]

\end{theorem}

We gave a simple proof of this using the factorial formula for BCs (= binomial
coefficients), but we can give a combinatorial proof as well:

\begin{proof}
[Combinatorial proof of Theorem \ref{thm.combpf.symmetry}.]By the
combinatorial interpretation of BCs, we have%
\begin{equation}
\dbinom{n}{k}=\left(  \text{\# of }k\text{-element subsets of }\left[
n\right]  \right)  . \label{pf.thm.combpf.symmetry.1}%
\end{equation}
Similarly,%
\begin{equation}
\dbinom{n}{n-k}=\left(  \text{\# of }\left(  n-k\right)  \text{-element
subsets of }\left[  n\right]  \right)  . \label{pf.thm.combpf.symmetry.2}%
\end{equation}


Now, the map%
\begin{align*}
\left\{  k\text{-element subsets of }\left[  n\right]  \right\}   &
\rightarrow\left\{  \left(  n-k\right)  \text{-element subsets of }\left[
n\right]  \right\}  ,\\
S  &  \mapsto\left[  n\right]  \setminus S
\end{align*}
is well-defined (because if $S$ is a $k$-element subset of $\left[  n\right]
$, then its complement $\left[  n\right]  \setminus S$ is an $\left(
n-k\right)  $-element subset of $\left[  n\right]  $) and bijective (indeed,
it has an inverse map, which also sends each $S$ to $\left[  n\right]
\setminus S$). Thus, it is a bijection. Hence, the bijection principle yields%
\[
\left\vert \left\{  k\text{-element subsets of }\left[  n\right]  \right\}
\right\vert =\left\vert \left\{  \left(  n-k\right)  \text{-element subsets of
}\left[  n\right]  \right\}  \right\vert .
\]
In other words,%
\[
\left(  \text{\# of }k\text{-element subsets of }\left[  n\right]  \right)
=\left(  \text{\# of }\left(  n-k\right)  \text{-element subsets of }\left[
n\right]  \right)  .
\]
In view of (\ref{pf.thm.combpf.symmetry.1}) and
(\ref{pf.thm.combpf.symmetry.2}), this rewrites as
\[
\dbinom{n}{k}=\dbinom{n}{n-k}.
\]
This proves Theorem \ref{thm.combpf.symmetry} again.
\end{proof}

\subsubsection{The Chu--Vandermonde identity}

Recall the Chu--Vandermonde identity (Theorem 2.3.1 in Lecture 15), which says
the following:

\begin{theorem}
[Chu--Vandermonde identity]\label{thm.combpf.vand}Let $n\in\mathbb{N}$ and
$x,y\in\mathbb{R}$. Then,%
\[
\dbinom{x+y}{n}=\sum_{k=0}^{n}\dbinom{x}{k}\dbinom{y}{n-k}.
\]

\end{theorem}

We proved this in Lecture 15. Let us now give a different proof:

\begin{proof}
[Combinatorial proof of Theorem \ref{thm.combpf.vand}.]First, we assume that
$x,y\in\mathbb{N}$. (We will later handle the general case.)

Let $Q$ be the set $\left\{  1,2,\ldots,x\right\}  \cup\left\{  -1,-2,\ldots
,-y\right\}  $. How many $n$-element subsets does $Q$ have?\footnote{Here is
an illustration of an $n$-element subset of $Q$ (for $n=4$ and $x=5$ and
$y=3$):
\[%
%TCIMACRO{\TeXButton{tikz gummi-bear}{\begin{tikzpicture}[blend mode=multiply]
%\filldraw[fill=yellow!20!white] (-4, -2) rectangle (6, 2);
%\filldraw
%[very thick, fill=green!20!white, draw=green!50!black] plot[smooth] coordinates {(-2, 1) (-2.2, 0.8) (-2.5, 0) (-2, -1.5) (3.5, -1.5) (4.5, 0) (4, 1) (3, 1) (2.5, 0) (2, -0.8) (1, 1) (-1, -0.8) (-1.5, 0) (-1.8, 0.8) (-2, 1)}
%-- cycle;
%\node(1) at (1, 0) {$1$};
%\node(2) at (2, 0) {$2$};
%\node(3) at (3, 0) {$3$};
%\node(4) at (4, 0) {$4$};
%\node(5) at (5, 0) {$5$};
%\node(-1) at (-1, 0) {$-1$};
%\node(-2) at (-2, 0) {$-2$};
%\node(-3) at (-3, 0) {$-3$};
%\draw[very thick, red] (0, -2) -- (0, 2);
%\end{tikzpicture}}}%
%BeginExpansion
\begin{tikzpicture}[blend mode=multiply]
\filldraw[fill=yellow!20!white] (-4, -2) rectangle (6, 2);
\filldraw
[very thick, fill=green!20!white, draw=green!50!black] plot[smooth] coordinates {(-2, 1) (-2.2, 0.8) (-2.5, 0) (-2, -1.5) (3.5, -1.5) (4.5, 0) (4, 1) (3, 1) (2.5, 0) (2, -0.8) (1, 1) (-1, -0.8) (-1.5, 0) (-1.8, 0.8) (-2, 1)}
-- cycle;
\node(1) at (1, 0) {$1$};
\node(2) at (2, 0) {$2$};
\node(3) at (3, 0) {$3$};
\node(4) at (4, 0) {$4$};
\node(5) at (5, 0) {$5$};
\node(-1) at (-1, 0) {$-1$};
\node(-2) at (-2, 0) {$-2$};
\node(-3) at (-3, 0) {$-3$};
\draw[very thick, red] (0, -2) -- (0, 2);
\end{tikzpicture}%
%EndExpansion
.
\]
The yellow rectangle is the set $Q$; the green blob is the subset. The
vertical line separates the positive from the negative elements of $Q$ (which
will be crucial to the proof later on).}

We can answer this question in two ways (for a double-counting proof):

\textit{1st way:} Clearly, $Q$ has $\dbinom{x+y}{n}$ many $n$-element subsets
(by the combinatorial interpretation of BCs, since $Q$ is an $\left(
x+y\right)  $-element set).

\textit{2nd way:} We can choose an $n$-element subset $S$ of $Q$ using the
following procedure:

\begin{itemize}
\item First, we decide on the number of positive elements of $S$ (that is, we
decide how many elements of $S$ will be positive). Let $k\in\left\{
0,1,\ldots,n\right\}  $ be this number. Thus, the set $S$ will have $k$
positive elements and $n-k$ negative elements.

\item Now, we choose the $k$ positive elements of $S$. The \# of ways to do
this is $\dbinom{x}{k}$, because this amounts to choosing a $k$-element subset
of the $x$-element set $\left\{  1,2,\ldots,x\right\}  $.

\item Finally, we choose the $n-k$ negative elements of $S$. The \# of ways to
do this is $\dbinom{y}{n-k}$, since this amounts to choosing an $\left(
n-k\right)  $-element subset of the $y$-element set $\left\{  -1,-2,\ldots
,-y\right\}  $.
\end{itemize}

The total \# of ways to perform this construction is%
\[
\sum_{k=0}^{n}\dbinom{x}{k}\dbinom{y}{n-k}%
\]
(indeed, the summation sign $\sum_{k=0}^{n}$ is owed to the choice of
$k\in\left\{  0,1,\ldots,n\right\}  $, and the addend $\dbinom{x}{k}\dbinom
{y}{n-k}$ is the \# of possibilities for $S$ such that the \# of positive
elements of $S$ is $k$).

We have now found two answers to the question \textquotedblleft how many
$n$-element subsets does $Q$ have?\textquotedblright. The first answer is
$\dbinom{x+y}{n}$; the second is $\sum\limits_{k=0}^{n}\dbinom{x}{k}\dbinom
{y}{n-k}$. Since these two answers must be equal (because they answer the same
question), we thus obtain%
\[
\dbinom{x+y}{n}=\sum\limits_{k=0}^{n}\dbinom{x}{k}\dbinom{y}{n-k}.
\]


This proves Theorem \ref{thm.combpf.vand} for all $x,y\in\mathbb{N}$. Now we
can generalize it to $x,y\in\mathbb{R}$ as follows:

\begin{itemize}
\item Keep $y$ fixed, and use the polynomial identity trick (Lecture 14,
Corollary 2.2.5) to generalize from $x\in\mathbb{N}$ to $x\in\mathbb{R}$. (The
polynomial identity trick must be applied to the polynomials $P=\dbinom
{X+y}{n}$ and $Q=\sum\limits_{k=0}^{n}\dbinom{X}{k}\dbinom{y}{n-k}$ here.)

\item Keep $x$ fixed, and use the polynomial identity trick again to
generalize from $y\in\mathbb{N}$ to $y\in\mathbb{R}$. (This time, the
polynomial identity trick is applied to $P=\dbinom{x+X}{n}$ and $Q=\sum
\limits_{k=0}^{n}\dbinom{x}{k}\dbinom{X}{n-k}$.)
\end{itemize}

\noindent(See \S 2.6.3 of the 2019 notes for the details of this argument.)

Thus, Theorem \ref{thm.combpf.vand} is proved again.
\end{proof}

\begin{remark}
The proof we just gave was a proof by double counting. But we can easily
transform it into a bijective proof.

Indeed, let us assume that $x,y\in\mathbb{N}$, and let $Q$ be the set
$\left\{  1,2,\ldots,x\right\}  \cup\left\{  -1,-2,\ldots,-y\right\}  $.

For any set $A$ and any $i\in\mathbb{N}$, let $\mathcal{P}_{i}\left(
A\right)  $ denote the \# of $i$-element subsets of $A$. Thus,
\begin{equation}
\left\vert \mathcal{P}_{n}\left(  Q\right)  \right\vert =\left(  \text{\# of
}n\text{-element subsets of }Q\right)  =\dbinom{x+y}{n}
\label{pf.thm.combpf.vand.again.1}%
\end{equation}
(by the combinatorial interpretation of BCs, since $Q$ is an $\left(
x+y\right)  $-element set).

Furthermore, for any $k\in\left\{  0,1,\ldots,n\right\}  $, let%
\[
\mathcal{P}_{n,k}\left(  Q\right)  :=\left\{  n\text{-element subsets of
}Q\text{ with exactly }k\text{ positive elements}\right\}  .
\]
Then, the sum rule yields%
\begin{equation}
\left\vert \mathcal{P}_{n}\left(  Q\right)  \right\vert =\sum_{k=0}%
^{n}\left\vert \mathcal{P}_{n,k}\left(  Q\right)  \right\vert ,
\label{pf.thm.combpf.vand.again.3}%
\end{equation}
since any $n$-element subset of $Q$ has exactly $k$ positive elements for a
unique $k\in\left\{  0,1,\ldots,n\right\}  $.

However, for each $k\in\left\{  0,1,\ldots,n\right\}  $, there is a bijection
from $\mathcal{P}_{n,k}\left(  Q\right)  $ to the Cartesian product%
\begin{align*}
&  \mathcal{P}_{k}\left(  \left\{  1,2,\ldots,x\right\}  \right)
\times\mathcal{P}_{n-k}\left(  \left\{  -1,-2,\ldots,-y\right\}  \right) \\
&  =\left\{  \text{pairs }\left(  X,Y\right)  \text{, where }X\text{ is a
}k\text{-element subset of }\left\{  1,2,\ldots,x\right\}  \right. \\
&  \ \ \ \ \ \ \ \ \ \ \left.  \text{and }Y\text{ is an }\left(  n-k\right)
\text{-element subset of }\left\{  -1,-2,\ldots,-y\right\}  \right\}  ;
\end{align*}
this bijection sends each subset $S\in\mathcal{P}_{n,k}\left(  Q\right)  $ to
the pair%
\begin{align*}
\left(  S_{+},S_{-}\right)  \text{, where }S_{+}  &  :=\left\{  \text{positive
elements of }S\right\}  =S\cap\left\{  1,2,\ldots,x\right\} \\
\ \ \ \ \ \ \ \ \ \ \text{and }S_{-}  &  :=\left\{  \text{negative elements of
}S\right\}  =S\cap\left\{  -1,-2,\ldots,-y\right\}  .
\end{align*}
The bijection principle therefore yields%
\begin{align*}
\left\vert \mathcal{P}_{n,k}\left(  Q\right)  \right\vert  &  =\left\vert
\mathcal{P}_{k}\left(  \left\{  1,2,\ldots,x\right\}  \right)  \times
\mathcal{P}_{n-k}\left(  \left\{  -1,-2,\ldots,-y\right\}  \right)
\right\vert \\
&  =\underbrace{\left\vert \mathcal{P}_{k}\left(  \left\{  1,2,\ldots
,x\right\}  \right)  \right\vert }_{\substack{=\dbinom{x}{k}\\\text{(by the
combinatorial}\\\text{interpretation of BCs)}}}\cdot\underbrace{\left\vert
\mathcal{P}_{n-k}\left(  \left\{  -1,-2,\ldots,-y\right\}  \right)
\right\vert }_{\substack{=\dbinom{y}{n-k}\\\text{(by the combinatorial}%
\\\text{interpretation of BCs)}}}\\
&  \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \left(  \text{by the product
rule}\right) \\
&  =\dbinom{x}{k}\dbinom{y}{n-k}.
\end{align*}
Thus, (\ref{pf.thm.combpf.vand.again.3}) can be rewritten as%
\[
\left\vert \mathcal{P}_{n}\left(  Q\right)  \right\vert =\sum_{k=0}^{n}%
\dbinom{x}{k}\dbinom{y}{n-k}.
\]
Comparing this with (\ref{pf.thm.combpf.vand.again.1}), we obtain%
\[
\dbinom{x+y}{n}=\sum_{k=0}^{n}\dbinom{x}{k}\dbinom{y}{n-k}.
\]
This proves Theorem \ref{thm.combpf.vand} for all $x,y\in\mathbb{N}$ again.
\end{remark}

\subsubsection{The upside-down Chu--Vandermonde identity}

Recall the upside-down Chu--Vandermonde identity (Lecture 15, Proposition 2.3.6):

\begin{proposition}
[upside-down Chu--Vandermonde identity]\label{prop.combpf.dnav}Let
$n,x,y\in\mathbb{N}$. Then,%
\[
\dbinom{n+1}{x+y+1}=\sum_{k=0}^{n}\dbinom{k}{x}\dbinom{n-k}{y}.
\]

\end{proposition}

Again, let us prove this combinatorially.

\begin{proof}
[Combinatorial proof of Proposition \ref{prop.combpf.dnav}.]We proceed by
double counting.

How many $\left(  x+y+1\right)  $-element subsets does the set $\left[
n+1\right]  $ have? Again, there are two ways to answer this question:

\textit{1st way:} There are $\dbinom{n+1}{x+y+1}$ of them, by the
combinatorial interpretation of BCs.

\textit{2nd way:} We can construct an $\left(  x+y+1\right)  $-element subset
$S$ of $\left[  n+1\right]  $ by the following procedure:

\begin{itemize}
\item First, we choose the $\left(  x+1\right)  $-st smallest element of $S$.
Let $k$ be this element. Note that $k\in\left[  n+1\right]  =\left\{
1,2,\ldots,n+1\right\}  $.

Note that the set $S$ will have to contain exactly $x$ elements smaller than
$k$ (since $k$ is to be the $\left(  x+1\right)  $-st smallest element of $S$)
and exactly $y$ elements larger than $k$ (since $S$ must have $x+y+1$ elements
in total, but $k$ is its $\left(  x+1\right)  $-st smallest element).

\item Next, we choose the $x$ elements of $S$ that are smaller than $k$. These
$x$ elements must be chosen from $\left\{  1,2,\ldots,k-1\right\}  $. So there
are $\dbinom{k-1}{x}$ options for them, since we are choosing an $x$-element
subset of $\left\{  1,2,\ldots,k-1\right\}  $.

\item Finally, we choose the $y$ elements of $S$ that are larger than $k$.
These $y$ elements must be chosen from $\left\{  k+1,k+2,\ldots,n+1\right\}
$. So there are $\dbinom{n-k+1}{y}$ options for them, since we are choosing a
$y$-element subset of $\left\{  k+1,k+2,\ldots,n+1\right\}  $.
\end{itemize}

Altogether, the \# of ways to perform this construction is%
\begin{align*}
\sum_{k=1}^{n+1}\dbinom{k-1}{x}\dbinom{n-k+1}{y}  &  =\sum_{k=1}^{n+1}%
\dbinom{k-1}{x}\dbinom{n-\left(  k-1\right)  }{y}\\
&  =\sum_{k=0}^{n}\dbinom{k}{x}\dbinom{n-k}{y}%
\end{align*}
(here, we have substituted $k$ for $k-1$ in the sum).

Comparing the results of both ways, we find%
\[
\dbinom{n+1}{x+y+1}=\sum_{k=0}^{n}\dbinom{k}{x}\dbinom{n-k}{y},
\]
which is precisely the claim of Proposition \ref{prop.combpf.dnav}.
\end{proof}

\begin{remark}
Applying Proposition \ref{prop.combpf.dnav} to $y=0$, we obtain%
\[
\dbinom{n+1}{x+1}=\sum_{k=0}^{n}\dbinom{k}{x}%
\]
(because $\dbinom{n-k}{0}=1$). This is precisely the hockey-stick identity
(part of Lecture 7, Theorem 1.3.24). Thus, we have given a combinatorial proof
of the hockey-stick identity.
\end{remark}

\subsubsection{Expanding the product of two BCs}

Here is another binomial identity (one we haven't seen so far):

\begin{theorem}
\label{thm.combpf.xaxb}Let $a,b\in\mathbb{N}$ and $x\in\mathbb{R}$. Then,%
\[
\dbinom{x}{a}\dbinom{x}{b}=\sum_{i=0}^{a+b}\dbinom{i}{a}\dbinom{a}%
{a+b-i}\dbinom{x}{i}.
\]

\end{theorem}

\begin{example}
For $a=2$ and $b=3$, the claim of Theorem \ref{thm.combpf.xaxb} says that%
\begin{align*}
\dbinom{x}{2}\dbinom{x}{3} &  =\sum_{i=0}^{2+3}\dbinom{i}{2}\dbinom{2}%
{2+3-i}\dbinom{x}{i}\\
&  =\underbrace{\dbinom{0}{2}}_{=0}\dbinom{2}{5}\dbinom{x}{0}%
+\underbrace{\dbinom{1}{2}}_{=0}\dbinom{2}{4}\dbinom{x}{1}+\dbinom{2}%
{2}\underbrace{\dbinom{2}{3}}_{=0}\dbinom{x}{2}\\
&  \ \ \ \ \ \ \ \ \ \ +\underbrace{\dbinom{3}{2}}_{=3}\underbrace{\dbinom
{2}{2}}_{=1}\dbinom{x}{3}+\underbrace{\dbinom{4}{2}}_{=6}\underbrace{\dbinom
{2}{1}}_{=2}\dbinom{x}{4}+\underbrace{\dbinom{5}{2}}_{=10}\underbrace{\dbinom
{2}{0}}_{=1}\dbinom{x}{5}\\
&  =3\dbinom{x}{3}+12\dbinom{x}{4}+10\dbinom{x}{5}.
\end{align*}

\end{example}

An algebraic proof of Theorem \ref{thm.combpf.xaxb} appears in
\cite[Proposition 3.37]{detnotes}\footnote{More precisely, \cite[Proposition
3.37]{detnotes} is Theorem \ref{thm.combpf.xaxb} with $\mathbb{R}$ replaced by
$\mathbb{Q}$, but the difference between $\mathbb{R}$ and $\mathbb{Q}$ does
not matter to the proof.}. Here is a combinatorial proof:

\begin{proof}
[Combinatorial proof of Theorem \ref{thm.combpf.xaxb}.]First of all, we WLOG
assume that $x\in\mathbb{N}$, because if we can prove the claim for all
$x\in\mathbb{N}$, then we will automatically conclude (using the polynomial
identity trick, applied to the polynomials $P=\dbinom{X}{a}\dbinom{X}{b}$ and
$Q=\sum_{i=0}^{a+b}\dbinom{i}{a}\dbinom{a}{a+b-i}\dbinom{X}{i}$) that it also
holds for all $x\in\mathbb{R}$.

Thus, $x\in\mathbb{N}$. Let $X$ be the set $\left[  x\right]  =\left\{
1,2,\ldots,x\right\}  $.

Let us count the pairs $\left(  A,B\right)  $ that consist of an $a$-element
subset $A$ of $X$ and a $b$-element subset $B$ of $X$. We shall refer to such
pairs $\left(  A,B\right)  $ as \textquotedblleft\textbf{ab-pairs}%
\textquotedblright\footnote{The following illustration of an ab-pair might be
useful:
\[%
%TCIMACRO{\TeXButton{tikz ab-pair}{\begin{tikzpicture}[blend mode=multiply]
%\filldraw[fill=yellow!20!white] (0, 0) rectangle (5, 3);
%\filldraw[fill=green!20!white] (1.5, 1) circle (0.8);
%\filldraw[fill=red!20!white] (3, 1.5) circle (1.2);
%\node at (1.4, 1) {$A$};
%\node at (3.5, 1.4) {$B$};
%\node at (0.7, 2.3) {$X$};
%\end{tikzpicture}}}%
%BeginExpansion
\begin{tikzpicture}[blend mode=multiply]
\filldraw[fill=yellow!20!white] (0, 0) rectangle (5, 3);
\filldraw[fill=green!20!white] (1.5, 1) circle (0.8);
\filldraw[fill=red!20!white] (3, 1.5) circle (1.2);
\node at (1.4, 1) {$A$};
\node at (3.5, 1.4) {$B$};
\node at (0.7, 2.3) {$X$};
\end{tikzpicture}%
%EndExpansion
\]
}. We count these ab-pairs $\left(  A,B\right)  $ in two ways:

\textit{1st way:} The \# of ab-pairs is $\dbinom{x}{a}\dbinom{x}{b}$, since
there are $\dbinom{x}{a}$ ways to choose $A$ and $\dbinom{x}{b}$ ways to
choose $B$.

\textit{2nd way:} Here is a more intricate way to construct an ab-pair
$\left(  A,B\right)  $:

\begin{itemize}
\item First, we choose the size $i:=\left\vert A\cup B\right\vert $. This size
$i$ is an element of $\left\{  0,1,\ldots,a+b\right\}  $ (since we must have
$i=\left\vert A\cup B\right\vert \leq\left\vert A\right\vert +\left\vert
B\right\vert =a+b$).

\item Next, we choose the set $A\cup B$ itself. This must be an $i$-element
subset of $X$, so it can be chosen in $\dbinom{x}{i}$ many ways.

\item Next, we choose the set $A$. This must be an $a$-element subset of the
union $A\cup B$ (which is already fixed), so it can be chosen in $\dbinom
{i}{a}$ many ways (since $A\cup B$ is an $i$-element set).

\item Finally, we choose the set $A\cap B$. This must be a subset of $A$, and
its size must be $a+b-i$. Why? Well, for any two finite sets $U$ and $V$, we
have $\left\vert U\cup V\right\vert +\left\vert U\cap V\right\vert =\left\vert
U\right\vert +\left\vert V\right\vert $ (this is a nice and easy identity to
check\footnote{and will be greatly generalized in the next lecture!}), so that%
\[
\left\vert U\cap V\right\vert =\left\vert U\right\vert +\left\vert
V\right\vert -\left\vert U\cup V\right\vert .
\]
Applying this to $U=A$ and $V=B$, we obtain%
\[
\left\vert A\cap B\right\vert =\underbrace{\left\vert A\right\vert }%
_{=a}+\underbrace{\left\vert B\right\vert }_{=b}-\underbrace{\left\vert A\cup
B\right\vert }_{=i}=a+b-i.
\]
Thus, $A\cap B$ should be an $\left(  a+b-i\right)  $-element subset of $A$.
There are $\dbinom{a}{a+b-i}$ many options for choosing such a subset.

\item Having chosen $A\cup B$, $A$ and $A\cap B$, we get $B$ for free using
the formula%
\[
B=\left(  \left(  A\cup B\right)  \setminus A\right)  \cup\left(  A\cap
B\right)
\]
(which is true for any two sets $A$ and $B$ and follows easily by looking at
Venn diagrams).

I claim that the pair $\left(  A,B\right)  $ we have constructed is an
ab-pair. Proving this is slightly tricky because our notation is a bit too
suggestive: We have chosen three sets $A\cup B$, $A$ and $A\cap B$ and only
then defined the set $B$; thus, it is not obvious that the previously chosen
set $A\cup B$ really is the union of our two sets $A$ and $B$, nor is it clear
that the set $A\cap B$ really is the intersection of our two sets $A$ and $B$.
The safest way around this minefield is to rename the sets $A\cup B$ and
$A\cap B$ that were chosen in our above steps as $C$ and $D$, respectively.
Thus, $C$ is an $i$-element subset of $X$, and $A$ is an $a$-element subset of
$C$, and $D$ is an $\left(  a+b-i\right)  $-element subset of $A$. The
definition of $B$ can then be rewritten as $B=\left(  C\setminus A\right)
\cup D$. We must now prove that $A\cup B=C$ and $A\cap B=D$. This is
straightforward set theory:%
\[
A\cup\underbrace{B}_{=\left(  C\setminus A\right)  \cup D}=\underbrace{A\cup
\left(  C\setminus A\right)  }_{\substack{=C\\\text{(since }A\subseteq
C\text{)}}}\cup D=C\cup D=C\ \ \ \ \ \ \ \ \ \ \left(  \text{since }D\subseteq
A\subseteq C\right)
\]
and%
\begin{align*}
A\cap\underbrace{B}_{=\left(  C\setminus A\right)  \cup D}  &  =A\cap\left(
\left(  C\setminus A\right)  \cup D\right) \\
&  =\underbrace{\left(  A\cap\left(  C\setminus A\right)  \right)
}_{\substack{=\varnothing\\\text{(since }A\text{ and }C\setminus A\text{ are
disjoint)}}}\cup\left(  A\cap D\right) \\
&  \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \left(
\begin{array}
[c]{c}%
\text{by the distributive law}\\
U\cap\left(  V\cup W\right)  =\left(  U\cap V\right)  \cup\left(  U\cap
W\right)  \text{,}\\
\text{which holds for any three sets }U,V,W
\end{array}
\right) \\
&  =\varnothing\cup\left(  A\cap D\right)  =A\cap
D=D\ \ \ \ \ \ \ \ \ \ \left(  \text{since }D\subseteq A\right)  .
\end{align*}
Finally, we need to prove that $B$ is a $b$-element set. This, too, is easy:
The set $C\setminus A$ is disjoint from $A$ (clearly), and thus also disjoint
from $D$ (since $D\subseteq A$). Hence, by the sum rule, we have $\left\vert
\left(  C\setminus A\right)  \cup D\right\vert =\left\vert C\setminus
A\right\vert +\left\vert D\right\vert $. However, $B=\left(  C\setminus
A\right)  \cup D$, so that%
\begin{align*}
\left\vert B\right\vert  &  =\left\vert \left(  C\setminus A\right)  \cup
D\right\vert =\underbrace{\left\vert C\setminus A\right\vert }%
_{\substack{=\left\vert C\right\vert -\left\vert A\right\vert \\\text{(since
}A\subseteq C\text{)}}}+\underbrace{\left\vert D\right\vert }_{=a+b-i}%
=\underbrace{\left\vert C\right\vert }_{=i}-\underbrace{\left\vert
A\right\vert }_{=a}+a+b-i\\
&  =i-a+a+b-i=b.
\end{align*}
This shows that $B$ is a $b$-element set. Thus, we have finally shown that
$\left(  A,B\right)  $ really is an ab-pair.
\end{itemize}

Altogether, by the sum rule and the dependent product rule, we see that the \#
of ways to perform this construction is%
\[
\sum_{i=0}^{a+b}\dbinom{x}{i}\dbinom{i}{a}\dbinom{a}{a+b-i}.
\]
Thus, the \# of ab-pairs is
\[
\sum_{i=0}^{a+b}\dbinom{x}{i}\dbinom{i}{a}\dbinom{a}{a+b-i}%
\]
(since any ab-pair can clearly be obtained by our construction).

Comparing our two formulas for the \# of ab-pairs, we obtain%
\[
\dbinom{x}{a}\dbinom{x}{b}=\sum_{i=0}^{a+b}\dbinom{x}{i}\dbinom{i}{a}%
\dbinom{a}{a+b-i}=\sum_{i=0}^{a+b}\dbinom{i}{a}\dbinom{a}{a+b-i}\dbinom{x}%
{i}.
\]
This proves Theorem \ref{thm.combpf.xaxb}.
\end{proof}

\subsubsection{The combinatorial interpretation of the BCs}

Let us now go back to the basics. The combinatorial interpretation of the BCs
(Lecture 6, Theorem 1.3.10) says the following:

\begin{theorem}
\label{thm.combpf.bccomb}Let $n\in\mathbb{N}$ and $k\in\mathbb{R}$. Let $S$ be
an $n$-element set. Then,%
\[
\left(  \text{\# of }k\text{-element subsets of }S\right)  =\dbinom{n}{k}.
\]

\end{theorem}

Back in Lecture 6, we proved this by induction. This was already a rather
combinatorial proof (as it used bijections), but let us give a new,
\textquotedblleft more combinatorial\textquotedblright\ proof now:

\begin{proof}
[New proof of Theorem \ref{thm.combpf.bccomb}.]We WLOG assume that
$k\in\mathbb{N}$ (since otherwise, our claim is just saying that $0=0$).

Thus, by the definition of BCs, we have%
\[
\dbinom{n}{k}=\dfrac{n\left(  n-1\right)  \left(  n-2\right)  \cdots\left(
n-k+1\right)  }{k!}=\dfrac{n^{\underline{k}}}{k^{\underline{k}}},
\]
where%
\[
n^{\underline{k}}=n\left(  n-1\right)  \left(  n-2\right)  \cdots\left(
n-k+1\right)
\]
is the falling factorial defined in Definition 2.4.2 (Lecture 16). Hence, we
must prove that%
\[
\left(  \text{\# of }k\text{-element subsets of }S\right)  =\dfrac
{n^{\underline{k}}}{k^{\underline{k}}}.
\]
Equivalently, we must prove that%
\[
\left(  \text{\# of }k\text{-element subsets of }S\right)  \cdot
k^{\underline{k}}=n^{\underline{k}}.
\]


We use double counting again. We let $K:=\left[  k\right]  =\left\{
1,2,\ldots,k\right\}  $. What is the \# of injective maps from $K$ to $S$ ? We
answer this question in two ways:

\textit{1st way:} Theorem 2.4.4 (from Lecture 16) yields%
\begin{equation}
\left(  \text{\# of injective maps from }K\text{ to }S\right)
=n^{\underline{k}} \label{pf.thm.combpf.bccomb.w1}%
\end{equation}
(since $K$ is a $k$-element set, while $S$ is an $n$-element set).

\textit{2nd way:} We recall the notion of the \textbf{range} of a map.

If $f:X\rightarrow Y$ is any map, then the \textbf{range} (aka \textbf{image})
of $f$ is defined to be the subset%
\[
\operatorname{Im}f:=\left\{  f\left(  x\right)  \ \mid\ x\in X\right\}
=\left\{  \text{all values of }f\right\}
\]
of $Y$. Thus, in particular, for any map $f:K\rightarrow S$, the range
$\operatorname{Im}f$ is a subset of $S$. Moreover, if the map $f:K\rightarrow
S$ is injective, then its range $\operatorname{Im}f$ is a $k$-element
set\footnote{Indeed, if $f$ is injective, then the values $f\left(  1\right)
,f\left(  2\right)  ,\ldots,f\left(  k\right)  $ of $f$ are distinct, so that
$f$ has $k$ distinct values, but this means that the set $\operatorname{Im}f$
has $k$ elements.} and therefore is a $k$-element subset of $S$.

So any injective map $f:K\rightarrow S$ has a range $\operatorname{Im}f$ that
is a $k$-element subset of $S$. Thus, by the sum rule,%
\begin{align*}
&  \left(  \text{\# of injective maps from }K\text{ to }S\right) \\
&  =\sum_{R\text{ is a }k\text{-element subset of }S}\left(  \text{\# of
injective maps from }K\text{ to }S\text{ whose range is }R\right)  .
\end{align*}
Let us now take a closer look at the addends on the right hand side.

We fix a $k$-element subset $R$ of $S$. Then,%
\begin{align*}
&  \left(  \text{\# of injective maps from }K\text{ to }S\text{ whose range is
}R\right) \\
&  =\left(  \text{\# of bijective maps from }K\text{ to }R\right)
\end{align*}
(since an injective map from $K$ to $S$ whose range is $R$ is essentially the
same as a bijective map from $K$ to $R$\ \ \ \ \footnote{More details for the
confused and the pedantic:
\par
Let $f$ be a map from $K$ to $S$ whose range is $R$. Then, the values of $f$
belong to $R$. Thus, $f$ is \textquotedblleft essentially\textquotedblright\ a
map from $K$ to $R$. To be more precise, we can define a map $f^{\prime
}:K\rightarrow R$ by letting%
\[
f^{\prime}\left(  x\right)  =f\left(  x\right)  \ \ \ \ \ \ \ \ \ \ \text{for
all }x\in K.
\]
For example,
\begin{align*}
\text{if }f  &  =%
%TCIMACRO{\TeXButton{blobs1}{\begin{tikzpicture}
%\filldraw[fill=yellow!20!white] (0, 4) ellipse (1 and 1.7);
%\node(Aa) at (0, 5) {$1$};
%\node(Ab) at (0, 4) {$2$};
%\node(Ac) at (0, 3) {$3$};
%\filldraw[fill=yellow!20!white] (3, 3.5) ellipse (1 and 2.2);
%\node(Aname) at (0, 2) {$K$};
%\node(B1) at (3, 5) {$a$};
%\node(B2) at (3, 4) {$b$};
%\node(B3) at (3, 3) {$c$};
%\node(B4) at (3, 2) {$d$};
%\node(Bname) at (3, 1) {$S$};
%\draw[->, very thick, darkgreen] (Aa) -- (B2);
%\draw[->, very thick, darkgreen] (Ab) -- (B1);
%\draw[->, very thick, darkgreen] (Ac) -- (B4);
%\node(phinameR) at (1.5, 5) {$\color{darkgreen}{f}$};
%\end{tikzpicture}}}%
%BeginExpansion
\begin{tikzpicture}
\filldraw[fill=yellow!20!white] (0, 4) ellipse (1 and 1.7);
\node(Aa) at (0, 5) {$1$};
\node(Ab) at (0, 4) {$2$};
\node(Ac) at (0, 3) {$3$};
\filldraw[fill=yellow!20!white] (3, 3.5) ellipse (1 and 2.2);
\node(Aname) at (0, 2) {$K$};
\node(B1) at (3, 5) {$a$};
\node(B2) at (3, 4) {$b$};
\node(B3) at (3, 3) {$c$};
\node(B4) at (3, 2) {$d$};
\node(Bname) at (3, 1) {$S$};
\draw[->, very thick, darkgreen] (Aa) -- (B2);
\draw[->, very thick, darkgreen] (Ab) -- (B1);
\draw[->, very thick, darkgreen] (Ac) -- (B4);
\node(phinameR) at (1.5, 5) {$\color{darkgreen}{f}$};
\end{tikzpicture}%
%EndExpansion
\text{ (and }R=\left\{  a,b,d\right\}  \text{),}\\
& \\
\text{then }f^{\prime}  &  =%
%TCIMACRO{\TeXButton{blobs2}{\begin{tikzpicture}
%\filldraw[fill=yellow!20!white] (0, 4) ellipse (1 and 1.7);
%\node(Aa) at (0, 5) {$1$};
%\node(Ab) at (0, 4) {$2$};
%\node(Ac) at (0, 3) {$3$};
%\filldraw[fill=yellow!20!white] plot[smooth] coordinates
%{(2.2, 4.5) (2.3, 5) (3, 5.7) (3.8, 4.5) (3.8, 2.5) (3, 1.3) (2.3, 2) (3.2, 3) (2.2, 4) (2.2, 4.5)}
%-- cycle;
%\node(Aname) at (0, 2) {$K$};
%\node(B1) at (3, 5) {$a$};
%\node(B3) at (3, 4) {$b$};
%\node(B4) at (3, 2) {$d$};
%\node(Bname) at (3, 1) {$R$};
%\draw[->, very thick, darkgreen] (Aa) -- (B2);
%\draw[->, very thick, darkgreen] (Ab) -- (B1);
%\draw[->, very thick, darkgreen] (Ac) -- (B4);
%\node(phinameR) at (1.5, 5) {$\color{darkgreen}{f}$};
%\end{tikzpicture}}}%
%BeginExpansion
\begin{tikzpicture}
\filldraw[fill=yellow!20!white] (0, 4) ellipse (1 and 1.7);
\node(Aa) at (0, 5) {$1$};
\node(Ab) at (0, 4) {$2$};
\node(Ac) at (0, 3) {$3$};
\filldraw[fill=yellow!20!white] plot[smooth] coordinates
{(2.2, 4.5) (2.3, 5) (3, 5.7) (3.8, 4.5) (3.8, 2.5) (3, 1.3) (2.3, 2) (3.2, 3) (2.2, 4) (2.2, 4.5)}
-- cycle;
\node(Aname) at (0, 2) {$K$};
\node(B1) at (3, 5) {$a$};
\node(B3) at (3, 4) {$b$};
\node(B4) at (3, 2) {$d$};
\node(Bname) at (3, 1) {$R$};
\draw[->, very thick, darkgreen] (Aa) -- (B2);
\draw[->, very thick, darkgreen] (Ab) -- (B1);
\draw[->, very thick, darkgreen] (Ac) -- (B4);
\node(phinameR) at (1.5, 5) {$\color{darkgreen}{f}$};
\end{tikzpicture}%
%EndExpansion
\text{.}%
\end{align*}
Strictly speaking, we should make a distinction between the maps $f$ and
$f^{\prime}$, since they have different targets ($S$ for $f$ and $R$ for
$f^{\prime}$), but it is clear that they are \textquotedblleft essentially the
same map\textquotedblright\ (as they send the same elements to the same
values). Note furthermore that the map $f^{\prime}$ is surjective (since its
target $R$ is the range of $f$, so that every element of $R$ is taken as a
value by $f$ and thus by $f^{\prime}$ as well). If $f$ is injective, then
$f^{\prime}$ is also injective and therefore bijective (since $f^{\prime}$ is
surjective).
\par
Forget that we fixed $f$. We thus have shown that if $f$ is an injective map
from $K$ to $S$ whose range is $R$, then the corresponding map $f^{\prime}$
from $K$ to $R$ is bijective. Conversely, any bijective map from $K$ to $R$
can be viewed as an injective map from $K$ to $S$ whose range is $R$.}).
Furthermore, the two sets $K$ and $R$ satisfy $\left\vert K\right\vert
=\left\vert R\right\vert $ (since $\left\vert K\right\vert =k$ and $\left\vert
R\right\vert =k$). Thus, the Pigeonhole Principle for Injections (Theorem
2.4.5 \textbf{(b)} in Lecture 16) yields that any injective map from $K$ to
$R$ is bijective. Since the converse holds as well (every bijective map is
automatically injective), we thus conclude that the bijective maps from $K$ to
$R$ are precisely the injective maps from $K$ to $R$. Therefore,%
\begin{align*}
&  \left(  \text{\# of bijective maps from }K\text{ to }R\right) \\
&  =\left(  \text{\# of injective maps from }K\text{ to }R\right)
=k^{\underline{k}}%
\end{align*}
(by Theorem 2.4.4 in Lecture 16, since $\left\vert K\right\vert =k$ and
$\left\vert R\right\vert =k$). Altogether, we thus have%
\begin{align}
&  \left(  \text{\# of injective maps from }K\text{ to }S\text{ whose range is
}R\right) \nonumber\\
&  =\left(  \text{\# of bijective maps from }K\text{ to }R\right) \nonumber\\
&  =k^{\underline{k}}. \label{pf.thm.combpf.bccomb.w2.k}%
\end{align}


Forget that we fixed $R$. We thus have proved (\ref{pf.thm.combpf.bccomb.w2.k}%
) for every $k$-element subset $R$ of $S$.

Now, we can continue our computation of $\left(  \text{\# of injective maps
from }K\text{ to }S\right)  $ as follows:%
\begin{align*}
&  \left(  \text{\# of injective maps from }K\text{ to }S\right) \\
&  =\sum_{R\text{ is a }k\text{-element subset of }S}\underbrace{\left(
\text{\# of injective maps from }K\text{ to }S\text{ whose range is }R\right)
}_{\substack{=k^{\underline{k}}\\\text{(by (\ref{pf.thm.combpf.bccomb.w2.k}%
))}}}\\
&  =\sum_{R\text{ is a }k\text{-element subset of }S}k^{\underline{k}}\\
&  =\left(  \text{\# of }k\text{-element subsets of }S\right)  \cdot
k^{\underline{k}}.
\end{align*}


Comparing this with (\ref{pf.thm.combpf.bccomb.w1}), we obtain%
\[
\left(  \text{\# of }k\text{-element subsets of }S\right)  \cdot
k^{\underline{k}}=n^{\underline{k}}.
\]
As explained above, this proves Theorem \ref{thm.combpf.bccomb}.
\end{proof}

\subsubsection{An identity with fractions}

Here is another apocryphal binomial identity:

\begin{theorem}
\label{thm.combpf.wit}Let $n,m\in\mathbb{N}$. Then,%
\[
n=\sum_{k=0}^{m-1}\dbinom{n-1}{k}\dfrac{\left(  k+1\right)  !}{n^{k}}%
+n\dbinom{n-1}{m}\dfrac{m!}{n^{m}}.
\]

\end{theorem}

\begin{proof}
By multiplying both sides with $n^{m-1}$, we can rewrite this identity as%
\begin{equation}
n^{m}=\sum_{k=0}^{m-1}\dbinom{n-1}{k}\left(  k+1\right)  !n^{m-1-k}%
+\dbinom{n-1}{m}m!. \label{pf.thm.combpf.wit.1}%
\end{equation}


We shall prove this by double counting. Specifically, we shall double-count
the \# of $m$-tuples $\left(  a_{1},a_{2},\ldots,a_{m}\right)  \in\left[
n\right]  ^{m}$.

\textit{1st way:} Clearly, the \# of such $m$-tuples is $n^{m}$.

\textit{2nd way:} We define the \textbf{wit} of an $m$-tuple $\left(
a_{1},a_{2},\ldots,a_{m}\right)  $ to be the largest $i\in\left\{
0,1,\ldots,m\right\}  $ such that the numbers $a_{1},a_{2},\ldots,a_{i}$ are distinct.

For example,

\begin{itemize}
\item the $5$-tuple $\left(  1,4,2,2,1\right)  $ has wit $3$ (since $1,4,2$
are distinct, but $1,4,2,2$ are not).

\item the $5$-tuple $\left(  4,5,6,5,4\right)  $ has wit $3$.

\item the $5$-tuple $\left(  2,4,6,8,9\right)  $ has wit $5$.
\end{itemize}

Note that the wit is always an element of $\left[  m\right]  $ unless $m=0$.
We WLOG assume that $m\neq0$ (since (\ref{pf.thm.combpf.wit.1}) is easy to
prove by hand for $m=0$). Thus, the wit is always an element of $\left[
m\right]  $.

Hence, the sum rule yields%
\begin{align}
&  \left(  \text{\# of }m\text{-tuples }\left(  a_{1},a_{2},\ldots
,a_{m}\right)  \in\left[  n\right]  ^{m}\right) \nonumber\\
&  =\sum_{i=1}^{m}\left(  \text{\# of }m\text{-tuples }\left(  a_{1}%
,a_{2},\ldots,a_{m}\right)  \in\left[  n\right]  ^{m}\text{ with wit
}i\right)  . \label{pf.thm.combpf.wit.sum}%
\end{align}


So let us count the $m$-tuples with a given wit.

Fix $i\in\left[  m-1\right]  $. How many $m$-tuples $\left(  a_{1}%
,a_{2},\ldots,a_{m}\right)  \in\left[  n\right]  ^{m}$ have wit $i$ ? An
$m$-tuple $\left(  a_{1},a_{2},\ldots,a_{m}\right)  \in\left[  n\right]  ^{m}$
has wit $i$ if and only if

\begin{itemize}
\item its first $i$ entries $a_{1},a_{2},\ldots,a_{i}$ are distinct,

\item its next entry $a_{i+1}$ repeats one of these $i$ entries,

\item and all its remaining $m-i-1$ entries $a_{i+2},a_{i+3},\ldots,a_{m}$ are arbitrary.
\end{itemize}

Thus, we can construct an $m$-tuple $\left(  a_{1},a_{2},\ldots,a_{m}\right)
\in\left[  n\right]  ^{m}$ with wit $i$ via the following procedure:

\begin{itemize}
\item We choose its first $i$ entries $a_{1},a_{2},\ldots,a_{i}$. The \# of
options for this is $n\left(  n-1\right)  \left(  n-2\right)  \cdots\left(
n-i+1\right)  $ (since each of these $i$ entries has to be distinct from all
the preceding entries, which are furthermore distinct among themselves by construction).

\item Next, we choose the $\left(  i+1\right)  $-st entry $a_{i+1}$. The \#
options for this is $i$ (since it has to repeat one of the previous $i$
entries, which are furthermore distinct by construction).

\item Finally, we choose the remaining $m-i-1$ entries $a_{i+2},a_{i+3}%
,\ldots,a_{m}$. The \# of options for this is $n^{m-i-1}$ (since they are
arbitrarily chosen from $\left[  n\right]  $).
\end{itemize}

By the dependent product rule, the total \# of ways to perform this procedure
is
\begin{align*}
&  \underbrace{n\left(  n-1\right)  \left(  n-2\right)  \cdots\left(
n-i+1\right)  }_{=\dbinom{n}{i}\cdot i!}\cdot i\cdot n^{m-i-1}\\
&  =\underbrace{\dbinom{n}{i}}_{\substack{=\dfrac{n}{i}\dbinom{n-1}%
{i-1}\\\text{(by the absorption formula}\\\text{(Lecture 8, Proposition
1.3.29))}}}\cdot i!\cdot i\cdot n^{m-i-1}\\
&  =\dfrac{n}{i}\dbinom{n-1}{i-1}\cdot i!\cdot i\cdot n^{m-i-1}\\
&  =\dbinom{n-1}{i-1}\cdot i!\cdot n^{m-i}.
\end{align*}
So this must be the \# of $m$-tuples $\left(  a_{1},a_{2},\ldots,a_{m}\right)
\in\left[  n\right]  ^{m}$ with wit $i$.

Forget that we fixed $i$. We have thus proved that%
\begin{align}
&  \left(  \text{\# of }m\text{-tuples }\left(  a_{1},a_{2},\ldots
,a_{m}\right)  \in\left[  n\right]  ^{m}\text{ with wit }i\right) \nonumber\\
&  =\dbinom{n-1}{i-1}\cdot i!\cdot n^{m-i} \label{pf.thm.combpf.wit.numi}%
\end{align}
for each $i\in\left[  m-1\right]  $.

When $i=m$, a similar argument gives us%
\begin{align}
&  \left(  \text{\# of }m\text{-tuples }\left(  a_{1},a_{2},\ldots
,a_{m}\right)  \in\left[  n\right]  ^{m}\text{ with wit }m\right) \nonumber\\
&  =n\left(  n-1\right)  \left(  n-2\right)  \cdots\left(  n-m+1\right)
=\dbinom{n}{m}\cdot m!. \label{pf.thm.combpf.wit.numm}%
\end{align}


Now, (\ref{pf.thm.combpf.wit.sum}) becomes
\begin{align*}
&  \left(  \text{\# of }m\text{-tuples }\left(  a_{1},a_{2},\ldots
,a_{m}\right)  \in\left[  n\right]  ^{m}\right) \\
&  =\sum_{i=1}^{m}\left(  \text{\# of }m\text{-tuples }\left(  a_{1}%
,a_{2},\ldots,a_{m}\right)  \in\left[  n\right]  ^{m}\text{ with wit }i\right)
\\
&  =\sum_{i=1}^{m-1}\underbrace{\left(  \text{\# of }m\text{-tuples }\left(
a_{1},a_{2},\ldots,a_{m}\right)  \in\left[  n\right]  ^{m}\text{ with wit
}i\right)  }_{\substack{=\dbinom{n-1}{i-1}\cdot i!\cdot n^{m-i}\\\text{(by
(\ref{pf.thm.combpf.wit.numi}))}}}\\
&  \ \ \ \ \ \ \ \ \ \ +\underbrace{\left(  \text{\# of }m\text{-tuples
}\left(  a_{1},a_{2},\ldots,a_{m}\right)  \in\left[  n\right]  ^{m}\text{ with
wit }m\right)  }_{\substack{=\dbinom{n}{m}\cdot m!\\\text{(by
(\ref{pf.thm.combpf.wit.numm}))}}}\\
&  =\sum_{i=1}^{m-1}\dbinom{n-1}{i-1}\cdot i!\cdot n^{m-i}+\dbinom{n}{m}\cdot
m!\\
&  =\sum_{k=0}^{m-2}\dbinom{n-1}{k}\cdot\left(  k+1\right)  !\cdot
\underbrace{n^{m-\left(  k+1\right)  }}_{=n^{m-1-k}}+\underbrace{\dbinom{n}%
{m}}_{\substack{=\dbinom{n-1}{m-1}+\dbinom{n-1}{m}\\\text{(by Pascal's
recurrence)}}}\cdot m!\\
&  \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \left(  \text{here, we substituted
}k+1\text{ for }i\text{ in the sum}\right) \\
&  =\sum_{k=0}^{m-2}\dbinom{n-1}{k}\cdot\left(  k+1\right)  !\cdot
n^{m-1-k}+\left(  \dbinom{n-1}{m-1}+\dbinom{n-1}{m}\right)  \cdot m!\\
&  =\underbrace{\sum_{k=0}^{m-2}\dbinom{n-1}{k}\left(  k+1\right)
!n^{m-1-k}+\dbinom{n-1}{m-1}m!}_{\substack{=\sum_{k=0}^{m-1}\dbinom{n-1}%
{k}\left(  k+1\right)  !n^{m-1-k}\\\text{(since the extra addend }\dbinom
{n-1}{m-1}m!\\\text{is precisely the \textquotedblleft
missing\textquotedblright\ }k=m-1\text{ addend}\\\text{of the sum }\sum
_{k=0}^{m-2}\dbinom{n-1}{k}\left(  k+1\right)  !n^{m-1-k}\text{)}}%
}+\dbinom{n-1}{m}m!\\
&  =\sum_{k=0}^{m-1}\dbinom{n-1}{k}\left(  k+1\right)  !n^{m-1-k}+\dbinom
{n-1}{m}m!.
\end{align*}


Comparing this with%
\[
\left(  \text{\# of }m\text{-tuples }\left(  a_{1},a_{2},\ldots,a_{m}\right)
\in\left[  n\right]  ^{m}\right)  =n^{m},
\]
we obtain%
\[
n^{m}=\sum_{k=0}^{m-1}\dbinom{n-1}{k}\left(  k+1\right)  !n^{m-1-k}%
+\dbinom{n-1}{m}m!.
\]
This proves (\ref{pf.thm.combpf.wit.1}) and thus Theorem \ref{thm.combpf.wit}.
\end{proof}

\begin{exercise}
Prove Theorem \ref{thm.combpf.wit} algebraically, by induction on $m$.
\end{exercise}

\begin{thebibliography}{99999999}                                                                                         %


\bibitem[BenQui03]{BenQui03}Arthur T. Benjamin and Jennifer J. Quinn,
\textit{Proofs that Really Count: The Art of Combinatorial Proof}, Dolciani
Mathematical Expositions \textbf{27}, The Mathematical Association of America, 2003.

\bibitem[Grinbe15]{detnotes}Darij Grinberg, \textit{Notes on the combinatorial
fundamentals of algebra}, 15 September 2022.\newline%
\url{http://www.cip.ifi.lmu.de/~grinberg/primes2015/sols.pdf} \newline The
numbering of theorems and formulas in this link might shift when the project
gets updated; for a \textquotedblleft frozen\textquotedblright\ version whose
numbering is guaranteed to match that in the citations above, see
\url{https://github.com/darijgr/detnotes/releases/tag/2022-09-15c} .

\bibitem[Loehr11]{Loehr-BC}%
\href{http://www.math.vt.edu/people/nloehr/bijbook.html}{Nicholas A. Loehr,
\textit{Bijective Combinatorics}, Chapman \& Hall/CRC 2011.}
\end{thebibliography}


\end{document}