%! TEX root = GT.tex
% vim: tw=50
% 12/10/2023 09AM

\begin{remark*}
   A planar graph $G$ can have inequivalent
   drawings:
   \begin{center}
       \includegraphics[width=0.6\linewidth]
       {images/9a335e3068d711ee.png}
   \end{center}
\end{remark*}
\vspace{-1em}

Despite this, perhaps is it the case that the
number of faces is always the same? It turns out
the answer is yes.

\begin{flashcard}[euler-formula-thm]
\begin{theorem}[Euler's Formula]
  \label{eulers_formula}
  \cloze{
  Let $G$ be a \fcemph{connected} plane graph with
  $n$ vertices, $m$ edges and $f$ faces. Then $n -
  m + f = 2$.
  }
\end{theorem}

\fcscrap{
\begin{note*}
  We do need $G$ connected. For example, $E_n$ has
  $n$ vertices, $0$ edges and $1$ face.
\end{note*}
}

\begin{proof}
  \cloze{
  If $G$ acyclic, then $G$ is a tree, so $m = n -
  1$, $f = 1$.

  If $G$ has a cycle, pick edge $e$ on a cycle and
  let $G' = G - xy$. Then $G'$ has $n$ vertices,
  $m - 1$ edges, $f - 1$ faces (as $e$ on a
  cycle). So $n - (m - 1) + (f - 1) = 2$
  (induction), i.e. $n - m + f = 2$.
  }
\end{proof}
\end{flashcard}

\begin{flashcard}[planar-graph-bound]
\begin{theorem}
  \label{plane_graph_ineq}
  Let $G$ be a planer graph with $n$ vertices ($n
  \ge 3$) and $m$ edges. Then \cloze{$m \le 3n -
  6$.}
\end{theorem}

\fcscrap{
\begin{note*}
  \phantom{}
  \begin{enumerate}[(1)]
    \item This is a \emph{linear} bound -- whereas
      in general a graph could have up to ${n
      \choose 2} = \frac{n^2 - n}{2}$ edges.
    \item Bound is best-possible, for example
      \begin{center}
          \includegraphics[width=0.6\linewidth]
          {images/1834179268d911ee.png}
      \end{center}
  \end{enumerate}
\end{note*}
}

\begin{proof}
  \cloze{
  Without loss of generality, assume $G$ is
  connected (else add edges to make $G$
  connected).

  If we sum, for each face, the number of edges on
  its boundary, we obtain $\ge 3f$, since each
  face has $\ge 3$ edges (for $n > 3$, and for $n
  = 3$ the theorem is trivial anyway).

  Also, each edge is counted at most twice. Hence
  $3f \le 2m$, so by \nameref{eulers_formula}, $n
  - m + \frac{2}{3}m \ge 2$, i.e. $n - \frac{m}{3}
  \ge 2$, so $m \le 3n - 6$ as desired.
  }
\end{proof}
\end{flashcard}

\begin{flashcard}[K5-not-planar-coro]
\begin{corollary}
  $K_5$ is not planar.
\end{corollary}

\begin{proof}
  \cloze{
  $n = 5$, $m = 10$, violating $m \le 3n - 6$ from
  \cref{plane_graph_ineq}.
  }
\end{proof}
\end{flashcard}

Hence any $G$ containing $K_5$ as a subgraph is
not planar, for example $K_n$ for $n \ge 5$.

\begin{flashcard}[subdivision-defn]
\begin{definition*}[Subdivision]
  \cloze{
  A \emph{subdivision} of a graph $G$ is obtained
  by replacing some edges of $G$ by (distinct)
  paths.
  }
\end{definition*}
\end{flashcard}

\vspace{-1em}
Hence any $G$ containing any subdivided $K_5$ is
non-planar.

\begin{flashcard}[girth-defn]
\begin{definition*}[Girth]
  \glspropdefn{girth}{girth}{\gls{graph}}
  \cloze{
  The \emph{girth} of a graph is the length of a
  shortest cycle in $G$ (and if $G$ has no cycles
  we say girth $\infty$).
  }
\end{definition*}
\end{flashcard}

\begin{flashcard}[generalised-planar-graph-bound]
\begin{theorem*}
  Let $G$ be a planar graph with girth $\ge g$.
  Then
  \[ \cloze{m \le \max \left( \frac{g}{g - 2} (n -
  2), n - 1 \right)} \]
\end{theorem*}
\end{flashcard}
\vspace{-1em}

Using this, we may check that $K_{3, 3}$ is not
planar.

Hence any $G$ that contains a subdivided $K_{3,
3}$ or subdivided $K_5$ must not be planar.

\begin{theorem*}[Kuratowski's Theorem]
  \label{kuratowski}
  $G$ is planar if and only if it contains no
  subdivision of $K_5$ or $K_{3, 3}$.
\end{theorem*}

\begin{proof}
  Not proved in this course, because the proof is
  very long and not terribly interesting.
\end{proof}

So, to show a graph $G$ is planar, just draw it.
To show a graph $G$ isn't planar, find a
subdivided $K_5$ or $K_{3, 3}$.
\nameref{kuratowski} says that this method will
always work. But in any proof of this form, we
don't actually have to quote this theorem!

\newpage
\mychapter{Connectivity and Matchings}

\newpage
\section{Matchings and Hall's Marriage Theorem}

\glsadjdefn{indep_edge}{independent}{edges}
Say that a set of edges is \emph{independent} if
none of the edges have any vertices in common.

Let $G$ be bipartite, classes $X, Y$. A matching
from $X$ to $Y$ consists of $|X|$ independent
edges (no vertices in common). When does $G$ have
a matching. `Mathmaker' terminology: $X$ is boys,
$Y$ is girls. An edge from $x$ to $y$ if $x$ knows
$y$. Want to marry off each boy with a girl he
knows.

Fails if there exists $x \in X$ with $d(x) = 0$,
or if there exists distinct $x, x' \in X$ with
$d(x) = d(x') = 1$, $\Gamma(x) = \Gamma(x')$.

Write $\Gamma(A)$ for $\bigcup_{x \in A}
\Gamma(x)$ for any $A \subset X$. Then certainly
\emph{must} have $|\Gamma(A)| \ge |A|$ for all $A
\subset X$. Do there exist any other possible
obstructions?
