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

\begin{flashcard}[forest-defn]
\begin{definition*}[Forest]
  \cloze{
  A \emph{forest} is an acyclic graph.
  }
\end{definition*}
\end{flashcard}

\begin{flashcard}[Cutvertex]
  \glsnoundefn{cutvertex}{cutvertex}{cutvertices}
  A \emph{cutvertex} is \cloze{a \gls{vertex} $x$ such
  that $G - x$ is \glsref[connected]{connected}.}
\end{flashcard}

\begin{flashcard}[bridge-defn]
\begin{definition*}[Bridge]
  \cloze{For a connected graph $G$, an edge $xy \in G$ is
  a \emph{bridge} if $G - xy$ is disconnected.}
\end{definition*}
\end{flashcard}

\begin{remark*}
  Every edge in a tree is a bridge.
\end{remark*}

\begin{flashcard}[bridge-implies-cutvertex-lemma]
\begin{lemma*}
  If $G$ has a bridge, \cloze{then it has a
  curvertex (as long as $|G| > 2$).}
\end{lemma*}
\end{flashcard}

\begin{remark*}
  If $G$ has a cutvertex, it doesn't necessarily
  have a bridge. For example:
  \begin{center}
      \includegraphics[width=0.6\linewidth]
      {images/68863b2a674511ee.png}
  \end{center}
\end{remark*}

\begin{hiddenflashcard}[cutvertex-doesnt-imply-bridge]
\begin{lemma*}
  If $G$ has a cutvertex, \cloze{then it
  \fcemph{does not} necessarily have a bridge.}
\end{lemma*}
\end{hiddenflashcard}

\subsection{Bipartite Graphs}

\begin{flashcard}[bipartite-defn]
\begin{definition*}[Bipartite Graph]
  \glsadjdefn{bipartite}{bipartite}{graph}
  \glssymboldefn{bipartite_complete}{complete bipartite}{graph}
  \cloze{A graph $G = (V, E)$ is \emph{bipartite} if
  there exists a partitition $V = V_1, V_2$ of $V$
  such that $E \subset \{xy : x \in V_1, y \in
  V_2\}$.}
\end{definition*}
\end{flashcard}
\vspace{-1em}

``No edges inside the two parts.''

\begin{example*}
  A path is a bipartite graph:
  \begin{center}
      \includegraphics[width=0.6\linewidth]
      {images/ef31e30e674511ee.png}
  \end{center}
\end{example*}

\begin{flashcard}[complete-bipartite-defn]
\begin{definition*}
  \glsadjdefn{complete_bipartite}{complete
  bipartite}{graph}
  \glssymboldefn{complete_bipartite}{$K_{m,
  n}$}{$K_{m, n}$}
  $K_{m, n}$ denotes \cloze{the \emph{complete
  bipartite graph}, which has vertex set $V_1 \cup
  V_2$ ($V_1$, $V_2$ disjoint), with $|V_1| = m$,
  $|V_2| = n$ and edge set $E = \{xy : x \in V_1,
  y \in V_2\}$. So $e(K_{m, n}) = mn$.}
\end{definition*}
\end{flashcard}

\begin{example*}
  $K_{2, 3}$ looks like:
  \begin{center}
      \includegraphics[width=0.6\linewidth]
      {images/5e3ab212674611ee.png}
  \end{center}
\end{example*}
\vspace{-1em}

We will show that a graph is bipartite if and only
if it has no odd length cycles, but first we need
to introduce the concept of a circuit.

\begin{flashcard}[circuit-defn]
\begin{definition*}[Circuit]
  \glsnoundefn{circ}{circuit}{circuits}
  \cloze{A \emph{circuit} in a graph is a closed
  walk, i.e. a walk $x_1, \ldots, x_k$ with $x_k =
  x_1$.}
\end{definition*}
\end{flashcard}

\begin{flashcard}[odd-circuit-implies-odd-cycle]
\begin{lemma*}
  If $G$ has an odd circuit, then it has an odd
  cycle.
\end{lemma*}

\begin{proof}
  \cloze{
  Suppose $x_1, \ldots, x_k = x_1$ is an odd circuit
  that is not a cycle. Say $x_i = x_j$ for $i <
  j$. Then one of $x_i x_{i + 1} \ldots x_j$ or
  $x_j x_{j + 1} \ldots x_{k - 1} x_1 x_2 \ldots
  x_i$ is a shorter circuit. Done by induction on
  length.}
\end{proof}
\end{flashcard}

\begin{remark*}
  We have crucially used oddness in this proof.
  The lemma is false if ``odd'' is replaced by
  ``even''.
\end{remark*}

\begin{flashcard}[bipartite-iff-prop]
\begin{proposition}
  A graph $G$ is bipartite if and only if
  \cloze{$G$ has no odd cycle.}
\end{proposition}

\begin{proof}
  \begin{enumerate}[$\Rightarrow$]
    \item[$\Rightarrow$] \cloze{A cycle's vertices must
      alternate between $V_1$ and $V_2$.}
    \item[$\Leftarrow$] \cloze{Without loss of
      generality, assume $G$ is connected (since
      if each component of $G$ is bipartite then
      so is $G$). Fix $x_0 \in V$. Let $V_1 = \{x
      : d(x, x_0) \text{even}\}$ and $V_2 = \{x :
      d(x, x_0) \text{odd}\}$. If we had an edge
      $xy$ with $x, y \in V_1$ or $x, y \in V_2$,
      then $xy$ together with shortest paths from
      $x$ and $y$ to $x_0$ would form an odd
      circuit. Hence $G$ would contain an odd
      cycle, contradiction.} \qedhere
  \end{enumerate}
\end{proof}
\end{flashcard}

\subsection{Planar graphs}

\begin{flashcard}[planar-graph-defn]
\begin{definition*}[Planar Graph]
  \glsadjdefn{planar}{planar}{graph}
  \cloze{A \emph{planar graph} is a graph that can be
  drawn in the plane without crossing edges.}
\end{definition*}
\end{flashcard}

\begin{flashcard}[plane-graph-defn]
\begin{definition*}[Plane Graph]
  \glsadjdefn{plane}{plane}{\gls{graph}}
  \cloze{A \emph{plane graph} is a drawing of a
  planar graph in which none of the edges cross.}
\end{definition*}
\end{flashcard}

\begin{example*}
  $K_4$ is a planar graph, but the following is
  not a plane graph:
  \begin{center}
      \includegraphics[width=0.3\linewidth]
      {images/321aca30674811ee.png}
  \end{center}
  On the other hand, this drawing of $K_4$
  \emph{is} a plane graph:
  \begin{center}
      \includegraphics[width=0.3\linewidth]
      {images/3fccadf6674811ee.png}
  \end{center}
\end{example*}

\begin{flashcard}[face-defn]
\begin{definition*}[Face]
  \glsnoundefn{face}{face}{faces}
  \cloze{For a plane graph $G$, $\RR^2 - G$ splits
  up into connected regions called \emph{faces}.

  The \emph{boundary} of a face consists of the
  vertices and edges of $G$ that touch it.}
\end{definition*}
\end{flashcard}

\begin{example*}
  The following has 6 faces:
  \begin{center}
      \includegraphics[width=0.3\linewidth]
      {images/a10551cc674811ee.png}
  \end{center}
  $F_1$ has boundary a $3$-cycle, and $F_6$ has
  boundary a $5$-cycle.
\end{example*}

\begin{warning*}
  \phantom{}
  \begin{enumerate}[(1)]
    \item Boundary of a face need not be a cycle,
      for example
      \begin{center}
          \includegraphics[width=0.3\linewidth]
          {images/f8e046b8674811ee.png}
      \end{center}
    \item Boundary of a face need not even be
      connected, for example:
      \begin{center}
          \includegraphics[width=0.3\linewidth]
          {images/2457a0a2674911ee.png}
      \end{center}
    \item The two faces on either side of an edge
      may be the same, for example:
      \begin{center}
          \includegraphics[width=0.3\linewidth]
          {images/39483b66674911ee.png}
      \end{center}
  \end{enumerate}
\end{warning*}

\begin{example*}
  \phantom{}
  \begin{enumerate}[(1)]
    \item Every tree is planar, with exactly 1
      face. Proof is by induction via remove a
      leaf (remember that this is the usual way to
      attack a question about trees).
    \item The empty graph $E_n$ is planar.
    \item Every cycle is planar (via the obvious
      drawing).
  \end{enumerate}
\end{example*}
\vspace{-1em}

\textbf{Question:} Which graphs are planar? How do
we tell if a graph is / isn't planar?

\subsubsection*{Formal Bit}

\begin{definition*}
  For $x, y \in RR^2$, a \emph{polygonal arc} from
  $x$ to $y$ is a finite union of (closed)
  straight-line segments $\ol{x_1 x_2} \cup
  \ol{x_2 x_3} \cup \cdots \cup \ol{x_{k - 1}
  x_k}$ such that $x_1 = x$, $x_k = y$ and the
  $\ol{x_i x_{i + 1}}$ are disjoint except for
  $\ol{x_i x_{i + 1}} \cap \ol{x_{i + 1} x_{i +
  2}} = \{x_{i + 1}\}$.
\end{definition*}
\vspace{-1em}

For a graph $G$, with $V = \{v_1, \ldots, v_n\}$,
a \emph{drawing} of $G$ consists of distinct
points $x_1, \ldots, x_n \in \RR^2$, together
with, for each $v_i v_j \in E$, a polygonal arc
$p_{ij}$ from $x_i$ to $x_j$ such that $p_{ij}
\cap p_{kl} = \emptyset$ if $i, j, k, l$ distinct
and $p_{ij} \cap p_{jk} = \{x_j\}$ for $i, k$
distinct.

On $\RR^2 - G$, define $x \sim y$ if there exists
a polygonal arc in $\RR^2 - G$ from $x$ to $y$.
Clearly (ish), this is an equivalence relation.
The components are the \emph{faces} of $G$. The
\emph{boundary} of a face is the intersection of
$G$ with the closure of the face.

\begin{hiddenflashcard}[plane-graph-formalities]
\prompt{Formal setup for a plane graph drawing?}

\cloze{
Edges are drawn as polygonal arcs (sequence of
line segments).

Vertices are distinct points.

Faces are connected components of $\RR^2 - G$
(where connected means there exists a polygonal
arc between two points).
}
\end{hiddenflashcard}

We'll use simple faces about $\RR^2$, like
``boundary of a face consists of vertices and
(whole) edges'' or ``a cycle has 2 faces'' - all
can be proved by induction on the number of
straight-line segments.
