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

\begin{proof}[Proof of \nameref{edge_menger}]
  Form $G'$ from $L(G)$ by adding two points, $a'$
  and $b'$, with $a'$ joined to each $e \in E$
  incident with $a$ and similarly for $b'$. Then
  $\exists~ \text{\abpath{a}{b} in $G$} \iff
  \exists~ \text{\abpath{a'}{b'} in $G'$}$, and
  moreover a family of $k$ \gls{indep_edge}
  \abpathpl{a'}{b'} in $G'$ gives a family of $k$
  edge-disjoint \abpathpl{a}{b} in $G$. So done by
  usual \hyperref[mengers_thm]{Vertex Menger}.
\end{proof}

\begin{corollary}
  Let $G$ be a \gls{graph}, $|G| > 1$. Then 
  \[ \text{$G$ \edgecon{k}} \iff \text{$\forall$
  distinct $a, b \in G$, $\exists$ $k$
  edge-disjoint \abpathpl{a}{b}} .\]
\end{corollary}

\begin{proof}
  \phantom{}
  \begin{enumerate}[$\Rightarrow$]
    \item[$\Leftarrow$] Trivial.
    \item[$\Rightarrow$] \nameref{edge_menger}
      \qedhere
  \end{enumerate}
\end{proof}

\begin{note*}
  Can also prove \nameref{edge_menger} by
  \maxflowmincut\ (dual edge-capacity form).
\end{note*}

\newpage
\mychapter{Extremal Problems}

\begin{flashcard}[euler-circuit-defn]
\begin{definition*}[Euler circuit]
  \glsnoundefn{euler_circ}{Euler circuit}{Euler
  circuits}
  \cloze{An \emph{Euler circuit} in a \gls{graph} $G$ is
  a \gls{circ} that contains each \gls{edge} of $G$ exactly
  once.}
\end{definition*}
\end{flashcard}

\begin{flashcard}[eulerian-graph-defn]
\begin{definition*}[Eulerian graph]
  \glsadjdefn{eulerian}{Eulerian}{graph}
  \cloze{
  Say $G$ is \emph{Eulerian} if it has an
  \gls{euler_circ}.
  }
\end{definition*}
\end{flashcard}

\begin{example*}
  \phantom{}
  \begin{center}
    \includegraphics[width=0.6\linewidth]
    {images/8647c4866feb11ee.png}
  \end{center}
\end{example*}

\begin{flashcard}[eulerian-characterisation-prop]
\begin{proposition}
  Let $G$ be a \gls{connected} \gls{graph}. Then $G$
  \gls{eulerian} if and only if \cloze{$\vdeg(x)$ is even for
  all $x \in G$ (so $G$ \gls{eulerian} if and only
  if all \glsref[v_deg]{degrees} even and $\le 1$
  \gls{conn_comp} has an \gls{edge}).}
\end{proposition}

\begin{proof}
  \phantom{}
  \begin{enumerate}[$\Rightarrow$]
    \item \cloze{If \gls{circ} goes through vertex $k$
      times then $\vdeg(x) = 2k$.}
    \item \cloze{Induction on $e(G)$. $e(G) = 0$ trivial.
      Given $G$ with $e(G) > 0$, with $G$
      \gls{connected}, all \glsref[v_deg]{degrees} even:
      choose a longest \gls{circ} $C$ in $G$ not
      repeating any \gls{edge} ($e(C) > 0$ because
      $G$ has a \gls{cycle}, since $G$ not a
      \gls{tree} since all \glsref[v_deg]{degrees} are $>2$).

      Suppose $E(C) \neq E(G)$. Let $H$ be a
      \gls{conn_comp} of $G - E(C)$ with $e(H) > 0$.
      Then for all $x \in H$, $\vdeg_H(x)$ even
      (as $\vdeg_G(x)$ even, $\vdeg_C(x)$ even).
      So $H$ has an \gls{euler_circ}, $C'$ say
      (induction). Since $V(H) \cap V(C) \neq
      \emptyset$ ($G$ connected), can combine $C$
      and $C'$ to find a longer \gls{circ} than
      $C$ with no repeated \gls{edge}.} \qedhere
  \end{enumerate}
\end{proof}
\end{flashcard}

\begin{flashcard}[hamiltonian-circuit-defn]
\begin{definition*}[Hamiltonian circuit]
  \glsnoundefn{ham_cyc}{Hamiltonian
  cycle}{Hamiltonian cycle}
  \cloze{
  In a \gls{graph} $G$, a \emph{Hamiltonian
  cycle} is a \gls{cycle} that goes through every
  \gls{edge} of $G$.
  }
\end{definition*}
\end{flashcard}

\begin{flashcard}[hamiltonian-graph-defn]
\begin{definition*}[Hamiltonian graph]
  \glsadjdefn{ham_graph}{Hamiltonian}{graph}
  \cloze{
  Say $G$ is \emph{Hamiltonian} if it contains a
  \gls{ham_cyc}.
  }
\end{definition*}
\end{flashcard}

\begin{example*}
  \phantom{}
  \begin{center}
    \includegraphics[width=0.6\linewidth]
    {images/2003d3286fef11ee.png}
  \end{center}
\end{example*}
\vspace{-1em}

There is no ``nice'' if and only if
characterisation of
\glsref[ham_graph]{Hamiltonicity}. No parity kind
of condition since $G$ \gls{ham_graph} implies
$G + xy$ is as well.

How ``large'' does a graph have to be to ensure
that it is \gls{ham_graph}? Could ask, how many
\glspl{edge} do we need to ensure $G$ (on $n$
\glspl{vertex}) is \gls{ham_graph}? This is a
silly question, because any $x$ with $\vdeg(x) =
1$ stops $G$ from being \gls{ham_graph}, so could
for example take $\complete_n$ with an extra \gls{vertex}
connected to a single \gls{vertex} in $\complete_n$.
This has ${n \choose 2} - (n - 2)$ edges, but it
not \gls{ham_graph}.

\textbf{Sensible question}: What $\mindeg(G)$
forces $G$ to be \gls{ham_graph}? If $n$ even,
then $G$ being two disjoint $\complete_{n/2}$ has
$\mindeg(G) = \frac{n}{2} - 1$, not
\gls{ham_graph}. If $n$ odd, then $G$ being two
$\complete{(n + 1)/2}$s, meeting at a point, has
$\mindeg(G) = \frac{n - 1}{2}$, not
\gls{ham_graph}.

\begin{theorem}
  \label{min_deg_implies_ham}
  Let $G$ be a \gls{graph} on $n$ \glspl{vertex}
  ($n \ge 2$), with $\mindeg(G) \ge \frac{n}{2}$.
  Then $G$ is \gls{ham_graph}.
\end{theorem}

\begin{proof}
  $G$ \gls{connected}, since for any
  non-\gls{adj_v} $x, y$ must have $\nbd(x) \cap
  \nbd(y) \neq \emptyset$ for size reasons.

  Choose a longest \gls{path} $P = x_1, \ldots,
  x_l$ in $G$. ($l \ge 3$ since $G$
  \gls{connected}, $|G|
  > 3$).
  
  Without loss of generality, $G$ has no
  $l$-\gls{cycle}, because if $l = n$ then have
  $n$-\gls{cycle}, and if $l < n$ then there exists $x
  \not\in$ \gls{cycle} \gls{adj_v} to \gls{cycle} (as $G$
  \gls{connected}), giving a \gls{path} on $l + 1$
  \glspl{vertex}.

  By maximality of $l$, we must have $\nbd(x_1)
  \subset \{x_1, \ldots, x_l\}$, $\nbd(x_l)
  \subset \{x_1, \ldots, x_l\}$, and $x_1 x_l
  \not\in E$. Also, cannot have $i$ such that $x_1
  x_i \in E, x_{i - 1} x_i \in E$ (else have an
  $l$-\gls{cycle}). So the sets $\nbd(x_1)$ and
  $\nbd^-(x_l) = \{2 \le i \le l, x_{i - 1} \in
  \nbd(x_l)\}$ are disjoint. But $\nbd(x_1),
  \nbd^-(x_l) \subset \{x_1, \ldots, x_n\}$ and
  have size $\ge \frac{n}{2}$, contradiction.
\end{proof}

\begin{remark*}
  Actually, only needed $\vdeg(x) + \vdeg(y) \ge
  n ~\forall x, y$ non-\gls{adj_v}.
\end{remark*}
