\documentclass[numbers=enddot,12pt,final,onecolumn,notitlepage]{scrartcl}%
\usepackage[headsepline,footsepline,manualmark]{scrlayer-scrpage}
\usepackage[all,cmtip]{xy}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{framed}
\usepackage{comment}
\usepackage{color}
\usepackage[breaklinks=True]{hyperref}
\usepackage[sc]{mathpazo}
\usepackage[T1]{fontenc}
\usepackage{needspace}
\usepackage{tabls}
\usepackage{tikz}
\usepackage{bbding}
%TCIDATA{OutputFilter=latex2.dll}
%TCIDATA{Version=5.50.0.2960}
%TCIDATA{LastRevised=Monday, November 28, 2022 18:33:20}
%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 26, version \today}
\ohead{page \thepage}
\cfoot{}
\begin{document}
\section*{Math 222 Fall 2022, Lecture 26: 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}

We will now revisit permutations. We have already defined and counted them,
but there is a lot more to do. We will not go anywhere deep, but just
introduce some of the main players and solve some of the more fundamental
counting questions. Much more can be found in \cite{Bona22}, \cite{Sagan01}
and \cite[Chapter 1]{Stanley-EC1} (see also \cite[Chapter 5]{21s} for the
treatment we are mostly following here).

\subsection{Basic definitions}

\subsubsection{Symmetric groups}

\begin{definition}
Let $X$ be a set.

\textbf{(a)} As we recall, a \textbf{permutation} of $X$ means a bijection
from $X$ to $X$.

\textbf{(b)} If $\alpha$ and $\beta$ are two permutations of $X$, then we will
denote their composition $\alpha\circ\beta$ by $\alpha\beta$.

\textbf{(c)} The set of all permutations of $X$ is denoted by $S_{X}$, and is
called the \textbf{symmetric group} of $X$.

\textbf{(d)} If $\alpha\in S_{X}$ and $k\in\mathbb{Z}$, then we define a
permutation $\alpha^{k}$ as follows: If $k\geq0$, then we set $\alpha
^{k}:=\underbrace{\alpha\circ\alpha\circ\cdots\circ\alpha}_{k\text{ times}}$
(this is just standard notation for the $k$-th power of an arbitrary map from
$X$ to $X$). If $k<0$, then we set $\alpha^{k}=\left(  \alpha^{-1}\right)
^{-k}$.
\end{definition}

If you are familiar with abstract algebra, you will recognize that the
symmetric group $S_{X}$ is actually a group (with the composition operation
$\left(  \alpha,\beta\right)  \mapsto\alpha\circ\beta$ playing the role of
multiplication, and with the identity map $\operatorname*{id}\nolimits_{X}$
being the neutral element). This viewpoint is somewhat helpful, but not very
deep; most combinatorial properties of permutations do not stem from group theory.

Note that the composition of permutations is not commutative: If $\alpha$ and
$\beta$ are two permutations in $S_{X}$, then $\alpha\beta$ usually differs
from $\beta\alpha$. (There is a pretty nice formula for how often $\alpha
\beta$ happens to equal $\beta\alpha$, though. See Theorem 4.3.11 in Lecture
28 below.)

Our favorite symmetric groups will be the symmetric groups $S_{\left[
n\right]  }$ of the sets $\left[  n\right]  =\left\{  1,2,\ldots,n\right\}  $
for various integers $n\in\mathbb{N}$. We will discuss them so often that we
introduce a shorthand for them:

\begin{definition}
Let $n\in\mathbb{N}$. Then, the symmetric group $S_{\left[  n\right]  }$
(which is the set of all permutations of $\left[  n\right]  $) is denoted by
$S_{n}$.
\end{definition}

As we saw in \S 1.7.2 (Lecture 12), if $X$ is any $n$-element set, then the
permutations of $X$ can be turned into the permutations of $\left[  n\right]
$ by \textquotedblleft relabelling\textquotedblright\ the elements of $X$ as
$1,2,\ldots,n$. Thus, if we understand the symmetric groups $S_{n}=S_{\left[
n\right]  }$ for all $n\in\mathbb{N}$, then we essentially understand the
symmetric groups $S_{X}$ for all finite sets $X$ (at least if we restrict
ourselves to properties that don't depend on the actual elements of $X$). This
explains why the specific symmetric groups $S_{n}$ are so central to combinatorics.

\subsubsection{Three notations for permutations}

\begin{definition}
\label{def.perm.nots}Let $n\in\mathbb{N}$ and $\sigma\in S_{n}$. We introduce
three notations for $\sigma$:

\textbf{(a)} A \textbf{two-line notation} of $\sigma$ means a $2\times
n$-table $\left(
\begin{array}
[c]{cccc}%
p_{1} & p_{2} & \cdots & p_{n}\\
\sigma\left(  p_{1}\right)  & \sigma\left(  p_{2}\right)  & \cdots &
\sigma\left(  p_{n}\right)
\end{array}
\right)  $, where $p_{1},p_{2},\ldots,p_{n}$ are the elements of $\left[
n\right]  $ in some order. (Usually, this order is $1,2,\ldots,n$, but
sometimes a different order can make for a nicer table. Thus the indefinite
article in \textquotedblleft a two-line notation\textquotedblright.)

\textbf{(b)} The \textbf{one-line notation} (short: \textbf{OLN}) of $\sigma$
means the $n$-tuple $\left(  \sigma\left(  1\right)  ,\sigma\left(  2\right)
,\ldots,\sigma\left(  n\right)  \right)  \in\left[  n\right]  ^{n}$.

It is common to omit the commas and the parentheses in the OLN. So, for
instance, instead of $\left(  3,1,4,2\right)  $, you write $3142$. This works
fine for $n\leq10$.

\textbf{(c)} The \textbf{cycle digraph} of $\sigma$ is (informally) defined as
a picture that is constructed as follows:

\begin{itemize}
\item For each $i\in\left[  n\right]  $, draw a point (\textquotedblleft%
\textbf{node}\textquotedblright) labelled $i$.

\item For each $i\in\left[  n\right]  $, draw an arrow (\textquotedblleft%
\textbf{arc}\textquotedblright) from the node labelled $i$ to the node
labelled $\sigma\left(  i\right)  $.
\end{itemize}

The resulting picture is called the cycle digraph of $\sigma$. Formally
speaking, it is a digraph (= directed graph\footnotemark) with vertices
$1,2,\ldots,n$ and arcs $i\rightarrow\sigma\left(  i\right)  $ for all
$i\in\left[  n\right]  $.
\end{definition}

\footnotetext{For the definition (and many properties) of directed graphs, see
various textbooks on graph theory, such as \cite[Chapter 7]{ChLeZh16},
\cite[Chapter 3]{Ruohon13} and many others, or even my own notes
\cite[Lectures 9--12]{22s}. Note that different authors use slightly different
definitions, but all these definitions fit our purpose (as long as they allow
loops).}

\begin{example}
\label{exa.perm.cycle-dig1}Let $\sigma$ be the permutation of $\left[
4\right]  $ whose OLN is $2431$. Thus, $\sigma\left(  1\right)  =2$ and
$\sigma\left(  2\right)  =4$ and $\sigma\left(  3\right)  =3$ and
$\sigma\left(  4\right)  =1$. Here is one way to draw the cycle digraph of
$\sigma$:%
\[%
%TCIMACRO{\TeXButton{tikz 4-permutation 1}{\begin{tikzpicture}%
%[->,shorten >=1pt,auto,node distance=3cm, thick,main node/.style={circle,fill=blue!20,draw}%
%]
%\node[main node] (1) {1};
%\node[main node] (2) [right of=1] {2};
%\node[main node] (3) [right of=2] {3};
%\node[main node] (4) [right of=3] {4};
%\path[-{Stealth[length=4mm]}]
%(1) edge [bend left] (2)
%(2) edge [bend left] (4)
%(4) edge [bend left] (1)
%(3) edge [loop right] (3);
%\end{tikzpicture}}}%
%BeginExpansion
\begin{tikzpicture}%
[->,shorten >=1pt,auto,node distance=3cm, thick,main node/.style={circle,fill=blue!20,draw}%
]
\node[main node] (1) {1};
\node[main node] (2) [right of=1] {2};
\node[main node] (3) [right of=2] {3};
\node[main node] (4) [right of=3] {4};
\path[-{Stealth[length=4mm]}]
(1) edge [bend left] (2)
(2) edge [bend left] (4)
(4) edge [bend left] (1)
(3) edge [loop right] (3);
\end{tikzpicture}%
%EndExpansion
\ \ .
\]
Another way to draw this digraph is
\[%
%TCIMACRO{\TeXButton{tikz 4-permutation 2}{\begin{tikzpicture}%
%[->,shorten >=1pt,auto,node distance=3cm, thick,main node/.style={circle,fill=blue!20,draw}%
%]
%\node[main node] (1) {1};
%\node[main node] (2) [below left of=1] {2};
%\node[main node] (3) [right of=1] {3};
%\node[main node] (4) [left of=1] {4};
%\path[-{Stealth[length=4mm]}]
%(1) edge [bend left] (2)
%(2) edge [bend left] (4)
%(4) edge [bend left] (1)
%(3) edge [loop right] (3);
%\end{tikzpicture}}}%
%BeginExpansion
\begin{tikzpicture}%
[->,shorten >=1pt,auto,node distance=3cm, thick,main node/.style={circle,fill=blue!20,draw}%
]
\node[main node] (1) {1};
\node[main node] (2) [below left of=1] {2};
\node[main node] (3) [right of=1] {3};
\node[main node] (4) [left of=1] {4};
\path[-{Stealth[length=4mm]}]
(1) edge [bend left] (2)
(2) edge [bend left] (4)
(4) edge [bend left] (1)
(3) edge [loop right] (3);
\end{tikzpicture}%
%EndExpansion
\ \ .
\]
(When drawing cycle digraphs, one has full freedom in placing the nodes, as
long as they don't overlap with the arcs. Most often, one places them in such
a way that the cycles are visibly separate.)
\end{example}

\begin{example}
\label{exa.perm.cycle-dig2}Let $\sigma$ be the permutation of $\left[
10\right]  $ whose OLN is%
\[
5\ 4\ 3\ 2\ 6\ \left(  10\right)  \ 1\ 9\ 8\ 7.
\]
(We have put the element $10$ in parentheses to make its place clearer.) For
example, $\sigma\left(  5\right)  =6$ and $\sigma\left(  6\right)  =10$. The
cycle digraph of $\sigma$ is%
\[%
%TCIMACRO{\TeXButton{tikz cycle digraph}{\begin{tikzpicture}%
%[->,shorten >=1pt,auto,node distance=3cm, thick,main node/.style={circle,fill=blue!20,draw}%
%]
%\node[main node] (0) {10};
%\node[main node] (6) [above of=0] {6};
%\node[main node] (5) [above left of=6] {5};
%\node[main node] (1) [below left of=5] {1};
%\node[main node] (7) [below of=1] {7};
%\node[main node] (9) [above right of=6] {9};
%\node[main node] (8) [right of=9] {8};
%\node[main node] (2) [right of=0] {2};
%\node[main node] (4) [right of=2] {4};
%\node[main node] (3) [below of=8] {3};
%\path[-{Stealth[length=4mm]}]
%(1) edge [bend left] (5)
%(5) edge [bend left] (6)
%(6) edge [bend left] (0)
%(0) edge [bend left] (7)
%(7) edge [bend left] (1)
%(9) edge [bend right] (8)
%(8) edge [bend right] (9)
%(2) edge [bend right] (4)
%(4) edge [bend right] (2)
%(3) edge [loop right] (3);
%\end{tikzpicture}}}%
%BeginExpansion
\begin{tikzpicture}%
[->,shorten >=1pt,auto,node distance=3cm, thick,main node/.style={circle,fill=blue!20,draw}%
]
\node[main node] (0) {10};
\node[main node] (6) [above of=0] {6};
\node[main node] (5) [above left of=6] {5};
\node[main node] (1) [below left of=5] {1};
\node[main node] (7) [below of=1] {7};
\node[main node] (9) [above right of=6] {9};
\node[main node] (8) [right of=9] {8};
\node[main node] (2) [right of=0] {2};
\node[main node] (4) [right of=2] {4};
\node[main node] (3) [below of=8] {3};
\path[-{Stealth[length=4mm]}]
(1) edge [bend left] (5)
(5) edge [bend left] (6)
(6) edge [bend left] (0)
(0) edge [bend left] (7)
(7) edge [bend left] (1)
(9) edge [bend right] (8)
(8) edge [bend right] (9)
(2) edge [bend right] (4)
(4) edge [bend right] (2)
(3) edge [loop right] (3);
\end{tikzpicture}%
%EndExpansion
\ \ .
\]

\end{example}

As you will have noticed from these examples, the cycle digraph of a
permutation $\sigma$ looks like a bunch of disjoint cycles. This is indeed the
case for any permutation $\sigma$, and we will soon prove this.

The different notations for permutations have different advantages. The cycle
digraph of $\sigma$ is useful for understanding the \textquotedblleft
intrinsic structure\textquotedblright\ of $\sigma$, and particularly for
computing powers $\sigma^{k}$ of $\sigma$ (because in order to compute
$\sigma^{k}\left(  i\right)  $ for some element $i\in\left[  n\right]  $, we
just need to start at the node labelled $i$, and follow the arcs for $k$
steps). Other combinatorial properties are easier to see on the OLN.

We note that the two-line notation and the cycle digraph can be defined for
any permutation $\sigma$ of any finite set $X$ (not just for $\sigma\in S_{n}%
$). The definitions are the same that we gave in Definition
\ref{def.perm.nots}, just replacing $\left[  n\right]  $ by $X$. However, the
one-line notation cannot be generalized to arbitrary finite sets $X$.

\bigskip

\subsection{Transpositions and cycles}

Next, we will define some important families of permutations.

\subsubsection{Transpositions}

One of the simplest kinds of permutations (beyond the identity maps) are the transpositions:

\begin{definition}
Let $X$ be a set. Let $i$ and $j$ be two distinct elements of $X$.

Then, the \textbf{transposition} $t_{i,j}$ is the permutation of $X$ that
sends $i$ to $j$, sends $j$ to $i$, and leaves all other elements of $X$
unchanged. (We should denote this permutation by $t_{i,j,X}$, since it depends
on $X$; but we will just call it $t_{i,j}$ because $X$ will be clear from the context.)
\end{definition}

\begin{example}
The permutation $t_{2,4}$ of the set $\left[  7\right]  $ has OLN $1432567$.
Here is its cycle digraph:%
\[%
%TCIMACRO{\TeXButton{tikz cycle digraph}{\begin{tikzpicture}%
%[->,shorten >=1pt,auto,node distance=3cm, thick,main node/.style={circle,fill=blue!20,draw}%
%]
%\node[main node] (1) {1};
%\node[main node] (3) [above of=1] {3};
%\node[main node] (5) [right of=1] {5};
%\node[main node] (6) [right of=5] {6};
%\node[main node] (7) [above of=6] {7};
%\node[main node] (2) [right of=7] {2};
%\node[main node] (4) [right of=6] {4};
%\path[-{Stealth[length=4mm]}]
%(2) edge [bend left] (4)
%(4) edge [bend left] (2)
%(1) edge [loop right] (1)
%(3) edge [loop right] (3)
%(5) edge [loop right] (5)
%(6) edge [loop right] (6)
%(7) edge [loop right] (7);
%\end{tikzpicture}}}%
%BeginExpansion
\begin{tikzpicture}%
[->,shorten >=1pt,auto,node distance=3cm, thick,main node/.style={circle,fill=blue!20,draw}%
]
\node[main node] (1) {1};
\node[main node] (3) [above of=1] {3};
\node[main node] (5) [right of=1] {5};
\node[main node] (6) [right of=5] {6};
\node[main node] (7) [above of=6] {7};
\node[main node] (2) [right of=7] {2};
\node[main node] (4) [right of=6] {4};
\path[-{Stealth[length=4mm]}]
(2) edge [bend left] (4)
(4) edge [bend left] (2)
(1) edge [loop right] (1)
(3) edge [loop right] (3)
(5) edge [loop right] (5)
(6) edge [loop right] (6)
(7) edge [loop right] (7);
\end{tikzpicture}%
%EndExpansion
\ \ .
\]

\end{example}

More generally, any transposition $t_{i,j}$ has a cycle digraph that consists
of a $2$-arc cycle (containing the nodes labelled $i$ and $j$) and a bunch of
$1$-arc cycles (each containing a single node).

Note that $t_{i,j}=t_{j,i}$ for any $i\neq j$. Thus, for an $n$-element set
$X$, there are exactly $\dbinom{n}{2}$ many transpositions in the symmetric
group $S_{X}$ (namely, one transposition $t_{i,j}$ for every $2$-element
subset $\left\{  i,j\right\}  $ of $X$).

\bigskip

The simplest type of transpositions are the so-called simple transpositions:

\begin{definition}
Let $n\in\mathbb{N}$ and $i\in\left[  n-1\right]  $. Then, the \textbf{simple
transposition }$s_{i}$ is defined by%
\[
s_{i}:=t_{i,i+1}\in S_{n}.
\]

\end{definition}

Thus, a simple transposition is a transposition that swaps two consecutive
integers. The following proposition gives some basic properties of simple
transpositions:\footnote{Recall that we are using the shorthand $\alpha\beta$
for the composition $\alpha\circ\beta$ of two permutations $\alpha$ and
$\beta$.}

\begin{proposition}
\label{prop.perm.simples.rules}Let $n\in\mathbb{N}$.

\textbf{(a)} We have $s_{i}^{2}=\operatorname*{id}$ for each $i\in\left[
n-1\right]  $. More generally, $t_{i,j}^{2}=\operatorname*{id}$ for any $i\neq
j$ in $\left[  n\right]  $.

\textbf{(b)} We have $s_{i}s_{j}=s_{j}s_{i}$ for any $i,j\in\left[
n-1\right]  $ satisfying $\left\vert i-j\right\vert >1$. (This is called
\textbf{transposition locality}.)

\textbf{(c)} We have $s_{i}s_{i+1}s_{i}=s_{i+1}s_{i}s_{i+1}=t_{i,i+2}$ for any
$i\in\left[  n-2\right]  $. (This is called the \textbf{braid rule}.)
\end{proposition}

\begin{proof}
Just verify that the relevant permutations send every possible input to the
same output. This verification is rather straightforward. For example, in part
\textbf{(c)}, we need to show that for any $i\in\left[  n-2\right]  $ and any
$k\in\left[  n\right]  $, we have
\begin{equation}
\left(  s_{i}s_{i+1}s_{i}\right)  \left(  k\right)  =\left(  s_{i+1}%
s_{i}s_{i+1}\right)  \left(  k\right)  =t_{i,i+2}\left(  k\right)  .
\label{pf.prop.perm.simples.rules.c.goal}%
\end{equation}
This is best done by separately analyzing the four cases $k=i$, $k=i+1$,
$k=i+2$ and $k\notin\left\{  i,i+1,i+2\right\}  $. For example, if $k=i$, then
all three sides of the equality (\ref{pf.prop.perm.simples.rules.c.goal})
equal $i+2$, whereas for $k\notin\left\{  i,i+1,i+2\right\}  $, they all equal
$k$.
\end{proof}

\subsubsection{Cycles}

A more general class of permutations are the cycles, defined as follows:

\begin{definition}
Let $X$ be a set. Let $i_{1},i_{2},\ldots,i_{k}$ be $k$ distinct elements of
$X$. Then,%
\[
\operatorname*{cyc}\nolimits_{i_{1},i_{2},\ldots,i_{k}}%
\]
means the permutation of $X$ that sends%
\begin{align*}
&  i_{1}\text{ to }i_{2},\\
&  i_{2}\text{ to }i_{3},\\
&  i_{3}\text{ to }i_{4},\\
&  \ldots,\\
&  i_{k-1}\text{ to }i_{k},\\
&  i_{k}\text{ to }i_{1}%
\end{align*}
and leaves all other elements of $X$ unchanged. In other words,
$\operatorname*{cyc}\nolimits_{i_{1},i_{2},\ldots,i_{k}}$ means the
permutation of $X$ that satisfies%
\[
\operatorname*{cyc}\nolimits_{i_{1},i_{2},\ldots,i_{k}}\left(  p\right)  =%
\begin{cases}
i_{j+1}, & \text{if }p=i_{j}\text{ for some }j\in\left[  k\right]  ;\\
p, & \text{otherwise}%
\end{cases}
\ \ \ \ \ \ \ \ \ \ \text{for every }p\in X,
\]
where $i_{k+1}$ means $i_{1}$.

This permutation is called a $k$\textbf{-cycle}.
\end{definition}

The only $1$-cycle in $S_{X}$ is the identity map $\operatorname*{id}%
\nolimits_{X}$ (since $\operatorname*{cyc}\nolimits_{i}=\operatorname*{id}%
\nolimits_{X}$ for each $i\in X$). The $2$-cycles are precisely the
transpositions (since $\operatorname*{cyc}\nolimits_{i,j}=t_{i,j}$ for any
$i\neq j$ in $X$).

The $k$-cycles have gotten their name because their cycle digraphs look as
follows: one cycle of length $k$ (containing $k$ nodes), and all other nodes
just form cycles of length $1$ each. For example, the permutation $\sigma$ in
Example \ref{exa.perm.cycle-dig1} is the $3$-cycle $\operatorname*{cyc}%
\nolimits_{1,2,4}$.

A fairly common notation for the $k$-cycle $\operatorname*{cyc}%
\nolimits_{i_{1},i_{2},\ldots,i_{k}}$ is $\left(  i_{1},i_{2},\ldots
,i_{k}\right)  $. Many textbooks use this notation, but it requires some care,
as it conflicts with the notation for the $k$-tuple $\left(  i_{1}%
,i_{2},\ldots,i_{k}\right)  $. Thus, I use $\operatorname*{cyc}%
\nolimits_{i_{1},i_{2},\ldots,i_{k}}$ instead.

The $k$-cycle $\operatorname*{cyc}\nolimits_{i_{1},i_{2},\ldots,i_{k}}$ does
not change if we permute the $k$ subscripts $i_{1},i_{2},\ldots,i_{k}$ cyclically:

\begin{proposition}
\label{prop.perm.cycle.cyclic}Let $X$ be a set. For any $k$ distinct elements
$i_{1},i_{2},\ldots,i_{k}$ of $X$, we have%
\[
\operatorname*{cyc}\nolimits_{i_{1},i_{2},\ldots,i_{k}}=\operatorname*{cyc}%
\nolimits_{i_{2},i_{3},\ldots,i_{k},i_{1}}=\operatorname*{cyc}\nolimits_{i_{3}%
,i_{4},\ldots,i_{k},i_{1},i_{2}}=\cdots=\operatorname*{cyc}\nolimits_{i_{k}%
,i_{1},i_{2},\ldots,i_{k-1}}.
\]

\end{proposition}

\begin{proof}
Obvious.
\end{proof}

Previously, we have counted the transpositions in $S_{X}$; let us now
generalize this to counting $k$-cycles:

\begin{exercise}
\label{exe.perm.cycle.count}Let $n\in\mathbb{N}$ and $k\in\left[  n\right]  $.
Let $X$ be an $n$-element set. How many $k$-cycles are there in $S_{X}$ ?
\end{exercise}

\begin{proof}
[Solution.]The case $k=1$ is easy: There is exactly one $1$-cycle in $S_{X}$
(for $n>0$), since a $1$-cycle is just the identity map. This should be viewed
as a degenerate case; thus, we WLOG assume that $k>1$ from now on.

Recall the notation $n^{\underline{k}}$ for the number $n\left(  n-1\right)
\left(  n-2\right)  \cdots\left(  n-k+1\right)  $ (this is called a falling
factorial and has been introduced in Definition 2.4.2 in Lecture 7). Note that%
\begin{equation}
n^{\underline{k}}=n\left(  n-1\right)  \left(  n-2\right)  \cdots\left(
n-k+1\right)  =k!\cdot\dbinom{n}{k} \label{sol.perm.cycle.count.lf}%
\end{equation}
(since $\dbinom{n}{k}$ is defined as $\dfrac{n\left(  n-1\right)  \left(
n-2\right)  \cdots\left(  n-k+1\right)  }{k!}$).

A $k$-cycle $\operatorname*{cyc}\nolimits_{i_{1},i_{2},\ldots,i_{k}}$ is
defined for every $k$-tuple $\left(  i_{1},i_{2},\ldots,i_{k}\right)  $ of $k$
distinct elements of $X$. The \# of such $k$-tuples is easily seen to be
$n^{\underline{k}}$. Indeed, we can construct such a $k$-tuple by first
choosing its first entry $i_{1}$ (there are $\left\vert X\right\vert =n$ many
options for this), then choosing its second entry $i_{2}$ (there are $n-1$
options for this, since we need $i_{2}$ to be distinct from $i_{1}$), then
choosing its third entry $i_{3}$ (there are $n-2$ options for this, since we
need $i_{3}$ to be distinct from both $i_{1}$ and $i_{2}$, and since $i_{1}$
and $i_{2}$ are distinct), and so on. The total \# of possibilities is thus
$n\left(  n-1\right)  \left(  n-2\right)  \cdots\left(  n-k+1\right)
=n^{\underline{k}}$.

Unfortunately, the $n^{\underline{k}}$ distinct $k$-tuples $\left(
i_{1},i_{2},\ldots,i_{k}\right)  $ do \textbf{not} produce $n^{\underline{k}}$
distinct $k$-cycles $\operatorname*{cyc}\nolimits_{i_{1},i_{2},\ldots,i_{k}}$.
Indeed, Proposition \ref{prop.perm.cycle.cyclic} shows that any $k$-cycle
$\operatorname*{cyc}\nolimits_{i_{1},i_{2},\ldots,i_{k}}$ can also be
rewritten in the $k-1$ other forms%
\[
\operatorname*{cyc}\nolimits_{i_{2},i_{3},\ldots,i_{k},i_{1}}%
,\ \ \operatorname*{cyc}\nolimits_{i_{3},i_{4},\ldots,i_{k},i_{1},i_{2}%
},\ \ \ldots,\ \ \operatorname*{cyc}\nolimits_{i_{k},i_{1},i_{2}%
,\ldots,i_{k-1}},
\]
so that it is produced by $k$ different $k$-tuples.

The good news is that this \textquotedblleft ambiguity\textquotedblright\ is
the worst that can happen. More precisely: A $k$-cycle $\operatorname*{cyc}%
\nolimits_{i_{1},i_{2},\ldots,i_{k}}$ always uniquely determines the elements
$i_{1},i_{2},\ldots,i_{k}$ up to cyclic rotation. Indeed, if $\sigma
=\operatorname*{cyc}\nolimits_{i_{1},i_{2},\ldots,i_{k}}$ is a $k$-cycle, then
the elements $i_{1},i_{2},\ldots,i_{k}$ are precisely the elements of $X$ that
are not fixed by $\sigma$ (it is here that we use our assumption $k>1$), and
furthermore, if we know which of these elements is $i_{1}$, then we can
reconstruct the remaining elements $i_{2},i_{3},\ldots,i_{k}$ recursively by%
\[
i_{2}=\sigma\left(  i_{1}\right)  ,\ \ \ \ \ \ \ \ \ \ i_{3}=\sigma\left(
i_{2}\right)  ,\ \ \ \ \ \ \ \ \ \ i_{4}=\sigma\left(  i_{3}\right)
,\ \ \ \ \ \ \ \ \ \ \ldots,\ \ \ \ \ \ \ \ \ \ i_{k}=\sigma\left(
i_{k-1}\right)
\]
(that is, $i_{2},i_{3},\ldots,i_{k}$ are obtained by iteratively applying
$\sigma$ to $i_{1}$). Therefore, if $\sigma\in S_{X}$ is a $k$-cycle, then
there are precisely $k$ different $k$-tuples $\left(  i_{1},i_{2},\ldots
,i_{k}\right)  $ that satisfy $\sigma=\operatorname*{cyc}\nolimits_{i_{1}%
,i_{2},\ldots,i_{k}}$ (coming from the $k$ options for choosing $i_{1}$ among
the elements of $X$ not fixed by $\sigma$).

In other words, for any $k$-cycle $\sigma$, we have%
\begin{align}
&  \left(  \text{\# of }k\text{-tuples }\left(  i_{1},i_{2},\ldots
,i_{k}\right)  \text{ of distinct elements of }X\text{ such that }%
\sigma=\operatorname*{cyc}\nolimits_{i_{1},i_{2},\ldots,i_{k}}\right)
\nonumber\\
&  =k.\label{sol.perm.cycle.count.5}%
\end{align}


Now, the sum rule yields%
\begin{align*}
&  \left(  \text{\# of }k\text{-tuples }\left(  i_{1},i_{2},\ldots
,i_{k}\right)  \text{ of distinct elements of }X\right) \\
&  =\sum_{\substack{\sigma\in S_{X}\text{ is}\\\text{a }k\text{-cycle}%
}}\underbrace{\left(  \text{\# of }k\text{-tuples }\left(  i_{1},i_{2}%
,\ldots,i_{k}\right)  \text{ of distinct elements of }X\text{ such that
}\sigma=\operatorname*{cyc}\nolimits_{i_{1},i_{2},\ldots,i_{k}}\right)
}_{\substack{=k\\\text{(by (\ref{sol.perm.cycle.count.5}))}}}\\
&  =\sum_{\substack{\sigma\in S_{X}\text{ is}\\\text{a }k\text{-cycle}%
}}k=\left(  \text{\# of }k\text{-cycles in }S_{X}\right)  \cdot k.
\end{align*}
Solving this for $\left(  \text{\# of }k\text{-cycles in }S_{X}\right)  $, we
obtain\footnote{Note that we are using the shepherd's principle again.}%
\begin{align*}
&  \left(  \text{\# of }k\text{-cycles in }S_{X}\right) \\
&  =\dfrac{1}{k}\cdot\underbrace{\left(  \text{\# of }k\text{-tuples }\left(
i_{1},i_{2},\ldots,i_{k}\right)  \text{ of distinct elements of }X\right)
}_{\substack{=n^{\underline{k}}\\\text{(as we have seen above)}}}\\
&  =\dfrac{1}{k}\cdot\underbrace{n^{\underline{k}}}_{\substack{=k!\cdot
\dbinom{n}{k}\\\text{(by (\ref{sol.perm.cycle.count.lf}))}}%
}=\underbrace{\dfrac{1}{k}\cdot k!}_{=\left(  k-1\right)  !}\cdot\dbinom{n}%
{k}=\left(  k-1\right)  !\cdot\dbinom{n}{k}.
\end{align*}


Thus, the general answer to Exercise \ref{exe.perm.cycle.count} is%
\[%
\begin{cases}
1, & \text{if }k=1;\\
\left(  k-1\right)  !\cdot\dbinom{n}{k}, & \text{if }k>1.
\end{cases}
\]

\end{proof}

\begin{thebibliography}{99999999}                                                                                         %


\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[22s]{22s}Darij Grinberg, \textit{Math 530: Graph Theory
(Combinatorial Mathematics I), Spring 2022}.\newline\url{https://www.cip.ifi.lmu.de/~grinberg/t/22s/}

\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[ChLeZh16]{ChLeZh16}\href{https://doi.org/10.1201/b19731}{Gary
Chartrand, Linda Lesniak, Ping Zhang, \textit{Graphs and Digraphs}, 6th
edition, CRC Press 2016.}

\bibitem[Ruohon13]{Ruohon13}Keijo Ruohonen, \textit{Graph theory},
2013.\newline\url{https://www.freetechbooks.com/graph-theory-t1080.html}

\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[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.
\end{thebibliography}


\end{document}