\documentclass[11pt]{article} \usepackage[margin=1in,headheight=24pt]{geometry} \usepackage{fancyhdr} \setlength{\headheight}{55pt} \usepackage{hyperref} \usepackage{tcolorbox} \usepackage{xcolor} \usepackage{amsfonts,amsmath,amssymb,amsthm} \usepackage{mathtools} \usepackage{subcaption} \usepackage{setspace} \usepackage{tikz} \usetikzlibrary{arrows.meta} \usepackage{tikz-network} % Set line spacing to be more open \setstretch{1.3} \newtheorem{theorem}{Theorem}[section] \newtheorem{axiom}[theorem]{Axiom} \newtheorem{corollary}[theorem]{Corollary} \newtheorem{definition}[theorem]{Definition} \newtheorem{example}[theorem]{Example} \newtheorem{fact}[theorem]{Fact} \newtheorem{lemma}[theorem]{Lemma} \newtheorem{proposition}[theorem]{Proposition} \newtheorem{remark}[theorem]{Remark} \definecolor{black}{RGB}{0,0,0} \definecolor{orange}{RGB}{230,159,0} \definecolor{skyblue}{RGB}{86,180,233} \definecolor{bluishgreen}{RGB}{0,158,115} \definecolor{yellow}{RGB}{240,228,66} \definecolor{blue}{RGB}{0,114,178} \definecolor{vermillion}{RGB}{213,94,0} \definecolor{reddishpurple}{RGB}{204,121,167} \definecolor{cugold}{RGB}{207,184,124} \pagestyle{plain} \fancypagestyle{firstpage}{ \fancyhf{} \renewcommand{\headrulewidth}{0pt} \fancyhead[c]{ \makebox[\textwidth][l]{\textbf{MATH 6404: Applied Combinatorics and Graph Theory} \hfill CU Denver} \\ \rule{\textwidth}{0.5pt} \\ \makebox[\textwidth][l]{Spring 2026 \hfill Instructor: Carlos Mart\'inez} } \fancyfoot[C]{\thepage} } \newcommand{\scribebox}[4]{ \begin{tcolorbox}[colback=cugold!40,colframe=black,left=6pt,right=6pt,top=10pt,bottom=10pt] \centering \textbf{Lecture #1:} #2 \\ \textbf{Date:} #3 \hfill \textbf{Scribe:} #4 \end{tcolorbox} } %%% -+-+-+-+-+-+- BEGIN HERE -+-+-+-+-+-+- %%% \newcommand{\lecturenumber}{$6$} \newcommand{\lecturetitle}{Permutations, sets, and multisets} \newcommand{\scribename}{Parsa S. Farahani} \newcommand{\lecturedate}{February 9, 2026} \begin{document} \thispagestyle{firstpage} \scribebox{\lecturenumber}{\lecturetitle}{\lecturedate}{\scribename} \section{Permutations and factorials} You may have seen this before: \[ \binom{n}{k} = \frac{n!}{k!(n-k)!} \] \vspace{0.5em} \noindent The first goal of today is to unpack this (for the case where $n \ge 0$). \\[\baselineskip] $n! = n \times (n-1) \times (n-2) \times \dots \times 2 \times 1$ ($n$ factorial) \\[\baselineskip] $n$ factorial is the number of different ways of ordering $[n]$ \\ (number of permutations of $[n]$) \begin{itemize} \item You have $n$ choices for which element of $[n]$ comes first. \item Given choice of first element, you have $n-1$ choices for which element comes second. \item Given choices of first and second, you have $n-2$ choices for third. \item And so on. \end{itemize} \vspace{1em} Now, we want to understand $\binom{n}{k}$, i.e., ``$n$ choose $k$'' as the number of different ways of picking a subset of size $k$ from a set of size $n$. \\[\baselineskip] define: \[ \binom{[n]}{k} := \{ T \subseteq [n] : |T| = k \} \] what we mean with ``$n$ choose $k$'' is: \[ \binom{n}{k} = \left| \binom{[n]}{k} \right|. \] \vspace{11 em} \noindent Let $P([n], k)$ be the set of words of length $k$ using letters from $[n]$ without repetition. \\[\baselineskip] - $|P([n], n)| = n!$ \\[\baselineskip] - $|P([n], k)| = \underbrace{n \times (n-1) \times \dots \times (n-k+1)}_{k \text{ terms}}$ \\[\baselineskip] denoted $n_{\downarrow k} = \frac{n!}{(n-k)!} $ \\[\baselineskip] $\Rightarrow n_{\downarrow n} = n!$ \vspace{1em} \noindent Now, note that: \[ \left| \binom{[n]}{k} \right| k! = |P([n], k)|. \] Since each set $T \in \binom{[n]}{k}$ can be ordered in $k!$ different ways. \\[\baselineskip] $\Rightarrow \binom{n}{k} = \left| \binom{[n]}{k} \right| = \frac{|P([n], k)|}{k!} = \frac{n!}{(n-k)! k!}$ \vspace{1em} By convention: \begin{itemize} \item $\binom{n}{k} = 0$ if $k < 0$ or $k > n$ \item $\binom{n}{0} = 1$ \item $\binom{0}{0} = 1$ \end{itemize} \vspace{1.5em} \section{Some identities} \begin{lemma} $\sum_{k} \binom{n}{k} = 2^n$ \end{lemma} \begin{proof} First, there are $2^n$ subsets of $[n]$. (recall product rule: $\underbrace{2 \times 2 \times \dots \times 2}_{n \text{ times}}$) \\[\baselineskip] Also, a subset of $[n]$ must have some size $k$. \\ The sizes are mutually exclusive and collectively exhaustive. \\ Thus, use sum rule. \end{proof} \vspace{4em} \begin{lemma} $\binom{n}{k} = \binom{n}{n-k}$ \end{lemma} \begin{proof} Let \[ f : \underbrace{2^{[n]}}_{\text{power set of }[n]} \rightarrow 2^{[n]},\] \\[\baselineskip] where for $S \in \binom{[n]}{k}$, we let $f(S) = [n] \setminus S $. \\[\baselineskip] Here, $[n] \setminus S$ denotes the set of all elements of $[n]$ that are **not in $S$**, and since $S$ has $k$ elements, $[n] \setminus S$ has $n-k$ elements. \vspace{1em} \noindent Note: \\ $f \circ f = \text{Id}_f \Rightarrow f$ is its own inverse --- ``an involution'' \\[\baselineskip] So $f$ restricts to a bijection between $\binom{[n]}{k}$ and $\binom{[n]}{n-k}$. \\[\baselineskip] $\binom{n}{k} = \left| \binom{[n]}{k} \right| = \left| \binom{[n]}{n-k} \right| = \binom{n}{n-k}$ \end{proof} \vspace{1em} \begin{lemma} For $n \ge 1$, $\binom{n}{k} = \binom{n-1}{k-1} + \binom{n-1}{k}$. \end{lemma} \begin{proof} Let \[ \mathcal{S}_1 = \{ S \in \binom{[n]}{k} : n \in S \}, \qquad \mathcal{S}_2 = \{ S \in \binom{[n]}{k} : n \notin S \}. \] Then \[ \binom{[n]}{k} = \mathcal{S}_1 \sqcup \mathcal{S}_2, \] where $\sqcup$ denotes disjoint union. \\[\baselineskip] By sum rule, \[ \binom{n}{k} = \left| \binom{[n]}{k} \right| = |\mathcal{S}_1| + |\mathcal{S}_2|. \] If $S \in \mathcal{S}_1 \Rightarrow S - n \in \binom{[n-1]}{k-1}$. \\ $|\mathcal{S}_1| = \binom{n-1}{k-1}$ \\[\baselineskip] If $S \in \mathcal{S}_2 \xrightarrow{\text{bijection}} S \in \binom{[n-1]}{k}$. \\ $|\mathcal{S}_2| = \left| \binom{[n-1]}{k} \right| = \binom{n-1}{k}$ \\[\baselineskip] we plug these into $|\mathcal{S}_1| + |\mathcal{S}_2|$. \end{proof} \vspace{1.5em} \section{Multisets} Multisets are unordered sets with repetitions accounted for. \\[\baselineskip] For example, \[ \{a, a, b, b, c\} = \{a, b, a, b, c\} \text{ as a multiset}. \] But \[ \{a, a, b, b, c\} \neq \{a, b, c\} \text{ as a multiset}. \] \vspace{1em} Let $\left(\!\binom{[n]}{k}\!\right)$ as the set of multisets on $[n]$ of size $k$. \[ \left(\!\binom{n}{k}\!\right) = \left| \left(\!\binom{[n]}{k}\!\right) \right|. \] \begin{example} $\left(\!\binom{[3]}{2}\!\right) = \{ \{1,1\}, \{1,2\}, \{1,3\}, \{2,2\}, \{2,3\}, \{3,3\} \}$ \\ $\left(\!\binom{3}{2}\!\right) = \left| \left(\!\binom{[3]}{2}\!\right) \right| = 6$ \end{example} \vspace{1.5em} \section{Dots and bars} \begin{lemma} For $n, k \ge 0$, $\left(\!\binom{n}{k}\!\right) = \binom{n+k-1}{k}$. \end{lemma} \begin{proof} We need to pick $k$ things from $n$ different kinds of things. \\[\baselineskip] Form a list of ``dots and bars''. \\ We need $k$ dots and $n-1$ bars. \\ This list will fully determine how many things of each kind we pick. \\[\baselineskip] For example: $\left(\!\binom{3}{5}\!\right)$: \\ 1) $\bullet \bullet \mid \mid \bullet \bullet \bullet \Rightarrow$ 2 of first kind, 0 of second kind, 3 of third kind. \\ 2) $\mid \bullet \bullet \bullet \mid \bullet \bullet \Rightarrow$ 0 of first kind, 3 of second kind, 2 of third kind. \\[\baselineskip] Our list of dots and bars is of length $k + n - 1 = n + k - 1$. \\[\baselineskip] We know that $k$ of the elements of the list must be dots (the rest are all bars). \\[\baselineskip] How many different options for this choice? $\binom{n+k-1}{k}$. \end{proof} \vspace{8 em} \section{Lattice paths} \begin{figure}[h] \centering \caption*{(Cartesian plane and its integer points)} \begin{tikzpicture}[scale=0.7] \draw[step=1cm,gray!30,very thin] (-0.5,-0.5) grid (4.5,3.5); \draw[thick,->] (-0.5,0) -- (5,0) node[right] {$x$}; \draw[thick,->] (0,-0.5) -- (0,4) node[above] {$y$}; \foreach \x in {0,1,2,3,4} \foreach \y in {0,1,2,3} \fill[red!60] (\x,\y) circle (2pt); \draw[ultra thick, blue] (0,0) -- (2,0) -- (2,1) -- (4,1) -- (4,3); \node[below left] at (0,0) {$(0,0)$}; \node[above right] at (4,3) {$(m,n)$}; \end{tikzpicture} \caption{A lattice path from $(0,0)$ to $(m,n)$.} \end{figure} A lattice path from $(0,0)$ to $(m,n)$ is a path from $(0,0)$ to $(m,n)$ using only lattice moves allowed: \begin{itemize} \item North \item East \end{itemize} \vspace{1em} \begin{lemma} The number of N,E lattice paths from $(0,0)$ to $(m,n)$ is $\binom{m+n}{m} = \binom{m+n}{n}$. \end{lemma} \begin{proof} These paths are a list of size $m+n$ with $m$ elements being $E$ steps and $n$ elements being $N$ steps. \\[\baselineskip] The choice of $E$ steps fully determines the path. \\[\baselineskip] There are $\binom{m+n}{m}$ choices. Identity is analogous. \end{proof} \end{document}