\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=Saturday, December 24, 2022 20:49:18}
%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 28, version \today}
\ohead{page \thepage}
\cfoot{}
\begin{document}
\section*{Math 222 Fall 2022, Lecture 28: Permutations}

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

\section{\label{chap.perm}Permutations}

\setcounter{subsection}{2}

\subsection{The cycle decomposition of a permutation (cont'd)}

\setcounter{subsubsection}{4}

\setcounter{theo}{22}

\subsubsection{Cycles and transpositions}

Recall that if $\alpha$ and $\beta$ are two permutations of a finite set $X$,
then we denote their composition $\alpha\circ\beta$ by $\alpha\beta$. More
generally, the \textbf{product} of any number of permutations $\alpha
_{1},\alpha_{2},\ldots,\alpha_{k}$ is defined to be their composition
$\alpha_{1}\circ\alpha_{2}\circ\cdots\circ\alpha_{k}$, and will be denoted by
$\alpha_{1}\alpha_{2}\cdots\alpha_{k}$. When $k=0$, this composition is a
composition of $0$ maps, and this composition is defined to be the identity
map $\operatorname*{id}\nolimits_{X}$. (A composition of $0$ maps is always
defined to be the identity map.)

Recall that a transposition of a set $X$ means a permutation of the form
$t_{i,j}$, where $i$ and $j$ are two distinct elements of $X$. This
permutation $t_{i,j}$ swaps $i$ with $j$ and leaves all remaining elements of
$X$ unchanged.

It turns out that every permutation of a finite set can be written as a
product of transpositions (and this is a useful fact, since transpositions are
easier to understand than permutations in general). We can even be more specific:

\begin{theorem}
\label{thm.perm.transp-orbits}Let $n\in\mathbb{N}$. Let $X$ be an $n$-element
set. Then:

\textbf{(a)} Every permutation $\sigma\in S_{X}$ can be written as a product
of at most $n-1$ transpositions (if $n>0$).

\textbf{(b)} Let $\sigma\in S_{X}$ be any permutation. Let%
\[
k=n-\left(  \text{\# of orbits of }\sigma\right)  .
\]
Then, $\sigma$ can be written as a product of $k$ transpositions, but not of
fewer than $k$ transpositions. In other words, $k$ is the smallest
$p\in\mathbb{N}$ such that $\sigma$ can be written as a product of $p$ transpositions.
\end{theorem}

\begin{example}
\label{exa.perm.transp-orbits.1}Let $\sigma$ be the permutation of $\left[
10\right]  $ whose OLN is%
\[
5\ 4\ 3\ 2\ 6\ \left(  10\right)  \ 1\ 9\ 8\ 7.
\]
(This is the permutation from Example 4.1.5 in Lecture 26.) As we know,
$\sigma$ has $4$ orbits. Thus, Theorem \ref{thm.perm.transp-orbits}
\textbf{(b)} (applied to $n=10$ and $X=\left[  10\right]  $ and $k=n-4=10-4=6$%
) shows that $\sigma$ can be written as a product of $6$ transpositions, but
not of fewer than $6$ transpositions. And indeed, we can easily verify that
$\sigma$ can be written as a product of $6$ transpositions:%
\[
\sigma=t_{1,5}\circ t_{5,6}\circ t_{6,10}\circ t_{7,10}\circ t_{8,9}\circ
t_{2,4}.
\]
(There are also several other ways to write $\sigma$ in this form.)
\end{example}

\begin{fineprint}
To prove Theorem \ref{thm.perm.transp-orbits}, we need a little lemma, which
is an easy consequence of Lemma 4.3.13 in Lecture 27:

\begin{lemma}
\label{lem.perm.transp-orbits.l1}Let $X$ be a finite set. Let $i$ and $j$ be
two distinct elements of $X$. Let $\sigma\in S_{X}$ be a permutation, and let
$\tau=t_{i,j}\circ\sigma$. Then:

\textbf{(a)} If $i\overset{\sigma}{\sim}j$, then $\left(  \text{\# of orbits
of }\tau\right)  =\left(  \text{\# of orbits of }\sigma\right)  +1$.

\textbf{(b)} If we don't have $i\overset{\sigma}{\sim}j$, then $\left(
\text{\# of orbits of }\tau\right)  =\left(  \text{\# of orbits of }%
\sigma\right)  -1$.

\textbf{(c)} In either case, we have $\left(  \text{\# of orbits of }%
\tau\right)  \geq\left(  \text{\# of orbits of }\sigma\right)  -1$.
\end{lemma}

\begin{proof}
[Proof of Lemma \ref{lem.perm.transp-orbits.l1} (sketched).]\textbf{(a)} This
is precisely Lemma 4.3.13 \textbf{(a)} in Lecture 27.

\textbf{(b)} This is precisely Lemma 4.3.13 \textbf{(c)} in Lecture 27.

\textbf{(c)} We either have $i\overset{\sigma}{\sim}j$, or we don't have
$i\overset{\sigma}{\sim}j$. In the former case, Lemma
\ref{lem.perm.transp-orbits.l1} \textbf{(a)} yields $\left(  \text{\# of
orbits of }\tau\right)  =\left(  \text{\# of orbits of }\sigma\right)
+1\geq\left(  \text{\# of orbits of }\sigma\right)  -1$. In the latter case,
Lemma \ref{lem.perm.transp-orbits.l1} \textbf{(b)} yields $\left(  \text{\# of
orbits of }\tau\right)  =\left(  \text{\# of orbits of }\sigma\right)  -1$. In
either case, the claim of Lemma \ref{lem.perm.transp-orbits.l1} \textbf{(c)} follows.
\end{proof}

\begin{proof}
[Proof of Theorem \ref{thm.perm.transp-orbits} (sketched).]\textbf{(b)} We
first observe that $k\geq0$ (since the \# orbits of $\sigma$ cannot be larger
than $n$), so that $k\in\mathbb{N}$. Thus, we can induct on $k$:

\textit{Base case:} The case $k=0$ can happen only if $\sigma
=\operatorname*{id}\nolimits_{X}$ (because $k=0$ means that $\sigma$ has $n$
orbits, whence every orbit is a $1$-element set, so that each $x\in X$ is a
fixed point of $\sigma$, and therefore $\sigma=\operatorname*{id}%
\nolimits_{X}$). In this case, however, $\sigma$ can be written as a product
of $0$ transpositions (since a product of $0$ transpositions is
$\operatorname*{id}\nolimits_{X}$ by definition), but not of fewer than $0$
transpositions (since a product cannot have fewer than $0$ factors). Thus,
Theorem \ref{thm.perm.transp-orbits} \textbf{(b)} is proved in the case $k=0$.

\textit{Induction step:} Let $h\in\mathbb{N}$. Assume (as the induction
hypothesis) that Theorem \ref{thm.perm.transp-orbits} \textbf{(b)} is proved
in the case when $k=h$. We must prove that Theorem
\ref{thm.perm.transp-orbits} \textbf{(b)} holds in the case when $k=h+1$.

So let $\sigma$ be any permutation with
\begin{equation}
n-\left(  \text{\# of orbits of }\sigma\right)  =h+1.
\label{pf.thm.perm.transp-orbits.b.1}%
\end{equation}
We must show that $\sigma$ can be written as a product of $h+1$
transpositions, but not of fewer than $h+1$ transpositions.

From (\ref{pf.thm.perm.transp-orbits.b.1}), we obtain $\left(  \text{\# of
orbits of }\sigma\right)  =n-\underbrace{\left(  h+1\right)  }_{>0}<n$, and
therefore there are two elements $i$ and $j$ of $X$ that belong to the same
orbit of $\sigma$ (why?). Consider such $i$ and $j$. Thus, $i\overset{\sigma
}{\sim}j$. Let $\tau$ be the permutation $t_{i,j}\circ\sigma$. Then,%
\[
n-\underbrace{\left(  \text{\# of orbits of }\tau\right)  }%
_{\substack{=\left(  \text{\# of orbits of }\sigma\right)  +1\\\text{(by Lemma
\ref{lem.perm.transp-orbits.l1} \textbf{(a)})}}}=n-\left(  \left(  \text{\# of
orbits of }\sigma\right)  +1\right)  =\underbrace{n-\left(  \text{\# of orbits
of }\sigma\right)  }_{=h+1}-1=h.
\]
Hence, by the induction hypothesis, the permutation $\tau$ can be written as a
product of $h$ transpositions, but not of fewer than $h$ transpositions. In
particular, $\tau$ can be written as a product of $h$ transpositions. In other
words, $\tau$ can be written as
\[
\tau=t_{i_{1},j_{1}}\circ t_{i_{2},j_{2}}\circ\cdots\circ t_{i_{h},j_{h}}%
\]
for some $i_{1},j_{1},i_{2},j_{2},\ldots,i_{h},j_{h}\in X$. Consider these
$i_{1},j_{1},i_{2},j_{2},\ldots,i_{h},j_{h}$.

Recall that $t_{i,j}\circ t_{i,j}=\operatorname*{id}\nolimits_{X}$. Now,
$t_{i,j}\circ\underbrace{\tau}_{=t_{i,j}\circ\sigma}=\underbrace{t_{i,j}\circ
t_{i,j}}_{=\operatorname*{id}\nolimits_{X}}\circ\sigma=\operatorname*{id}%
\nolimits_{X}\circ\sigma=\sigma$. Hence,%
\[
\sigma=t_{i,j}\circ\underbrace{\tau}_{=t_{i_{1},j_{1}}\circ t_{i_{2},j_{2}%
}\circ\cdots\circ t_{i_{h},j_{h}}}=t_{i,j}\circ t_{i_{1},j_{1}}\circ
t_{i_{2},j_{2}}\circ\cdots\circ t_{i_{h},j_{h}}.
\]
This shows that $\sigma$ can be written as a product of $h+1$ transpositions.
It remains to prove that $\sigma$ cannot be written as a product of fewer than
$h+1$ transpositions.

To prove this, we assume the contrary. Thus, $\sigma$ can be written as
\[
\sigma=t_{u_{1},v_{1}}\circ t_{u_{2},v_{2}}\circ\cdots\circ t_{u_{p},v_{p}}%
\]
for some nonnegative integer $p<h+1$ and some elements $u_{1},v_{1}%
,u_{2},v_{2},\ldots,u_{p},v_{p}\in X$. Consider this $p$ and these
$u_{1},v_{1},u_{2},v_{2},\ldots,u_{p},v_{p}$. For each $i\in\left[
p+1\right]  $, we set%
\[
\sigma_{i}:=t_{u_{i},v_{i}}\circ t_{u_{i+1},v_{i+1}}\circ\cdots\circ
t_{u_{p},v_{p}}.
\]
Then, $\sigma_{1}=t_{u_{1},v_{1}}\circ t_{u_{2},v_{2}}\circ\cdots\circ
t_{u_{p},v_{p}}=\sigma$, whereas $\sigma_{p+1}=\operatorname*{id}%
\nolimits_{X}$ (since $\sigma_{p+1}=t_{u_{p+1},v_{p+1}}\circ t_{u_{p+2}%
,v_{p+2}}\circ\cdots\circ t_{u_{p},v_{p}}$ is a composition of $0$
permutations and therefore equals $\operatorname*{id}\nolimits_{X}$ by
definition). For each $i\in\left[  p\right]  $, we have $\sigma_{i}%
=t_{u_{i},v_{i}}\circ\sigma_{i+1}$ (to see why, compare the definitions of
$\sigma_{i}$ and $\sigma_{i+1}$) and therefore
\begin{equation}
\left(  \text{\# of orbits of }\sigma_{i}\right)  \geq\left(  \text{\# of
orbits of }\sigma_{i+1}\right)  -1 \label{pf.thm.perm.transp-orbits.b.8}%
\end{equation}
(by Lemma \ref{lem.perm.transp-orbits.l1} \textbf{(c)}, applied to
$\sigma_{i+1}$, $u_{i}$, $v_{i}$ and $\sigma_{i}$ instead of $\sigma$, $i$,
$j$ and $\tau$). Hence,%
\begin{align*}
\left(  \text{\# of orbits of }\sigma\right)   &  =\left(  \text{\# of orbits
of }\sigma_{1}\right)  \ \ \ \ \ \ \ \ \ \ \left(  \text{since }\sigma
=\sigma_{1}\right) \\
&  \geq\underbrace{\left(  \text{\# of orbits of }\sigma_{2}\right)
}_{\substack{\geq\left(  \text{\# of orbits of }\sigma_{3}\right)
-1\\\text{(by (\ref{pf.thm.perm.transp-orbits.b.8}))}}%
}-1\ \ \ \ \ \ \ \ \ \ \left(  \text{by (\ref{pf.thm.perm.transp-orbits.b.8}%
)}\right) \\
&  \geq\underbrace{\left(  \text{\# of orbits of }\sigma_{3}\right)
}_{\substack{\geq\left(  \text{\# of orbits of }\sigma_{4}\right)
-1\\\text{(by (\ref{pf.thm.perm.transp-orbits.b.8}))}}}-2\\
&  \geq\underbrace{\left(  \text{\# of orbits of }\sigma_{4}\right)
}_{\substack{\geq\left(  \text{\# of orbits of }\sigma_{5}\right)
-1\\\text{(by (\ref{pf.thm.perm.transp-orbits.b.8}))}}}-3\\
&  \geq\cdots\\
&  \geq\underbrace{\left(  \text{\# of orbits of }\sigma_{p+1}\right)
}_{\substack{=n\\\text{(since }\sigma_{p+1}=\operatorname*{id}\nolimits_{X}%
\text{ has }n\text{ orbits)}}}-p=n-p.
\end{align*}
However, (\ref{pf.thm.perm.transp-orbits.b.1}) yields%
\[
h+1=n-\underbrace{\left(  \text{\# of orbits of }\sigma\right)  }_{\geq
n-p}\leq n-\left(  n-p\right)  =p.
\]
This contradicts $p<h+1$. This contradiction shows that our assumption was
false. Hence, we have proved that $\sigma$ cannot be written as a product of
fewer than $h+1$ transpositions. This completes the induction step, and thus
Theorem \ref{thm.perm.transp-orbits} \textbf{(b)} is proved. \medskip

\textbf{(a)} Assume that $n>0$. Then, $\sigma$ has at least $1$ orbit (why?).
In other words, $\left(  \text{\# of orbits of }\sigma\right)  \geq1$.

Let $k=n-\left(  \text{\# of orbits of }\sigma\right)  $. Then,
$k=n-\underbrace{\left(  \text{\# of orbits of }\sigma\right)  }_{\geq1}\leq
n-1$. However, Theorem \ref{thm.perm.transp-orbits} \textbf{(b)} yields that
$\sigma$ can be written as a product of $k$ transpositions. Hence, $\sigma$
can be written as a product of at most $n-1$ transpositions (since $k\leq
n-1$). This proves Theorem \ref{thm.perm.transp-orbits} \textbf{(a)}.
\end{proof}
\end{fineprint}

\begin{fineprint}
We can replace \textquotedblleft transpositions\textquotedblright\ by
\textquotedblleft distinct transpositions\textquotedblright\ in Theorem
\ref{thm.perm.transp-orbits} (but we cannot force the transpositions to
commute with each other; thus, the order of factors in the product matters).

For $X=\left[  n\right]  $, we can state something stronger:

\begin{theorem}
\label{thm.perm.transp-orbits.n}Let $n\in\mathbb{N}$ and $\sigma\in S_{n}$.
Let $\operatorname*{Nonfix}\sigma$ denote the set of all $x\in\left[
n\right]  $ that satisfy $\sigma\left(  x\right)  \neq x$ (that is, the set of
all elements of $\left[  n\right]  $ that are not fixed points of $\sigma$).
Then, we can write $\sigma$ as a product of $k$ transpositions%
\begin{align}
\sigma &  =t_{i_{1},j_{1}}\circ t_{i_{2},j_{2}}\circ\cdots\circ t_{i_{k}%
,j_{k}}\ \ \ \ \ \ \ \ \ \ \text{with}\nonumber\\
\operatorname*{Nonfix}\sigma &  =\left\{  i_{1},j_{1},i_{2},j_{2},\ldots
,i_{k},j_{k}\right\}  ,\label{eq.thm.perm.transp-orbits.n.eq2}\\
k  &  =n-\left(  \text{\# of orbits of }\sigma\right)  ,\nonumber\\
i_{1}  &  <i_{2}<\cdots<i_{k}\ \ \ \ \ \ \ \ \ \ \text{and}\nonumber\\
i_{p}  &  <j_{p}\text{ for each }p\in\left[  k\right]  .\nonumber
\end{align}
(The equality (\ref{eq.thm.perm.transp-orbits.n.eq2}) does not imply that the
$2k$ elements $i_{1},j_{1},i_{2},j_{2},\ldots,i_{k},j_{k}$ are all distinct;
any element of $\operatorname*{Nonfix}\sigma$ can appear multiple times in
this list.)
\end{theorem}

\begin{proof}
[Proof idea.]Perform the same induction as in the above proof of Theorem
\ref{thm.perm.transp-orbits} \textbf{(b)} (with $X=\left[  n\right]  $), but
make sure to choose $i$ and $j$ strategically in the induction step: Namely,
let $i$ be the smallest element of $\operatorname*{Nonfix}\sigma$, and let
$j=\sigma\left(  i\right)  $. Then, $\tau=t_{i,j}\circ\sigma$ has $1$ more
orbit than $\sigma$ and satisfies $\tau\left(  i\right)  =i$ and
$\operatorname*{Nonfix}\sigma=\left\{  i,j\right\}  \cup\operatorname*{Nonfix}%
\tau$ and $\operatorname*{Nonfix}\tau\subseteq\left\{  i+1,i+2,\ldots
,n\right\}  $. This allows the induction hypothesis to be used. Details are
left to the reader.
\end{proof}
\end{fineprint}

\subsubsection{Permutations and partitions}

Permutations are connected with set partitions and also with integer
partitions. To see how, fix a finite set $X$. Then, for every permutation
$\sigma\in S_{X}$, the orbits of $\sigma$ form a set partition of $X$ (since
each element of $X$ belongs to exactly one orbit of $\sigma$). Thus, we obtain
a map%
\begin{align*}
S_{X}=\left\{  \text{permutations of }X\right\}   &  \rightarrow\left\{
\text{set partitions of }X\right\}  ,\\
\sigma &  \mapsto\left\{  \text{orbits of }\sigma\right\}  .
\end{align*}
For example, this map sends the permutation $\sigma$ from Example
\ref{exa.perm.transp-orbits.1} to the set partition $\left\{  \left\{
1,5,6,10,7\right\}  ,\ \left\{  8,9\right\}  ,\ \left\{  3\right\}
,\ \left\{  2,4\right\}  \right\}  $.

Furthermore, each set partition $\mathcal{F}$ of $X$ yields an integer
partition of $\left\vert X\right\vert $; the entries of the latter partition
are just the sizes of all parts of $\mathcal{F}$ (listed in decreasing order).
Thus, we obtain a map%
\begin{align*}
\left\{  \text{set partitions of }X\right\}   &  \rightarrow\left\{
\text{integer partitions of }\left\vert X\right\vert \right\}  ,\\
\left\{  \underbrace{X_{1},X_{2},\ldots,X_{k}}_{\text{distinct}}\right\}   &
\mapsto\left(  \left\vert X_{1}\right\vert ,\left\vert X_{2}\right\vert
,\ldots,\left\vert X_{k}\right\vert \right)  \text{ sorted in decreasing
order.}%
\end{align*}
For example, this map sends the set partition $\left\{  \left\{
1,5,6,10,7\right\}  ,\ \left\{  8,9\right\}  ,\ \left\{  3\right\}
,\ \left\{  2,4\right\}  \right\}  $ of $\left[  10\right]  $ to the partition
$\left(  5,2,2,1\right)  $.

Composing these two maps, we obtain a map%
\begin{align*}
S_{X}  &  \rightarrow\left\{  \text{integer partitions of }\left\vert
X\right\vert \right\}  ,\\
\sigma &  \mapsto\left(  \text{list of sizes of all orbits of }\sigma\text{,
in decreasing order}\right)  .
\end{align*}
This latter list is called the \textbf{cycle type} of $\sigma$. In other words:

\begin{definition}
Let $X$ be a finite set. Let $\sigma\in S_{X}$ be a permutation of $X$. Then,
the \textbf{cycle type} of $\sigma$ is defined to be the partition whose parts
are the sizes of the orbits of $\sigma$ (written in decreasing order). This is
a partition of $\left\vert X\right\vert $.
\end{definition}

\begin{example}
\begin{itemize}
\item A transposition $t_{i,j}\in S_{X}$ always has cycle type $\left(
2,1,1,\ldots,1\right)  $ (with $\left\vert X\right\vert -2$ many $1$'s).

\item The identity map $\operatorname*{id}\nolimits_{X}$ has cycle type
$\left(  1,1,\ldots,1\right)  $ (with $\left\vert X\right\vert $ many $1$'s).

\item More generally, a $k$-cycle in $S_{X}$ always has cycle type $\left(
k,1,1,\ldots,1\right)  $ (with $\left\vert X\right\vert -k$ many $1$'s after
the $k$).

\item The permutation $\sigma$ from Example \ref{exa.perm.transp-orbits.1} has
cycle type $\left(  5,2,2,1\right)  $.
\end{itemize}
\end{example}

The cycle type of a permutation $\sigma$ determines the lengths of the cycles
on the cycle digraph of $\sigma$. Thus, if you know the cycle type of a
permutation $\sigma\in S_{X}$, then you can draw the cycle digraph of $\sigma$
except for the labels of the nodes (i.e., you don't know which node
corresponds to which element of $X$). Hence, the cycle type of a permutation
determines this permutation up to \textquotedblleft relabelling its
elements\textquotedblright. So we can view integer partitions as
\textquotedblleft unlabelled permutations\textquotedblright.

To formalize this idea, we define the notion of \textbf{isomorphism of
permutations}:

\begin{definition}
Let $X$ and $Y$ be two finite sets.

Let $\sigma\in S_{X}$ and $\tau\in S_{Y}$ be two permutations.

We say that these two permutations $\sigma$ and $\tau$ are \textbf{isomorphic}
(as permutations) if there exists a bijection $\phi:X\rightarrow Y$ such that
$\tau=\phi\circ\sigma\circ\phi^{-1}$. (Recall that $\phi\circ\sigma\circ
\phi^{-1}$ is the result of \textquotedblleft relabelling\textquotedblright%
\ the elements of $X$ using $\phi$ in the permutation $\sigma$; we have
already used this construction in the proof of Lemma 1.7.6 in Lecture 12.
Thus, the equality $\tau=\phi\circ\sigma\circ\phi^{-1}$ means that if we
relabel each node $x$ in the cycle digraph of $\sigma$ as $\phi\left(
x\right)  $, then we obtain the cycle digraph of $\tau$.)
\end{definition}

\begin{example}
Let $X$ be the $6$-element set $\left[  6\right]  $, and let $\sigma\in S_{X}$
be the permutation with cycle digraph%
\[%
%TCIMACRO{\TeXButton{tikz sigma}{\begin{tikzpicture}%
%[->,shorten >=1pt,auto,node distance=3cm, thick,
%main node/.style={circle, fill=blue!20,draw}]
%\node[main node] (1) at (0:2) {$1$};
%\node[main node] (3) at (360/3:2) {$3$};
%\node[main node] (6) at (2*360/3:2) {$6$};
%\node[main node] (2) at (4,1) {$2$};
%\node[main node] (4) at (6,1) {$4$};
%\node[main node] (5) at (4,-1) {$5$};
%\path[-{Stealth[length=4mm]}]
%(1) edge [bend right] (3)
%(3) edge [bend right] (6)
%(6) edge [bend right] (1)
%(2) edge [bend right] (4)
%(4) edge [bend right] (2)
%(5) edge [loop right] (5);
%\end{tikzpicture}}}%
%BeginExpansion
\begin{tikzpicture}[->,shorten >=1pt,auto,node distance=3cm, thick,
main node/.style={circle, fill=blue!20,draw}]
\node[main node] (1) at (0:2) {$1$};
\node[main node] (3) at (360/3:2) {$3$};
\node[main node] (6) at (2*360/3:2) {$6$};
\node[main node] (2) at (4,1) {$2$};
\node[main node] (4) at (6,1) {$4$};
\node[main node] (5) at (4,-1) {$5$};
\path[-{Stealth[length=4mm]}]
(1) edge [bend right] (3)
(3) edge [bend right] (6)
(6) edge [bend right] (1)
(2) edge [bend right] (4)
(4) edge [bend right] (2)
(5) edge [loop right] (5);
\end{tikzpicture}%
%EndExpansion
\ \ .
\]


Let $Y$ be the $6$-element set $\left\{  4,5,6,7,8,9\right\}  $, and let
$\tau\in S_{Y}$ be the permutation with cycle digraph%
\[%
%TCIMACRO{\TeXButton{tikz sigma}{\begin{tikzpicture}%
%[->,shorten >=1pt,auto,node distance=3cm, thick,
%main node/.style={circle, fill=blue!20,draw}]
%\node[main node] (1) at (0:2) {$4$};
%\node[main node] (3) at (360/3:2) {$6$};
%\node[main node] (6) at (2*360/3:2) {$9$};
%\node[main node] (2) at (4,1) {$8$};
%\node[main node] (4) at (6,1) {$5$};
%\node[main node] (5) at (4,-1) {$7$};
%\path[-{Stealth[length=4mm]}]
%(1) edge [bend right] (3)
%(3) edge [bend right] (6)
%(6) edge [bend right] (1)
%(2) edge [bend right] (4)
%(4) edge [bend right] (2)
%(5) edge [loop right] (5);
%\end{tikzpicture}}}%
%BeginExpansion
\begin{tikzpicture}[->,shorten >=1pt,auto,node distance=3cm, thick,
main node/.style={circle, fill=blue!20,draw}]
\node[main node] (1) at (0:2) {$4$};
\node[main node] (3) at (360/3:2) {$6$};
\node[main node] (6) at (2*360/3:2) {$9$};
\node[main node] (2) at (4,1) {$8$};
\node[main node] (4) at (6,1) {$5$};
\node[main node] (5) at (4,-1) {$7$};
\path[-{Stealth[length=4mm]}]
(1) edge [bend right] (3)
(3) edge [bend right] (6)
(6) edge [bend right] (1)
(2) edge [bend right] (4)
(4) edge [bend right] (2)
(5) edge [loop right] (5);
\end{tikzpicture}%
%EndExpansion
\ \ .
\]
It is obvious from the two cycle digraphs that $\tau$ is just $\sigma$ with
the elements $1,2,3,4,5,6$ relabelled as $4,8,6,5,7,9$, respectively. In other
words, $\tau=\phi\circ\sigma\circ\phi^{-1}$, where $\phi:X\rightarrow Y$ is
the bijection that sends $1,2,3,4,5,6$ to $4,8,6,5,7,9$, respectively. Thus,
$\sigma$ and $\tau$ are isomorphic. (Note that there are several bijections
$\phi$ that satisfy $\tau=\phi\circ\sigma\circ\phi^{-1}$; we just picked the
one most obvious from the picture. We could just as well have taken, e.g., the
one that sends $1,2,3,4,5,6$ to $6,5,9,8,7,4$, respectively.)

On the other hand, let $\sigma^{\prime}\in S_{X}$ be the permutation with
cycle digraph%
\[%
%TCIMACRO{\TeXButton{tikz sigma}{\begin{tikzpicture}%
%[->,shorten >=1pt,auto,node distance=3cm, thick,
%main node/.style={circle, fill=blue!20,draw}]
%\node[main node] (1) at (2,1) {$1$};
%\node[main node] (3) at (0,1) {$3$};
%\node[main node] (6) at (2,-1) {$6$};
%\node[main node] (2) at (4,1) {$2$};
%\node[main node] (4) at (6,1) {$4$};
%\node[main node] (5) at (4,-1) {$5$};
%\path[-{Stealth[length=4mm]}]
%(1) edge [bend right] (3)
%(3) edge [bend right] (1)
%(6) edge [bend right] (5)
%(5) edge [bend right] (6)
%(2) edge [bend right] (4)
%(4) edge [bend right] (2);
%\end{tikzpicture}}}%
%BeginExpansion
\begin{tikzpicture}[->,shorten >=1pt,auto,node distance=3cm, thick,
main node/.style={circle, fill=blue!20,draw}]
\node[main node] (1) at (2,1) {$1$};
\node[main node] (3) at (0,1) {$3$};
\node[main node] (6) at (2,-1) {$6$};
\node[main node] (2) at (4,1) {$2$};
\node[main node] (4) at (6,1) {$4$};
\node[main node] (5) at (4,-1) {$5$};
\path[-{Stealth[length=4mm]}]
(1) edge [bend right] (3)
(3) edge [bend right] (1)
(6) edge [bend right] (5)
(5) edge [bend right] (6)
(2) edge [bend right] (4)
(4) edge [bend right] (2);
\end{tikzpicture}%
%EndExpansion
\ \ .
\]
Then, $\sigma^{\prime}$ is not isomorphic to $\sigma$. This is easiest to see
by observing that $\sigma$ has a fixed point whereas $\sigma^{\prime}$ has
none. (The property \textquotedblleft has a fixed point\textquotedblright\ is
preserved under isomorphism, since a bijection $\phi:X\rightarrow Y$
satisfying $\tau=\phi\circ\sigma\circ\phi^{-1}$ would send any fixed points of
$\sigma$ to fixed points of $\tau$.)
\end{example}

Two isomorphic permutations of the same set $X$ are also said to be
\textbf{conjugate} in the symmetric group $S_{X}$.

Now, what we said above about cycle types can be stated rigorously as follows:

\begin{theorem}
[isomorphism criterion for permutations]\label{thm.perm.iso-cyctyp}Let $X$ and
$Y$ be two finite sets.

Let $\sigma\in S_{X}$ and $\tau\in S_{Y}$ be permutations.

Then, the permutations $\sigma$ and $\tau$ are isomorphic if and only if they
have the same cycle type.
\end{theorem}

\begin{fineprint}
\begin{proof}
[Proof idea.]$\Longrightarrow:$ Assume that $\sigma$ and $\tau$ are
isomorphic. Thus, there exists a bijection $\phi:X\rightarrow Y$ satisfying
$\tau=\phi\circ\sigma\circ\phi^{-1}$. This bijection $\phi$ must then send
each orbit of $\sigma$ to an orbit of $\tau$ (why?). It furthermore preserves
the sizes of these orbits (since a bijection preserves the sizes of all
subsets). Hence, the orbits of $\tau$ have the same sizes as the orbits of
$\sigma$. In other words, $\sigma$ and $\tau$ have the same cycle type.

$\Longleftarrow:$ Assume that $\sigma$ and $\tau$ have the same cycle type.
Let $\left(  \lambda_{1},\lambda_{2},\ldots,\lambda_{k}\right)  $ be this
cycle type.

The permutation $\sigma$ has cycle type $\left(  \lambda_{1},\lambda
_{2},\ldots,\lambda_{k}\right)  $. In other words, it has an orbit $X_{1}$ of
size $\lambda_{1}$, an orbit $X_{2}$ of size $\lambda_{2}$, an orbit $X_{3}$
of size $\lambda_{3}$, and so on, and these altogether $k$ orbits $X_{1}%
,X_{2},\ldots,X_{k}$ form a set partition of the set $X$. Consider these $k$
orbits. For each $i\in\left[  k\right]  $, write the orbit $X_{i}$ in the form
$X_{i}=\left[  x_{i}\right]  _{\sim}$ for some $x_{i}\in X_{i}$, where $\sim$
is the relation $\overset{\sigma}{\sim}$. Then, for each $i\in\left[
k\right]  $, we have
\[
X_{i}=\left\{  \sigma^{0}\left(  x_{i}\right)  ,\ \sigma^{1}\left(
x_{i}\right)  ,\ \sigma^{2}\left(  x_{i}\right)  ,\ \ldots,\ \sigma
^{\lambda_{i}-1}\left(  x_{i}\right)  \right\}
\]
(why? hint: use Proposition 4.3.4 \textbf{(b)} in Lecture 27).

Similarly, we can analyze the orbits of $\tau$. We learn that there are $k$ of
them, and we can denote them as $Y_{1},Y_{2},\ldots,Y_{k}$ and have%
\[
Y_{i}=\left\{  \tau^{0}\left(  y_{i}\right)  ,\ \tau^{1}\left(  y_{i}\right)
,\ \tau^{2}\left(  y_{i}\right)  ,\ \ldots,\ \tau^{\lambda_{i}-1}\left(
y_{i}\right)  \right\}  \ \ \ \ \ \ \ \ \ \ \text{for each }i\in\left[
k\right]
\]
(where the elements $y_{i}$ are chosen appropriately).

Note that each element of $X$ belongs to exactly one orbit $X_{i}$ of $\sigma
$, and thus can be written in the form $\sigma^{j}\left(  x_{i}\right)  $ for
a unique $i\in\left[  k\right]  $ and a unique $j\in\left\{  0,1,\ldots
,\lambda_{i}-1\right\}  $. Similarly, each element of $Y$ can be written in
the form $\tau^{j}\left(  y_{i}\right)  $ for a unique $i\in\left[  k\right]
$ and a unique $j\in\left\{  0,1,\ldots,\lambda_{i}-1\right\}  $.

This allows us to define $\phi:X\rightarrow Y$ to be the map that sends each
$\sigma^{j}\left(  x_{i}\right)  \in X$ (for each $i\in\left[  k\right]  $ and
each $j\in\left\{  0,1,\ldots,\lambda_{i}-1\right\}  $) to the respective
$\tau^{j}\left(  y_{i}\right)  \in Y$. This map $\phi$ is a bijection (why?)
and satisfies $\tau\circ\phi=\phi\circ\sigma$ (why?), thus $\tau=\phi
\circ\sigma\circ\phi^{-1}$. This shows that $\sigma$ and $\tau$ are isomorphic.
\end{proof}
\end{fineprint}

As a curiosity, let me mention another relation between permutations and
partitions: a formula for the \# of times that two permutations of a given set
$X$ commute. This formula is surprising in its simplicity:

\begin{theorem}
\label{thm.perm.count-commuting-pairs}Let $n\in\mathbb{N}$ and let $X$ be an
$n$-element set. Then,%
\[
\left(  \text{\# of pairs }\left(  \alpha,\beta\right)  \in S_{X}\times
S_{X}\text{ such that }\alpha\beta=\beta\alpha\right)  =n!\cdot p\left(
n\right)  .
\]
Here, $p\left(  n\right)  $ denotes the \# of all partitions of $n$.
\end{theorem}

\begin{fineprint}
\begin{proof}
[Proof idea.]This theorem's natural habitat is finite group theory. In fact,
if $G$ is any finite group, then the \# of pairs $\left(  \alpha,\beta\right)
\in G\times G$ such that $\alpha\beta=\beta\alpha$ equals $\left\vert
G\right\vert \cdot\left\vert \widetilde{G}\right\vert $, where $\widetilde{G}$
is the set of all conjugacy classes of $G$. See
\url{https://math.stackexchange.com/a/1401276/} or
\url{https://math.stackexchange.com/a/3023502/} for a proof of this fact
(which appears to have been first found by Erd\"{o}s and Tur\'{a}n in 1968).
Applying this fact to $G=S_{X}$ yields the claim of Theorem
\ref{thm.perm.count-commuting-pairs}, after observing that the conjugacy
classes of $S_{X}$ are in bijection with the partitions of $n$ (an easy
consequence of Theorem \ref{thm.perm.iso-cyctyp}).
\end{proof}
\end{fineprint}

\subsection{Inversions and lengths}

In the previous section, we have mostly been discussing permutations of
arbitrary finite sets $X$. Let us next discuss some features that are specific
to permutations of $\left[  n\right]  $ (or, more generally, of totally
ordered sets, but for us $\left[  n\right]  $ will suffice). Specifically, we
will study the inversions and the length of a permutation, and find out how to
express any permutation of $\left[  n\right]  $ as a product of simple
transpositions (as opposed to arbitrary transpositions, which we know how to
do from Theorem \ref{thm.perm.transp-orbits}). We will only scratch the
surface (and only sketch the proof); more details can be found in
\cite[\S 5.3]{21s} and in \cite[\S 5.2, \S 5.5, \S 5.8]{detnotes}.

\subsubsection{Definitions}

\begin{definition}
\label{def.perm.inversions}Let $n\in\mathbb{N}$. Let $\sigma\in S_{n}$ be a permutation.

\textbf{(a)} An \textbf{inversion} of $\sigma$ means a pair $\left(
i,j\right)  \in\left[  n\right]  \times\left[  n\right]  $ such that $i<j$ and
$\sigma\left(  i\right)  >\sigma\left(  j\right)  $.

\textbf{(b)} The \textbf{Coxeter length} $\ell\left(  \sigma\right)  $ of
$\sigma$ (also denoted $\operatorname*{inv}\sigma$) is the \# of inversions of
$\sigma$.
\end{definition}

\begin{example}
\label{exa.perm.inversions.1}Consider the permutation $\sigma\in S_{5}$ whose
OLN is $31452$. (Thus, $\sigma\left(  1\right)  =3$ and $\sigma\left(
2\right)  =1$ and $\sigma\left(  3\right)  =4$ and $\sigma\left(  4\right)
=5$ and $\sigma\left(  5\right)  =2$.)

Then, the inversions of $\sigma$ are
\begin{align*}
&  \left(  1,2\right)  \ \ \ \ \ \ \ \ \ \ \left(  \text{since }1<2\text{ but
}\sigma\left(  1\right)  =3>1=\sigma\left(  2\right)  \right)  ,\\
&  \left(  1,5\right)  \ \ \ \ \ \ \ \ \ \ \left(  \text{since }1<5\text{ but
}\sigma\left(  1\right)  =3>2=\sigma\left(  5\right)  \right)  ,\\
&  \left(  3,5\right)  \ \ \ \ \ \ \ \ \ \ \left(  \text{since }3<5\text{ but
}\sigma\left(  3\right)  =4>2=\sigma\left(  5\right)  \right)  ,\\
&  \left(  4,5\right)  \ \ \ \ \ \ \ \ \ \ \left(  \text{since }4<5\text{ but
}\sigma\left(  4\right)  =5>2=\sigma\left(  5\right)  \right)  .
\end{align*}
So the Coxeter length $\ell\left(  \sigma\right)  $ of $\sigma$ is $4$.
\end{example}

Note that the inversions of a permutation $\sigma\in S_{n}$ can be easily read
off from its OLN: Namely, every time you see a bigger number
before\footnote{\textquotedblleft Before\textquotedblright\ does not mean
\textquotedblleft immediately before\textquotedblright. For instance, $3$ is
before $2$ in $312$.} a smaller number in the OLN of $\sigma$, you have an
inversion. Note, however, that the entries of the inversion are \textbf{not}
the bigger number and the smaller number, but rather their \textbf{positions}
in the OLN. For example, the permutation $\sigma\in S_{3}$ with OLN $312$ has
inversion $\left(  1,2\right)  $ not because the $1$ stands before the $2$ (it
doesn't), but because the entry in position $1$ is larger than the entry in
position $2$.

\bigskip

\textbf{Recall:} Given $n\in\mathbb{N}$, we define the \textbf{simple
transpositions} $s_{1},s_{2},\ldots,s_{n-1}\in S_{n}$ by $s_{i}:=t_{i,i+1}$.
Each of these simple transpositions has Coxeter length $\ell\left(
s_{i}\right)  =1$ (since its only inversion is $\left(  i,i+1\right)  $, as
you can easily check).

\subsubsection{Counting}

Now, another counting question suggests itself: How many permutations
$\sigma\in S_{n}$ have Coxeter length $k$ for a given $n$ and a given $k$ ?

Some simple results first:

\begin{proposition}
\label{prop.perm.wnk.basics}Let $n\in\mathbb{N}$. Then:

\textbf{(a)} For every $\sigma\in S_{n}$, we have $\ell\left(  \sigma\right)
\in\left\{  0,1,\ldots,\dbinom{n}{2}\right\}  $.

\textbf{(b)} The only permutation $\sigma\in S_{n}$ satisfying $\ell\left(
\sigma\right)  =0$ is $\operatorname*{id}\nolimits_{\left[  n\right]  }$.

\textbf{(c)} The only permutation $\sigma\in S_{n}$ satisfying $\ell\left(
\sigma\right)  =\dbinom{n}{2}$ is the permutation that sends each $k\in\left[
n\right]  $ to $n+1-k$. Its OLN is $\left(  n,n-1,\ldots,2,1\right)  $. It is
occasionally denoted by $w_{0}$.

\textbf{(d)} Assume that $n>0$. Then, there are exactly $n-1$ permutations
$\sigma\in S_{n}$ satisfying $\ell\left(  \sigma\right)  =1$, namely the
simple transpositions $s_{1},s_{2},\ldots,s_{n-1}$.
\end{proposition}

\begin{fineprint}
\begin{proof}
[Proof idea.]\textbf{(a)} There are only $\dbinom{n}{2}$ different pairs
$\left(  i,j\right)  \in\left[  n\right]  \times\left[  n\right]  $ with
$i<j$. \medskip

\textbf{(b)} If a permutation $\sigma\in S_{n}$ satisfies $\ell\left(
\sigma\right)  =0$, then it must satisfy $\sigma\left(  1\right)  \leq
\sigma\left(  2\right)  \leq\cdots\leq\sigma\left(  n\right)  $ (since
$\sigma\left(  i\right)  >\sigma\left(  i+1\right)  $ would cause $\left(
i,i+1\right)  $ to be an inversion of $\sigma$) and thus $\sigma\left(
1\right)  <\sigma\left(  2\right)  <\cdots<\sigma\left(  n\right)  $ (since
$\sigma$ is injective), which easily leads to $\sigma=\operatorname*{id}%
\nolimits_{\left[  n\right]  }$ (why?\footnote{See \cite[Exercise 5.2
\textbf{(d)}]{detnotes} for the details of this step.}). \medskip

\textbf{(c)} Left to the reader (similar to part \textbf{(b)}). \medskip

\textbf{(d)} Left to the reader (nice exercise).
\end{proof}
\end{fineprint}

Okay, but what about the other possible Coxeter lengths? As there is no simple
explicit answer to our counting question, we introduce a notation for it:

\begin{definition}
\label{def.perm.wnk}Let $n\in\mathbb{N}$ and $k\in\mathbb{Z}$. Then, $w\left(
n,k\right)  $ shall denote the \# of permutations $\sigma\in S_{n}$ satisfying
$\ell\left(  \sigma\right)  =k$.
\end{definition}

Thus,

\begin{itemize}
\item we have $w\left(  n,0\right)  =1$ for any $n\in\mathbb{N}$ (by
Proposition \ref{prop.perm.wnk.basics} \textbf{(b)});

\item we have $w\left(  n,\dbinom{n}{2}\right)  =1$ for any $n\in\mathbb{N}$
(by Proposition \ref{prop.perm.wnk.basics} \textbf{(c)});

\item we have $w\left(  n,1\right)  =n-1$ for any $n>0$ (by Proposition
\ref{prop.perm.wnk.basics} \textbf{(d)});

\item we have $w\left(  n,k\right)  =0$ for every $n\in\mathbb{N}$ and
$k\notin\left\{  0,1,\ldots,\dbinom{n}{2}\right\}  $ (by Proposition
\ref{prop.perm.wnk.basics} \textbf{(a)}).
\end{itemize}

More can be said (in particular, it is not too hard to check that $w\left(
n,2\right)  =\dfrac{\left(  n-2\right)  \left(  n+1\right)  }{2}$ for any
$n\geq2$). Alas, there is no explicit formula for $w\left(  n,k\right)  $ in
general. However, there is a recursion:

\begin{proposition}
\label{prop.perm.wnk.rec}For any positive integer $n$ and any $k\in\mathbb{Z}%
$, we have%
\[
w\left(  n,k\right)  =\sum_{i=k-n+1}^{k}w\left(  n-1,i\right)  .
\]

\end{proposition}

\begin{fineprint}
\begin{proof}
[Proof idea.]We shall be sloppy and identify any permutation $\sigma\in S_{n}$
with its OLN $\left(  \sigma\left(  1\right)  ,\sigma\left(  2\right)
,\ldots,\sigma\left(  n\right)  \right)  $; thus, the \textquotedblleft$i$-th
entry\textquotedblright\ of $\sigma$ shall mean $\sigma\left(  i\right)  $,
and we shall be speaking of \textquotedblleft removing an entry from a
permutation\textquotedblright\ (meaning, of course, removing it from its OLN).

Fix a positive integer $n$ and any $k\in\mathbb{Z}$. Then, if $\sigma$ is a
permutation of $\left[  n\right]  $, then removing the entry $n$ from $\sigma$
(that is, from the OLN of $\sigma$) yields a permutation of $\left[
n-1\right]  $ (because the remaining $n-1$ entries will be $1,2,\ldots,n-1$ in
some order). Let us denote the latter permutation of $\left[  n-1\right]  $ by
$\overline{\sigma}$. For example, if $n=5$ and $\sigma=31254$ (in OLN), then
$\overline{\sigma}=3124\in S_{4}$ (again in OLN).

Now, fix any $p\in\left[  n\right]  $. If $\sigma\in S_{n}$ is any permutation
satisfying $\sigma\left(  p\right)  =n$, then:

\begin{itemize}
\item We have $\ell\left(  \overline{\sigma}\right)  =\ell\left(
\sigma\right)  -\left(  n-p\right)  $. (Indeed, $\sigma\left(  p\right)  =n$
shows that the entry $n$ lies in the $p$-th position of the OLN of $\sigma$,
and therefore all the $n-p$ pairs
\[
\left(  p,p+1\right)  ,\ \ \left(  p,p+2\right)  ,\ \ \left(  p,p+3\right)
,\ \ \ldots,\ \ \left(  p,n\right)
\]
are inversions of $\sigma$. All these $n-p$ inversions are lost when we remove
the entry $n$ from $\sigma$. Any other inversions of $\sigma$ are preserved
when we remove the entry $n$ from $\sigma$, although they can change slightly
(specifically, if $\left(  i,j\right)  $ is an inversion of $\sigma$ with
$i\neq p$, then it becomes $\left(  i^{\prime},j^{\prime}\right)  $ after
removing the entry $n$ from $\sigma$, where $i^{\prime}:=%
\begin{cases}
i, & \text{if }i<p;\\
i-1, & \text{if }i>p
\end{cases}
$ and $j^{\prime}:=%
\begin{cases}
j, & \text{if }j<p;\\
j-1, & \text{if }j>p
\end{cases}
$). Altogether, the permutation $\sigma$ thus loses $n-p$ inversions when we
remove the entry $n$ from it. In other words, $\ell\left(  \overline{\sigma
}\right)  =\ell\left(  \sigma\right)  -\left(  n-p\right)  $, since
$\overline{\sigma}$ is precisely the result of removing the entry $n$ from
$\sigma$.)

\item Hence, $\ell\left(  \sigma\right)  =k$ holds if and only if $\ell\left(
\overline{\sigma}\right)  =k-\left(  n-p\right)  $.

\item We can uniquely reconstruct $\sigma$ from $\overline{\sigma}$. (Indeed,
$\overline{\sigma}$ is obtained from $\sigma$ by removing the entry $n$, which
lies in the $p$-th position of the OLN. Thus, in order to undo this removal,
we simply need to reinsert $n$ into the $p$-th position, shifting all later
entries one position to the right.)
\end{itemize}

Thus, we obtain a map%
\begin{align*}
\left\{  \sigma\in S_{n}\ \mid\ \sigma\left(  p\right)  =n\text{ and }%
\ell\left(  \sigma\right)  =k\right\}   &  \rightarrow\left\{  \tau\in
S_{n-1}\ \mid\ \ell\left(  \tau\right)  =k-\left(  n-p\right)  \right\}  ,\\
\sigma &  \mapsto\overline{\sigma}.
\end{align*}
This map is bijective\footnote{Indeed, it is injective (since we can uniquely
reconstruct $\sigma$ from $\overline{\sigma}$, as we have already seen above)
and surjective (since the just-mentioned method for reconstructing $\sigma$
can be applied to any permutation $\tau\in S_{n-1}$ satisfying $\ell\left(
\tau\right)  =k-\left(  n-p\right)  $, and thus provides a permutation
$\sigma\in S_{n}$ satisfying $\sigma\left(  p\right)  =n$ and $\ell\left(
\sigma\right)  =k$ and $\overline{\sigma}=\tau$).}. Hence, the bijection
principle yields%
\begin{align}
&  \left(  \text{\# of }\sigma\in S_{n}\text{ satisfying }\sigma\left(
p\right)  =n\text{ and }\ell\left(  \sigma\right)  =k\right) \nonumber\\
&  =\left(  \text{\# of }\tau\in S_{n-1}\text{ satisfying }\ell\left(
\tau\right)  =k-\left(  n-p\right)  \right) \nonumber\\
&  =w\left(  n-1,\ k-\left(  n-p\right)  \right)
\label{pf.prop.perm.wnk.rec.given-p}%
\end{align}
(by the definition of $w\left(  n-1,\ k-\left(  n-p\right)  \right)  $).

Now, forget that we fixed $p$. We have thus proved
(\ref{pf.prop.perm.wnk.rec.given-p}) for each $p\in\left[  n\right]  $.
However, for each permutation $\sigma\in S_{n}$, there is a unique
$p\in\left[  n\right]  $ satisfying $\sigma\left(  p\right)  =n$. Thus, by the
sum rule, we have%
\begin{align*}
&  \left(  \text{\# of }\sigma\in S_{n}\text{ satisfying }\ell\left(
\sigma\right)  =k\right) \\
&  =\sum_{p\in\left[  n\right]  }\underbrace{\left(  \text{\# of }\sigma\in
S_{n}\text{ satisfying }\sigma\left(  p\right)  =n\text{ and }\ell\left(
\sigma\right)  =k\right)  }_{\substack{=w\left(  n-1,\ k-\left(  n-p\right)
\right)  \\\text{(by (\ref{pf.prop.perm.wnk.rec.given-p}))}}}\\
&  =\sum_{p\in\left[  n\right]  }w\left(  n-1,\ k-\left(  n-p\right)  \right)
=\sum_{i=k-n+1}^{k}w\left(  n-1,i\right)
\end{align*}
(here, we have substituted $i$ for $k-\left(  n-p\right)  $ in the sum). Since
the left hand side of this equality is $w\left(  n,k\right)  $, we thus have
proved Proposition \ref{prop.perm.wnk.rec}.
\end{proof}
\end{fineprint}

Equivalently, there is a \textbf{generating function formula} for the
$w\left(  n,k\right)  $:

\begin{proposition}
\label{prop.perm.wnk.genf}Consider polynomials in an indeterminate $X$. For
any $n\in\mathbb{N}$, we have%
\begin{align*}
&  \sum_{\sigma\in S_{n}}X^{\ell\left(  \sigma\right)  }\\
&  =\prod_{i=1}^{n}\left(  1+X+X^{2}+\cdots+X^{i-1}\right) \\
&  =\left(  1+X\right)  \left(  1+X+X^{2}\right)  \left(  1+X+X^{2}%
+X^{3}\right)  \cdots\left(  1+X+X^{2}+\cdots+X^{n-1}\right)  .
\end{align*}
Note that the LHS here is $\sum\limits_{k\in\mathbb{Z}}w\left(  n,k\right)
X^{k}$.
\end{proposition}

\begin{fineprint}
\begin{proof}
[Proof idea.]This can be proved by induction on $n$ using Proposition
\ref{prop.perm.wnk.rec}. A different proof can be found in \cite[Proposition
5.3.5]{21s}.
\end{proof}
\end{fineprint}

We remark that the distribution of the Coxeter lengths of all permutations
$\sigma\in S_{n}$ is symmetric around $\dbinom{n}{2}/2$. In other words:

\begin{remark}
\label{rmk.perm.wnk.symm}We have $w\left(  n,k\right)  =w\left(  n,\dbinom
{n}{2}-k\right)  $ for all $n\in\mathbb{N}$ and $k\in\mathbb{Z}$.
\end{remark}

\begin{fineprint}
\begin{proof}
[Proof idea.]Nice (and easy) exercise.
\end{proof}
\end{fineprint}

\subsubsection{Products of simple transpositions}

Theorem \ref{thm.perm.transp-orbits} \textbf{(b)} shows that any permutation
$\sigma$ of a finite set $X$ can be written as a product of transpositions,
and describes the smallest \# of transpositions needed for this. In this
subsection, we shall prove a similar result about \textbf{simple}
transpositions (i.e., the transpositions $s_{i}=t_{i,i+1}$) instead of
arbitrary transpositions. For this, of course, we need $X$ to be $\left[
n\right]  $ (otherwise, simple transpositions aren't defined), and we should
expect that writing $\sigma$ as a product of simple transpositions will
require more factors than writing $\sigma$ as a product of transpositions
(since simple transpositions are more restrictive).

This is indeed the case. In order to get to our result, we first need some
properties of Coxeter lengths:

\begin{proposition}
\label{prop.perm.len.inv}Let $n\in\mathbb{N}$. Let $\sigma\in S_{n}$. Then,
$\ell\left(  \sigma^{-1}\right)  =\ell\left(  \sigma\right)  $.
\end{proposition}

\begin{fineprint}
\begin{proof}
[Proof idea.]Find the bijection! Or look it up in \cite[Proposition
5.3.13]{21s}.
\end{proof}
\end{fineprint}

The next result is a crucial lemma, which characterizes how the Coxeter length
of a permutation $\sigma$ changes when we multiply $\sigma$ by a simple
transposition $s_{k}$ (either from the left or from the right):

\begin{lemma}
[single swap lemma]\label{lem.perm.len.ssl}Let $n\in\mathbb{N}$. Let
$\sigma\in S_{n}$ and $k\in\left[  n-1\right]  $. Then:

\textbf{(a)} We have%
\[
\ell\left(  \sigma s_{k}\right)  =%
\begin{cases}
\ell\left(  \sigma\right)  +1, & \text{if }\sigma\left(  k\right)
<\sigma\left(  k+1\right)  ;\\
\ell\left(  \sigma\right)  -1, & \text{if }\sigma\left(  k\right)
>\sigma\left(  k+1\right)  .
\end{cases}
\]


\textbf{(b)} We have%
\[
\ell\left(  s_{k}\sigma\right)  =%
\begin{cases}
\ell\left(  \sigma\right)  +1, & \text{if }\sigma^{-1}\left(  k\right)
<\sigma^{-1}\left(  k+1\right)  ;\\
\ell\left(  \sigma\right)  -1, & \text{if }\sigma^{-1}\left(  k\right)
>\sigma^{-1}\left(  k+1\right)  .
\end{cases}
\]


[\textbf{Note:} The OLN of $\sigma s_{k}$ is obtained from the OLN of $\sigma$
by swapping the $k$-th and $\left(  k+1\right)  $-st entries, whereas the OLN
of $s_{k}\sigma$ is obtained from the OLN of $\sigma$ by swapping the entries
$k$ and $k+1$ (wherever they lie). The condition $\sigma\left(  k\right)
<\sigma\left(  k+1\right)  $ means that the $k$-th entry in the OLN of
$\sigma$ is smaller than the $\left(  k+1\right)  $-th entry. The condition
$\sigma^{-1}\left(  k\right)  <\sigma^{-1}\left(  k+1\right)  $ means that the
entry $k$ is to the left of the entry $k+1$ in the OLN of $\sigma$.]
\end{lemma}

\begin{fineprint}
\begin{proof}
[Proof idea.]\textbf{(a)} A pair $\left(  i,j\right)  $ will be called
\textbf{active} if it is $\left(  k,k+1\right)  $, and \textbf{inactive}
otherwise. Thus, there is exactly one active pair, which is $\left(
k,k+1\right)  $.

If $\sigma\left(  k\right)  <\sigma\left(  k+1\right)  $, then the active pair
$\left(  k,k+1\right)  $ is an inversion of $\sigma s_{k}$ but not of $\sigma
$. If $\sigma\left(  k\right)  >\sigma\left(  k+1\right)  $, then it is the
other way round. Hence, we have%
\begin{equation}
\left(  \text{\# of active inversions of }\sigma\right)  =%
\begin{cases}
0, & \text{if }\sigma\left(  k\right)  <\sigma\left(  k+1\right)  ;\\
1, & \text{if }\sigma\left(  k\right)  >\sigma\left(  k+1\right)
\end{cases}
\label{pf.lem.perm.len.ssl.a.a1}%
\end{equation}
and%
\begin{equation}
\left(  \text{\# of active inversions of }\sigma s_{k}\right)  =%
\begin{cases}
1, & \text{if }\sigma\left(  k\right)  <\sigma\left(  k+1\right)  ;\\
0, & \text{if }\sigma\left(  k\right)  >\sigma\left(  k+1\right)  .
\end{cases}
\label{pf.lem.perm.len.ssl.a.a2}%
\end{equation}


What about the inactive pairs? We claim that the permutations $\sigma$ and
$\sigma s_{k}$ have the same \# of inactive inversions. In fact, the
permutation $\sigma s_{k}$ is obtained from $\sigma$ by swapping the $k$-th
and $\left(  k+1\right)  $-st entries in the OLN; thus, the $k$-th entry moves
one position to its right, while the $\left(  k+1\right)  $-st entry moves one
position to its left, and all remaining entries stay where they are. Hence, if
a bigger entry comes before a smaller entry in the OLN of $\sigma$, then the
former bigger entry will still come before the latter smaller entry in the OLN
of $\sigma s_{k}$, unless these two entries were the $k$-th and the $\left(
k+1\right)  $-st entries to begin with. In other words, any inactive inversion
$\left(  i,j\right)  $ of $\sigma$ gives rise to an inactive inversion
$\left(  s_{k}\left(  i\right)  ,s_{k}\left(  j\right)  \right)  $ of $\sigma
s_{k}$ (the \textquotedblleft$s_{k}$\textquotedblright s in the latter
inversion are coming from the fact that the $k$-th and the $\left(
k+1\right)  $-st entries got moved from $\sigma$ to $\sigma s_{k}$).
Conversely, any inactive inversion of $\sigma s_{k}$ can be obtained in this
way (why?). Thus, we obtain a bijection%
\begin{align*}
\left\{  \text{inactive inversions of }\sigma\right\}   &  \rightarrow\left\{
\text{inactive inversions of }\sigma s_{k}\right\}  ,\\
\left(  i,j\right)   &  \mapsto\left(  s_{k}\left(  i\right)  ,s_{k}\left(
j\right)  \right)  .
\end{align*}
The bijection principle therefore yields%
\begin{equation}
\left(  \text{\# of inactive inversions of }\sigma\right)  =\left(  \text{\#
of inactive inversions of }\sigma s_{k}\right)  .
\label{pf.lem.perm.len.ssl.a.i}%
\end{equation}


Now, the definition of Coxeter length yields%
\begin{align*}
\ell\left(  \sigma s_{k}\right)   &  =\left(  \text{\# of inversions of
}\sigma s_{k}\right) \\
&  =\underbrace{\left(  \text{\# of active inversions of }\sigma s_{k}\right)
}_{\substack{=%
\begin{cases}
1, & \text{if }\sigma\left(  k\right)  <\sigma\left(  k+1\right)  ;\\
0, & \text{if }\sigma\left(  k\right)  >\sigma\left(  k+1\right)
\end{cases}
\\\text{(by (\ref{pf.lem.perm.len.ssl.a.a2}))}}}+\underbrace{\left(  \text{\#
of inactive inversions of }\sigma s_{k}\right)  }_{\substack{=\left(  \text{\#
of inactive inversions of }\sigma\right)  \\\text{(by
(\ref{pf.lem.perm.len.ssl.a.i}))}}}\\
&  =%
\begin{cases}
1, & \text{if }\sigma\left(  k\right)  <\sigma\left(  k+1\right)  ;\\
0, & \text{if }\sigma\left(  k\right)  >\sigma\left(  k+1\right)
\end{cases}
\ \ +\left(  \text{\# of inactive inversions of }\sigma\right)
\end{align*}
and%
\begin{align*}
\ell\left(  \sigma\right)   &  =\left(  \text{\# of inversions of }%
\sigma\right) \\
&  =\underbrace{\left(  \text{\# of active inversions of }\sigma\right)
}_{\substack{=%
\begin{cases}
0, & \text{if }\sigma\left(  k\right)  <\sigma\left(  k+1\right)  ;\\
1, & \text{if }\sigma\left(  k\right)  >\sigma\left(  k+1\right)
\end{cases}
\\\text{(by (\ref{pf.lem.perm.len.ssl.a.a1}))}}}+\left(  \text{\# of inactive
inversions of }\sigma\right) \\
&  =%
\begin{cases}
0, & \text{if }\sigma\left(  k\right)  <\sigma\left(  k+1\right)  ;\\
1, & \text{if }\sigma\left(  k\right)  >\sigma\left(  k+1\right)
\end{cases}
\ \ +\left(  \text{\# of inactive inversions of }\sigma\right)  .
\end{align*}
The right hand sides of these two equalities differ by $1$ or $-1$ depending
on whether $\sigma\left(  k\right)  <\sigma\left(  k+1\right)  $ or
$\sigma\left(  k\right)  >\sigma\left(  k+1\right)  $. Thus, so do the left
hand sides. In other words,%
\begin{align*}
\ell\left(  \sigma s_{k}\right)   &  =\ell\left(  \sigma\right)  +%
\begin{cases}
1, & \text{if }\sigma\left(  k\right)  <\sigma\left(  k+1\right)  ;\\
-1, & \text{if }\sigma\left(  k\right)  >\sigma\left(  k+1\right)
\end{cases}
\\
&  =%
\begin{cases}
\ell\left(  \sigma\right)  +1, & \text{if }\sigma\left(  k\right)
<\sigma\left(  k+1\right)  ;\\
\ell\left(  \sigma\right)  -1, & \text{if }\sigma\left(  k\right)
>\sigma\left(  k+1\right)  .
\end{cases}
\end{align*}
This proves Lemma \ref{lem.perm.len.ssl} \textbf{(a)}. \medskip

\textbf{(b)} Apply Lemma \ref{lem.perm.len.ssl} \textbf{(a)} to $\sigma^{-1}$
instead of $\sigma$, and translate back using Proposition
\ref{prop.perm.len.inv} (and $s_{k}^{-1}=s_{k}$).
\end{proof}
\end{fineprint}

The following theorem is a counterpart to Theorem \ref{thm.perm.transp-orbits}
for \textbf{simple} transpositions (instead of arbitrary transpositions):

\begin{theorem}
\label{thm.perm.len.redword1}Let $n\in\mathbb{N}$ and $\sigma\in S_{n}$. Then:

\textbf{(a)} We can write $\sigma$ as a product of $\ell\left(  \sigma\right)
$ simple transpositions (which are not necessarily distinct!).

\textbf{(b)} The number $\ell\left(  \sigma\right)  $ is the smallest
$p\in\mathbb{N}$ such that $\sigma$ can be written as a product of $p$ simple transpositions.
\end{theorem}

\begin{example}
\label{exa.perm.redwords.1}Let $n=5$, and let $\sigma\in S_{5}$ be the
permutation whose OLN is $32415$. Then, there are several ways to write
$\sigma$ as a product of $4$ simple transpositions:%
\[
\sigma=s_{1}s_{3}s_{2}s_{1}=s_{3}s_{1}s_{2}s_{1}=s_{3}s_{2}s_{1}s_{2},
\]
as well as infinitely many ways to write $\sigma$ as a product of more than
$4$ simple transpositions (for example, $\sigma=s_{2}s_{3}s_{2}s_{3}s_{1}%
s_{2}$). This is well in line with what Theorem \ref{thm.perm.len.redword1}
claims (since $\ell\left(  \sigma\right)  =4$).
\end{example}

\begin{fineprint}
\begin{proof}
[Proof idea for Theorem \ref{thm.perm.len.redword1}.]What follows is but a
brief sketch; see \cite[Theorem 5.3.17]{21s} for more details. \medskip

\textbf{(a)} Induct on $\ell\left(  \sigma\right)  $.

\textit{Base case:} The case $\ell\left(  \sigma\right)  =0$ follows from
Proposition \ref{prop.perm.wnk.basics} \textbf{(b)}.

\textit{Induction step:} If $\ell\left(  \sigma\right)  =h+1>0$, then there
exists some $k\in\left[  n-1\right]  $ such that $\sigma\left(  k\right)
>\sigma\left(  k+1\right)  $ (why?), and then Lemma \ref{lem.perm.len.ssl}
\textbf{(a)} shows that $\ell\left(  \sigma s_{k}\right)  =h$, which allows us
to apply the induction hypothesis to $\sigma s_{k}$ instead of $\sigma$.
\medskip

\textbf{(b)} Assume that $\sigma=s_{i_{1}}s_{i_{2}}\cdots s_{i_{p}}$ for some
$i_{1},i_{2},\ldots,i_{p}$. We must show that $p\geq\ell\left(  \sigma\right)
$.

Set $\sigma_{j}:=s_{i_{1}}s_{i_{2}}\cdots s_{i_{j}}$ for each $j\in\left\{
0,1,\ldots,p\right\}  $. Argue (using Lemma \ref{lem.perm.len.ssl}
\textbf{(a)}) that $\ell\left(  \sigma_{j}\right)  \leq\ell\left(
\sigma_{j-1}\right)  +1$ for each $j\in\left[  p\right]  $. Conclude that
$\ell\left(  \sigma_{p}\right)  \leq\ell\left(  \sigma_{0}\right)  +p$. In
view of $\sigma_{p}=\sigma$ and $\sigma_{0}=\operatorname*{id}$, this can be
simplified to $\ell\left(  \sigma\right)  \leq p$, qed.
\end{proof}
\end{fineprint}

Note that Theorem \ref{thm.perm.len.redword1} is the reason why the Coxeter
length $\ell\left(  \sigma\right)  $ is called a \textquotedblleft
length\textquotedblright: It really is the length of $\sigma$ if we regard
$\sigma$ as a string of simple transpositions... And people often do view
permutations in this way; in fact, this is the idea behind the Coxeter group
approach to the symmetric group (see, e.g., \cite[Chapter 1]{William03} for an introduction).

\bigskip

Using Lemma \ref{lem.perm.len.ssl} and Theorem \ref{thm.perm.len.redword1}
\textbf{(a)}, we can easily prove the following fact:

\begin{proposition}
\label{prop.perm.len.abn}Let $n\in\mathbb{N}$. Let $\alpha,\beta\in S_{n}$ be
two permutations. Then:

\textbf{(a)} We have $\ell\left(  \alpha\beta\right)  \leq\ell\left(
\alpha\right)  +\ell\left(  \beta\right)  $.

\textbf{(b)} We have $\ell\left(  \alpha\beta\right)  \equiv\ell\left(
\alpha\right)  +\ell\left(  \beta\right)  \operatorname{mod}2$. (In other
words, the integers $\ell\left(  \alpha\beta\right)  $ and $\ell\left(
\alpha\right)  +\ell\left(  \beta\right)  $ are either both even or both odd.)
\end{proposition}

\begin{fineprint}
\begin{proof}
[Proof idea.]See \cite[Corollary 5.3.20 \textbf{(b)}]{21s} for part
\textbf{(a)}, and \cite[Corollary 5.3.20 \textbf{(a)}]{21s} for part
\textbf{(b)}.

(Here is the proof in a nutshell: Use Theorem \ref{thm.perm.len.redword1}
\textbf{(a)} to write $\beta$ as a product of $\ell\left(  \beta\right)  $
simple transpositions: $\beta=s_{k_{1}}s_{k_{2}}\cdots s_{k_{\ell\left(
\beta\right)  }}$. Thus, the permutation $\alpha\beta$ can be obtained by
successively multiplying $\alpha$ with the $\ell\left(  \beta\right)  $ simple
transpositions $s_{k_{1}},s_{k_{2}},\ldots,s_{k_{\ell\left(  \beta\right)  }}%
$. However, when we multiply a permutation $\sigma$ by a single simple
transposition $s_{k}$ (on the left or on the right), its Coxeter length
$\ell\left(  \sigma\right)  $ either increases by $1$ or decreases by $1$
(according to Lemma \ref{lem.perm.len.ssl}). Hence, this length $\ell\left(
\sigma\right)  $ changes its parity (i.e., becomes even if it was odd, and
becomes odd if it was even), and increases by at most $1$. Therefore, when we
successively multiply $\alpha$ with the $\ell\left(  \beta\right)  $ simple
transpositions $s_{k_{1}},s_{k_{2}},\ldots,s_{k_{\ell\left(  \beta\right)  }}%
$, the length $\ell\left(  \alpha\right)  $ changes its parity $\ell\left(
\beta\right)  $ many times in total, and increases by at most $\ell\left(
\beta\right)  $ in total. This yields both parts of Proposition
\ref{prop.perm.len.abn}.)
\end{proof}
\end{fineprint}

\subsection{Signs of permutations}

One of the most useful features of a permutation is its \textbf{sign} (aka
\textbf{signature}). For a permutation of $\left[  n\right]  $, the easiest
way to define the sign is as follows:

\begin{definition}
\label{def.perm.sign}Let $n\in\mathbb{N}$. The \textbf{sign} of a permutation
$\sigma\in S_{n}$ is defined to be the integer $\left(  -1\right)
^{\ell\left(  \sigma\right)  }$.

We denote it by $\left(  -1\right)  ^{\sigma}$. (Other common notations for it
are $\operatorname*{sgn}\left(  \sigma\right)  $ or $\operatorname*{sign}%
\left(  \sigma\right)  $ or $\varepsilon\left(  \sigma\right)  $. It is also
known as the \textbf{signature} of $\sigma$.)
\end{definition}

Thus, the sign $\left(  -1\right)  ^{\sigma}$ of a permutation $\sigma\in
S_{n}$ is $1$ if its Coxeter length $\ell\left(  \sigma\right)  $ is even, and
$-1$ if $\ell\left(  \sigma\right)  $ is odd. Thus, many properties of signs
follow easily from properties of Coxeter lengths. Here is a collection of
basic properties of signs:

\begin{proposition}
\label{prop.perm.sign.props}Let $n\in\mathbb{N}$.

\textbf{(a)} The sign of the permutation $\operatorname*{id}\in S_{n}$ is
$\left(  -1\right)  ^{\operatorname*{id}}=1$.

\textbf{(b)} For any two distinct elements $i$ and $j$ of $\left[  n\right]
$, the transposition $t_{i,j}\in S_{n}$ has sign $\left(  -1\right)
^{t_{i,j}}=-1$.

\textbf{(c)} For any positive integer $k$ and any distinct elements
$i_{1},i_{2},\ldots,i_{k}\in\left[  n\right]  $, the $k$-cycle
$\operatorname*{cyc}\nolimits_{i_{1},i_{2},\ldots,i_{k}}$ has sign $\left(
-1\right)  ^{\operatorname*{cyc}\nolimits_{i_{1},i_{2},\ldots,i_{k}}}=\left(
-1\right)  ^{k-1}$.

\textbf{(d)} We have $\left(  -1\right)  ^{\alpha\beta}=\left(  -1\right)
^{\alpha}\cdot\left(  -1\right)  ^{\beta}$ for any $\alpha\in S_{n}$ and
$\beta\in S_{n}$.

\textbf{(e)} We have $\left(  -1\right)  ^{\sigma_{1}\sigma_{2}\cdots
\sigma_{p}}=\left(  -1\right)  ^{\sigma_{1}}\left(  -1\right)  ^{\sigma_{2}%
}\cdots\left(  -1\right)  ^{\sigma_{p}}$ for any $\sigma_{1},\sigma_{2}%
,\ldots,\sigma_{p}\in S_{n}$.

\textbf{(f)} We have $\left(  -1\right)  ^{\sigma^{-1}}=\left(  -1\right)
^{\sigma}$ for any $\sigma\in S_{n}$. (The left hand side here has to be
understood as $\left(  -1\right)  ^{\left(  \sigma^{-1}\right)  }$.)

\textbf{(g)} We have%
\[
\left(  -1\right)  ^{\sigma}=\prod_{1\leq i<j\leq n}\dfrac{\sigma\left(
i\right)  -\sigma\left(  j\right)  }{i-j}\ \ \ \ \ \ \ \ \ \ \text{for each
}\sigma\in S_{n}.
\]
(The product sign \textquotedblleft$\prod_{1\leq i<j\leq n}$\textquotedblright%
\ means a product over all pairs $\left(  i,j\right)  $ of integers satisfying
$1\leq i<j\leq n$. There are $\dbinom{n}{2}$ such pairs.)

\textbf{(h)} If $x_{1},x_{2},\ldots,x_{n}$ are any numbers, and if $\sigma\in
S_{n}$, then%
\[
\prod_{1\leq i<j\leq n}\left(  x_{\sigma\left(  i\right)  }-x_{\sigma\left(
j\right)  }\right)  =\left(  -1\right)  ^{\sigma}\prod_{1\leq i<j\leq
n}\left(  x_{i}-x_{j}\right)  .
\]


\textbf{(i)} If $\sigma\in S_{n}$ is a permutation with exactly $k$ orbits,
then $\left(  -1\right)  ^{\sigma}=\left(  -1\right)  ^{n-k}$.
\end{proposition}

\begin{fineprint}
\begin{proof}
[Proof sketch.]\textbf{(a)} This is \cite[Proposition 5.15 \textbf{(a)}%
]{detnotes}, and follows easily from $\ell\left(  \operatorname*{id}\right)
=0$.

\textbf{(d)} This is \cite[Proposition 5.15 \textbf{(c)}]{detnotes}, and
follows easily from Proposition \ref{prop.perm.len.abn} \textbf{(b)}. A
different proof appears in \cite[Proposition B.13]{Strick13}.

\textbf{(e)} This is \cite[Proposition 5.28]{detnotes}, and follows by
induction from Proposition \ref{prop.perm.sign.props} \textbf{(d)}.

\textbf{(f)} This is \cite[Proposition 5.15 \textbf{(d)}]{detnotes}, and
follows easily from Proposition \ref{prop.perm.sign.props} \textbf{(d)} or
from Proposition \ref{prop.perm.len.inv}.

\textbf{(h)} This is \cite[Exercise 5.13 \textbf{(a)}]{detnotes}. The proof is
fairly easy: Each factor $x_{\sigma\left(  i\right)  }-x_{\sigma\left(
j\right)  }$ on the left hand side appears also on the right hand side, albeit
with a different sign if $\left(  i,j\right)  $ is an inversion of $\sigma$.
Thus, the products on both sides agree up to a sign, which is precisely
$\left(  -1\right)  ^{\ell\left(  \sigma\right)  }=\left(  -1\right)
^{\sigma}$.

\textbf{(g)} This is \cite[Exercise 5.13 \textbf{(c)}]{detnotes}, and is a
particular case of Proposition \ref{prop.perm.sign.props} \textbf{(h)}.

\textbf{(b)} This is \cite[Exercise 5.10 \textbf{(b)}]{detnotes}, but can also
be proved rather directly: Let $i$ and $j$ be two distinct elements of
$\left[  n\right]  $. Assume WLOG that $i<j$ (else, swap $i$ with $j$). Then,
the inversions of the transposition $t_{i,j}$ are the pairs $\left(
i,k\right)  $ for all $k\in\left\{  i+1,i+2,\ldots,j-1\right\}  $, as well as
the pairs $\left(  k,j\right)  $ for all $k\in\left\{  i+1,i+2,\ldots
,j-1\right\}  $, as well as the pair $\left(  i,j\right)  $. The total \# of
these inversions is therefore $2\left(  j-i-1\right)  +1$. In other words,
$\ell\left(  t_{i,j}\right)  =2\left(  j-i-1\right)  +1$. Hence, $\left(
-1\right)  ^{t_{i,j}}=\left(  -1\right)  ^{\ell\left(  t_{i,j}\right)
}=\left(  -1\right)  ^{2\left(  j-i-1\right)  +1}=-1$.

\textbf{(c)} This is \cite[Exercise 5.17 \textbf{(d)}]{detnotes}, and follows
easily from Proposition \ref{prop.perm.sign.props} \textbf{(e)} and from the
fact that%
\[
\operatorname*{cyc}\nolimits_{i_{1},i_{2},\ldots,i_{k}}=t_{i_{1},i_{2}}\circ
t_{i_{2},i_{3}}\circ\cdots\circ t_{i_{k-1},i_{k}}%
\]
(check this!).

\textbf{(i)} This is \cite[Proposition 5.5.7]{21s} (since $\sigma$ has $k$
orbits if and only if $\sigma$ has $k$ cycles in its DCD). Alternatively, this
follows easily from Proposition \ref{prop.perm.sign.props} \textbf{(e)}
combined with Theorem \ref{thm.perm.transp-orbits} \textbf{(b)} (just keep in
mind that our $k$ here is not the $k$ from Theorem
\ref{thm.perm.transp-orbits} \textbf{(b)}).
\end{proof}
\end{fineprint}

Using the signs, the permutations of $\left[  n\right]  $ can be classified
into \textquotedblleft even\textquotedblright\ and \textquotedblleft
odd\textquotedblright\ ones:

\begin{definition}
\label{def.perm.even-odd}Let $n\in\mathbb{N}$. A permutation $\sigma\in S_{n}$
is said to be

\begin{itemize}
\item \textbf{even} if $\left(  -1\right)  ^{\sigma}=1$ (that is, if
$\ell\left(  \sigma\right)  $ is even);

\item \textbf{odd} if $\left(  -1\right)  ^{\sigma}=-1$ (that is, if
$\ell\left(  \sigma\right)  $ is odd).
\end{itemize}
\end{definition}

We note that the even and the odd permutations of $\left[  n\right]  $ are
equinumerous when $n\geq2$:

\begin{corollary}
\label{cor.perm.num-even}Let $n\geq2$. Then,%
\[
\left(  \text{\# of even permutations }\sigma\in S_{n}\right)  =\left(
\text{\# of odd permutations }\sigma\in S_{n}\right)  =n!/2.
\]

\end{corollary}

\begin{fineprint}
\begin{proof}
[Proof idea.](See \cite[Exercise 5.4]{detnotes} for details.) Argue that the
map%
\begin{align*}
\left\{  \text{even permutations }\sigma\in S_{n}\right\}   &  \rightarrow
\left\{  \text{odd permutations }\sigma\in S_{n}\right\}  ,\\
\sigma &  \mapsto\sigma s_{1}%
\end{align*}
(this is the map that swaps the first two entries in the OLN of a permutation)
is a bijection.
\end{proof}
\end{fineprint}

\bigskip

The sign and the \textquotedblleft parity\textquotedblright\ (i.e.,
evenness/oddness) of a permutation have applications all around mathematics.
Most prominently, the \textbf{determinant} $\det A$ of an $n\times n$-matrix%
\[
A=\left(
\begin{array}
[c]{cccc}%
a_{1,1} & a_{1,2} & \cdots & a_{1,n}\\
a_{2,1} & a_{2,2} & \cdots & a_{2,n}\\
\vdots & \vdots & \ddots & \vdots\\
a_{n,1} & a_{n,2} & \cdots & a_{n,n}%
\end{array}
\right)
\]
is defined as follows:%
\[
\det A:=\sum_{\sigma\in S_{n}}\left(  -1\right)  ^{\sigma}a_{1,\sigma\left(
1\right)  }a_{2,\sigma\left(  2\right)  }\cdots a_{n,\sigma\left(  n\right)
}.
\]
Note how the sign $\left(  -1\right)  ^{\sigma}$ appears in this sum, making
some of its addends positive and some negative. The sign of a permutation also
appears as a useful invariant in the analysis of \textbf{permutation puzzles}
(such as Rubik's cube and the $15$-game; see \cite[Chapters 7--8 and Theorem
20.2.1]{Mulhol21} for example).

\subsection{Descents and Eulerian numbers}

\begin{fineprint}
Imagine you are drawing the \textquotedblleft naive\textquotedblright\ plot of
a permutation $\sigma\in S_{n}$ by marking the points $\left(  1,\sigma\left(
1\right)  \right)  $, $\left(  2,\sigma\left(  2\right)  \right)  $, $\ldots$,
$\left(  n,\sigma\left(  n\right)  \right)  $ on the Cartesian plane and
connecting them with line segments. For instance, if $\sigma$ is the
permutation $S_{6}$ whose OLN is $314562$, then this plot looks as follows:
\begin{equation}%
%TCIMACRO{\TeXButton{tikz naive plot of sigma}{\begin{tikzpicture}
%\clip(-0.3, -0.3) rectangle (7.5, 7.5);
%\draw[very thin,color=gray] (0, 0) grid (7, 7);
%\draw[->] (0,0) -- (7,0) node[right] {$x$};
%\draw[->] (0,0) -- (0,7) node[above] {$y$};
%\draw
%[very thick, color=blue] (1, 3) -- (2, 1) -- (3, 4) -- (4, 5) -- (5, 6) -- (6, 2);
%\filldraw[blue] (1, 3) circle (0.1);
%\filldraw[blue] (2, 1) circle (0.1);
%\filldraw[blue] (3, 4) circle (0.1);
%\filldraw[blue] (4, 5) circle (0.1);
%\filldraw[blue] (5, 6) circle (0.1);
%\filldraw[blue] (6, 2) circle (0.1);
%\end{tikzpicture}}}%
%BeginExpansion
\begin{tikzpicture}
\clip(-0.3, -0.3) rectangle (7.5, 7.5);
\draw[very thin,color=gray] (0, 0) grid (7, 7);
\draw[->] (0,0) -- (7,0) node[right] {$x$};
\draw[->] (0,0) -- (0,7) node[above] {$y$};
\draw
[very thick, color=blue] (1, 3) -- (2, 1) -- (3, 4) -- (4, 5) -- (5, 6) -- (6, 2);
\filldraw[blue] (1, 3) circle (0.1);
\filldraw[blue] (2, 1) circle (0.1);
\filldraw[blue] (3, 4) circle (0.1);
\filldraw[blue] (4, 5) circle (0.1);
\filldraw[blue] (5, 6) circle (0.1);
\filldraw[blue] (6, 2) circle (0.1);
\end{tikzpicture}%
%EndExpansion
\label{eq.perm.descent.plot}%
\end{equation}
(where both axes start at $0$ and end at $7$). This kind of plot can hardly be
called combinatorially meaningful (after all, $\sigma$ is just a map on a
finite set, and it makes no combinatorial sense to \textquotedblleft connect
the dots\textquotedblright\ with line segments), but it serves a good purpose
in making some properties of $\sigma$ clear. In particular, we see that our
map $\sigma$ decreases on the interval $\left[  1,2\right]  $, then increases
on $\left[  2,5\right]  $, then decreases again on $\left[  5,6\right]  $.
This kind of increasing-decreasing behavior is typically subsumed under the
notion of \textquotedblleft descents\textquotedblright:

\begin{definition}
Let $n\in\mathbb{N}$. Let $\sigma\in S_{n}$ be a permutation. Then, a
\textbf{descent} of $\sigma$ means an $i\in\left[  n-1\right]  $ such that
$\sigma\left(  i\right)  >\sigma\left(  i+1\right)  $.
\end{definition}

For example, the permutation $\sigma\in S_{6}$ that we have \textquotedblleft
plotted\textquotedblright\ in (\ref{eq.perm.descent.plot}) has descents $1$
(since $\sigma\left(  1\right)  >\sigma\left(  2\right)  $) and $5$ (since
$\sigma\left(  5\right)  >\sigma\left(  6\right)  $).

We can restate the definition of a descent as follows: A \textbf{descent} of a
permutation $\sigma\in S_{n}$ is an $i\in\left[  n-1\right]  $ such that
$\left(  i,i+1\right)  $ is an inversion of $\sigma$. Thus, descents can be
viewed as special kinds of inversions (up to the fact that a descent is not a pair).

Just as we defined descents, we can define \textquotedblleft
ascents\textquotedblright: An \textbf{ascent} of a permutation $\sigma\in
S_{n}$ means an $i\in\left[  n-1\right]  $ such that $\sigma\left(  i\right)
<\sigma\left(  i+1\right)  $. Of course, the ascents of $\sigma$ are just the
elements of $\left[  n-1\right]  $ that are not descents of $\sigma$ (since
the injectivity of $\sigma$ rules out the \textquotedblleft third
option\textquotedblright\ $\sigma\left(  i\right)  =\sigma\left(  i+1\right)
$). Thus, studying descents is equivalent to studying ascents.

\begin{definition}
Let $n\in\mathbb{N}$. Let $\sigma\in S_{n}$ be a permutation. Then, the
\textbf{descent set} of $\sigma$ is defined to be the set of all descents of
$\sigma$. It is denoted by $\operatorname*{Des}\sigma$.
\end{definition}

Thus,
\[
\operatorname*{Des}\sigma=\left\{  i\in\left[  n-1\right]  \ \mid
\ \sigma\left(  i\right)  >\sigma\left(  i+1\right)  \right\}
\]
for each $\sigma\in S_{n}$. For instance, the permutation $\sigma\in S_{6}$
that we have \textquotedblleft plotted\textquotedblright\ in
(\ref{eq.perm.descent.plot}) has descent set $\operatorname*{Des}%
\sigma=\left\{  1,5\right\}  $.

The concepts we have just introduced suggest some counting problems. We begin
with some of the easy ones:

\begin{exercise}
\label{exe.perm.des.counts}Fix an integer $n\geq4$.

\textbf{(a)} How many permutations $\sigma\in S_{n}$ satisfy $1\in
\operatorname*{Des}\sigma$ (that is, $\sigma\left(  1\right)  >\sigma\left(
2\right)  $) ?

\textbf{(b)} How many permutations $\sigma\in S_{n}$ satisfy $1,2\in
\operatorname*{Des}\sigma$ (that is, $\sigma\left(  1\right)  >\sigma\left(
2\right)  >\sigma\left(  3\right)  $) ?

\textbf{(c)} How many permutations $\sigma\in S_{n}$ satisfy $1,3\in
\operatorname*{Des}\sigma$ (that is, $\sigma\left(  1\right)  >\sigma\left(
2\right)  $ and $\sigma\left(  3\right)  >\sigma\left(  4\right)  $) ?
\end{exercise}

\begin{proof}
[Hints.]Here are the rough ideas (see \cite[\S 0.2]{18s-mt1s} for the details).

\textbf{(a)} The answer is $\dfrac{n!}{2}$. Indeed, the \# of permutations
$\sigma\in S_{n}$ satisfying $\sigma\left(  1\right)  >\sigma\left(  2\right)
$ equals the \# of permutations $\sigma\in S_{n}$ satisfying $\sigma\left(
1\right)  <\sigma\left(  2\right)  $, since there is a bijection from the
former permutations to the latter (given by swapping the first two values of
$\sigma$, or, equivalently, by sending $\sigma$ to $\sigma\circ t_{1,2}$). But
the two \#s clearly add up to $n!$, so they both must be $\dfrac{n!}{2}$.

\textbf{(b)} The answer is $\dfrac{n!}{6}$. Indeed, there are $6$ ways in
which the first three values $\sigma\left(  1\right)  ,\sigma\left(  2\right)
,\sigma\left(  3\right)  $ of a permutation $\sigma\in S_{n}$ can be
relatively ordered (namely, $\sigma\left(  1\right)  <\sigma\left(  2\right)
<\sigma\left(  3\right)  $ and $\sigma\left(  1\right)  <\sigma\left(
3\right)  <\sigma\left(  2\right)  $ and $\sigma\left(  2\right)
<\sigma\left(  1\right)  <\sigma\left(  3\right)  $ and $\sigma\left(
2\right)  <\sigma\left(  3\right)  <\sigma\left(  1\right)  $ and
$\sigma\left(  3\right)  <\sigma\left(  1\right)  <\sigma\left(  2\right)  $
and $\sigma\left(  3\right)  <\sigma\left(  2\right)  <\sigma\left(  1\right)
$), and they are all equally likely (since there are bijections going between
the corresponding permutations $\sigma$), so each of them appears exactly
$\dfrac{n!}{6}$ times.

\textbf{(c)} The answer is $\dfrac{n!}{4}$. Indeed, there are $4$ ways in
which the two inequality signs in \textquotedblleft$\sigma\left(  1\right)
\lessgtr\sigma\left(  2\right)  $\textquotedblright\ and \textquotedblleft%
$\sigma\left(  3\right)  \lessgtr\sigma\left(  4\right)  $\textquotedblright%
\ may point, and they are all equally likely again.
\end{proof}

Here is a subtler counting problem: How many permutations $\sigma\in S_{n}$
have a given \# of descents? The answer to this problem has a name:

\begin{definition}
Let $n\in\mathbb{N}$ and $k\in\mathbb{Z}$. Then, the \textbf{Eulerian number}
$%
%TCIMACRO{\QDATOPD{\langle}{\rangle}{n}{k}}%
%BeginExpansion
\genfrac{\langle}{\rangle}{0pt}{0}{n}{k}%
%EndExpansion
$ is defined to be the \# of all permutations $\sigma\in S_{n}$ that have
exactly $k$ descents (i.e., that satisfy $\left\vert \operatorname*{Des}%
\sigma\right\vert =k$).
\end{definition}

\begin{example}
We have $%
%TCIMACRO{\QDATOPD{\langle}{\rangle}{4}{2}}%
%BeginExpansion
\genfrac{\langle}{\rangle}{0pt}{0}{4}{2}%
%EndExpansion
=11$, since there are exactly $11$ permutations $\sigma\in S_{4}$ that have
exactly $2$ descents. Indeed, these $11$ permutations are (written in OLN)%
\begin{align*}
&
1432,\ \ \ \ \ \ \ \ \ \ 2143,\ \ \ \ \ \ \ \ \ \ 2431,\ \ \ \ \ \ \ \ \ \ 3142,\ \ \ \ \ \ \ \ \ \ 3214,\ \ \ \ \ \ \ \ \ \ 3241,\\
&
3421,\ \ \ \ \ \ \ \ \ \ 4132,\ \ \ \ \ \ \ \ \ \ 4231,\ \ \ \ \ \ \ \ \ \ 4213,\ \ \ \ \ \ \ \ \ \ 4312.
\end{align*}

\end{example}

Here is a table of some Eulerian numbers:%
\[%
\begin{tabular}
[c]{|c||c|c|c|c|c|c|c|c|}\hline
$%
%TCIMACRO{\QDATOPD{\langle}{\rangle}{n}{k}}%
%BeginExpansion
\genfrac{\langle}{\rangle}{0pt}{0}{n}{k}%
%EndExpansion
$ & $n=0$ & $n=1$ & $n=2$ & $n=3$ & $n=4$ & $n=5$ & $n=6$ & $n=7$%
\\\hline\hline
$k=0$ & $1$ & $1$ & $1$ & $1$ & $1$ & $1$ & $1$ & $1$\\\hline
$k=1$ & $0$ & $0$ & $1$ & $4$ & $11$ & $26$ & $57$ & $120$\\\hline
$k=2$ & $0$ & $0$ & $0$ & $1$ & $11$ & $66$ & $302$ & $1191$\\\hline
$k=3$ & $0$ & $0$ & $0$ & $0$ & $1$ & $26$ & $302$ & $2416$\\\hline
$k=4$ & $0$ & $0$ & $0$ & $0$ & $0$ & $1$ & $57$ & $1191$\\\hline
$k=5$ & $0$ & $0$ & $0$ & $0$ & $0$ & $0$ & $1$ & $120$\\\hline
$k=6$ & $0$ & $0$ & $0$ & $0$ & $0$ & $0$ & $0$ & $1$\\\hline
$k=7$ & $0$ & $0$ & $0$ & $0$ & $0$ & $0$ & $0$ & $0$\\\hline
\end{tabular}
\ \ \
\]
(see \href{https://en.wikipedia.org/wiki/Eulerian_number}{the Wikipedia page}
for more). Here are some basic properties:

\begin{proposition}
\label{prop.perm.eulerian.easy}\textbf{(a)} We have $%
%TCIMACRO{\QDATOPD{\langle}{\rangle}{n}{k}}%
%BeginExpansion
\genfrac{\langle}{\rangle}{0pt}{0}{n}{k}%
%EndExpansion
=0$ for any $n,k\in\mathbb{N}$ satisfying $k\geq n$ and $k>0$.

\textbf{(b)} We have $%
%TCIMACRO{\QDATOPD{\langle}{\rangle}{n}{0}}%
%BeginExpansion
\genfrac{\langle}{\rangle}{0pt}{0}{n}{0}%
%EndExpansion
=1$ for any $n\in\mathbb{N}$.

\textbf{(c)} We have $%
%TCIMACRO{\QDATOPD{\langle}{\rangle}{n}{n-1}}%
%BeginExpansion
\genfrac{\langle}{\rangle}{0pt}{0}{n}{n-1}%
%EndExpansion
=1$ for any $n>0$.

\textbf{(d)} We have $%
%TCIMACRO{\QDATOPD{\langle}{\rangle}{n}{k}}%
%BeginExpansion
\genfrac{\langle}{\rangle}{0pt}{0}{n}{k}%
%EndExpansion
=%
%TCIMACRO{\QDATOPD{\langle}{\rangle}{n}{n-1-k}}%
%BeginExpansion
\genfrac{\langle}{\rangle}{0pt}{0}{n}{n-1-k}%
%EndExpansion
$ for any integer $n>0$ and any $k\in\mathbb{Z}$.

\textbf{(e)} We have $%
%TCIMACRO{\QDATOPD{\langle}{\rangle}{n}{1}}%
%BeginExpansion
\genfrac{\langle}{\rangle}{0pt}{0}{n}{1}%
%EndExpansion
=2^{n}-\left(  n+1\right)  $ for any $n>0$.

\textbf{(f)} We have $%
%TCIMACRO{\QDATOPD{\langle}{\rangle}{n}{k}}%
%BeginExpansion
\genfrac{\langle}{\rangle}{0pt}{0}{n}{k}%
%EndExpansion
=0$ for any $n\in\mathbb{N}$ and any negative $k\in\mathbb{Z}$.
\end{proposition}

\begin{proof}
[Proof idea.]\textbf{(a)} A permutation $\sigma\in S_{n}$ cannot have more
than $n-1$ descents unless $n=0$ (since $\operatorname*{Des}\sigma
\subseteq\left[  n-1\right]  $). Thus, part \textbf{(a)} follows. \medskip

\textbf{(f)} This is even more obvious than part \textbf{(a)}. \medskip

\textbf{(b)} A permutation $\sigma\in S_{n}$ that has $0$ descents must
satisfy $\sigma\left(  1\right)  \leq\sigma\left(  2\right)  \leq\cdots
\leq\sigma\left(  n\right)  $ and therefore $\sigma=\operatorname*{id}$
(why?\footnote{See \cite[Exercise 5.2 \textbf{(d)}]{detnotes} for a detailed
proof.}). Thus, there is exactly $1$ such permutation $\sigma$. Hence, $%
%TCIMACRO{\QDATOPD{\langle}{\rangle}{n}{0}}%
%BeginExpansion
\genfrac{\langle}{\rangle}{0pt}{0}{n}{0}%
%EndExpansion
=1$. \medskip

\textbf{(d)} (See \cite[Exercise 3]{18f-hw4s} for details.) Let $n>0$ and
$k\in\mathbb{Z}$. Let $w_{0}$ be the permutation in $S_{n}$ that sends each
$i\in\left[  n\right]  $ to $n+1-i$. In other words, $w_{0}$ is the
permutation in $S_{n}$ whose OLN is $\left(  n,n-1,n-2,\ldots,2,1\right)  $.
Then, it is easy to see that the descents of a permutation $\sigma\in S_{n}$
are precisely the ascents of the permutation $w_{0}\circ\sigma$ (since
$\sigma\left(  i\right)  >\sigma\left(  i+1\right)  $ is equivalent to
$\left(  w_{0}\circ\sigma\right)  \left(  i\right)  <\left(  w_{0}\circ
\sigma\right)  \left(  i+1\right)  $). Hence, a permutation $\sigma\in S_{n}$
has $k$ descents if and only if the permutation $w_{0}\circ\sigma$ has $k$
ascents, i.e., has $n-1-k$ descents. Thus, we obtain a map%
\begin{align*}
&  \text{from }\left\{  \text{permutations }\sigma\in S_{n}\text{ that have
}k\text{ descents}\right\} \\
&  \text{to }\left\{  \text{permutations }\sigma\in S_{n}\text{ that have
}n-1-k\text{ descents}\right\}  ,
\end{align*}
which sends each $\sigma$ to $w_{0}\circ\sigma$. This map is a bijection
(why?). The bijection principle thus yields%
\begin{align*}
&  \left(  \text{\# of all permutations }\sigma\in S_{n}\text{ that have
}k\text{ descents}\right) \\
&  =\left(  \text{\# of all permutations }\sigma\in S_{n}\text{ that have
}n-1-k\text{ descents}\right)  .
\end{align*}
In other words, $%
%TCIMACRO{\QDATOPD{\langle}{\rangle}{n}{k}}%
%BeginExpansion
\genfrac{\langle}{\rangle}{0pt}{0}{n}{k}%
%EndExpansion
=%
%TCIMACRO{\QDATOPD{\langle}{\rangle}{n}{n-1-k}}%
%BeginExpansion
\genfrac{\langle}{\rangle}{0pt}{0}{n}{n-1-k}%
%EndExpansion
$. This proves Proposition \ref{prop.perm.eulerian.easy} \textbf{(d)}.
\medskip

\textbf{(c)} Let $n>0$. Then, Proposition \ref{prop.perm.eulerian.easy}
\textbf{(d)} yields $%
%TCIMACRO{\QDATOPD{\langle}{\rangle}{n}{n-1}}%
%BeginExpansion
\genfrac{\langle}{\rangle}{0pt}{0}{n}{n-1}%
%EndExpansion
=%
%TCIMACRO{\QDATOPD{\langle}{\rangle}{n}{n-1-\left(  n-1\right)  }}%
%BeginExpansion
\genfrac{\langle}{\rangle}{0pt}{0}{n}{n-1-\left(  n-1\right)  }%
%EndExpansion
=%
%TCIMACRO{\QDATOPD{\langle}{\rangle}{n}{0}}%
%BeginExpansion
\genfrac{\langle}{\rangle}{0pt}{0}{n}{0}%
%EndExpansion
=1$ (by Proposition \ref{prop.perm.eulerian.easy} \textbf{(b)}). \medskip

\textbf{(e)} Let $n>0$. Then, the definition of $%
%TCIMACRO{\QDATOPD{\langle}{\rangle}{n}{1}}%
%BeginExpansion
\genfrac{\langle}{\rangle}{0pt}{0}{n}{1}%
%EndExpansion
$ yields%
\begin{align*}%
%TCIMACRO{\QDATOPD{\langle}{\rangle}{n}{1} }%
%BeginExpansion
\genfrac{\langle}{\rangle}{0pt}{0}{n}{1}
%EndExpansion
&  =\left(  \text{\# of all permutations }\sigma\in S_{n}\text{ having exactly
}1\text{ descent}\right) \\
&  =\sum_{i=1}^{n-1}\left(  \text{\# of all permutations }\sigma\in
S_{n}\text{ with }\operatorname*{Des}\sigma=\left\{  i\right\}  \right)
\end{align*}
(by the sum rule). Now, let us compute the addends on the right hand side.

Indeed, let $i\in\left[  n-1\right]  $. How does a permutation $\sigma\in
S_{n}$ with $\operatorname*{Des}\sigma=\left\{  i\right\}  $ look like? Such a
permutation $\sigma$ must satisfy the chain of inequalities%
\[
\sigma\left(  1\right)  <\sigma\left(  2\right)  <\cdots<\sigma\left(
i\right)  >\sigma\left(  i+1\right)  <\sigma\left(  i+2\right)  <\cdots
<\sigma\left(  n\right)
\]
(all inequality signs in this chain are $<$ except for the sign between
$\sigma\left(  i\right)  $ and $\sigma\left(  i+1\right)  $). This chain of
inequalities is moreover necessary and sufficient for $\operatorname*{Des}%
\sigma=\left\{  i\right\}  $.

Now, how many permutations $\sigma\in S_{n}$ satisfy this chain of
inequalities? Let us first ignore the $>$ sign between $\sigma\left(
i\right)  $ and $\sigma\left(  i+1\right)  $. This breaks our chain into two
chains $\sigma\left(  1\right)  <\sigma\left(  2\right)  <\cdots<\sigma\left(
i\right)  $ and $\sigma\left(  i+1\right)  <\sigma\left(  i+2\right)
<\cdots<\sigma\left(  n\right)  $. The \# of all permutations $\sigma\in
S_{n}$ satisfying both $\sigma\left(  1\right)  <\sigma\left(  2\right)
<\cdots<\sigma\left(  i\right)  $ and $\sigma\left(  i+1\right)
<\sigma\left(  i+2\right)  <\cdots<\sigma\left(  n\right)  $ is $\dbinom{n}%
{i}$\ \ \ \ \footnote{\textit{Proof.} Any such permutation $\sigma$ can be
uniquely constructed by the following procedure:
\par
\begin{enumerate}
\item Choose the $i$-element subset $\left\{  \sigma\left(  1\right)
,\sigma\left(  2\right)  ,\ldots,\sigma\left(  i\right)  \right\}  $ of
$\left[  n\right]  $. (There are $\dbinom{n}{i}$ options for this subset.)
\par
\item Let $\sigma\left(  1\right)  ,\sigma\left(  2\right)  ,\ldots
,\sigma\left(  i\right)  $ be the $i$ elements of this subset in increasing
order.
\par
\item Let $\sigma\left(  i+1\right)  ,\sigma\left(  i+2\right)  ,\ldots
,\sigma\left(  n\right)  $ be the $n-i$ elements of $\left[  n\right]  $ that
don't belong to this subset (again listed in increasing order).
\end{enumerate}
}. Only one of these $\dbinom{n}{i}$ permutations satisfies $\sigma\left(
i\right)  \leq\sigma\left(  i+1\right)  $ (namely, the identity permutation
$\operatorname*{id}$). Hence, the remaining $\dbinom{n}{i}-1$ permutations
satisfy $\sigma\left(  i\right)  >\sigma\left(  i+1\right)  $ and therefore%
\[
\sigma\left(  1\right)  <\sigma\left(  2\right)  <\cdots<\sigma\left(
i\right)  >\sigma\left(  i+1\right)  <\sigma\left(  i+2\right)  <\cdots
<\sigma\left(  n\right)  .
\]
Hence,%
\begin{align*}
&  \left(  \text{\# of all permutations }\sigma\in S_{n}\text{ satisfying the
chain of}\right. \\
&  \ \ \ \ \ \ \ \ \ \ \left.  \text{inequalities }\sigma\left(  1\right)
<\sigma\left(  2\right)  <\cdots<\sigma\left(  i\right)  >\sigma\left(
i+1\right)  <\sigma\left(  i+2\right)  <\cdots<\sigma\left(  n\right)  \right)
\\
&  =\dbinom{n}{i}-1.
\end{align*}
In other words,%
\begin{align}
&  \left(  \text{\# of all permutations }\sigma\in S_{n}\text{ with
}\operatorname*{Des}\sigma=\left\{  i\right\}  \right) \nonumber\\
&  =\dbinom{n}{i}-1 \label{eq.prop.perm.eulerian.easy.4}%
\end{align}
(since we have previously observed that the chain of inequalities
$\sigma\left(  1\right)  <\sigma\left(  2\right)  <\cdots<\sigma\left(
i\right)  >\sigma\left(  i+1\right)  <\sigma\left(  i+2\right)  <\cdots
<\sigma\left(  n\right)  $ is necessary and sufficient for
$\operatorname*{Des}\sigma=\left\{  i\right\}  $).

Forget that we fixed $i$. We thus have proved
(\ref{eq.prop.perm.eulerian.easy.4}) for each $i\in\left[  n-1\right]  $. Now,
as we know,
\begin{align*}%
%TCIMACRO{\QDATOPD{\langle}{\rangle}{n}{1} }%
%BeginExpansion
\genfrac{\langle}{\rangle}{0pt}{0}{n}{1}
%EndExpansion
&  =\sum_{i=1}^{n-1}\underbrace{\left(  \text{\# of all permutations }%
\sigma\in S_{n}\text{ with }\operatorname*{Des}\sigma=\left\{  i\right\}
\right)  }_{\substack{=\dbinom{n}{i}-1\\\text{(by
(\ref{eq.prop.perm.eulerian.easy.4}))}}}\\
&  =\sum_{i=1}^{n-1}\left(  \dbinom{n}{i}-1\right)  =\underbrace{\sum
_{i=1}^{n-1}\dbinom{n}{i}}_{=\sum_{i=0}^{n}\dbinom{n}{i}-\dbinom{n}{0}%
-\dbinom{n}{n}}-\left(  n-1\right) \\
&  =\underbrace{\sum_{i=0}^{n}\dbinom{n}{i}}_{\substack{=2^{n}\\\text{(by
Corollary 1.3.32}\\\text{in Lecture 7)}}}-\underbrace{\dbinom{n}{0}}%
_{=1}-\underbrace{\dbinom{n}{n}}_{=1}-\left(  n-1\right)  =2^{n}-1-1-\left(
n-1\right) \\
&  =2^{n}-\left(  n+1\right)  .
\end{align*}
This proves Proposition \ref{prop.perm.eulerian.easy} \textbf{(e)}.
\end{proof}

The Eulerian numbers also satisfy a recursion:

\begin{proposition}
\label{prop.perm.eulerian.rec}For any positive integer $n$ and any integer
$k$, we have%
\[%
%TCIMACRO{\QDATOPD{\langle}{\rangle}{n}{k}}%
%BeginExpansion
\genfrac{\langle}{\rangle}{0pt}{0}{n}{k}%
%EndExpansion
=\left(  k+1\right)
%TCIMACRO{\QDATOPD{\langle}{\rangle}{n-1}{k}}%
%BeginExpansion
\genfrac{\langle}{\rangle}{0pt}{0}{n-1}{k}%
%EndExpansion
+\left(  n-k\right)
%TCIMACRO{\QDATOPD{\langle}{\rangle}{n-1}{k-1}}%
%BeginExpansion
\genfrac{\langle}{\rangle}{0pt}{0}{n-1}{k-1}%
%EndExpansion
.
\]

\end{proposition}

\begin{proof}
[Proof idea.]See \cite[Exercise 1 \textbf{(c)}]{18f-mt2s}. (Ignore the
assumption that $k$ be positive; this assumption is not actually used.)
\end{proof}

More surprisingly, there is an explicit formula for the Eulerian numbers:

\begin{theorem}
\label{thm.perm.eulerian.sum}Let $n\in\mathbb{N}$ and $k\in\mathbb{N}$. Then,%
\[%
%TCIMACRO{\QDATOPD{\langle}{\rangle}{n}{k}}%
%BeginExpansion
\genfrac{\langle}{\rangle}{0pt}{0}{n}{k}%
%EndExpansion
=\sum_{i=0}^{k}\left(  -1\right)  ^{i}\dbinom{n+1}{i}\left(  k+1-i\right)
^{n}.
\]

\end{theorem}

\begin{proof}
[Proof sketch.](The below argument is taken from \cite[proof of Theorem
1.11]{Bona22}; it is due to Hugh Thomas and Richard Stanley.)

A $k$\textbf{-barper} (this is short for \textquotedblleft$k$-barred
permutation\textquotedblright) shall mean an $n$-tuple containing each of the
numbers $1,2,\ldots,n$ exactly once (i.e., the one-line notation of some
$\sigma\in S_{n}$), with (altogether) $k$ \textbf{bars} placed between some of
its entries (or at the very start, or at the very end). The bars subdivide the
$n$-tuple into $k+1$ (possibly empty) \textbf{compartments}, each of which
consists of the entries between two consecutive bars (or between the beginning
of the $n$-tuple and the very first bar, or between the very last bar and the
end of the $n$-tuple).

For example, for $n=8$, here are some examples of $5$-barpers:%
\begin{align*}
\beta_{1}  &  =5\mid1\ 3\mid8\mid\ \mid2\ 4\ 6\mid7;\\
\beta_{2}  &  =5\mid1\ 3\ 8\mid2\ 4\ \mid\ \mid\ \mid\ 6\ 7;\\
\beta_{3}  &  =5\mid1\ 8\ 3\mid2\ 4\ \mid\ \mid\ 6\ 7\ \mid;\\
\beta_{4}  &  =\ \mid\ \mid5\mid1\ 3\ 8\mid2\ 4\ 6\ 7\ \mid;\\
\beta_{5}  &  =5\ 1\mid3\ 8\ 2\ \mid\ \mid4\mid6\mid7
\end{align*}
(we are omitting the commas between the entries of the tuples, and the
parentheses around the tuples). We note that several bars can be placed
between two consecutive entries (or at the start, or at the end). The six
compartments of $\beta_{2}$ are $\left(  5\right)  $, $\left(  1,3,8\right)
$, $\left(  2,4\right)  $, $\left(  {}\right)  $, $\left(  {}\right)  $ and
$\left(  6,7\right)  $.

A compartment of a $k$-barper is said to be \textbf{good} if its entries are
in increasing order. In the above example, the second compartment of
$\beta_{3}$ is not good (since its entries $1\ 8\ 3$ are not in increasing
order), and the first two compartments of $\beta_{5}$ are not good (since
$5>1$ and $8>2$), but all other compartments are good.

A $k$-barper is said to be \textbf{good} if all its compartments are good. In
the above example, the $k$-barpers $\beta_{1},\beta_{2},\beta_{4}$ are good,
whereas $\beta_{3}$ and $\beta_{5}$ are not.

We observe that%
\begin{equation}
\left(  \text{\# of good }k\text{-barpers}\right)  =\left(  k+1\right)  ^{n}.
\label{pf.thm.perm.eulerian.sum.allgood}%
\end{equation}
(Indeed, in order to construct a good $k$-barper, we only need to decide, for
each $i\in\left[  n\right]  $, which of the $k+1$ compartments we want to
place $i$ in. The \textquotedblleft goodness\textquotedblright\ then takes
care of the ordering of the entries in each compartment.)

Some more notations are in order. If $\beta$ is a good $k$-barper, then:

\begin{itemize}
\item A \textbf{wall} of $\beta$ means a bar of $\beta$ that is not
immediately followed by another bar. In other words, a wall of $\beta$ means a
bar of $\beta$ that marks the beginning of a nonempty compartment or has no
walls to its right. For example, in the good $k$-barper $\beta_{2}$ from the
above examples, the first, second and fifth bars are walls, whereas the third
and fourth bars are not. In the good $k$-barper $\beta_{4}$, all bars except
for the first are walls.

\item A \textbf{useless wall} of $\beta$ means a wall of $\beta$ such that
removing this wall yields a good $\left(  k-1\right)  $-barper. In other
words, a useless wall of $\beta$ means a wall of $\beta$ such that each entry
in the compartment just to its left is smaller than each entry in the
compartment just to its right. For example, in the $5$-barper $\beta_{1}%
=5\mid1\ 3\mid8\mid\ \mid2\ 4\ 6\mid7$ from the above examples, the second
wall is useless (since removing it yields $5\mid1\ 3\ 8\mid\ \mid2\ 4\ 6\mid
7$, which is a good $4$-barper), but the first wall is not (since removing it
yields $5\ 1\ 3\mid8\mid\ \mid2\ 4\ 6\mid7$, which is not good). Likewise, the
third wall (= the fourth bar) in $\beta_{1}$ is useless (since removing it
yields $5\mid1\ 3\mid8\mid2\ 4\ 6\mid7$, which is a good $4$-barper), and so
is the fourth wall (= the fifth bar). Note, in particular, that a wall placed
at the very end or the very start of the tuple is automatically useless.
\end{itemize}

Now, we claim that%
\begin{equation}%
%TCIMACRO{\QDATOPD{\langle}{\rangle}{n}{k}}%
%BeginExpansion
\genfrac{\langle}{\rangle}{0pt}{0}{n}{k}%
%EndExpansion
=\left(  \text{\# of good }k\text{-barpers with no useless walls}\right)  .
\label{pf.thm.perm.eulerian.sum.eul=}%
\end{equation}


[\textit{Proof of (\ref{pf.thm.perm.eulerian.sum.eul=}):} If $\sigma\in S_{n}$
is a permutation having exactly $k$ descents, then we can turn the OLN of this
permutation $\sigma$ into a $k$-barper $\beta_{\sigma}$ by putting a bar
\textquotedblleft at each descent of $\sigma$\textquotedblright\ (that is, for
each descent $i$ of $\sigma$, we put a bar between $\sigma\left(  i\right)  $
and $\sigma\left(  i+1\right)  $ in the OLN of $\sigma$). For example, if
$\sigma\in S_{7}$ is the permutation with OLN $4261375$, then the resulting
$k$-barper $\beta_{\sigma}$ will be $4\mid2\ 6\mid1\ 3\ 7\mid5$. Note that the
$k$-barper $\beta_{\sigma}$ is good (since $\sigma\left(  i\right)
<\sigma\left(  i+1\right)  $ whenever $i$ is not a descent of $\sigma$) and
has no useless walls (since $\sigma\left(  i\right)  >\sigma\left(
i+1\right)  $ for each descent $i$ of $\sigma$). Thus, we obtain a map%
\begin{align*}
&  \text{from }\left\{  \text{permutations }\sigma\in S_{n}\text{ having
exactly }k\text{ descents}\right\} \\
&  \text{to }\left\{  \text{good }k\text{-barpers with no useless
walls}\right\}
\end{align*}
which sends each $\sigma$ to $\beta_{\sigma}$. This map is easily seen to be a
bijection, because a good $k$-barper with no useless walls can always be read
as the OLN of a permutation $\sigma\in S_{n}$ having exactly $k$ descents
(just drop the bars)\footnote{To see this, it helps to observe that if a
$k$-barper $\beta$ has no useless walls, then each bar of $\beta$ is a wall
(since otherwise, the next wall to the right of this bar would be useless),
and there are no bars at the very beginning or the very end of $\beta$ (for
the same reason).}. Thus, the bijection principle yields
\begin{align*}
&  \left(  \text{\# of permutations }\sigma\in S_{n}\text{ having exactly
}k\text{ descents}\right) \\
&  =\left(  \text{\# of good }k\text{-barpers with no useless walls}\right)  .
\end{align*}
But this is precisely (\ref{pf.thm.perm.eulerian.sum.eul=}), since the LHS
equals $%
%TCIMACRO{\QDATOPD{\langle}{\rangle}{n}{k}}%
%BeginExpansion
\genfrac{\langle}{\rangle}{0pt}{0}{n}{k}%
%EndExpansion
$.] \medskip

Now, we shall compute the RHS of (\ref{pf.thm.perm.eulerian.sum.eul=}) using
the Principle of Inclusion and Exclusion.

Let
\[
U:=\left\{  \text{all good }k\text{-barpers}\right\}  .
\]


For each $i\in\left[  n+1\right]  $, let $A_{i}$ be the set of all good
$k$-barpers that have a useless wall between the $\left(  i-1\right)  $-st and
the $i$-th entries\footnote{If $i=1$, then this means having a useless wall
before the first entry. If $i=n+1$, then this means having a useless wall at
the very end.}. Then,%
\begin{align*}
&  \left\{  \text{all good }k\text{-barpers with no useless walls}\right\} \\
&  =U\setminus\left(  A_{1}\cup A_{2}\cup\cdots\cup A_{n+1}\right)  ,
\end{align*}
so that
\begin{align*}
&  \left(  \text{\# of good }k\text{-barpers with no useless walls}\right) \\
&  =\left\vert U\setminus\left(  A_{1}\cup A_{2}\cup\cdots\cup A_{n+1}\right)
\right\vert \\
&  =\sum_{I\subseteq\left[  n+1\right]  }\left(  -1\right)  ^{\left\vert
I\right\vert }\left\vert \bigcap_{i\in I}A_{i}\right\vert
\end{align*}
(by Theorem 2.7.6 in Lecture 19). Hence, (\ref{pf.thm.perm.eulerian.sum.eul=})
becomes%
\begin{equation}%
%TCIMACRO{\QDATOPD{\langle}{\rangle}{n}{k}}%
%BeginExpansion
\genfrac{\langle}{\rangle}{0pt}{0}{n}{k}%
%EndExpansion
=\sum_{I\subseteq\left[  n+1\right]  }\left(  -1\right)  ^{\left\vert
I\right\vert }\left\vert \bigcap_{i\in I}A_{i}\right\vert .
\label{pf.thm.perm.eulerian.sum.eul=sum}%
\end{equation}


Now, we shall compute the sizes on the RHS of this equality. We claim that%
\begin{equation}
\left\vert \bigcap_{i\in I}A_{i}\right\vert =%
\begin{cases}
\left(  k-\left\vert I\right\vert +1\right)  ^{n}, & \text{if }\left\vert
I\right\vert \leq k;\\
0, & \text{if }\left\vert I\right\vert >k
\end{cases}
\label{pf.thm.perm.eulerian.sum.I}%
\end{equation}
for every subset $I$ of $\left[  n+1\right]  $.

[\textit{Proof of (\ref{pf.thm.perm.eulerian.sum.I}):} Let $I$ be a subset of
$\left[  n+1\right]  $. Then, $\bigcap_{i\in I}A_{i}$ is the set of all good
$k$-barpers that have a useless wall between the $\left(  i-1\right)  $-st and
the $i$-th entries for each $i\in I$.\ \ \ \ \footnote{Note that a good
$k$-barper cannot have more than one wall between the same two adjacent
entries (since only the last bar between these two entries counts as a wall).}
Obviously, such $k$-barpers can exist only if $\left\vert I\right\vert \leq k$
(since a $k$-barper has only $k$ bars, thus at most $k$ useless walls). Thus,
the set $\bigcap_{i\in I}A_{i}$ is empty when $\left\vert I\right\vert >k$. In
other words, $\left\vert \bigcap_{i\in I}A_{i}\right\vert =0$ when $\left\vert
I\right\vert >k$. It remains to prove that $\left\vert \bigcap_{i\in I}%
A_{i}\right\vert =\left(  k-\left\vert I\right\vert +1\right)  ^{n}$ when
$\left\vert I\right\vert \leq k$.

Let us thus assume that $\left\vert I\right\vert \leq k$. Thus, $k-\left\vert
I\right\vert \in\mathbb{N}$.

Let $\beta\in\bigcap_{i\in I}A_{i}$ be arbitrary. Thus, $\beta$ is a good
$k$-barper that has a useless wall between the $\left(  i-1\right)  $-st and
the $i$-th entries for each $i\in I$. If we delete all these $\left\vert
I\right\vert $ many useless walls from $\beta$ (leaving all other useless
walls in place, if there are any), then we obtain a good $\left(  k-\left\vert
I\right\vert \right)  $-barper\footnote{This is not completely obvious. By
definition, if we delete a single useless wall from $\beta$, then the
resulting $\left(  k-1\right)  $-barper is good. But what we need to show is
that if we delete $j$ useless walls at the same time, then the resulting
$\left(  k-j\right)  $-barper is still good. To convince yourself of this,
observe that if the $i$-th entry of $\beta$ is larger than the $\left(
i+1\right)  $-st entry, then these two entries are separated in $\beta$ by a
bar that is not a useless wall (i.e., either by a non-useless wall, or by a
bar that is not a wall), and therefore they cannot end up in the same
compartment upon removal of several useless walls.}, which we shall call
$\beta^{\prime}$. This yields a map%
\[
\text{from }\bigcap_{i\in I}A_{i}\text{ to }\left\{  \text{good }\left(
k-\left\vert I\right\vert \right)  \text{-barpers}\right\}
\]
that sends each $\beta\in\bigcap_{i\in I}A_{i}$ to the respective
$\beta^{\prime}$. This map is injective (since we can always reinsert the
$\left\vert I\right\vert $ useless walls that we removed\footnote{The
positions at which they have to be reinserted are uniquely determined, since a
wall separating two adjacent entries must always stand to the right of all
bars separating these two entries.}) and surjective (since we can always start
with any good $\left(  k-\left\vert I\right\vert \right)  $-barper and insert
a wall between its $\left(  i-1\right)  $-st and the $i$-th entries for each
$i\in I$; then, all these inserted walls will be useless\footnote{since the
original $\left(  k-\left\vert I\right\vert \right)  $-barper was good}, and
the resulting $k$-barper will belong to $\bigcap_{i\in I}A_{i}$). Hence, it is
bijective. The bijection principle therefore yields%
\[
\left\vert \bigcap_{i\in I}A_{i}\right\vert =\left(  \text{\# of good }\left(
k-\left\vert I\right\vert \right)  \text{-barpers}\right)  =\left(
k-\left\vert I\right\vert +1\right)  ^{n}%
\]
(by (\ref{pf.thm.perm.eulerian.sum.allgood}), applied to $k-\left\vert
I\right\vert $ instead of $k$). This completes the proof of
(\ref{pf.thm.perm.eulerian.sum.I}).]

Now, (\ref{pf.thm.perm.eulerian.sum.eul=sum}) becomes\footnote{I will be using
the \textquotedblleft$\overset{0}{=}$\textquotedblright\ symbol; its meaning
has been explained in Remark 2.3.2 in Lecture 15.}%
\begin{align*}%
%TCIMACRO{\QDATOPD{\langle}{\rangle}{n}{k}}%
%BeginExpansion
\genfrac{\langle}{\rangle}{0pt}{0}{n}{k}%
%EndExpansion
&  =\sum_{I\subseteq\left[  n+1\right]  }\left(  -1\right)  ^{\left\vert
I\right\vert }\left\vert \bigcap_{i\in I}A_{i}\right\vert \\
&  =\sum_{I\subseteq\left[  n+1\right]  }\left(  -1\right)  ^{\left\vert
I\right\vert }%
\begin{cases}
\left(  k-\left\vert I\right\vert +1\right)  ^{n}, & \text{if }\left\vert
I\right\vert \leq k;\\
0, & \text{if }\left\vert I\right\vert >k
\end{cases}
\ \ \ \ \ \ \ \ \ \ \left(  \text{by (\ref{pf.thm.perm.eulerian.sum.I}%
)}\right) \\
&  =\sum_{i=0}^{n+1}\ \ \sum_{\substack{I\subseteq\left[  n+1\right]
;\\\left\vert I\right\vert =i}}\underbrace{\left(  -1\right)  ^{\left\vert
I\right\vert }%
\begin{cases}
\left(  k-\left\vert I\right\vert +1\right)  ^{n}, & \text{if }\left\vert
I\right\vert \leq k;\\
0, & \text{if }\left\vert I\right\vert >k
\end{cases}
}_{\substack{=\left(  -1\right)  ^{i}%
\begin{cases}
\left(  k-i+1\right)  ^{n}, & \text{if }i\leq k;\\
0, & \text{if }i>k
\end{cases}
\\\text{(since }\left\vert I\right\vert =i\text{)}}}\\
&  \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \left(
\begin{array}
[c]{c}%
\text{here, we have split up the sum}\\
\text{according to the value of }\left\vert I\right\vert
\end{array}
\right) \\
&  =\sum_{i=0}^{n+1}\ \ \underbrace{\sum_{\substack{I\subseteq\left[
n+1\right]  ;\\\left\vert I\right\vert =i}}\left(  -1\right)  ^{i}%
\begin{cases}
\left(  k-i+1\right)  ^{n}, & \text{if }i\leq k;\\
0, & \text{if }i>k
\end{cases}
}_{\substack{=\dbinom{n+1}{i}\left(  -1\right)  ^{i}%
\begin{cases}
\left(  k-i+1\right)  ^{n}, & \text{if }i\leq k;\\
0, & \text{if }i>k
\end{cases}
\\\text{(since the \# of }i\text{-element subsets of }\left[  n+1\right]
\text{ is }\dbinom{n+1}{i}\text{)}}}\\
&  =\sum_{i=0}^{n+1}\dbinom{n+1}{i}\left(  -1\right)  ^{i}%
\begin{cases}
\left(  k-i+1\right)  ^{n}, & \text{if }i\leq k;\\
0, & \text{if }i>k
\end{cases}
\\
&  \overset{0}{=}\ \sum_{i\in\mathbb{N}}\dbinom{n+1}{i}\left(  -1\right)  ^{i}%
\begin{cases}
\left(  k-i+1\right)  ^{n}, & \text{if }i\leq k;\\
0, & \text{if }i>k
\end{cases}
\ \ \ \ \ \ \ \ \ \ \left(
\begin{array}
[c]{c}%
\text{since }\dbinom{n+1}{i}=0\\
\text{for all }i>n+1
\end{array}
\right) \\
&  =\sum_{i=0}^{k}\dbinom{n+1}{i}\left(  -1\right)  ^{i}\left(  k-i+1\right)
^{n}+\underbrace{\sum_{i>k}\dbinom{n+1}{i}\left(  -1\right)  ^{i}0}_{=0}\\
&  \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \left(
\begin{array}
[c]{c}%
\text{here, we have split up the sum into one part}\\
\text{containing all addends with }i\leq k\text{, and another}\\
\text{part containing all addends with }i>k
\end{array}
\right) \\
&  =\sum_{i=0}^{k}\dbinom{n+1}{i}\left(  -1\right)  ^{i}\left(  k-i+1\right)
^{n}=\sum_{i=0}^{k}\left(  -1\right)  ^{i}\dbinom{n+1}{i}\left(  k+1-i\right)
^{n}.
\end{align*}
This proves Theorem \ref{thm.perm.eulerian.sum}.
\end{proof}

A different proof of Theorem \ref{thm.perm.eulerian.sum} (using generating
functions) appears in \cite[Corollary 1.3]{Peters15}.

See \cite[\S 1.4 and \S 1.5]{Stanley-EC1}, \cite[\S 1.1]{Bona22} and
\cite{Rzadko08} for more on descents and Eulerian numbers\footnote{Notational
warning: The descent set $\operatorname*{Des}\sigma$ is called $D\left(
\sigma\right)  $ in \cite{Stanley-EC1} and in \cite{Bona22}. The Eulerian
number $%
%TCIMACRO{\QDATOPD{\langle}{\rangle}{n}{k}}%
%BeginExpansion
\genfrac{\langle}{\rangle}{0pt}{0}{n}{k}%
%EndExpansion
$ is called $A\left(  n,k+1\right)  $ in \cite{Stanley-EC1} and in
\cite{Bona22}.}. (In particular, \cite[Proposition 1.4.1]{Stanley-EC1}
generalizes Exercise \ref{exe.perm.des.counts}.) See also \cite{BayDia92} for
an application of descents to probability theory (specifically, to the
question of how a deck of cards looks like when it has been shuffled several
times via a riffle shuffle).
\end{fineprint}

\bigskip

There is much more to say about permutations, which we don't have time for in
this short course:

\begin{itemize}
\item the permutahedron (e.g., \cite[Remark 5.3.19]{21s}, \cite{Santmy07});

\item Lehmer codes (\cite[\S 5.3.2]{21s}) and an \textbf{explicit} way to
write a permutation $\sigma\in S_{n}$ as a product of $\ell\left(
\sigma\right)  $ simple transpositions (\cite[Remark 5.3.23 and Proposition
5.3.24]{21s});

\item pattern avoidance (\cite[Chapter 4]{Bona22});

\item Coxeter groups and reflection groups as generalizations of symmetric
groups (\cite{BjoBre05});

\item and much more...
\end{itemize}

\begin{thebibliography}{99999999}                                                                                         %


\bibitem[18f-hw4s]{18f-hw4s}Darij Grinberg, \textit{UMN Fall 2018 Math 5705
homework set \#4 with solutions}, \url{http://www.cip.ifi.lmu.de/~grinberg/t/18f/hw4s.pdf}

\bibitem[18f-mt2s]{18f-mt2s}Darij Grinberg, \textit{UMN Fall 2018 Math 5705
midterm \#2 with solutions}, \url{http://www.cip.ifi.lmu.de/~grinberg/t/18f/mt2s.pdf}

\bibitem[18s-mt1s]{18s-mt1s}Darij Grinberg, \textit{UMN Spring 2018 Math 4707
midterm \#1 with solutions}, \url{http://www.cip.ifi.lmu.de/~grinberg/t/18s/mt1s.pdf}

\bibitem[21s]{21s}Darij Grinberg, \textit{Algebraic Combinatorics (Drexel
Spring 2021 Math 701 lecture notes)}, 4 May 2021.\newline\url{https://www.cip.ifi.lmu.de/~grinberg/t/21s/lecs.pdf}

\bibitem[BayDia92]{BayDia92}%
\href{https://doi.org/10.1214/aoap/1177005705}{Dave Bayer, Persi Diaconis,
\textit{Trailing the Dovetail Shuffle to its Lair}, The Annals of Applied
Probability \textbf{2}, No. 2 (May, 1992), pp. 294--313.}

\bibitem[BjoBre05]{BjoBre05}\href{http://doi.org/10.1007/3-540-27596-7}{Anders
Bj\"{o}rner, Francesco Brenti, \textit{Combinatorics of Coxeter Groups},
Graduate Texts in Mathematics \#231, Springer 2005.}\newline See
\url{https://www.mat.uniroma2.it/~brenti/correct.ps} for errata.

\bibitem[Bona22]{Bona22}Miklos B\'{o}na, \textit{Combinatorics of
Permutations}, 3rd edition, Taylor\&Francis 2022.\newline\url{https://doi.org/10.1201/9780429274107}

\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[Mulhol21]{Mulhol21}Jamie Mulholland, \textit{Permutation Puzzles: A
Mathematical Perspective}, 12 January 2021.\newline\url{http://www.sfu.ca/~jtmulhol/math302/notes/permutation-puzzles-book.pdf}

\bibitem[Peters15]{Peters15}%
\href{https://doi.org/10.1007/978-1-4939-3091-3}{T. Kyle Petersen,
\textit{Eulerian Numbers}, Birkh\"{a}user Advanced Texts, Birkh\"{a}user
2015.}

\bibitem[Rzadko08]{Rzadko08}%
\href{https://doi.org/10.1080/00029890.2008.11920551}{Grzegorz Rzadkowski,
\textit{Derivatives and Eulerian Numbers}, American Mathematical Monthly
\textbf{115}, issue 5, pp. 458--460.}

\bibitem[Sagan01]{Sagan01}Bruce Sagan, \textit{The Symmetric Group}, Graduate
Texts in Mathematics \textbf{203}, 2nd edition 2001.\newline%
\url{https://doi.org/10.1007/978-1-4757-6804-6}\newline See
\url{https://users.math.msu.edu/users/bsagan/Books/Sym/errata.pdf} for errata.

\bibitem[Santmy07]{Santmy07}%
\href{https://doi.org/10.1080/0025570X.2007.11953465}{Joe Santmyer,
\textit{For All Possible Distances Look to the Permutohedron}, Mathematics
Magazine \textbf{80}:2, pp. 120--125.}

\bibitem[Stanle11]{Stanley-EC1}Richard P. Stanley, \textit{Enumerative
Combinatorics, volume 1}, Second edition, version of 15 July 2011. Available
at \url{http://math.mit.edu/~rstan/ec/} .\newline See
\url{http://math.mit.edu/~rstan/ec/} for errata.

\bibitem[Strick13]{Strick13}Neil Strickland, \textit{MAS201 Linear Mathematics
for Applications}, lecture notes, 28 September 2013.\newline\url{https://neilstrickland.github.io/linear_maths/}

\bibitem[Willia03]{William03}%
\href{http://people.mpim-bonn.mpg.de/geordie/Hecke.pdf}{Geordie Williamson,
\textit{Mind your }$P$\textit{ and }$Q$\textit{-symbols: Why the
Kazhdan-Lusztig basis of the Hecke algebra of type A is cellular}, Honours
thesis at the University of Sydney, October 2003.}
\end{thebibliography}


\end{document}