\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=Wednesday, November 23, 2022 20:32:37}
%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 9, version \today}
\ohead{page \thepage}
\cfoot{}
\begin{document}
\section*{Math 222 Fall 2022, Lecture 9: 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}}}

\section{Introduction (cont'd)}

\setcounter{subsection}{3}

\subsection{Counting subsets (cont'd)}

\setcounter{subsubsection}{1}

\subsubsection{Lacunar subsets (cont'd)}

Last time, we defined lacunar subsets. Recall their definition:

\setcounter{theo}{1}

\begin{definition}
A set $S$ of integers is said to be \textbf{lacunar} if it contains no two
consecutive integers (i.e., there is no integer $i$ such that both $i$ and
$i+1$ belong to $S$).
\end{definition}

We also answered part \textbf{(c)} of the following question:

\begin{question}
For given $n,k\in\mathbb{N}$:

\textbf{(a)} How many lacunar subsets does $\left[  n\right]  $ have?

\textbf{(b)} How many $k$-element lacunar subsets does $\left[  n\right]  $ have?

\textbf{(c)} What is the largest size of a lacunar subset of $\left[
n\right]  $ ?
\end{question}

We found (and proved) that the largest size of a lacunar subset of $\left[
n\right]  $ is $\left\lceil n/2\right\rceil $.

Let us now attack parts \textbf{(a)} and \textbf{(b)} of this question.

\setcounter{theo}{6}

\subsubsection{Intermezzo: SageMath}

[At this point, I made a little tech demo, showing the use of SageMath via the
SageMathCell server ( \url{https://sagecell.sagemath.org/} ). See \S 1.4.3 of
\href{https://www.cip.ifi.lmu.de/~grinberg/t/19fco/n/n.pdf}{the 2019 notes}
for the details.]

\subsubsection{Counting all lacunar subsets}

Some experimentation with SageMath suggests the following answer to question
\textbf{(a)}:\footnote{We extend the range of $n$ from $\mathbb{N}$ to the
slightly larger set $\left\{  -1,0,1,\ldots\right\}  $ in order to include a
border case that will later appear quite often in applications.}

\begin{proposition}
\label{prop.lacunar-count}Let $n\in\left\{  -1,0,1,\ldots\right\}  $. Then,%
\[
\left(  \text{\# of lacunar subsets of }\left[  n\right]  \right)  =f_{n+2}.
\]
Here, we agree that $\left[  -1\right]  :=\varnothing$. More generally, we
agree that $\left[  k\right]  :=\varnothing$ for any $k\leq0$.
\end{proposition}

\begin{proof}
Forget that we fixed $n$. For each $n\in\left\{  -1,0,1,\ldots\right\}  $, we
set%
\[
\ell_{n}:=\left(  \text{\# of lacunar subsets of }\left[  n\right]  \right)
.
\]
Our goal is thus to prove that $\ell_{n}=f_{n+2}$ for each $n\geq-1$.

We have $\ell_{0}=1$ and $\ell_{-1}=1$ (since the empty set has only one
lacunar subset). We shall now prove the following claaim:

\begin{statement}
\textit{Claim 1:} We have $\ell_{n}=\ell_{n-1}+\ell_{n-2}$ for each $n\geq1$.
\end{statement}

Once this claim is proved, a straightforward strong induction will yield our
goal (that $\ell_{n}=f_{n+2}$ for all $n\geq-1$). So we focus on proving Claim
1. \medskip

\textit{Proof of Claim 1:} Let $n\geq1$ be an integer. We shall call a subset
of $\left[  n\right]  $

\begin{itemize}
\item \textbf{red} if it contains $n$, and

\item \textbf{green} if it does not contain $n$.
\end{itemize}

Thus, each subset of $\left[  n\right]  $ is either red or green (but not
both). Hence, by the sum rule,%
\begin{align*}
&  \left(  \text{\# of lacunar subsets of }\left[  n\right]  \right) \\
&  =\left(  \text{\# of red lacunar subsets of }\left[  n\right]  \right)
+\left(  \text{\# of green lacunar subsets of }\left[  n\right]  \right)  .
\end{align*}
How can we compute the right hand side?

Start with the green lacunar subsets of $\left[  n\right]  $. They are just
the lacunar subsets of $\left[  n-1\right]  $. So their number is $\ell_{n-1}%
$. In other words,%
\[
\left(  \text{\# of green lacunar subsets of }\left[  n\right]  \right)
=\ell_{n-1}.
\]


Now to the red lacunar subsets of $\left[  n\right]  $. Inspired by what we
did previously, we could try to set up a bijection between $\left\{  \text{red
lacunar subsets of }\left[  n\right]  \right\}  $ and $\left\{  \text{lacunar
subsets of }\left[  n-1\right]  \right\}  $, by removing $n$ from the set (or
inserting $n$ into the set). But this does not work, since inserting $n$ into
a lacunar subset of $\left[  n-1\right]  $ will not always yield a lacunar set.

However, we can fix this. If we remove $n$ from a red lacunar subset of
$\left[  n\right]  $, then the result is not just a lacunar subset of $\left[
n-1\right]  $, but actually a lacunar subset of $\left[  n-2\right]  $ (since
the presence of $n$ in the red subset rules out the presence of $n-1$ by
lacunarity). Conversely, inserting $n$ into a lacunar subset of $\left[
n-2\right]  $ always results in a red lacunar subset of $\left[  n\right]  $
(since the subset does not contain $n-1$, and thus the insertion of $n$ will
not break its lacunarity). Thus, we obtain a bijection%
\begin{align*}
\left\{  \text{red lacunar subsets of }\left[  n\right]  \right\}   &
\rightarrow\left\{  \text{lacunar subsets of }\left[  n-2\right]  \right\}
,\\
S &  \mapsto S\setminus\left\{  n\right\}
\end{align*}
with inverse map%
\begin{align*}
\left\{  \text{lacunar subsets of }\left[  n-2\right]  \right\}   &
\rightarrow\left\{  \text{red lacunar subsets of }\left[  n\right]  \right\}
,\\
S &  \mapsto S\cup\left\{  n\right\}  .
\end{align*}
The bijection principle therefore yields%
\[
\left(  \text{\# of red lacunar subsets of }\left[  n\right]  \right)
=\left(  \text{\# of lacunar subsets of }\left[  n-2\right]  \right)
=\ell_{n-2}.
\]


Altogether,%
\begin{align*}
\ell_{n} &  =\left(  \text{\# of lacunar subsets of }\left[  n\right]
\right)  \\
&  =\underbrace{\left(  \text{\# of red lacunar subsets of }\left[  n\right]
\right)  }_{=\ell_{n-2}}+\underbrace{\left(  \text{\# of green lacunar subsets
of }\left[  n\right]  \right)  }_{=\ell_{n-1}}\\
&  =\ell_{n-2}+\ell_{n-1}=\ell_{n-1}+\ell_{n-2}.
\end{align*}
This proves Claim 1. \medskip

As explained above, Proposition \ref{prop.lacunar-count} now follows by strong induction.
\end{proof}

There is also a second proof of Proposition \ref{prop.lacunar-count}, which
avoids induction but instead sets up a bijection between the lacunar subsets
of $\left[  n\right]  $ and the domino tilings of $R_{n+1,2}$. Thus, by the
bijection principle, the \# of the lacunar subsets equals the \# of domino
tilings, which we have already computed (it is $f_{n+2}$). Details of this
argument are found in the 2019 notes (Proposition 1.4.9, second proof).

Either way, part \textbf{(a)} of the question is answered.

\subsubsection{Counting $k$-element lacunar subsets}

Now to part \textbf{(b)}:

\begin{proposition}
\label{prop.lacunar-k}Let $n\in\mathbb{Z}$ and $k\in\mathbb{N}$ be such that
$k\leq n+1$. Then,%
\[
\left(  \text{\# of }k\text{-element lacunar subsets of }\left[  n\right]
\right)  =\dbinom{n+1-k}{k}.
\]

\end{proposition}

One way to prove this proposition is by imitating the above inductive proof of
Proposition \ref{prop.lacunar-count} (or the similar inductive proof of the
fact that the \# of $k$-element subsets of $\left[  n\right]  $ is $\dbinom
{n}{k}$): Again, a subset of $\left[  n\right]  $ is called red or green if it
contains or doesn't contain $n$. Having already done such arguments twice, we
won't delve into the details here. Pascal's recurrence saves the day.

However, it is also nice to have a more \textquotedblleft
inspired\textquotedblright\ proof. After all, the binomial coefficient
$\dbinom{n+1-k}{k}$ shouldn't come out for no reason! It counts the
$k$-element subsets of $\left[  n+1-k\right]  $. So it would be reasonable to
expect a bijection%
\begin{align*}
&  \text{from }\left\{  k\text{-element lacunar subsets of }\left[  n\right]
\right\}  \\
&  \text{to }\left\{  k\text{-element subsets of }\left[  n+1-k\right]
\right\}  .
\end{align*}
Such a bijection can indeed be found. Its construction requires a basic fact
that I will not prove:

\begin{proposition}
\label{prop.unique-inclist-m}Let $m\in\mathbb{N}$. Let $S$ be an $m$-element
set of integers. Then, there exists a unique $m$-tuple $\left(  s_{1}%
,s_{2},\ldots,s_{m}\right)  $ of integers satisfying $\left\{  s_{1}%
,s_{2},\ldots,s_{m}\right\}  =S$ and $s_{1}<s_{2}<\cdots<s_{m}$.
\end{proposition}

This is just saying that if you have an $m$-element set of integers, then
there is a unique way to list the elements of this set in (strictly)
increasing order. Formally speaking, this needs proof, but this is so basic I
will not prove it here (a reference can be found in \S 1.4.5 of the 2019 notes).

As a consequence of Proposition \ref{prop.unique-inclist-m}, any $m$-element
set of integers can be uniquely written in the form $\left\{  s_{1}%
<s_{2}<\cdots<s_{m}\right\}  $, where the $<$-signs mean that the elements are
listed in strictly increasing order (for example, the set $\left\{
2,4,5\right\}  $ can be written as $\left\{  2<4<5\right\}  $, not as
$\left\{  4<2<5\right\}  $).

\begin{proof}
[Proof of Proposition \ref{prop.lacunar-k}.]If $\left\{  s_{1}<s_{2}%
<s_{3}<\cdots<s_{k}\right\}  $ is a $k$-element lacunar subset of $\left[
n\right]  $, then we can move its elements closer to each other (letting
$s_{1}$ stay put, while $s_{2}$ moves one step left, while $s_{3}$ moves two
steps left, and so on), and the resulting $k$ numbers $s_{1},\ \ s_{2}%
-1,\ \ s_{3}-2,\ \ \ldots,\ \ s_{k}-\left(  k-1\right)  $ will still be
distinct and listed in increasing order (because the lacunarity of $\left\{
s_{1}<s_{2}<s_{3}<\cdots<s_{k}\right\}  $ ensures that any two of the numbers
$s_{1},s_{2},\ldots,s_{k}$ have a distance of at least $2$ between them).
Thus, if $\left\{  s_{1}<s_{2}<s_{3}<\cdots<s_{k}\right\}  $ is a $k$-element
lacunar subset of $\left[  n\right]  $, then $\left\{  s_{1}<s_{2}%
-1<s_{3}-2<\cdots<s_{k}-\left(  k-1\right)  \right\}  $ is a well-defined
$k$-element set, and in fact a subset of $\left[  n+1-k\right]  $ (since
$s_{k}\leq n$ entails $s_{k}-\left(  k-1\right)  \leq n-\left(  k-1\right)
=n+1-k$).

Hence, we can define a map%
\begin{align*}
\left\{  k\text{-element lacunar subsets of }\left[  n\right]  \right\}   &
\rightarrow\left\{  k\text{-element subsets of }\left[  n+1-k\right]
\right\}  ,\\
\left\{  s_{1}<s_{2}<s_{3}<\cdots<s_{k}\right\}   &  \mapsto\left\{
s_{1}<s_{2}-1<s_{3}-2<\cdots<s_{k}-\left(  k-1\right)  \right\}  .
\end{align*}
Conversely, we define a map%
\begin{align*}
\left\{  k\text{-element subsets of }\left[  n+1-k\right]  \right\}   &
\rightarrow\left\{  k\text{-element lacunar subsets of }\left[  n\right]
\right\}  ,\\
\left\{  s_{1}<s_{2}<s_{3}<\cdots<s_{k}\right\}   &  \mapsto\left\{
s_{1}<s_{2}+1<s_{3}+2<\cdots<s_{k}+\left(  k-1\right)  \right\}
\end{align*}
(this produces a lacunar subset, since we added buffer space between every two
consecutive elements, and furthermore it will be a subset of $\left[
n\right]  $ because $s_{k}\leq n+1-k$ entails $s_{k}+\left(  k-1\right)
\leq\left(  n+1-k\right)  +\left(  k-1\right)  =n$). These two maps are
mutually inverse, and thus are bijections. Hence, by the bijection principle,
we have%
\begin{align*}
&  \left(  \text{\# of }k\text{-element lacunar subsets of }\left[  n\right]
\right)  \\
&  =\left(  \text{\# of }k\text{-element subsets of }\left[  n+1-k\right]
\right)  =\dbinom{n+1-k}{k}%
\end{align*}
(by the combinatorial interpretation of BCs, since $n+1-k\geq0$). Proposition
\ref{prop.lacunar-k} is proved.
\end{proof}

Keep the above bijection in mind -- it is useful in many other places!

\bigskip

Now we have solved all three parts of our counting question. As a consequence,
we can easily prove a binomial identity we left unproved in Lecture 7:

\begin{proposition}
\label{prop.fibonacci.as-sum-of-BCs}Let $n\in\mathbb{N}$. Then, the Fibonacci
number $f_{n+1}$ is%
\[
f_{n+1}=\sum\limits_{k=0}^{n}\dbinom{n-k}{k}=\dbinom{n-0}{0}+\dbinom{n-1}%
{1}+\dbinom{n-2}{2}+\cdots+\dbinom{n-n}{n}.
\]

\end{proposition}

\begin{proof}
Let $m:=n-1\in\left\{  -1,0,1,\ldots\right\}  $. Then,%
\begin{align*}
\left(  \text{\# of lacunar subsets of }\left[  m\right]  \right)   &
=f_{m+2}\ \ \ \ \ \ \ \ \ \ \left(  \text{by Proposition
\ref{prop.lacunar-count}}\right) \\
&  =f_{n+1}\ \ \ \ \ \ \ \ \ \ \left(  \text{since }m=n-1\text{ entails
}m+2=n+1\right)  .
\end{align*}
Thus,%
\begin{align*}
f_{n+1}  &  =\left(  \text{\# of lacunar subsets of }\left[  m\right]  \right)
\\
&  =\sum_{k=0}^{n}\underbrace{\left(  \text{\# of }k\text{-element lacunar
subsets of }\left[  m\right]  \right)  }_{\substack{=\dbinom{m+1-k}%
{k}\\\text{(by Proposition \ref{prop.lacunar-k})}}}\\
&  \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \left(
\begin{array}
[c]{c}%
\text{by the sum rule, since it is easy to see}\\
\text{that each lacunar subset of }\left[  m\right]  \text{ has size}\\
\text{between }0\text{ and }n\text{ (actually between }0\text{ and }%
m\text{,}\\
\text{but it is convenient for us to extend this}\\
\text{summation to }m+1=n\text{)}%
\end{array}
\right) \\
&  =\sum_{k=0}^{n}\dbinom{m+1-k}{k}=\sum_{k=0}^{n}\dbinom{n-k}{k}%
\ \ \ \ \ \ \ \ \ \ \left(  \text{since }m+1=n\right) \\
&  =\dbinom{n-0}{0}+\dbinom{n-1}{1}+\dbinom{n-2}{2}+\cdots+\dbinom{n-n}{n}.
\end{align*}
So Proposition \ref{prop.fibonacci.as-sum-of-BCs} is proved.
\end{proof}

\subsubsection{Counting subsets with $a$ odd and $b$ even elements}

Here is another instance of counting subsets with a given property:

\begin{proposition}
Let $n\in\mathbb{N}$ be even. Let $a,b\in\mathbb{N}$. Then,%
\begin{align*}
&  \left(  \text{\# of subsets of }\left[  n\right]  \text{ that contain
}a\text{ even elements and }b\text{ odd elements}\right) \\
&  =\dbinom{n/2}{a}\dbinom{n/2}{b}.
\end{align*}
(Here, \textquotedblleft$a$ even elements\textquotedblright\ means
\textquotedblleft exactly $a$ even elements\textquotedblright, and
\textquotedblleft$b$ odd elements\textquotedblright\ means \textquotedblleft
exactly $b$ odd elements\textquotedblright.)
\end{proposition}

Next time, we'll prove this. Meanwhile, think about why this is true!


\end{document}