\section{Introduction}


\definition{}
Informally, a \textit{permutation} of a collection of $n$ objects is an ordering of these $n$ objects. \par
For example, a few permutations of $\texttt{A}, \texttt{B}, \texttt{C}, \texttt{D}$ are $\texttt{ABCD}$,
$\texttt{BCDA}$, and $\texttt{DACB}$. \par

\vspace{2mm}

This, however, isn't the definition we'll use today. Instead of defining permutations as \say{ordered lists,}
(as we do above), we'll define them as functions. Our first goal today is to make sense of this definition.



\definition{Permutations}
Let $\Omega$ be an arbitrary set of $n$ objects. \par
A \textit{permutation} on $\Omega$ is a map from $\Omega$ to itself that produces a \textit{unique} output for each input. \par
\note{In other words, if $a$ and $b$ are different, $f(a)$ and $f(b)$ must also be different.}


\footnotetext{The words \say{function} and \say{map} are equivalent.}

\vspace{2mm}

For example, consider $\{1, 2, 3\}$. \par
One permutation on this set can be defined as follows: \par
\begin{itemize}
	\item $f(1) = 3$
	\item $f(2) = 1$
	\item $f(3) = 2$
\end{itemize}

If we take the array $123$ and apply


\problem{}
List all permutations on three objects. \par
How many permutations of $n$ objects are there?

\vfill


\problem{}
What map corresponds to the permutation $[321]$?


\vfill

\problem{}
What map corresponds to the \say{do-nothing} permutation? \par
Write it as a function and in square-bracket notation. \par
\note[Note]{We usually call this the \textit{trivial permutation}}


\vfill
\pagebreak


We can visualize permutations with a \textit{string diagram}, shown below. \par
The arrows in this diagram denote the image of $f$ for each possible input.
Two examples are below:

\vspace{2mm}
\hfill
\begin{tikzpicture}[scale=0.5]
	\node (1a) at (0, 0.5) {1};
	\node (2a) at (1, 0.5) {2};
	\node (3a) at (2, 0.5) {3};
	\node (4a) at (3, 0.5) {4};

	\node (1b) at (0, -2) {1};
	\node (3b) at (1, -2) {3};
	\node (4b) at (2, -2) {4};
	\node (2b) at (3, -2) {2};

	\line{1a}{1b}
	\line{2a}{2b}
	\line{3a}{3b}
	\line{4a}{4b}
\end{tikzpicture}
\hfill
\begin{tikzpicture}[scale=0.5]
	\node (1a) at (0, 0.5) {1};
	\node (2a) at (1, 0.5) {2};
	\node (3a) at (2, 0.5) {3};
	\node (4a) at (3, 0.5) {4};

	\node (2b) at (0, -2) {2};
	\node (1b) at (1, -2) {1};
	\node (3b) at (2, -2) {3};
	\node (4b) at (3, -2) {4};

	\line{1a}{1b}
	\line{2a}{2b}
	\line{3a}{3b}
	\line{4a}{4b}
\end{tikzpicture}
\hfill\null
\vspace{2mm}


Note that in all our examples thus far, the objects in our set have an implicit order.
This is only for convenience. The elements of $\Omega$ are not ordered (it is a \textit{set}, after all),
and we may present them however we wish.







\vspace{1cm}

For example, consider the diagrams below. \par
On the left, 1234 are ordered as usual. In the middle, they are ordered alphabetically. \par
The rightmost diagram uses arbitrary, meaningless labels.

\vspace{2mm}
\hfill
\begin{tikzpicture}[scale=0.5]
	\node (1a) at (0, 0.5) {1};
	\node (2a) at (1, 0.5) {2};
	\node (3a) at (2, 0.5) {3};
	\node (4a) at (3, 0.5) {4};

	\node (2b) at (0, -2) {2};
	\node (1b) at (1, -2) {1};
	\node (3b) at (2, -2) {3};
	\node (4b) at (3, -2) {4};

	\line{1a}{1b}
	\line{2a}{2b}
	\line{3a}{3b}
	\line{4a}{4b}
\end{tikzpicture}
\hfill
\begin{tikzpicture}[scale=0.5]
	\node (4a) at (0, 0.5) {4};
	\node (1a) at (1, 0.5) {1};
	\node (3a) at (2, 0.5) {3};
	\node (2a) at (3, 0.5) {2};

	\node (1b) at (0, -2) {1};
	\node (4b) at (1, -2) {4};
	\node (3b) at (2, -2) {3};
	\node (2b) at (3, -2) {2};

	\line{1a}{1b}
	\line{2a}{2b}
	\line{3a}{3b}
	\line{4a}{4b}
\end{tikzpicture}
\hfill
\begin{tikzpicture}[scale=0.5]
	\node (1a) at (0, 0.5) {$\triangle$};
	\node (2a) at (1, 0.5) {$\divideontimes$};
	\node (3a) at (2, 0.5) {$\circledcirc$};
	\node (4a) at (3, 0.5) {$\boxdot$};

	\node (2b) at (0, -2) {$\divideontimes$};
	\node (1b) at (1, -2) {$\triangle$};
	\node (3b) at (2, -2) {$\circledcirc$};
	\node (4b) at (3, -2) {$\boxdot$};

	\line{1a}{1b}
	\line{2a}{2b}
	\line{3a}{3b}
	\line{4a}{4b}
\end{tikzpicture}
\hfill\null
\vspace{2mm}


It shouldn't be hard to see that despite the different \say{output} order (2134 and 1432), \par
the same permutation is depicted in all three diagrams. This example demonstrates two things:
\begin{itemize}[itemsep=2mm]
	\item First, the names of the items in our set do not have any meaning. \par
	$\Omega$ is just a set of $n$ arbitrary things, which we may label however we like.

	\item Second, permutations are verbs. We do not care about the \say{output} of a certain permutation,
	we care about what it \textit{does}. We could, for example, describe the permutation above as
	\say{swap the first two of four elements.}
\end{itemize}

\vspace{2mm}


Why, then, do we order our elements when we talk about permutations? As noted before, this is for convenience.
If we assign a natural order to the elements of $\Omega$ (say, 1234), we can identify permutations by simply listing
their output:
Clearly, $[1234]$ represents the trivial permutation, $[2134]$ represents \say{swap first two,}
and $[4123]$ represents \say{cycle right.}

\problem{}
Draw string diagrams for $[4123]$ and $[2341]$.

\vfill
\pagebreak