From c9dd7f4f990f9e0a7ce9912f14cc0c4d244c92c6 Mon Sep 17 00:00:00 2001 From: Mark Date: Sun, 9 Jul 2023 21:37:57 -0700 Subject: [PATCH] Graph theory partial cleanup --- .../An Introduction to Graph Theory/main.tex | 3 +- .../parts/0 intro.tex | 6 + .../parts/1 paths.tex | 10 +- .../parts/2 planar.tex | 7 + .../parts/3 counting.tex | 157 ++++++++++++++++++ .../tikxset.tex | 5 +- 6 files changed, 181 insertions(+), 7 deletions(-) create mode 100644 Intermediate/An Introduction to Graph Theory/parts/2 planar.tex create mode 100644 Intermediate/An Introduction to Graph Theory/parts/3 counting.tex diff --git a/Intermediate/An Introduction to Graph Theory/main.tex b/Intermediate/An Introduction to Graph Theory/main.tex index 1a32a71..5c41cb0 100755 --- a/Intermediate/An Introduction to Graph Theory/main.tex +++ b/Intermediate/An Introduction to Graph Theory/main.tex @@ -24,6 +24,7 @@ \input{parts/0 intro.tex} \input{parts/1 paths.tex} - + \input{parts/2 planar.tex} + %\input{parts/3 counting.tex} \end{document} \ No newline at end of file diff --git a/Intermediate/An Introduction to Graph Theory/parts/0 intro.tex b/Intermediate/An Introduction to Graph Theory/parts/0 intro.tex index f1f3a88..9ac93c0 100644 --- a/Intermediate/An Introduction to Graph Theory/parts/0 intro.tex +++ b/Intermediate/An Introduction to Graph Theory/parts/0 intro.tex @@ -123,5 +123,11 @@ in my class. Isn't it funny that each of them has 5 friends in the class?} \say{This cannot be true,} immediately replies the other girl. How did she know? + +\vfill + +\problem{} +Say $G$ is a graph with nine vertices. Show that $G$ has at least five vertices of degree six or at least six vertices of degree 5. + \vfill \pagebreak \ No newline at end of file diff --git a/Intermediate/An Introduction to Graph Theory/parts/1 paths.tex b/Intermediate/An Introduction to Graph Theory/parts/1 paths.tex index 092bc6f..44b7e7e 100644 --- a/Intermediate/An Introduction to Graph Theory/parts/1 paths.tex +++ b/Intermediate/An Introduction to Graph Theory/parts/1 paths.tex @@ -201,11 +201,11 @@ Is there an Eulerian path in the following graph? \par Is there an Eulerian path in the following graph? \par \begin{center} - \begin{tikzpicture}[ - node distance={20mm}, - thick, - main/.style = {draw, circle} - ] +\begin{tikzpicture}[ + node distance={20mm}, + thick, + main/.style = {draw, circle} +] \node[main] (1) {$x_1$}; \node[main] (2) [above right of=1] {$x_2$}; diff --git a/Intermediate/An Introduction to Graph Theory/parts/2 planar.tex b/Intermediate/An Introduction to Graph Theory/parts/2 planar.tex new file mode 100644 index 0000000..8f43e79 --- /dev/null +++ b/Intermediate/An Introduction to Graph Theory/parts/2 planar.tex @@ -0,0 +1,7 @@ +\section{Planar Graphs} + +\textbf{TODO.} Will feature planar graphs, euler's formula, utility problem, utility problem on a torus + + +\vfill +\pagebreak \ No newline at end of file diff --git a/Intermediate/An Introduction to Graph Theory/parts/3 counting.tex b/Intermediate/An Introduction to Graph Theory/parts/3 counting.tex new file mode 100644 index 0000000..d54bd8d --- /dev/null +++ b/Intermediate/An Introduction to Graph Theory/parts/3 counting.tex @@ -0,0 +1,157 @@ +\section{Counting Graphs} + +\definition{} +A graph is \textit{bipartite} if its nodes can be split into two groups, where no two nodes in the same group share an edge. One such graph is shown below. + +\problem{} +Draw a bipartite graph with 5 vertices. + +\vfill + +\problem{} +Is the following graph bipartite? \par +\hint{Be careful.} + +\begin{center} +\begin{tikzpicture} + % Nodes + \begin{scope} + \node[main] (A) at (0mm, 0mm) {$A$}; + \node[main] (B) at (0mm, -10mm) {$B$}; + \node[main] (C) at (0mm, -20mm) {$C$}; + + \node[main] (D) at (20mm, 0mm) {$D$}; + \node[main] (E) at (20mm, -10mm) {$E$}; + \node[main] (F) at (20mm, -20mm) {$F$}; + \end{scope} + + % Edges + \draw + (A) edge (D) + (A) edge (E) + (B) edge (F) + (C) edge (E) + (C) edge (D) + (E) edge (F) + ; +\end{tikzpicture} +\end{center} + +\vfill + +\definition{} +A \textit{subgraph} is a graph inside another graph. \par +In the next problem, the left graph contains the left graph. \par +The triangle is a subgraph of the larger graph. + + +\problem{} +Find two subgraphs of the triangle in the larger graph. + +\begin{center} +\adjustbox{valign=c}{ +\begin{tikzpicture} + % Nodes + \begin{scope} + \node[main] (1) {1}; + \node[main] (2) [right of=1] {2}; + \node[main] (3) [below of=1] {3}; + \end{scope} + + % Edges + \draw + (1) edge (2) + (2) edge (3) + (3) edge (1) + ; +\end{tikzpicture} +} +\hspace{20mm} +\adjustbox{valign=c}{ +\begin{tikzpicture} + % Nodes + \begin{scope} + \node[main] (1) {1}; + \node[main] (4) [below of=1] {4}; + \node[main] (3) [left of=4] {3}; + \node[main] (5) [right of=4] {5}; + \node[main] (6) [right of=5] {6}; + \node[main] (2) [above of=6] {2}; + \node[main] (7) [below of=4] {7}; + \end{scope} + + % Edges + \draw + (1) edge (4) + (2) edge (5) + (2) edge (6) + (3) edge (4) + (4) edge (5) + (4) edge (7) + (5) edge (6) + (3) edge (7) + ; +\end{tikzpicture} +} +\end{center} + + + +\vfill +\pagebreak + +A few special graphs have names. Here are a few you should know before we begin: + +\definition{The path graph} +The \textit{path graph} on $n$ vertices (written $P_n$) is a straight line of vertices connected by edges. \par +$P_5$ is shown below. +\begin{center} +\begin{tikzpicture} + \node[main] (1) {1}; + \node[main] (2) [right of=1] {2}; + \node[main] (3) [right of=2] {3}; + \node[main] (4) [right of=3] {4}; + \node[main] (5) [right of=4] {5}; + + \draw[-] (1) -- (2); + \draw[-] (2) -- (3); + \draw[-] (3) -- (4); + \draw[-] (4) -- (5); +\end{tikzpicture} +\end{center} + + +\definition{The complete graph} +The \textit{complete graph} on $n$ vertices (written $K_n$) is the graph that has $n$ nodes, all of which share an edge. +$K_4$ is shown below. + +\begin{center} +\begin{tikzpicture} + \node[main] (1) {A}; + \node[main] (2) [above right of=1] {B}; + \node[main] (3) [below right of=1] {C}; + \node[main] (4) [above right of=3] {D}; + + \draw[-] (1) -- (2); + \draw[-] (1) -- (3); + \draw[-] (1) -- (4); + \draw[-] (2) -- (3); + \draw[-] (2) -- (4); + \draw[-] (3) -- (4); +\end{tikzpicture} +\end{center} + + + +\problem{} +\begin{enumerate} + \item How many times does $P_4$ appear in $K_9$? + \item How many times does $C_4$ appear in $K_9$? + \item How many times does $K_{4,4}$ appear in $K_9$? + \item How many times does $C_5$ appear in $K_8$? + \item How many times does $K_{3,3}$ appear in $K_{12}$? + \item How many times does $K_{3,3}$ appear in $K_{6,6}$? +\end{enumerate} + + + diff --git a/Intermediate/An Introduction to Graph Theory/tikxset.tex b/Intermediate/An Introduction to Graph Theory/tikxset.tex index 384dcfa..c567ce2 100644 --- a/Intermediate/An Introduction to Graph Theory/tikxset.tex +++ b/Intermediate/An Introduction to Graph Theory/tikxset.tex @@ -38,5 +38,8 @@ }, every path/.style = { line width = 0.3mm - } + }, + node distance={20mm}, + thick, + main/.style = {draw, circle} } \ No newline at end of file