\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=Friday, December 02, 2022 00:35:53}
%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 }}
\newtheoremstyle{plainsl}
{8pt plus 2pt minus 4pt}
{8pt plus 2pt minus 4pt}
{\slshape}
{0pt}
{\bfseries}
{.}
{5pt plus 1pt minus 1pt}
{}
\theoremstyle{plainsl}
\ihead{Lecture 1, version \today}
\ohead{page \thepage}
\cfoot{}
\begin{document}
\section*{Math 222 Fall 2022, Lecture 1: Introduction}

\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}}}

\subsection{Plan}

My name is Darij Grinberg.

This is a course on enumerative combinatorics: the mathematics of finite sets
and their sizes and the maps between them. It also includes the study of
finite sums and binomial coefficients.

I will be using the lecture notes from the 2019 iteration of this course
(\textquotedblleft\textit{Enumerative Combinatorics: class notes}%
\textquotedblright, available at
\url{https://www.cip.ifi.lmu.de/~grinberg/t/19fco/n/n.pdf} ). I will refer to
them as the \textquotedblleft2019 notes\textquotedblright, although they will
be updated on occasion. I won't slavishly follow them; instead I will omit
some details and sections while adding some new sections.

Everything I'm typing in class will also go on
\href{https://www.cip.ifi.lmu.de/~grinberg/t/22fco}{the course website} (but
it won't be as polished and fleshed-out as the 2019 notes). The website also
serves as a syllabus, containing homework sets, grading policies, links to
relevant systems (Gradescope, Piazza and Blackboard), and literature
suggestions for further study. \textbf{Read the website!}

The course will be split into 5 chapters, whose content I shall briefly survey now:

\begin{enumerate}
\item \textbf{Introduction.} Here we will meet some counting problems and even
solve a few of them. We'll introduce factorial and binomial coefficients and
prove some basic identities about them. We'll also learn about tools such as
the OEIS and SageMath.

\item \textbf{Binomial coefficients.} In this chapter, we will take a closer
and deeper look at binomial coefficients and systematically study their
properties as well as some counting problems to which they apply.

\item \textbf{The twelvefold way.} This is the problem of counting the ways to
distribute (a given number of) balls into (a given number of) boxes. The
meaning of this problem depends on

\begin{itemize}
\item whether the balls are labeled or not,

\item whether the boxes are labeled or not,

\item whether we insist that each box gets at least one ball, or at most one
ball, or we don't care.
\end{itemize}

\noindent Thus, this is not 1 problem but 12 different problems. The answers
are different, so this will be an opportunity for us to see various objects in
combinatorics, such as set partitions or integer partitions.

\item \textbf{Permutations.} We will have counted them in Chapter 2 already,
but now we will take a closer look at them and study their \textquotedblleft
inner life\textquotedblright.

\item \textbf{Lattice paths.} We will count lattice paths satisfying various
conditions. This is where will meet the infamous Catalan numbers.
\end{enumerate}

The three main threads of this course are:

\begin{itemize}
\item \textbf{Counting} -- i.e., finding formulas for the sizes of certain
finite sets. For example, we will count the permutations of the set $\left\{
1,2,\ldots,n\right\}  $, or the $k$-element subsets of $\left\{
1,2,\ldots,n\right\}  $ that contain no two consecutive elements.
\textquotedblleft Count\textquotedblright\ means finding a formula that
expresses the number of such permutations or $k$-element subsets in terms of
$n$ and $k$.

\item \textbf{Proving polynomial identities} (such as the binomial formula
$\left(  x+y\right)  ^{n}=\sum\limits_{k=0}^{n}\dbinom{n}{k}x^{k}y^{n-k}$ or
various deeper ones).

\item \textbf{Finding and studying interesting maps between sets.} A basic
example of such a map is the \textquotedblleft bit-set
encoding\textquotedblright: the bijective map (= one-to-one correspondence)
from%
\[
\left\{  \text{all subsets of }\left\{  1,2,\ldots,n\right\}  \right\}
\]
to%
\[
\left\{  \text{all }n\text{-tuples }\left(  i_{1},i_{2},\ldots,i_{n}\right)
\in\left\{  0,1\right\}  ^{n}\right\}
\]
(these $n$-tuples are also known as \textquotedblleft length-$n$
bitstrings\textquotedblright) that sends each subset $S$ of $\left\{
1,2,\ldots,n\right\}  $ to the bitstring $\left(  i_{1},i_{2},\ldots
,i_{n}\right)  $, whose entry $i_{k}$ is $1$ if $k\in S$ and $0$
otherwise.\footnote{Here,
\[
\left\{  0,1\right\}  ^{n}=\underbrace{\left\{  0,1\right\}  \times\left\{
0,1\right\}  \times\cdots\times\left\{  0,1\right\}  }_{n\text{ times}%
}=\left\{  \left(  i_{1},i_{2},\ldots,i_{n}\right)  \ \mid\ \text{each }%
i_{k}\text{ belongs to }\left\{  0,1\right\}  \right\}  .
\]
} (Don't worry -- we will be more detailed in the actual lectures.)
\end{itemize}

\section{Introduction}

Let me begin with some counting questions in no particular order.

\subsection{Domino tilings}

\subsubsection{The problem}

Let $n,m\in\mathbb{N}$. Here and in the following, $\mathbb{N}$ means the set
$\left\{  0,1,2,\ldots\right\}  $.

Let $R_{n,m}$ denote the $n\times m$\textbf{-rectangle} -- i.e., a rectangle
with width $n$ and height $m$. (We imagine a specific such rectangle drawn
somewhere in the plane.)

A \textbf{domino} shall mean a $1\times2$-rectangle or a $2\times1$-rectangle.
More specifically, a \textbf{vertical domino} shall mean a $1\times
2$-rectangle, while a \textbf{horizontal domino} shall mean a $2\times1$-rectangle.

A \textbf{domino tiling} of $R_{n,m}$ is a way to cover the rectangle
$R_{n,m}$ with non-overlapping dominos.

For instance, here are three domino tilings of $R_{3,4}$:%
\[%
\begin{tabular}
[c]{|lll|}\hline
\phantom{w} & \multicolumn{1}{l|}{\phantom{w}} & \phantom{w}\\\cline{1-2}%
\cline{1-2}%
\multicolumn{1}{|l|}{\phantom{w}} & \multicolumn{1}{l|}{\phantom{w}} &
\phantom{w}\\\cline{3-3}%
\multicolumn{1}{|l|}{\phantom{w}} & \multicolumn{1}{l|}{\phantom{w}} &
\phantom{w}\\\cline{1-2}\cline{2-2}%
\phantom{w} & \multicolumn{1}{l|}{\phantom{w}} & \phantom{w}\\\hline
\end{tabular}
\ \ \ \ ,\qquad%
\begin{tabular}
[c]{|l|l|l|}\hline
\phantom{w} & \phantom{w} & \phantom{w}\\\cline{4-4}%
\phantom{w} & \phantom{w} & \phantom{w}\\\hline
\phantom{w} & \phantom{w} & \phantom{w}\\\cline{4-4}%
\phantom{w} & \phantom{w} & \phantom{w}\\\hline
\end{tabular}
\ \ \ ,\qquad%
\begin{tabular}
[c]{|ll|l|}\hline
\phantom{w} & \phantom{w} & \phantom{w}\\\cline{1-2}%
\phantom{w} & \phantom{w} & \phantom{w}\\\hline
\phantom{w} & \phantom{w} & \phantom{w}\\\cline{1-2}%
\phantom{w} & \phantom{w} & \phantom{w}\\\hline
\end{tabular}
\ \ \ .
\]
There are several more; can you find a few?

We can now state our first counting problem:

\begin{statement}
\textbf{Domino tiling counting problem:} How many domino tilings does
$R_{n,m}$ have?
\end{statement}

For instance, the number of domino tilings of $R_{3,2}$ is $3$. Here are all
of them:%
\[%
\begin{tabular}
[c]{|l|l|l|}\hline
\phantom{w} & \phantom{w} & \phantom{w}\\\cline{4-4}%
\phantom{w} & \phantom{w} & \phantom{w}\\\hline
\end{tabular}
\ \ \ ,\qquad%
\begin{tabular}
[c]{|ll|l|}\hline
\phantom{w} & \phantom{w} & \phantom{w}\\\cline{1-2}%
\phantom{w} & \phantom{w} & \phantom{w}\\\hline
\end{tabular}
\ \ \ ,\qquad%
\begin{tabular}
[c]{|l|ll|}\hline
\phantom{w} & \phantom{w} & \phantom{w}\\\cline{2-3}%
\phantom{w} & \phantom{w} & \phantom{w}\\\hline
\end{tabular}
\ \ \ .
\]


How can we address larger cases (i.e., larger $n$ or $m$)?

First, we need to clarify our definition of \textquotedblleft domino
tiling\textquotedblright\ by explaining what \textquotedblleft a way to cover
the rectangle $R_{n,m}$ with non-overlapping dominos\textquotedblright\ means.
What does \textquotedblleft cover\textquotedblright\ mean, and what does
\textquotedblleft non-overlapping\textquotedblright\ mean? There are two ways
to define these notions:

\begin{itemize}
\item \textbf{The geometric way:} We really define $R_{n,m}$ as a rectangle of
width $n$ and height $m$ in the Euclidean plane\footnote{For instance, let's
say it's the rectangle with corners $\left(  0,0\right)  $, $\left(
n,0\right)  $, $\left(  0,m\right)  $ and $\left(  n,m\right)  $.}. We say
that a set of dominos \textbf{covers} $R_{n,m}$ if their union (as sets of
points) is $R_{n,m}$. It is trickier to define what it means for a set of
dominos to be \textbf{non-overlapping}. For instance, we can say that it means
that their pairwise intersections are $0$- or $1$-dimensional (or,
equivalently, they are just single points or line segments).

With these definitions, the problem becomes unambiguous and clear.
Unfortunately, it is still hard to reason about such tilings, since a lot of
visually obvious geometric facts are non-obvious to prove.

\item \textbf{The combinatorial way:} We redefine $R_{n,m}$ as the set
$\left[  n\right]  \times\left[  m\right]  $, where we set
\[
\left[  k\right]  :=\left\{  1,2,\ldots,k\right\}
\ \ \ \ \ \ \ \ \ \ \text{for each }k\in\mathbb{N}.
\]
Its elements are the pairs $\left(  i,j\right)  $ where $i\in\left[  n\right]
$ and $j\in\left[  m\right]  $. We refer to these pairs as \textbf{squares},
and we draw them as $1\times1$-squares in the plane (placing the center of
each square $\left(  i,j\right)  $ at the point with Cartesian coordinates
$\left(  i,j\right)  $).

For instance, here is how $R_{3,4}$ looks like with each square labeled:%
\[%
\begin{tabular}
[c]{|c|c|c|}\hline
$\left(  1,4\right)  \vphantom{\dfrac{1}{2f}}$ & $\left(  2,4\right)
\vphantom{\dfrac{1}{2f}}$ & $\left(  3,4\right)  \vphantom{\dfrac{1}{2f}}$%
\\\hline
$\left(  1,3\right)  \vphantom{\dfrac{1}{2f}}$ & $\left(  2,3\right)
\vphantom{\dfrac{1}{2f}}$ & $\left(  3,3\right)  \vphantom{\dfrac{1}{2f}}$%
\\\hline
$\left(  1,2\right)  \vphantom{\dfrac{1}{2f}}$ & $\left(  2,2\right)
\vphantom{\dfrac{1}{2f}}$ & $\left(  3,2\right)  \vphantom{\dfrac{1}{2f}}$%
\\\hline
$\left(  1,1\right)  \vphantom{\dfrac{1}{2f}}$ & $\left(  2,1\right)
\vphantom{\dfrac{1}{2f}}$ & $\left(  3,1\right)  \vphantom{\dfrac{1}{2f}}$%
\\\hline
\end{tabular}
\ \ \ \
\]


Thus, $R_{n,m}$ is a \textbf{finite} set of size $\left\vert R_{n,m}%
\right\vert =nm$. (The \textbf{size} of a finite set means the number of its
elements, i.e., its cardinality.)

A \textbf{vertical domino} means a set of the form%
\[
\left\{  \left(  i,j\right)  ,\ \left(  i,j+1\right)  \right\}
\ \ \ \ \ \ \ \ \ \ \text{for some }i,j\in\mathbb{Z}.
\]


A \textbf{horizontal domino} means a set of the form%
\[
\left\{  \left(  i,j\right)  ,\ \left(  i+1,j\right)  \right\}
\ \ \ \ \ \ \ \ \ \ \text{for some }i,j\in\mathbb{Z}.
\]


A \textbf{domino} means a vertical domino or a horizontal domino.

If $S$ is a set of squares (e.g., the rectangle $R_{n,m}$), then a
\textbf{domino tiling} of $S$ shall mean a set $\left\{  S_{1},S_{2}%
,\ldots,S_{k}\right\}  $ of \textbf{disjoint} dominos whose union is $S$ (that
is, $S_{1}\cup S_{2}\cup\cdots\cup S_{k}=S$).

Of course, we still \textbf{draw} our rectangles and dominos as geometric
rectangles on a grid, but we are now implementing them as finite sets of pairs
of numbers rather than as geometric shapes. For instance, the domino tiling%
\[%
\begin{tabular}
[c]{|ll|l|}\hline
\phantom{w} & \phantom{w} & \phantom{w}\\\cline{1-2}%
\phantom{w} & \phantom{w} & \phantom{w}\\\hline
\end{tabular}
\
\]
is now the set%
\[
\left\{  \left\{  \left(  1,1\right)  ,\ \left(  2,1\right)  \right\}
,\ \ \ \ \left\{  \left(  1,2\right)  ,\ \left(  2,2\right)  \right\}
,\ \ \ \ \ \left\{  \left(  3,1\right)  ,\ \left(  3,2\right)  \right\}
\right\}  .
\]


This kind of interpretation is known as a \textbf{discrete model} -- because
we're modeling our objects (domino tilings) as finite sets of integers. Note
that it is much simpler to reason about than the geometric model above: For
example, non-overlappingness of dominos means disjointness of sets in the
discrete model, whereas in the geometric model the dominos could meet along an edge.
\end{itemize}

From now on, we shall always be using the discrete model for our domino
tilings -- i.e., we define $R_{n,m}$ and domino tilings as in the
combinatorial way above.

Now, for any $n,m\in\mathbb{N}$, we define%
\[
d_{n,m}:=\left(  \text{\# of domino tilings of }R_{n,m}\right)  .
\]
Here and in the following, the symbol \textquotedblleft\#\textquotedblright%
\ means \textquotedblleft number\textquotedblright\ (or \textquotedblleft the
number\textquotedblright).

Our counting problem thus asks to compute $d_{n,m}$. For instance, we saw that
$d_{3,2}=3$.

In theory, each single $d_{n,m}$ can be computed by brute force: just check
all possible sets of dominos for being domino tilings of $R_{n,m}$. This is
slow and stupid, but shows that we are dealing with a \textbf{finite problem}.

Let us, however, see how to solve this problem more efficiently and (ideally)
in greater generality.
\end{document}