\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=Thursday, December 29, 2022 17:31:39}
%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{\numboxed}[2]{\underbrace{\boxed{#1}}_{\text{box } #2}}
\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 23, version \today}
\ohead{page \thepage}
\cfoot{}
\begin{document}
\section*{Math 222 Fall 2022, Lecture 23: 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}{9}

\subsection{Multinomial coefficients (cont'd)}

\subsubsection{Definition and formulas (cont'd)}

\setcounter{theo}{4}

What gave multinomial coefficients their name is the following theorem (which
generalizes the binomial formula):

\begin{theorem}
[multinomial formula]\label{thm.mulnom.mulnomform}Let $x_{1},x_{2}%
,\ldots,x_{k}$ be any numbers. Let $n\in\mathbb{N}$. Then,%
\[
\left(  x_{1}+x_{2}+\cdots+x_{k}\right)  ^{n}=\sum_{\substack{\left(
a_{1},a_{2},\ldots,a_{k}\right)  \in\mathbb{N}^{k};\\a_{1}+a_{2}+\cdots
+a_{k}=n}}\dbinom{n}{a_{1},a_{2},\ldots,a_{k}}x_{1}^{a_{1}}x_{2}^{a_{2}}\cdots
x_{k}^{a_{k}}.
\]

\end{theorem}

\begin{proof}
Either a straightforward induction on $n$, or a straightforward induction on
$k$, or expand and use the combinatorial interpretation of multinomial
coefficients (Proposition \ref{prop.mulnom.num-tups} below). References can be
found in the 2019 notes (proof of Theorem 2.12.16).
\end{proof}

\subsubsection{Counting maps that take each value a given number of times}

Here is a combinatorial interpretation of multinomial coefficients:

\begin{proposition}
\label{prop.mulnom.num-maps}Let $n\in\mathbb{N}$ and $n_{1},n_{2},\ldots
,n_{k}\in\mathbb{N}$ be such that $n_{1}+n_{2}+\cdots+n_{k}=n$. Then, the \#
of maps $f:\left[  n\right]  \rightarrow\left[  k\right]  $ that satisfy%
\[
\left(  \text{\# of }a\in\left[  n\right]  \text{ such that }f\left(
a\right)  =i\right)  =n_{i}\ \ \ \ \ \ \ \ \ \ \text{for each }i\in\left[
k\right]
\]
is $\dbinom{n}{n_{1},n_{2},\ldots,n_{k}}$.
\end{proposition}

\begin{example}
Applying this proposition to $n=7$ and $k=3$ and $\left(  n_{1},n_{2}%
,n_{3}\right)  =\left(  2,3,2\right)  $ yields that the \# of maps $f:\left[
7\right]  \rightarrow\left[  3\right]  $ that take the value $1$ two times,
the value $2$ three times, and the value $3$ two times is
\[
\dbinom{7}{2,3,2}=\dfrac{7!}{2!\cdot3!\cdot2!}=210.
\]
An example of such a map is (written in two-line notation)%
\[
\left(
\begin{array}
[c]{ccccccc}%
1 & 2 & 3 & 4 & 5 & 6 & 7\\
1 & 1 & 2 & 2 & 2 & 3 & 3
\end{array}
\right)  .
\]
Another is%
\[
\left(
\begin{array}
[c]{ccccccc}%
1 & 2 & 3 & 4 & 5 & 6 & 7\\
2 & 3 & 1 & 3 & 1 & 2 & 2
\end{array}
\right)  .
\]
We are not going to list the remaining $208$ such maps.
\end{example}

\begin{proof}
[Proof of Proposition \ref{prop.mulnom.num-maps}.]We need to count the maps
$f:\left[  n\right]  \rightarrow\left[  k\right]  $ that satisfy%
\[
\left(  \text{\# of }a\in\left[  n\right]  \text{ such that }f\left(
a\right)  =i\right)  =n_{i}\ \ \ \ \ \ \ \ \ \ \text{for each }i\in\left[
k\right]  .
\]
We can construct such a map in the following way:

\begin{enumerate}
\item We choose the set $\left\{  a\in\left[  n\right]  \ \mid\ f\left(
a\right)  =1\right\}  $. This must be an $n_{1}$-element subset of $\left[
n\right]  $, so we have $\dbinom{n}{n_{1}}$ many options for it.

\item We choose the set $\left\{  a\in\left[  n\right]  \ \mid\ f\left(
a\right)  =2\right\}  $. This must be an $n_{2}$-element subset of
\[
\left[  n\right]  \setminus\left\{  a\in\left[  n\right]  \ \mid\ f\left(
a\right)  =1\right\}  ,
\]
so we have $\dbinom{n-n_{1}}{n_{2}}$ many options for it\footnote{since
$\left[  n\right]  \setminus\left\{  a\in\left[  n\right]  \ \mid\ f\left(
a\right)  =1\right\}  $ is an $\left(  n-n_{1}\right)  $-element set}.

\item We choose the set $\left\{  a\in\left[  n\right]  \ \mid\ f\left(
a\right)  =3\right\}  $. This must be an $n_{3}$-element subset of
\[
\left[  n\right]  \setminus\left(  \left\{  a\in\left[  n\right]
\ \mid\ f\left(  a\right)  =1\right\}  \cup\left\{  a\in\left[  n\right]
\ \mid\ f\left(  a\right)  =2\right\}  \right)  ,
\]
so we have $\dbinom{n-n_{1}-n_{2}}{n_{3}}$ many options for it\footnote{since
$\left[  n\right]  \setminus\left(  \left\{  a\in\left[  n\right]
\ \mid\ f\left(  a\right)  =1\right\}  \cup\left\{  a\in\left[  n\right]
\ \mid\ f\left(  a\right)  =2\right\}  \right)  $ is an $\left(  n-n_{1}%
-n_{2}\right)  $-element set}.

\item And so on.
\end{enumerate}

By the dependent product rule, we thus see that the total \# of such maps is%
\begin{align*}
&  \dbinom{n}{n_{1}}\dbinom{n-n_{1}}{n_{2}}\dbinom{n-n_{1}-n_{2}}{n_{3}}%
\cdots\dbinom{n-n_{1}-n_{2}-\cdots-n_{k-1}}{n_{k}}\\
&  =\dbinom{n}{n_{1},n_{2},\ldots,n_{k}}\ \ \ \ \ \ \ \ \ \ \left(
\begin{array}
[c]{c}%
\text{by Proposition 2.10.4 \textbf{(a)}}\\
\text{from Lecture 22}%
\end{array}
\right)  .
\end{align*}
So we are done.

(See Proposition 2.12.5 in the 2019 notes for more details.)
\end{proof}

Let me restate Proposition \ref{prop.mulnom.num-maps} using tuples instead of maps:

\begin{proposition}
\label{prop.mulnom.num-tups}Let $n\in\mathbb{N}$ and $n_{1},n_{2},\ldots
,n_{k}\in\mathbb{N}$ be such that $n_{1}+n_{2}+\cdots+n_{k}=n$. Then, the \#
of $n$-tuples $\left(  u_{1},u_{2},\ldots,u_{n}\right)  \in\left[  k\right]
^{n}$ that satisfy%
\[
\left(  \text{\# of }a\in\left[  n\right]  \text{ such that }u_{a}=i\right)
=n_{i}\ \ \ \ \ \ \ \ \ \ \text{for each }i\in\left[  k\right]
\]
is $\dbinom{n}{n_{1},n_{2},\ldots,n_{k}}$.
\end{proposition}

\begin{proof}
This follows from Proposition \ref{prop.mulnom.num-maps}, using the standard
\textquotedblleft encode maps as tuples\textquotedblright\ bijection. (Again,
details can be found in the 2019 notes -- Proposition 2.12.7 to be specific.)
\end{proof}

\subsubsection{Counting anagrams}

An equivalent version of Proposition \ref{prop.mulnom.num-maps} can be
formulated using the notion of an \textquotedblleft anagram\textquotedblright.
Let us define this first:

\begin{definition}
\label{def.anagram}Let $n\in\mathbb{N}$. Let $\alpha$ be an $n$-tuple (of any objects).

An \textbf{anagram} of $\alpha$ shall mean an $n$-tuple that can be obtained
from $\alpha$ by permuting the entries.

In other words, if $\alpha=\left(  \alpha_{1},\alpha_{2},\ldots,\alpha
_{n}\right)  $, then an \textbf{anagram} of $\alpha$ means an $n$-tuple of the
form%
\[
\left(  \alpha_{\sigma\left(  1\right)  },\alpha_{\sigma\left(  2\right)
},\ldots,\alpha_{\sigma\left(  n\right)  }\right)
,\ \ \ \ \ \ \ \ \ \ \text{where }\sigma\text{ is a permutation of }\left[
n\right]  .
\]

\end{definition}

For example, the $6$-tuple $\left(  1,3,2,4,4,2\right)  $ is an anagram of
$\left(  2,2,1,4,3,4\right)  $, because the former tuple can be obtained from
the latter by permuting the entries (namely, permuting them in such a way that
the entry $1$ moves to the front, the two entries $2$ move to the third and
sixth positions, the entry $3$ moves to the second position, and the two
entries $4$ move to the fourth and fifth positions).

Anagrams are often called \textquotedblleft permutations\textquotedblright\ in
mathematics. I prefer calling them \textquotedblleft
anagrams\textquotedblright\ in order to reserve the word \textquotedblleft
permutation\textquotedblright\ for a bijective map from a set to itself. So a
permutation for me means (roughly speaking) a \textbf{way} to permute
elements, not a \textbf{result} of permuting elements. Distinct permutations
of $\left[  n\right]  $ may lead to the same anagram of $\alpha$ (if $\alpha$
has equal entries), so it is important to keep the two apart, and I do this by
giving them different names.

\begin{example}
\label{exa.anagram.exa1}How many anagrams does the word \textquotedblleft
anagram\textquotedblright\ have?

We treat a word as a tuple of letters, so the word \textquotedblleft
anagram\textquotedblright\ is the $7$-tuple $\left(  a,n,a,g,r,a,m\right)  $.

We note that an anagram of this $7$-tuple is just a $7$-tuple that contains
the letter $a$ three times, the letter $n$ once, the letter $g$ once, the
letter $r$ once, and the letter $m$ once. The \# of such tuples can be
obtained from Proposition \ref{prop.mulnom.num-maps} (after renaming the
letters $a,n,g,r,m$ as $1,2,3,4,5$, respectively). We conclude that the \# of
such tuples is $\dbinom{7}{3,1,1,1,1}=\dfrac{7!}{3!\cdot1!\cdot1!\cdot
1!\cdot1!}=840$.
\end{example}

By the same logic, we obtain the following general theorem:

\begin{theorem}
\label{thm.mulnom.anagrams}Let $n\in\mathbb{N}$ and $n_{1},n_{2},\ldots
,n_{k}\in\mathbb{N}$ be such that $n_{1}+n_{2}+\cdots+n_{k}=n$.

Let $\alpha$ be an $n$-tuple that contains $n_{1}$ many $1$'s, $n_{2}$ many
$2$'s, $\ldots$, $n_{k}$ many $k$'s.

Then, the \# of distinct anagrams of $\alpha$ is $\dbinom{n}{n_{1}%
,n_{2},\ldots,n_{k}}$.
\end{theorem}

\begin{proof}
See Proposition 2.12.13 in the 2019 notes (but this is just the argument from
Example \ref{exa.anagram.exa1}, generalized and formalized).
\end{proof}

\bigskip

\subsection{Odds and ends}

Here is a curious counting puzzle that can be solved with what we have seen so
far, and is actually pretty simple when viewed from the right viewpoint:

\begin{exercise}
\label{exe.count.tasks}Given $n$ persons ($n>0$) and $k$ tasks ($k>0$).

\textbf{(a)} What is the \# of ways to assign a task to each person such that
each task has at least $1$ person working on it?

\textbf{(b)} What if we additionally want to choose a leader for each task?
(The leader should be chosen from the people working on that task.)

\textbf{(c)} What if, instead of choosing leaders, we want to choose a
vertical hierarchy for each task? (A vertical hierarchy means a ranking of all
people working on this task, from highest to lowest; ties are not allowed.)
\medskip

\textbf{Example:} Assume that $n=8$ and $k=3$. Let our $8$ people be
$1,2,3,4,5,6,7,8$, and our $3$ tasks be $A,B,C$.

\textbf{(a)} One option is%
\[%
\begin{tabular}
[c]{|l|l|}\hline
task & people working on it\\\hline\hline
$A$ & $1,2,5$\\\hline
$B$ & $3$\\\hline
$C$ & $4,6,7,8$\\\hline
\end{tabular}
\ \ .
\]


\textbf{(b)} One option is%
\[%
\begin{tabular}
[c]{|l|l|}\hline
task & people working on it\\\hline\hline
$A$ & $1,2,5$ with leader $2$\\\hline
$B$ & $3$ with leader $3$\\\hline
$C$ & $4,6,7,8$ with leader $7$\\\hline
\end{tabular}
\ \ .
\]


\textbf{(c)} One option is%
\[%
\begin{tabular}
[c]{|l|l|}\hline
task & people working on it\\\hline\hline
$A$ & $1>5>2$\\\hline
$B$ & $3$\\\hline
$C$ & $7>8>4>6$\\\hline
\end{tabular}
\ \
\]
(where the \textquotedblleft$>$\textquotedblright\ sign means
\textquotedblleft is ranked above\textquotedblright).
\end{exercise}

For $n=3$ and $k=2$, the answers to \textbf{(a)}, \textbf{(b)} and
\textbf{(c)} are $6$, $12$ and $12$, respectively.

We will answer this question in Lecture 24.

\bigskip

\section{\label{chap.12way}The twelvefold way}

So far, we have been answering counting questions one by one, guided mostly by
the kinds of numbers that appear in their answers. Let us now try to
systematically address a wide class of counting problems. Specifically, we try
to solve all reasonable counting problems of the form \textquotedblleft how
many ways are there to put $n$ balls into $k$ boxes\textquotedblright. There
are many ways to make this question precise, and most of them lead to
interesting problems. The $12$ most basic interpretations are usually
classified in a table, called the \textbf{twelvefold way}.

\subsection{What is the twelvefold way?}

\begin{convention}
\label{conv.12way.AX}For the rest of this chapter, we fix two finite sets $A$
and $X$. We shall refer to the elements of $A$ as \textbf{balls} and to the
elements of $X$ as \textbf{boxes}.

A \textbf{placement} means a way to distribute all balls in $A$ into boxes in
$X$. In other words, it is just a map from $A$ to $X$. More precisely, this is
what we will call an $L\rightarrow L$ \textbf{placement}, or a
\textbf{placement of labelled balls into labelled boxes}.
\end{convention}

We see immediately that the \# of $L\rightarrow L$ placements is $\left\vert
X\right\vert ^{\left\vert A\right\vert }$.

For example, the eight $L\rightarrow L$ placements of $3$ balls $1,2,3$ into
two boxes $1,2$ are%
\begin{align*}
&  [123]\ [\ ],\\
&  [12]\ [3],\\
&  [13]\ [2],\\
&  [23]\ [1],\\
&  [1]\ [23],\\
&  [2]\ [13],\\
&  [3]\ [12],\\
&  [\ ]\ [123].
\end{align*}
Here, we are using a semi-visual notation, in which each box is shown as a
pair of square brackets, and the numbers between the brackets are the balls
placed in this box. The boxes are listed in the obvious order (i.e., the first
pair of brackets is box $1$, the next is box $2$, and so on). Thus, for
example, the $L\rightarrow L$ placement in which ball $2$ lies in box $1$
while balls $1$ and $3$ lie in box $2$ is denoted by $[2]\ [13]$. (In the 2019
notes, I have used the much more ornate notation $\fbox{$%
\ \ \underbrace{\boxed{\phantom{(1)}(2)\phantom{(3)}}}_\text{box\ 1}%
\ \ \ \underbrace{\boxed{\phantom{(2}(1)(3)\phantom{)}}}_\text{box\ 2}\ \ $}$
for the same placement; but there is little gained from this flourish. The
only problem with the square-brackets notation is that a box $[2]$ could be
confused with the set $\left[  2\right]  =\left\{  1,2\right\}  $; but this
confusion is unlikely when there is more than one box.)

Note that the order in which balls are written inside a box doesn't matter;
for example, $[23]$ means the same as $[32]$.

\bigskip

Counting $L\rightarrow L$ placements is rather boring. But we can vary the problem:

\begin{itemize}
\item What if we require our placements (i.e., maps $f:A\rightarrow X$) to be
injective (i.e., each box contains at most $1$ ball) or surjective (i.e., each
box contains at least $1$ ball)?

\item What if the balls are unlabelled (i.e., indistinguishable)?

In the above example ($A=\left\{  1,2,3\right\}  $ and $X=\left\{
1,2\right\}  $), this means that the three placements%
\begin{align*}
&  [12]\ [3],\\
&  [13]\ [2],\\
&  [23]\ [1]
\end{align*}
no longer count as distinct; instead, they all look the same (namely, they
look like \textquotedblleft two balls in box $1$, and one ball in box
$2$\textquotedblright). Correspondingly, we now denote them by%
\[
\lbrack\bullet\,\bullet]\ [\bullet].
\]


\item What if the boxes are unlabelled (i.e., indistinguishable)? This means
that the two placements%
\begin{align*}
&  [12]\ [3],\\
&  \left[  3\right]  \ \left[  12\right]
\end{align*}
no longer count as distinct (since they are the same up to the order of the
boxes). I will denote this by underlining the two boxes -- i.e., I will write
$\underline{[12]\ [3]}$ for both of these placements.
\end{itemize}

These variants can be combined (e.g., we can assume both balls and boxes to be
unlabelled, and we can require the placements to be injective). Thus, we get a
total of $3\cdot2\cdot2=12$ different counting problems.\footnote{Yes, we just
counted counting problems.}

Let us give them names:

\begin{itemize}
\item An $L\rightarrow L$\textbf{ placement} is a placement of labelled balls
into labelled boxes.

\item An $U\rightarrow L$\textbf{ placement} is a placement of unlabelled
balls into labelled boxes.

\item An $L\rightarrow U$\textbf{ placement} is a placement of labelled balls
into unlabelled boxes.

\item An $U\rightarrow U$\textbf{ placement} is a placement of unlabelled
balls into unlabelled boxes.
\end{itemize}

Next time (in Lecture 24), we will define formally what \textquotedblleft
unlabelled\textquotedblright\ means, but for now let us give an example:

\begin{example}
Let $X=\left[  2\right]  $ and $A=\left[  3\right]  $. Then, let us count how
many placements of each kind we have:%
\[%
\begin{tabular}
[c]{|c||c|c|c|}\hline
& arbitrary & injective & surjective\\\hline
$L\rightarrow L$ & $8$ & $0$ & $6$\\\hline
$U\rightarrow L$ & $4$ & $0$ & $2$\\\hline
$L\rightarrow U$ & $4$ & $0$ & $3$\\\hline
$U\rightarrow U$ & $2$ & $0$ & $1$\\\hline
\end{tabular}
\
\]


In fact:

\begin{itemize}
\item The $U\rightarrow L$ placements are%
\begin{align*}
&  [\bullet\bullet\bullet]\ [\ ],\\
&  [\bullet\,\bullet]\ [\bullet],\\
&  [\bullet]\ [\bullet\,\bullet],\\
&  [\ ]\ [\bullet\bullet\bullet].
\end{align*}
The second and the third of these are surjective, whereas the first and the
fourth are not. None of these placements is injective.

\item The $L\rightarrow U$ placements are%
\begin{align*}
&  \underline{[123]\ [\ ]},\\
&  \underline{[12]\ [3]},\\
&  \underline{[13]\ [2]},\\
&  \underline{[23]\ [1]}.
\end{align*}
The second, third and fourth of these are surjective, whereas the first is
not. None of these placements is injective.

\item The $U\rightarrow U$ placements are%
\begin{align*}
&  \underline{[\bullet\bullet\bullet]\ [\ ]},\\
&  \underline{[\bullet\,\bullet]\ [\bullet]}.
\end{align*}
The second of these is surjective, whereas the first is not. None of these
placements is injective.
\end{itemize}
\end{example}

Not all of the $12$ questions in the above table have closed-form answers (for
general $A$ and $X$). However, all of them have at least good recursive
answers, and on our quest to find them, we will encounter some nice
combinatorial structures.

\subsection{$L\rightarrow L$}

We begin with the first row of the twelvefold way: counting $L\rightarrow L$
placements. We repeat their definition:

\begin{definition}
\label{def.12way.LtoL}An $L\rightarrow L$ \textbf{placement from }$A$
\textbf{to }$X$ means a map from $A$ to $X$. The value of this map at some
$a\in A$ is called the \textbf{box in which the ball }$a$ \textbf{is placed}.
\end{definition}

Now, the following three propositions follow immediately from results that we
have proved back in \S 2.4:

\begin{proposition}
We have%
\begin{align*}
&  \left(  \text{\# of }L\rightarrow L\text{ placements }A\rightarrow X\right)
\\
&  =\left(  \text{\# of maps }A\rightarrow X\right)  =\left\vert X\right\vert
^{\left\vert A\right\vert }.
\end{align*}

\end{proposition}

\begin{proposition}
We have%
\begin{align*}
&  \left(  \text{\# of injective }L\rightarrow L\text{ placements
}A\rightarrow X\right) \\
&  =\left(  \text{\# of injective maps }A\rightarrow X\right) \\
&  =\left\vert X\right\vert ^{\underline{\left\vert A\right\vert }}=\left\vert
X\right\vert \cdot\left(  \left\vert X\right\vert -1\right)  \cdot\left(
\left\vert X\right\vert -2\right)  \cdot\cdots\cdot\left(  \left\vert
X\right\vert -\left\vert A\right\vert +1\right)  .
\end{align*}

\end{proposition}

\begin{proposition}
We have%
\begin{align*}
&  \left(  \text{\# of surjective }L\rightarrow L\text{ placements
}A\rightarrow X\right) \\
&  =\left(  \text{\# of surjective maps }A\rightarrow X\right)
=\operatorname*{sur}\left(  \left\vert A\right\vert ,\left\vert X\right\vert
\right)  .
\end{align*}

\end{proposition}

\bigskip

Now, to continue with the other three rows of the table, we need to first
define formally what \textquotedblleft unlabelled\textquotedblright\ things are.
\end{document}