It's just dots and lines
Consider the following graph:
The vertex set is \(\{A,B,C,D,E\}\)
The edge set is \(\{AB, AE, BC, CE, ED\}\)
Yes! A graph is connected if for any two vertices \(u\) and \(w\), there is a list of vertices \(u,v_{1},v_{2},\ldots,v_{k},w\) such that each consecutive pair in the list is adjacent in the graph.
What does connected mean? Is this graph connected?
An extremely useful way to represent a graph is called the adjacency matrix. This is the matrix with rows and columns labeled by the vertices (in the same order). The matrix has a \(1\) if the row and column indices are adjacent, and zero otherwise.
\(x_{0} = \begin{bmatrix}1\\0\\0\\0\\0\end{bmatrix}\) or \(x_{0} = \begin{bmatrix}0\\0\\0\\1\\0\end{bmatrix}\)
Consider the previous algorithm starting with:
The graph is connected!
How many edges do we need to delete to make it disconnected?
The graph has 16 edges, so we could delete each edge, then test again...
There are 120 pairs of edges, so we could delete each pair and test again...
What if that fails?
For a graph with vertices \(v_{1},v_{2},v_{3},\ldots,v_{n}\) the adjacency matrix \(A\) is given by
\[A_{i,j} = \begin{cases} 1 & v_i\text{ is adjacent to }v_{j},\\ 0 & \text{otherwise}.\end{cases}\]
The degree of vertex \(v_{i}\), denoted \(d(v_{i})\) is the number of edges incident with \(v_{i}\), that is \[d(v_{i}) = \sum_{i=1}^{n}A_{i,j}.\]
The Laplacian is the \(n\times n\) matrix \(L\) given by
\[L_{i,j} = \begin{cases} d(v_{i}) & i=j,\\ -A_{i,j} & i\neq j.\end{cases} \]
Consider the previous example:
For any vector \(x\in\mathbb{R}^{n}\) we have
\[x^{\top}Lx = [x_{1}\ \ x_{2}\ \ x_{3}\ \ \cdots\ \ x_{n}]\left[\begin{array}{ccccc}L_{1,1} & L_{1,2} & L_{1,3} & \cdots & L_{1,n}\\ L_{2,1} & L_{2,2} & L_{2,3} & \cdots & L_{2,n}\\[-1ex] L_{3,1} & L_{3,2} & L_{3,3} & & \vdots\\ \vdots & \vdots & & \ddots & \vdots\\ L_{n,1} & L_{n,2} & \cdots & \cdots & L_{n,n}\end{array}\right]\left[\begin{array}{c}x_{1}\\ x_{2}\\ x_{3}\\ \vdots \\ x_{n}\end{array}\right]\]
\[= \sum_{i=1}^{n}\sum_{j=1}^{n}x_{i}x_{j}L_{i,j} = \sum_{i=1}^{n}x_{i}^{2}L_{i,i} - \sum_{i=1}^{n}\sum_{j=1}^{n}x_{i}x_{j}A_{i,j}\]
\[\left[\begin{array}{ccccc}d(v_{1}) & -A_{1,2} & -A_{1,3} & \cdots & -A_{1,n}\\ -A_{2,1} & d(v_{2}) & -A_{2,3} & \cdots & -A_{2,n}\\ -A_{3,1} & -A_{3,2} & d(v_{3}) & & \vdots\\ \vdots & \vdots & & \ddots & \vdots\\ -A_{n,1} & -A_{n,2} & \cdots & \cdots & d(v_{n})\end{array}\right]\]
\[= \sum_{i=1}^{n}x_{i}^{2}\sum_{j=1}^{n}A_{i,j} - \sum_{i=1}^{n}\sum_{i=1}^{n}x_{i}x_{j}A_{i,j} = \sum_{i=1}^{n}\sum_{j=1}^{n}(x_{i}^{2}-x_{i}x_{j})A_{i,j}\]
Thus, since \(A_{i,j} = A_{j,i}\) we have
\[x^{\top}Lx = \sum_{i=1}^{n}\sum_{j=1}^{n}(x_{i}^{2}-x_{i}x_{j})A_{i,j} = \sum_{i=1}^{n}\sum_{j=1}^{n}(x_{j}^{2}-x_{i}x_{j})A_{i,j}\]
Hence
\[x^{\top}Lx = \frac{1}{2}\sum_{i=1}^{n}\sum_{j=1}^{n}(x_{i}^{2}-2x_{i}x_{j}+x_{j}^{2})A_{i,j} = \frac{1}{2}\sum_{i=1}^{n}\sum_{j=1}^{n}(x_{i}-x_{j})^{2}A_{i,j}.\]
For which vectors \(x\) is it the case that
\[x^{\top}Lx = \frac{1}{2}\sum_{i=1}^{n}\sum_{j=1}^{n}(x_{i}-x_{j})^{2}A_{i,j} = 0?\]
This occurs if and only if \(x_{i}=x_{j}\) for all \(i\) and \(j\) such that \(A_{i,j} = 1\).
Thus, \(x^{\top}Lx=0\) if and only if \(x\) is "constant on connected components".
In particular,
\(Lx=0\) \(\Rightarrow\) \(x^{\top}Lx = 0\)\(\Rightarrow\) \(x\) is constant on connected components.
Example
For this vector \(Lx = 0\):
For a connected graph:
Instead of \(Lx=0\), we look for \(x\neq 0\) such that \(Lx=\lambda x\) for the smallest \(\lambda\).
w/ \(\lambda = 0.3033351\)
\(A=\)
Definition 1.1.2. A graph \(G\) is a triple consisting of a vertex set \(V(G)\), an edge set \(E(G)\), and a relation that associates with each edge two vertices (not necessarily distinct) called its endpoints.
Example. Note that the vertex set is \(\{v_{1},v_{2},v_{3},v_{4},v_{5}\}\) and the edge set is \(\{e_{1},e_{2},e_{3},e_{4},e_{5}\}\).
The endpoints of \(e_{4}\) are \(v_{3}\) and \(v_{4}\).
Example. The vertex set is \(\{v_{1},v_{2},v_{3},v_{4},v_{5}\}\) and the edge set is \(\{e_{1},e_{2},e_{3},e_{4},e_{5},e_{6}\}\).
Both \(e_{1}\) and \(e_{6}\) have endpoints \(v_{1}\) and \(v_{2}\), thus they are multiple edges.
Example. Note that the vertex set is \(\{v_{1},v_{2},v_{3},v_{4},v_{5}\}\) and the edge set is \(\{e_{1},e_{2},e_{3},e_{4},e_{5},e_{6},e_{7}\}\).
The edge \(e_{7}\) has only one endpoint, this type of edge is called a loop.
If \(u\) and \(v\) are endpoints of an edge, they are adjacent and are neighbors, and we write \(u\leftrightarrow v\)
A graph without multiple edges and without loops is called a simple graph.
In a simple graph we can name the edges by their endpoints:
In the following graph, the edge set is \(\{v_{1}v_{2},v_{1}v_{3},v_{2}v_{4}, v_{3}v_{4}, v_{4}v_{5}\}\)
Definition 1.1.8.
Example.
\(G\)
\(\overline{G}\)
\(\{v_{2},v_{3},v_{5}\}\) is a clique in \(\overline{G}\)
\(\{v_{2},v_{3},v_{5}\}\) is an independent set in \(G\)
Example 1.1.7. Consider a group of 5 people. Is there always a group of three who are all mutual acquaintances or mutual strangers? In other words, for every simple graph on 5 vertices \(G\), does either \(G\) or \(\overline{G}\) contain a clique of size 3?
\(G\)
\(\overline{G}\)
What about in a group of 6 people?
Definition 1.1.10. A graph \(G\) is bipartite if \(V(G)\) is the union of two disjoint (possibly empty) independent sets called partite sets of \(G\).
Example.
Definition 1.1.15.
Path
Path
Cycle
Cycle
Neither
Definition 1.1.16.
Example. The red vertices and edges are a subgraph. This subgraph is a path.
Example.
Consider the simple graph with
\[V(G) = \{a,b,c,d,e\}\quad\text{and}\quad E(G) = \{ab,bc,cd,ac,ae\}\]
Consider the graph \(H\) where \[V(H) = \{a,b,c,d,e\}\quad\text{and}\quad E(H) = \{bc,cd,de,bd,ba\}.\]
Definition 1.1.17. Let \(G\) be a loopless graph with vertex set \(V(G) = \{v_{1},\ldots,v_{n}\}\) and edge set \(E(G) = \{e_{1},\ldots,e_{m}\}\). The adjacency matrix of \(G\), written \(A(G)\) is the \(n\times n\) matrix with entry in row \(i\), column \(j\) is the number of edges in \(G\) with endpoints \(\{v_{i},v_{j}\}\). The incidence matrix \(M(G)\) is the \(n\times m\) matrix in which the entry in row \(i\), column \(j\) is \(1\) if \(v_{i}\) is an endpoint of edge \(e_{j}\), and zero otherwise.
If vertex \(v\) is an endpoint of edge \(e\), then \(v\) and \(e\) are incident. The degree of a vertex (in a loopless graph) is the number of incident edges.
Example. Consider the simple graph with
\[V(G) = \{a,b,c,d,e\}\quad\text{and}\quad E(G) = \{ab,bc,cd,ac,ae\}\]
\[A(G) = \left[\begin{array}{ccccc} 0 & 1 & 1 & 0 & 1 \\ 1 & 0 & 1 & 0 & 0 \\ 1 & 1 & 0 & 1 & 0 \\ 0 & 0 & 1 & 0 & 0 \\ 1 & 0 & 0 & 0 & 0\end{array}\right]\]
\[M(G) = \left[\begin{array}{ccccc} 1 & 0 & 0 & 1 & 1\\ 1 & 1 & 0 & 0 & 0\\ 0 & 1 & 1 & 1 & 0\\ 0 & 0 & 1 & 0 & 0\\ 0 & 0 & 0 & 0 & 1\end{array}\right]\]
\[A(G_{1}) = \left[ \begin{array}{cccccc} 0 & 1 & 1 & 0 & 0 & 0 \\ 1 & 0 & 0 & 1 & 0 & 0 \\ 1 & 0 & 0 & 0 & 1 & 1 \\ 0 & 1 & 0 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 & 0 & 0 \end{array} \right] \]
\[A(G_{2}) = \left[ \begin{array}{cccccc} 0 & 1 & 1 & 1 & 0 & 0 \\ 1 & 0 & 0 & 0 & 0 & 0 \\ 1 & 0 & 0 & 0 & 1 & 0 \\ 1 & 0 & 0 & 0 & 0 & 1 \\ 0 & 0 & 1 & 0 & 0 & 0 \\ 0 & 0 & 0 & 1 & 0 & 0 \end{array} \right]\]
Definition 1.1.20. An isomorphism from a simple graph \(G\) to a simple graph \(H\) is a bijection \(f:V(G)\to V(H)\) such that \(uv\in E(G)\) if and only if \(f(u)f(v)\in E(H)\). We say that "\(G\) is isomorphic to \(H\)", written \(G\cong H\), if there is an isomorphism from \(G\) to \(H\).
Consider the simple graph \(G\) with \[V(G) = \{a,b,c,d,e\}\] and \[E(G) = \{ab,bc,cd,ac,ae\}\]
Consider the simple graph \(H\) with \[V(H) = \{a,b,c,d,e\}\] and \[E(H) = \{bc,cd,de,bd,ba\}.\]
The function \(f:V(G)\to V(H)\) such that
\[f(a)=b\]
\[f(b)=c\]
\[f(c)=d\]
\[f(d)=e\]
\[f(e)=a\]
is an isomorphism from \(G\) to \(H\).
Proposition. If \(f\) is an isomorphism from \(G\) and \(H\), then for any \(v\in V(G)\) the degrees of \(v\) and \(f(v)\) are the same. Moreover, if
\[d_{1},d_{2},\ldots,d_{n}\quad\text{and}\quad d_{1}',d_{2}',\ldots,d_{n}'\]
are the lists of the degrees of their vertices of \(G\) and \(H\), respectively, listed in nonincreasing order, then these lists are identical.
Proof. Consider a vertex \(v\in V(G)\) with degree \(d\). This means that there are \(d\) other vertices \(v_{1},v_{2},\ldots, v_{d}\) that are adjacent to \(v\), that is \(vv_{i}\in E(G)\) for each \(i\in\{1,2,\ldots,d\}\). By the definition of an isomorphism, the vertices adjacent to \(f(v)\) are exactly \(f(v_{1}),\ldots,f(v_{d})\). Thus \(f(v)\) has degree \(d\). \(\Box\)
Example. None of the following graphs are isomorphic:
Definition. A permutation matrix is a square matrix with entries in \(\{0,1\}\) and exactly one \(1\) in each row and each column.
Example. Some permutation matrices:
\[\begin{bmatrix} 1 & 0\\ 0 & 1\end{bmatrix}\]
\[\begin{bmatrix} 1 & 0 & 0\\ 0 & 1 & 0\\ 0 & 0 & 1\end{bmatrix}\]
\[\begin{bmatrix} 0 & 1 & 0\\ 1 & 0 & 0\\ 0 & 0 & 1\end{bmatrix}\]
\[\begin{bmatrix} 0 & 1 & 0 & 0\\ 1 & 0 & 0 & 0\\ 0 & 0 & 0 & 1\\ 0 & 0 & 1 & 0\end{bmatrix}\]
Multiplying a matrix by a permutation on the left permutes the rows:
\[\begin{bmatrix} 0 & 1 & 0\\ 0 & 0 & 1\\ 1 & 0 & 0\end{bmatrix}\begin{bmatrix} a & b & c\\ d & e & f\\ g & h & i\end{bmatrix} = \begin{bmatrix} d & e & f\\ g & h & i\\ a & b & c\end{bmatrix}\]
Multiplying a matrix by a permutation on the right permutes the columns:
\[\begin{bmatrix} a & b & c\\ d & e & f\\ g & h & i\end{bmatrix}\begin{bmatrix} 0 & 1 & 0\\ 0 & 0 & 1\\ 1 & 0 & 0\end{bmatrix} = \begin{bmatrix} c & a & b\\ f & d & e\\ i & g & h\end{bmatrix}\]
Rows: \((1,2,3)\mapsto (3,1,2)\)
Columns: \((1,2,3)\mapsto (2,3,1)\)
\[\begin{bmatrix} 0 & 0 & 1\\ 1 & 0 & 0\\ 0 & 1 & 0\end{bmatrix}\begin{bmatrix} a & b & c\\ d & e & f\\ g & h & i\end{bmatrix} \begin{bmatrix} 0 & 1 & 0\\ 0 & 0 & 1\\ 1 & 0 & 0\end{bmatrix}= \begin{bmatrix} i & g & h\\ c & a & b\\ f & d & e\end{bmatrix}\]
\(1\)
\(2\)
\(3\)
\(1\)
\(2\)
\(3\)
If we multiply by \(P\) on the right and \(P^{\top}\) on the left, then we permute the rows and columns in the same way:
Isomorphism: \((1,2,3)\mapsto (2,3,1)\)
\[\begin{bmatrix} 0 & 0 & 1\\ 1 & 0 & 0\\ 0 & 1 & 0\end{bmatrix}\begin{bmatrix} 0 & 1 & 1\\ 1 & 0 & 0\\ 1 & 0 & 0\end{bmatrix} \begin{bmatrix} 0 & 1 & 0\\ 0 & 0 & 1\\ 1 & 0 & 0\end{bmatrix}= \begin{bmatrix} 0 & 1 & 0\\ 1 & 0 & 1\\ 0 & 1 & 0\end{bmatrix}\]
Consider permuting the rows and columns of an adjacency matrix:
Theorem. Two simple graphs \(G\) and \(H\) are isomorphic if and only if there is a permutation matrix \(P\) such that
\[A(H) = P^{\top}A(G)P.\]
Thus, if we can find a permutation matrix such that \(A(H) = P^{\top}A(G)P\), we can conclude \(G\) and \(H\) are isomorphic. If \(G\) and \(H\) are not isomorphic, it is harder to prove.
Definition 1.1.25. An isomorphism class of graphs is an equivalence class of graphs under the isomorphism relation.
Example. Every simple graph on \(2\) vertices is isomorphic to one of the following:
So, there are two isomorphism classes of graphs on \(2\) vertices.
Example. How many isomorphism classes are there on \(3\) vertices?
The "structural" properties of a graph are the same for all isomorphic graphs. For example, number of edges, number of vertices, degree of vertices (already proven), sizes of cliques, sizes of independent sets, etc.
independent set of size \(4\)
NO independent set of size \(4\)
\(\not\cong\)
Definition 1.2.2.
Lemma 1.2.5. Every \(u,v\)-walk contains a \(u,v\)-path.
Proof. (On the board)
Example. A walk with a repeated vertex:
Definition 1.2.6. A graph is connected if for every pair of vertices \(u\) and \(v\), there is a \(u,v\)-path contained in the graph. Otherwise, we say that the graph is disconnected.
If \(G\) has a \(u,v\)-path, then we say that \(u\) is connected to \(v\) in \(G\).
Definition 1.2.8. The components of a graph \(G\) are its maximal connected subgraphs. A component is trivial if it has no edges otherwise it is nontrivial. An isolated vertex is a vertex of degree \(0\).
Proposition 1.2.11. Every graph with \(n\) vertices and \(k\) edges has at least \(n-k\) components.
Note, if a graph \(G\) contains a \(u,v\)-path and a \(v,w\)-path, it is not clear that \(G\) contains a \(u,w\)-path. However, if we concatenate these paths, then we get a \(u,w\)-walk which contains a \(u,w\)-path by Lemma 1.2.5. Thus, the connection relation on vertices is transitive. It is also reflexive (vertices are connected to themselves), and symmetric (since paths are reversible).
Proof. Adding an edge to a graph decreases the number of connected components by at most \(1\). \(\Box\)
Definition 1.2.12.
Cut-edges: \(ab\)
Cut-vertices: \(b, d\)
If \(T = \{a,b,c,e,f\}\) then \(G[T]\) is shown in red.
Theorem 1.2.14. An edge is a cut-edge if and only if it belongs to no cycle.
Proof. (On the board)
Note that this theorem is the statemet that the following two implications about an edge \(e\) in a graph \(G\) both hold:
\(e\) is a cut-edge \(\Rightarrow\) \(e\) belongs to no cycle
and
\(e\) belongs to no cycle \(\Rightarrow\) \(e\) is a cut-edge
Given an implication \(A\Rightarrow B\), it is often useful to consider the equivalent statement \(\sim B\Rightarrow \sim A\), which is called the contrapositive. (Here \(\sim A\) is the statement "\(A\) does not hold".)
Thus, we could instead prove the contrapositives of the above implications
\(e\) belongs to a cycle \(\Rightarrow\) \(e\) is not a cut-edge
and
\(e\) is a not a cut-edge \(\Rightarrow\) \(e\) belongs to a cycle
Is there a path that crosses all 7 bridges exactly once?
Is there a path that crosses all 7 bridges exactly once?
Is there a path that crosses all 7 bridges exactly once?
Definition 1.2.24.
Lemma 1.2.25. If every vertex of a graph \(G\) has degree at least 2, then \(G\) contains a cycle.
Theorem 1.2.26. A graph \(G\) is Eulerian if and only if it has at most one nontrivial component, and all its vertices have even degree.
Proof idea. By Lemma 1.2.25 the graph \(G\) contains a cycle. If we delete all the edges in that cycle, then new graph has fewer edges, but each vertex still has even degree. Thus, we can use induction on the number of edges. (Details are on the board and in the text.)
Proof. (On the board and in the text.)
Consider a path \(P\) in a graph \(G\). If there is another path \(Q\neq P\) such that \[P\subseteq Q\subseteq G,\] then we call \(Q\) an extension of \(P\). Since \(G\) only has finitely many vertices, we cannot extend a path forever. If a path \(P\subseteq G\) has no extension, then we call \(P\) a maximal path.
Proposition 1.2.27. Every even graph decomposes into cycles.
Proposition 1.2.28. If \(G\) is a simple graph in which every vertex has degree at least \(k\), then \(G\) contains a path of length at least \(k\). If \(k\geq 2\), then \(G\) contains a cycle of length at least \(k+1\).
Proposition 1.2.29. Every graph with at least one nonloop edge has at least two vertices that are not cut vertices.
Theorem 1.2.33. For a connected nontrivial graph with exactly \(2k\) odd vertices, the minimum number of trails that decompose it is \(\max\{k,1\}\).
Note: This "decomposition" is a partition of the edges. The cycles may share vertices. Indeed, every vertex of degree \(\geq 2\) must be in more than one cycle.
Definition 1.3.1.
\(1\)
\(1\)
\(2\)
\(2\)
\(2\)
\(4\)
\(\Delta(G) = 4\) and \(\delta(G) = 1\)
Example.
Definition 1.1.36. The Petersen graph is the simple graph with vertices consisting of all \(2\)-element subsets of \(\{1,2,3,4,5\}\), that is,
\[V(G) = \big\{\{1,2\},\{1,3\},\{1,4\},\{1,5\}, \{2,3\}, \{2,4\}, \{2,5\}, \{3,4\},\{3,5\},\{4,5\}\big\},\]
and two vertices are adjacent if the sets are disjoint.
Note that
\(\Delta(G) = \delta(G) = 3\)
Thus, the Petersen graph is \(3\)-regular.
Definition 1.1.27.
Definition 1.3.2.
Proposition 1.3.3. (Degree-Sum Formula) If \(G\) is a graph, then
\[\sum_{v\in V(G)}d(v) = 2e(G).\]
Proof. Recall that \(d(v)\) is the number of edges with endpoint \(v\). Since each edge has two endpoints, adding up all the degrees we count each edge twice. \(\Box\)
Corollary 1.3.4. In a graph \(G\), the average vertex degree is \(\frac{2e(G)}{n(G)}\), and hence
\[\delta(G)\leq \frac{2e(G)}{n(G)}\leq \Delta(G)\]
Corollary 1.3.5. Every graph has an even number of vertices of odd degree. No graph of odd order is regular with odd degree.
Corollary 1.3.6. A \(k\) regular graph with \(n\) vertices has \(nk/2\) edges.
Proposition 1.3.9. If \(k>0\), then a \(k\)-regular bipartite graph has the same number of vertices in each partite set.
\(X\)
\(Y\)
Example. Consider the \(2\)-regular bipartite graph below
Proof. Let \(X\) and \(Y\) be the partite sets, then \[e(G) = k|X| = k|Y|.\] Thus \(|X| = |Y|\). \(\Box\)
Delete vertex \(\{i,j\}\) and the vertices adjacent to it.
The remaining vertices are the two element sets that contain either \(i\) or \(j\).
\[\{i,k_{1}\},\{i,k_{2}\},\{i,k_{3}\}\]
and
\[\{j,k_{1}\},\{j,k_{2}\},\{j,k_{3}\}\]
Cycle:
\[\{i,k_{1}\},\{j,k_{3}\},\{i,k_{2}\},\{j,k_{1}\}\{i,k_{3}\},\{j,k_{2}\}\]
\(\#\) cycles \(\geq \#\) vertices:
Consider a 6-cycle \(F\) in the graph.
Cycle:
\[\{a_{1},b_{1}\},\{a_{2},b_{2}\},\{a_{3},b_{3}\},\]
\[\{a_{4},b_{4}\},\{a_{5},b_{5}\},\{a_{6},b_{6}\}\]
\(\#\) cycles \(\leq \#\) vertices:
Two \(i\) and \(j\) numbers show up three times on this list.
Hence, this cycle is the one we obtained by deleting vertex \(\{i,j\}\) and its neighbors.
Proposition 1.3.11 For a simple graph \(G\) with vertices \(v_{1},\ldots,v_{n}\) and \(n\geq 3\),
\[e(G) = \frac{1}{n-2}\sum_{i=1}^{n}e(G-v_{i})\quad\text{and}\quad d_{G}(v_{j}) = \frac{1}{n-2}\sum_{i=1}^{n} e(G-v_{i}) - e(G-v_{j})\]
Conjecture 1.3.12. (Reconstruction Conjecture) If \(G\) is a simple graph with at least three vertices, then \(G\) is uniquely determined by it's list of vertex-deleted subgraphs.
A subgraph obtained by deleting a single vertex is called a vertex-deleted subgraph.
Examples.
Example. Consider the following vertex-deleted subgraphs:
What order 5 graph?
Example. Consider the graph \(G\) and its vertex-deleted subgraphs:
Proposition 1.3.13. The minimum number of edges in a connected graph with \(n\) vertices is \(n-1\).
Proposition 1.3.15. If \(G\) is a simple graph with \(n\) vertices and \[\delta(G)\geq (n-1)/2,\] then \(G\) is connected.
Example 1.3.16. We wish to show that the inequality in Proposition 1.3.15 is sharp, that is, for any \(n\) there exists an \(n\)-vertex graph \(G\) such that \(\delta(G)<(n-1)/2\) and \(G\) is disconnected.
For even \(n\) consider \(K_{n/2}+K_{n/2}\), for odd \(n\) consider \(K_{\frac{n-1}{2}} +K_{\frac{n+1}{2}}\).
Definition 1.3.17. The union of two graphs \(G\) and \(H\) with disjoint vertex sets, is called their disjoint union or sum, and it is denoted \(G+H\). The disjoint union of \(m\) copies of \(G\) is denoted \(mG\).
Definition 1.3.27. The degree sequence of a graph is the list of vertex degrees, usually written in nonincreasing order \(d_{1}\geq \cdots\geq d_{n}\).
If \(d_{1},\cdots, d_{n}\) is the degree sequence of a graph \(G\), then the vertex-sum formula implies \(\sum_{i=1}^{n}d_{i}\) is even.
To be a degree sequence, it is necessary that \(\sum_{i=1}^{n}d_{i}\) is even. Is this condition also sufficient?
w/o loops, but w/ multiple edges, things are more complicated:
Exercise 1.3.56. The nonnegative integers \(d_{1}\geq\ldots\geq d_{n}\) are the vertex degree of some graph if and only if \(\sum_{i=1}^{n}d_{i}\) is even and \(d_{1}\leq d_{2}+\ldots+d_{n}\).
With loops in our graphs, yes!
Proposition 1.3.28. The nonnegative integers \(d_{1},\ldots,d_{n}\) are the vertex degree of some graph if and only if \(\sum_{i=1}^{n}d_{i}\) is even.
Theorem 1.3.31. For \(n>1\), an integer list \(d\) of size \(n\) is graphic if and only if \(d'\) is graphic, where \(d'\) is obtained from \(d\) by deleting the largest element \(\Delta\) of \(d\) and subtracting \(1\) from each of its \(\Delta\) next largest elements. The only \(1\)-element graphic sequence is \(d_{1}=0\).
Definition 1.3.29. A graphic sequence is a list of nonnegative number that is the degree sequence of some simple graph.
What about degree sequences of simple graphs?
Example. The degree sequences of both graphs are \(3,2,2,1,1,1\)
But these are not isomorphic graphs!
\[\begin{array}{r|r|r|r|r|r|r|r|r}i & 1 & 2 & 3 & & \Delta+1 & \Delta+2 & & n\\\hline\\ d & \Delta = d_{1} & d_{2} & d_{3} & \ldots & d_{\Delta+1} & d_{\Delta+2} & \ldots, & d_{n}\\\\\hline\\d' & & d_{2}-1 & d_{3}-1 & \ldots & d_{\Delta+1}-1 & d_{\Delta+2} & \ldots & d_{n} \end{array}\]
\[\begin{array}{r|r|r|r|r|r|r|r|r}i & 1 & 2 & 3 & & \Delta+1 & \Delta+2 & & n\\\hline\\ d & \phantom{\Delta = }d_{1} & d_{2} & d_{3} & \ldots & d_{\Delta+1} & d_{\Delta+2} & \ldots, & d_{n}\\\\\hline \\ d' & & \phantom{d_{2}-1} & \phantom{d_{3}-1} & \phantom{\ldots} & \phantom{d_{\Delta+1}-1} & \phantom{d_{\Delta+2}} & \phantom{\ldots} & \phantom{d_{n}} \end{array}\]
Example. Consider the sequence \(d = (3,3,2,1,1)\).
\(d = (3,3,2,1,1)\ \leadsto\ d' = (2,1,0,1)\)
\(d' = (2,1,1,0)\ \leadsto\ d'' = (0,0,0)\)
\(\leadsto\)
Reorder
\(d' = (2,1,1,0)\ \phantom{\leadsto\ d'' = (0,0,0)}\)
How to build \(d'\) from \(d\): Suppose \(d_{1}\geq \cdots\geq d_{n}\)
The sequence \(d = (3,2,2,2,1)\) is graphic since:
Deleting the degree 3 \(\rightarrow\)
So \((2,1,1,0)\) is graphic, but why is \(d' = (1,1,1,1)\) graphic?
We want a graph with degree sequence \((3,\underbrace{2,2,2},1)\) AND...
these vertices
this one's neighbors are...
Why does \(d\) graphic \(\Rightarrow\) \(d'\) graphic?
\[\begin{array}{c|ccccc} \text{vertices} & v_{1} & v_{2} & v_{3} & v_{4} & v_{5}\\\hline \text{degrees} & 3 & 2 & 2 & 2 & 1\end{array}\]
\(N(v_{1}) = \{v_{2},v_{4},v_{5}\}\)
Modify the graph so that \(v_{3}\leftrightarrow v_{1}\) and \(v_{5}\not\leftrightarrow v_{1}\)
BUT, keep degrees the same
\(v_{1}\)
\(v_{2}\)
\(v_{3}\)
\(v_{4}\)
\(v_{5}\)
Add: \(v_{1}v_{3}\)
Delete: \(v_{1}v_{5}\)
Pick a vertex y:
\(y\leftrightarrow v_{3}\) and \(y\not\leftrightarrow v_{5}\)
Delete: \(yv_{3}\)
Add: \(yv_{5}\)
\(v_{1}\)
\(v_{2}\)
\(v_{3}\)
\(v_{4}\)
\(v_{5}\)
\(v_{1}\)
\(v_{2}\)
\(v_{3}\)
\(v_{4}\)
\(v_{5}\)
Definition 1.4.2.
A directed graph or digraph \(G\) is a triple consisting of a vertex set \(V(G)\), an edge set \(E(G)\), and function assigning each edge an ordered pair of vertices. The first vertex in the ordered pair is the tail of the edge, and the second is the head; together, they are the endpoints. We say that an edge is from its tail to its head.
Example. Let \(V(G) = \{v_{1},v_{2},v_{3},v_{4},v_{5}\}\) and \(E(G) = \{e_{1},e_{2},e_{3},e_{4},e_{5},e_{6}\}\)
and the function that assigns edges to points is given by
\[f(e_{1}) = (v_{1},v_{2}),\quad f(e_{2}) = (v_{2},v_{3}),\quad f(e_{3}) = (v_{3},v_{5})\]
\[f(e_{4}) = (v_{4},v_{4}),\quad f(e_{5}) = (v_{2},v_{1}),\quad f(e_{6}) = (v_{3},v_{5})\]
Definition 1.4.3. In a digraph:
In a simple digraph:
Not simple!
Definition 1.4.6. A digraph \(G\) is a path if it is simple, and all of the vertices can be listed (without repetition) \[v_{1},v_{2},\ldots,v_{n}\] such that \[E(G) = \{v_{1}v_{2}\ ,\ v_{2}v_{3}\ ,\ v_{3}v_{4}\ ,\ \ldots\ ,\ v_{n-1}v_{n}\}\]
A digraph is a cycle if it is simple, and all of the vertices can be listed (without repetition) \[v_{1},v_{2},\ldots,v_{n}\] such that \[E(G) = \{v_{1}v_{2}\ ,\ v_{2}v_{3}\ ,\ v_{3}v_{4}\ ,\ \ldots\ ,\ v_{n-1}v_{n}\ ,\ v_{n}v_{1}\}\]
Cycle
Path
Neither
\[P=\left[\begin{array}{rrr}0 & 0.9 & 0.1\\ 1 & 0 & 0\\ 0.1 & 0.1 & 0.8 \end{array}\right]\]
Given a vector of nonnegative entries \[\mathbf{x} = [x_{A}\ \ x_{B}\ \ x_{C}]\quad\text{ such that }\quad x_{A}+x_{B}+x_{C}=1,\] we interpret \(x_{i}\) as the probability that we're in state \(i\)
Then \(\mathbf{x}P\) gives the probabilities that we're in each state after another step.
\[P=\left[\begin{array}{rrr}0 & 0.9 & 0.1\\ 1 & 0 & 0\\ 0.1 & 0.1 & 0.8 \end{array}\right]\]
Let \(\mathbf{x}_{n}\) be the vector of probabilities after \(n\) steps.
If we start at \(A\), then \(\mathbf{x}_{0} = [1\ \ 0\ \ 0]\), and
\[\mathbf{x}_{1} = \mathbf{x}_{0}P = [0\ \ 0.9\ \ 0.1]\]
\[\mathbf{x}_{2} =\mathbf{x}_{1}P = \mathbf{x}_{0}P^2 = [0.91\ \ 0.01\ \ 0.08]\]
\[\mathbf{x}_{3} =\mathbf{x}_{2}P = \mathbf{x}_{0}P^3 = [0.018\ \ 0.827\ \ 0.155]\]
\[\mathbf{x}_{100} = \mathbf{x}_{0}P^{100} \approx [0.410706\ \ 0.385357\ \ 0.203936]\]
\(\vdots\)
Definition 1.4.17. Let \(v\) be a vertex in a digraph.
Proposition 1.4.18. In a digraph \(G\), \[\sum_{v\in V(G)}d^{+}(v) = e(G) = \sum_{v\in V(G)}d^{-}(v).\]
Proposition 1.4.19. A list of ordered pairs of nonnegative integers is realizable as the degree pairs of a digraph if and only if the sum of the first coordinates equals the sum of the second coordinates.
Definition 1.4.22.
Lemma 1.4.23. If \(G\) is a digraph with \(\delta^{+}(G)\geq 1\) or \(\delta^{-}(G)\geq 1\), then \(G\) contains a cycle.
Theorem 1.4.24. A digraph is Eulerian if and only if \(d^{+}(v) = d^{-}(v)\) for each vertex \(v\) and the underlying graph has at most one nontrivial component.
Definition 1.4.9. The underlying graph of a digraph \(D\) is the graph \(G\) obtained by treating the edges of \(D\) as unordered pairs.
We have already seen that graphs are Eulerian if and only if they are even. What about digraphs?
Definition 2.1.1.
\[\underbrace{\hspace*{1.6in}}\]
\[\underbrace{\hspace*{1.6in}}\]
\[\underbrace{\hspace*{1.2in}}\]
Forest
Tree
Tree
Each of these vertices is a leaf.
Lemma 2.1.3. Every tree with at least two vertices has at least two leaves. Deleting a leaf from an \(n\)-vertex tree produces a tree with \(n-1\) vertices.
Theorem 2.1.4. For an \(n\)-vertex graph \(G\) (with \(n\geq 1\)), the following are equivalent:
A) \(G\) is connected and has no cycles, that is, \(G\) is a tree.
B) \(G\) is connected and has \(n-1\) edges.
C) \(G\) has \(n-1\) edges and no cycles.
D) For \(u,v\in V(G)\), \(G\) has exactly one \(u,v\)-path.
The next theorem give several alternate characterizations of graphs that are trees. Note that each of A, B, and C is the statement that two of the following hold: 1) \(G\) is acyclic, 2) \(G\) is connected, 3) \(G\) has \(n-1\) edges.
Corollary 2.1.5.
a) Every edge of a tree is a cut edge.
b) Adding one edge to a tree forms exactly one cycle.
c) Every connected graph contains a spanning tree.
Proposition 2.1.6. If \(T\) and \(T'\) are spanning trees of a connected graph \(G\), and \(e\in E(T)-E(T')\), then there is an edge \(e'\in E(T')-E(T)\) such that \(T-e+e'\) is a spanning tree of \(G\).
Proposition 2.1.7. If \(T\) and \(T'\) are spanning trees of a connected graph \(G\), and \(e\in E(T)-E(T')\), then there is an edge \(e'\in E(T')-E(T)\) such that \(T'+e-e'\) is a spanning tree of \(G\).
Suppose \(T\) is a tree and \(G\) is a simple graph. What must be true about \(T\) and \(G\) to ensure that \(T\) is a subgraph of \(G\).
If \(T\) has one vertex adjacent to all of the others, then \(T\) is called a star.
Clearly, \(T\) is a subgraph of \(G\) if and only if \(G\) has a vertex of degree \(e(T)\), that is, \(\Delta(G)\geq e(T)\).
Is is sufficient? No! \(P_{4}\) is not s subgraph of the star with \(4\) vertices.
What about \(\delta(G)\geq e(T)\)?
\(G\)
Not a subgraph of \(G\)
Subgraph of \(G\)
\(G\)
What about the other trees with 4 edges?
Proposition 2.1.8. If \(T\) is a tree with \(k\) edges, and \(G\) is a simple graph with \(\delta(G)\geq k\), then \(T\) is a subgraph of \(G\)
\(T\)
\(T'\)
Call its neighbor \(u\)
\(u\)
\(u\)
Pick a leaf \(v\)
\(u\)
Delete \(v\)
Find \(T'\) in \(G\)
Since \(d_{G}(u)\geq 4\)
and \(d_{T'}(u)\leq 3\)
\(\exists\,v\) adj. to \(u\), but not in \(T'\)
\(v\)
Proposition 2.1.8. If \(T\) is a tree with \(k\) edges, and \(G\) is a simple graph with \(\delta(G)\geq k\), then \(T\) is a subgraph of \(G\)
Proof outline. Use induction on \(k\):
Suppose that for some \(k\geq 1\) the claim holds for trees with \(<k\) edges. Let \(G\) be a graph with \(\delta(G)\geq k\), and let \(T\) be a tree with \(k\) edges.
Definition 2.1.9.
\(b\)
\(a\)
\(c\)
\(e\)
\(f\)
\(g\)
\(d(a,b)=1\)
\(d(a,c)=2\)
\(d(a,e)=3\)
\(d(a,f)=2\)
\(d(a,g)=1\)
\(d(a,a)=0\)
\(\operatorname{diam}G = 3\)
\(\epsilon(a) = 3\)
\(\operatorname{rad}G = 3\)
Example.
Theorem 2.1.11. Suppose \(G\) is a simple graph. If \(\operatorname{diam}G\geq 3\), then \(\operatorname{diam}\overline{G}\leq 3\).
Proof. Since \(\operatorname{diam}G>2\), there are two nonadjacent vertices \(u\) and \(v\) with no common neighbor.
Hence, for \(x\in V(G)-\{u,v\}\) either \(x\not\leftrightarrow u\) or \(x\not\leftrightarrow v\).
Note that \(u\) and \(v\) are adjacent in \(\overline{G}\). And any other vertex \(x\) is adjacent to either \(u\) or \(v\) in \(\overline{G}\).
Therefore, for any two vertices, there is a path of lenghth at most \(3\) in \(\overline{G}\). \(\Box\)
Definition 2.1.12. The center of a graph \(G\) is the subgraph induced by the vertices of minimum eccentricity.
Theorem 2.1.13. The center of a tree is either a vertex (\(K_{1}\)) or an edge (\(K_{2}\)).
Proof. We use induction on the number of vertices in a tree \(T\).
Inductive step:
Basis step: \(n(T) \leq 2\), then \(T=K_{1}\) or \(K_{2}\) and the center is \(T\).
If we want a graph with all vertices close together, then we want a small diameter.
On the other hand, if we want a graph where most vertices are close together, then we might want the average distsnce between points to be small. That is, if \(G\) is a graph with \(n\) vertices, then we want
\[\frac{2}{n(n+1)}\sum_{v,u\in V(G)}d_{G}(v,u)\]
to be small. Equivalently, we want the Wiener index:
\[D(G): = \sum_{v,u\in V(G)}d_{G}(v,u)\]
to be small.
The next theorem gives us the extremes of this index among all trees.
Theorem 2.1.14. For trees with \(n\) vertices, the Wiener index is minimized by stars and maximized by paths, both uniquely. That is, if \(T\) is a tree with \(n\) vertices, then
\[ (n-1)^2\leq D(T)\leq {n+1\choose 3},\]
moreover, if \(D(T) = (n-1)^2\) then \(T\cong K_{1,n-1}\) and if \(D(T) = {n+1\choose 3}\) then \(T\cong P_{n}\).
A weighted graph is a graph \(G\) together with a nonnegative number for each edge.
Our goals:
Find a minimum spanning tree: a spanning tree such that the sum of the edge weights is minimal
Find shortest path from \(u\) to \(v\):
The path from \(u\) to \(v\) such that the sum of the edge weights is minimal.
Define the subgraph \(H\) with \(V(H)=V(G)\) and \(E(H) = \varnothing\).
While it's possible
Add an edge to \(H\) from \(E(G)\) that does not create a cycle in \(H\), and has minimal weight among these.
Suppose \(G\) is a connected, weighted graph with \(n\) vertices:
End when no such edge exists
Theorem 2.3.3. In a connected weighted graph \(G\), Kruskal's Algorithm constructs a minimum-weight spanning tree.
Suppose \(T^{\ast}\) is a spanning tree of minimum weight. If \(T=T^{\ast}\) then we're done.
Proof. First, we see that the output, which we call \(T\), is a spanning tree
\(v\)
\(u\)
What is the shortest path from vertex \(v\) to vertex \(u\)?
Start with a list of distances \(0\) for \(v\) and \(\infty\) for the rest.
More generally, take the distance between vertices \(d(u,v)\) to be the smallest sum of weights among all \(u,v\)-paths.
What is \(d(u,v)\)?
\(v\)
\(u\)
Start with a list of distances \(0\) for \(v\) and \(\infty\) for the rest.
Theorem 2.3.7. Given a graph \(G\) and a vertex \(v\in V(G)\), Dijkstra's Algorithm computes \(d(v,z)\) for each vertex \(z\in V(G)\).
Proof. Let \(z_{k}\) denote the \(k\)th vertex visited, and let \(t_{k}(z)\) denote the "tentative distance" from \(v\) to \(z\), before the \(k\)th update. We will show by induction on \(k\), that \(t_{k}(z)\) is the length of the shortest \(v,z\)-path through the already visited vertices \(z_{1},\ldots,z_{k-1}\).
Since \(z_{1}=v\), \(t_{1}(v)=0\), and \(t_{1}(z)=\infty\) for \(z\neq v\), the base case is clear.
Suppose that there is a path \(P\) through vertices \(z_{1},\ldots,z_{k-1}\) whose length is less than \(t_{k}(z)\). Let \(z_{j}\) be the vertex adjacent to \(z\) in this path.
Now, we assume that there is some \(k\geq 2\) such that the claim is true for all \(j<k\), that is, \(t_{j}(z)\) is the length of the shortest \(v,z\)-path through the already visited vertices \(z_{1},\ldots,z_{j-1}\).
Proof continued.
Thus, the length of the path \(P\) is \(t_{k}(z_{j}) + d(z_{j},z)\), and thus
\[t_{k}(z)> t_{k-1}(z_{j})+d(z_{j},z).\]
However, at iteration \(j\), we would have updated \(t_{k}(z)\), and thus we would have
\[t_{k}(z)\leq t_{k-1}(z_{j})+d(z_{j},z).\]
This is a contradiction. Thus \(t_{k}(z)\) is the length of the shortest \(v,z\)-path through the first \(k-1\) vertices visited. Thus, after \(n=n(G)\) iterations of the algorithm, we see that \(t_{n+1}(z)=d(v,z)\). \(\Box\)
Visited vertices
\(v\)
\(u\)
For an unweighted graph, Dijkstra's algorithm is called a Breadth-First search.
However, we just take the next unvisited vertex that we've "seen" instead of the vertex with smallest tentative weight.
Definition 3.1.1.
Example.
The blue edges are a perfect matching
Are there other perfect matchings?
Example. If a graph has a vertex with degree \(0\), then it contains no perfect matching.
Give an example of a graph \(G\) such that \(\delta(G)\geq 1\), but no perfect matching?
The only star that contains a perfect matching is \(K_{2}\).
Stars!
Example 3.1.2. A perfect matching in \(K_{n,n}\) corresponds to a bijection of the partite sets.
If \(X = \{x_{1},x_{2},\ldots,x_{n}\}\) and \(Y=\{y_{1},y_{2},\ldots,y_{n}\}\) are the partite sets of vertices, then a bijection \(f:X\to Y\) gives a perfect matching, namely, the edges \(xf(x)\) for each \(x\in X\).
Conversely, given a perfect matching of edges, each edge has one endpoint in \(X\) and one in \(Y\), thus, for each edge \(xy\) in the perfect matching, we can define a bijection \(g:X\to Y\) by \(g(x) = y\) if and only if \(xy\) is in the perfect matching.
The number of bijections \(f:X\to Y\) is \(n!\), and thus there are \(n!\) perfect matchings in \(K_{n,n}\).
Corresponding bijection:
\(f(x_{1})=y_{2}\)
\(f(x_{2})=y_{1}\)
\(f(x_{3})=y_{4}\)
\(f(x_{4})=y_{5}\)
\(f(x_{5})=y_{3}\)
Example 3.1.3. Why is there no perfect matching in \(K_{3}\), \(K_{5}\), \(K_{7},\ldots\)?
If \(G\) has a perfect matching, then the order of \(G\) must be even!
Does \(K_{2n}\) have a perfect matching for each \(n\in\mathbb{N}\)?
YES! The set of perfect matchings of \(K_{2n}\) is in one-to-one correspondence with the partitions of \(\{1,2,3,\ldots,2n\}\) into \(n\) subsets of size \(2\). How many such partitions are there?
\[\frac{(2n)!}{2^{n}n!}\]
Partition: \(\{1,3\},\ \{2,4\},\ \{5,6\}\)
Definition 3.1.4. A maximal matching in a graph is a matching that cannot be enlarged by adding an edge. A maximum matching is a matching of maximum size among all matchings in the graph.
Maximal matching
(not maximum):
Maximum matching:
Definition 3.1.6. Given a matching \(M\), an \(M\)-alternating path is a path that alternates between edges in \(M\) and edges not in \(M\). An \(M\)-alternating path whose endpoints are unsaturated by \(M\) is an \(M\)-augmenting path.
Definition 3.1.7. If \(G\) and \(H\) are graphs with a common vertex set \(V\), then the symmetric difference \(G\triangle H\) is the graph with vertex set \(V\) whose edges are all those appearing in exactly one of \(G\) and \(H\). We similarly define the notion of symmetric difference for sets of edges.
Lemma 3.1.9. Every component of the symmetric difference of two matchings is a path or an even cycle.
\(\triangle\)
\(\triangle\)
\(=\)
\(=\)
Theorem 3.1.10. A matching \(M\) in a graph \(G\) is a maximum matching in \(G\) if and only if \(G\) has no \(M\)-augmenting path.
Consider the matching \(M\) in blue
the \(M\)-augmenting path \(P\) in red
and...
Replacing \(M\) with every other edge in \(P\) we obtain a matching with more edges:
Thus, if \(M\) is a maximum matching, then there is no \(M\)-augmenting path.
Given a bipartite graph \(G\), and one of the partite sets \(X\), one might ask whether there is a matching that saturates \(X\).
Consider the following graph:
The blue edges are a matching that saturates \(X:=\{x_{1},x_{2},x_{3},x_{4},x_{5}\}\).
If \(S\subset X\), then clearly the number of vertices adjacent to \(S\) must be \(\geq\) the number of vertices in \(S\).
Theorem 3.1.11. (Hall's Theorem) An \(X,Y\)-bigraph \(G\) has a matching that saturates \(X\) if and only if \(|N(S)|\geq |S|\) for all \(S\subseteq X\).
Recall:
Corollary (the Marriage Theorem). An \(X,Y\)-bigraph \(G\) contains a perfect matching if and only if both of the following hold:
Does the following bigraph have a perfect matching?
\(\underbrace{\hspace{1.8in}}\)
\(\overbrace{\hspace{1in}}\)
\(S\)
\(N(S)\)
Thus, the graph contains no perfect matching.
Corollary 3.1.13. For \(k>0\), every \(k\)-regular bipartite graph has a perfect matching.
Does the following bigraph have a perfect matching?
Since it is \(3\)-regular, by Corollary 3.1.13...YES!
Example. A group of 50 pets and 50 people meet one day and they decide whether they are compatible. Each pair decide whether they are mutually compatible.
At the end, each person is compatible with 10 of the pets, and each pet is compatible with 10 of the people.
Is there a way to match all 50 people compatible pets?
Definition 3.1.14. A vertex cover of a graph \(G\) is a set \(Q\subseteq V(G)\) that contains at least one endpoint of every edge. We say that the vertices in \(Q\) cover \(E(G)\).
Example. In each of the following graphs, the blue vertices comprise a vertex cover:
blue
Theorem 3.1.16. If \(G\) is a bipartite graph, then the maximum size of a matching in \(G\) equals the minimum size of a vertex cover of \(G\).
This is an example of a min-max relation since it establishes the equivalence between a maximization problem and a minimization problem.
Theorem 3.1.16. If \(G\) is a bipartite graph, then the maximum size of a matching in \(G\) equals the minimum size of a vertex cover of \(G\).
Extra vertex
\(\underbrace{\hspace{3in}}\)
One vertex in \(Q\) for each edge in \(M\).
Proof. First, we show that if \(Q\) is any vertex cover, and \(M\) is a maximum matching, then \(|Q|\geq |M|\). Therefore, a vertex cover of minimum size has at least as many vertices as the number of edges in a maximum matching.
Proof. Suppose \(X\) and \(Y\) are the partite sets in \(G\). Let \(Q\) be a vertex cover of minimum size.
Theorem 3.1.16. If \(G\) is a bipartite graph, then the maximum size of a matching in \(G\) equals the minimum size of a vertex cover of \(G\).
We'll use Hall's theorem to find a matching in \(H\) that saturates \(R\) and a matching in \(H'\) that saturates \(T\).
Since \(Q=T\cup R\), together these matchings give a matching in \(G\) of size \(|Q|\).
Proof. For each \(S\subseteq R\) we consider \(N_{H}(S)\).
Theorem 3.1.16. If \(G\) is a bipartite graph, then the maximum size of a matching in \(G\) equals the minimum size of a vertex cover of \(G\).
If \(|N_{H}(S)|<|S|\), then we could replace \(S\) with \(N_{H}(S)\) in \(Q\) to obtain a smaller vertex cover.
The union of the matchings in \(H\) and \(H'\) is a matching with \(|Q|\) edges in it. \(\Box\)
Since \(Q\) is minimum size, we see \(|N_{H}(S)|\geq |S|\).
The same argument shows Hall's condition holds in \(H'\).
Definition. The independence number of a graph is the maximum size of an independent set of vertices.
Is the independence number of a tree equal to the number of leaves?
Is the independence number of a tree \(\geq\) the number of leaves?
No!
No! Consider \(P_{2}\)
Is the independence number of a bipartite graph equal to the size of one of the partite sets?
No!
Definition 3.1.19. An edge cover of a graph \(G\) is a set of edges such that every vertex of \(G\) is incident to some edge of \(L\).
How many edges are in the smallest edge cover of the following graph?
5 edges!
Lemma 3.1.21. In a graph \(G\), a subset \(S\subseteq V(G)\) is an independent set if and only if \(\overline{S}\) is a vertex cover, and hence \(\alpha(G)+\beta(G) = n(G)\).
Theorem 3.1.22. If \(G\) is a graph without isolated vertices, then \[\alpha'(G) + \beta'(G) = n(G).\]
Definition 3.1.20.
Theorem 3.1.24. If \(G\) is a bipartite graph without isolated vertices, then \[\alpha(G) = \beta'(G).\]
Proof. We have the following equivalent statements:
Theorem 3.1.22. If \(G\) is a graph without isolated vertices, then \[\alpha'(G) + \beta'(G) = n(G).\]
Definition 3.1.20.
Proof that \(\alpha'(G)+\beta'(G)\leq n(G)\).
Theorem 3.1.22. If \(G\) is a graph without isolated vertices, then \[\alpha'(G) + \beta'(G) = n(G).\]
Definition 3.1.20.
Proof that \(\alpha'(G)+\beta'(G)\geq n(G)\).
\(\left\{\begin{array}{l}\text{\(G\) - an \(X,Y\)-bigraph}\\ \text{\(M\) - a matching in \(G\)}\\ \text{\(U=\) verts in \(X\) unsat. by \(M\)}\end{array}\right.\)
Inputs:
Initialize:
\(\left\{\begin{array}{l}S=U\\ \text{\(T=\varnothing\)}\\ K = \varnothing\end{array}\right.\)
Iteration: If \(K = S\) then by the next theorem \(T\cup (X-S)\) is a minimum cover, and \(M\) as a maximum matching.
If \(K\subsetneq S\), the select \(x\in S-K\). Go through each \(y\in N(x)\) such that \(xy\notin M\).
Note: \(S\subseteq X\), \(T\subseteq Y\) and \(K\subseteq S\) is the "marked vertices".
After all \(y\)'s have been explored, add \(x\) to \(K\).
Example.
We see \(x_{6}y_{5}\notin M\) but \(y_{5}\) is unsat. Since \(x_{6}\) is in \(S\), there is an \(M\)-alternating path from \(U\) to \(x_{6}\), extend this path to \(y_{5}\) for an \(M\)-augmenting path!
\(S=\{x_{1},x_{2},x_{3},x_{4},x_{5},x_{6}\}\)
\(T=\{y_{1},y_{2},y_{3}\}\)
\(K=\{x_{1},x_{2},x_{3},x_{4},x_{5}\}\)
\(S=\{x_{1},x_{2},x_{3},x_{4},x_{5}\}\)
\(T=\{y_{1},y_{2}\}\)
\(K=\{x_{1},x_{2},x_{3},x_{4}\}\)
\(S=\{x_{1},x_{2},x_{3},x_{4},x_{5}\}\)
\(T=\{y_{1},y_{2}\}\)
\(K=\{x_{1},x_{2},x_{3}\}\)
\(S=\{x_{1},x_{2},x_{3},x_{4}\}\)
\(T=\{y_{1}\}\)
\(K=\{x_{1},x_{2}\}\)
\(S=\{x_{1},x_{2},x_{3},x_{4}\}\)
\(T=\{y_{1}\}\)
\(K=\{x_{1}\}\)
\(S=U=\{x_{1},x_{2},x_{3}\}\)
\(T=\varnothing\)
\(K=\varnothing\)
Example.
A bigger matching!
Theorem 3.2.2. Repeatedly applying the Augmenting Path Algorithm to a bipartite graph produces a matching and a vertex cover of equal size.
Theorem 3.1.16. If \(G\) is a bipartite graph, then the maximum size of a matching in \(G\) equals the minimum size of a vertex cover of \(G\).
Recall the König-Egerváry Theorem:
Hence, the Augmenting Path Algorithm gives a maximum matching and a minimum vertex cover in a bipartite graph.
Definition 4.1.1.
Example. Consider the complete graph \(K_{n}\). Deleting a vertex results in \(K_{n-1}\), which is also connected. So \(K_{n}\) has no separating set.
Thus, we say \(\kappa(K_{n}) = n-1\).
Example. What about \(K_{m,n}\)?
If \(X\) and \(Y\) are a bipartition of the graph, then any separating set must contain either \(X\) or \(Y\), thus, \(\kappa(K_{m,n}) = \min\{m,n\}\).
In this section all graphs have no loops.
Lemma. \(\kappa(G)\leq \delta(G)\)
Proof. Let \(v\in V(G)\) be a vertex with degree \(\delta(G)\). Clearly \(N_{G}(v)\) is a separating set or \(G-N_{G}(V)\) is a single vertex. Thus \(\kappa(G)\leq |N_{G}(v)|=\delta(G)\). \(\Box\)
Given a graph \(G\) on \(n\) vertices which is \(k\)-connected, how many edges must \(G\) have?
Clearly, we must have \(\delta(G)\geq k\), and hence every vertex of \(G\) must have degree \(\geq k\).
By the degree-sum formula:
\[e(G) = \frac{1}{2}\sum_{v\in V(G)}d(v)\geq \frac{1}{2}nk.\]
Since \(e(G)\) is an integer, we have the following:
Proposition. If \(G\) is a \(k\)-connected graph on \(n\) vertices, then \(G\) has at least \(\lceil nk/2\rceil\) edges.
Definition (see Example 4.1.4.). Given \(k<n\) the graph \(H_{k,n}\) has \(n\) vertices placed equidistant around a circle, each vertex is connected to the \(\lfloor k/2\rfloor\) vertices closest to it around the circle.
If \(k\) is odd and \(n\) is even, add an edge between antipodal vertices as well.
If \(k\) is odd and \(n\) is odd, label the vertices \(\{0,1,2,\ldots,n\}\), and add an edge between vertices \(i\) and \(i+(n-1)/2\) for \(i=0,1,\ldots,(n-1)/2\).
The graphs \(H_{4,8}\), \(H_{5,8}\), and \(H_{5,9}\) are shown here:
Theorem 4.1.5. \(\kappa(H_{k,n}) = k\), and hence the minimum number of edges in a \(k\)-connected graph on \(n\) vertices is \(\lceil kn/2\rceil\).
Theorem 4.1.5. \(\kappa(H_{k,n}) = k\), and hence the minimum number of edges in a \(k\)-connected graph on \(n\) vertices is \(\lceil kn/2\rceil\).
Since \(\delta(H_{k,n}) = k\) we see that \(\kappa(H_{k,n})\leq k\).
\(H_{4,10}\) is shown here:
Similar proofs work with \(k\) is odd
Definition 4.1.7.
Disconnecting set
Not an edge cut
Edge cut
Disconnecting set
Disconnecting set
Not an edge cut
Note: A minimal disconnecting set is an edge cut.
Theorem 4.1.9. If \(G\) is a simple graph, then
\[\kappa(G)\leq \kappa'(G)\leq \delta(G).\]
Given disconnecting set \(F\subseteq E(G)\), we can delete one endpoint for each edge in \(F\) to disconnect the graph, right?
We conclude there is a vertex cut \(S\) with \(|S|=|F|\), and thus \(\kappa(G)\leq \kappa'(G)\), right?
The edges in blue are a disconnecting set.
If we delete the red vertices...
the graph is still connected.
So, is it true that \(\kappa(G)\leq \kappa'(G)\)?
Theorem 4.1.9. If \(G\) is a simple graph, then
\[\kappa(G)\leq \kappa'(G)\leq \delta(G).\]
Proof. The set of edges incident with a vertex of degree \(\delta(G)\) is an edge cut, thus \(\kappa'(G)\leq \delta(G)\).
Thus, we must show \(\kappa(G)\leq \kappa'(G)\):
How many colors do we need so that every bordering territory is a different color?
How many colors do we need so that every bordering territory is a different color?
Four colors
How many "colors" do we need so that we can color each vertex and no adjacent vertices are the same color?
Definition 5.1.1.
Proposition. A graph is \(2\)-colorable if and only if it is bipartite.
Proposition. \(C_{5}\) is not \(2\)-colorable.
Proof. Assume toward a contradiction there exists a proper \(2\)-coloring \(f~:~V(G)\to \{1,2\}\). Label the vertices \(\{0,1,2,3,4\}\) such that \(i\) and \(j\) are adjacent if and only if \(i-j\equiv \pm 1\) (mod \(5\)). By the pigeonhole principle, at least \(3\) vertices are labeled the same color. Let these vertices be \(a,b,c\) where \(0\leq a<b<c\leq 4\). Note that \(b\geq a+2\) and \(c\geq b+2\). Therefore \(4\geq c\geq a+4\geq 4\). We conclude \(a=0\) and \(c=4\), and since \(0-4\equiv 1\) (mod \(5\)), we see \(a\leftrightarrow c\). Thus \(f\) is not a proper coloring, which is a contradiction. \(\Box\)
Definition 5.1.6. The clique number of a graph \(G\), written \(\omega(G)\), is the maximum size of a set of pairwise adjacent vertices (a clique) in \(G\).
Theorem 5.1.7. For every graph \(G\),
\[\chi(G)\geq \omega(G) \quad\text{and}\quad\chi(G)\geq n(G)/\alpha(G).\]
Theorem 5.1.13. \(\chi(G)\leq \Delta(G)+1\).
Proof. Label the vertices \(v_{1},v_{2},\ldots,v_{n}\). In order, label each vertex \(v_{i}\) with the smallest label not used on a neighbor with an index smaller than \(i\) (this is just the greedy algorithm). One will never use more than \(\Delta(G)+1\) colors. \(\Box\)
Proof. A proper coloring of a clique on \(k\) vertices requires \(k\) colors. Thus, the first inequality is clear.
Each color class is an independent set. Let \(V_{1},\ldots,V_{\chi(G)}\) be the color classes of a minimum proper coloring, then \(|V_{i}|\leq \alpha(G)\), and \[\chi(G)\alpha(G)\geq |V_{1}|+|V_{2}|+\cdots+|V_{\chi(G)}| = n(G).\ \Box\]
Example. Consider the join of \(C_{5}\) and \(K_{3}\), which is denoted \(C_{5}\vee K_{3}\) (see Definition 3.3.6)
Note that \(\chi(C_{5})=3\) and \(\chi(K_{3})=3\)
Since \(C_{5}\) contains no triangles, we see that \(\omega(C_{5}\vee K_{3}) = 5\).
We cannot use any of the same colors in \(C_{5}\) and \(K_{3}\), thus \(\chi(C_{5}\vee K_{3}) =6\).
Theorem 5.1.13. \(\chi(G)\leq \Delta(G)+1\).
Proposition 5.1.14. If a graph \(G\) has degree sequence \[d_{1}\geq d_{2}\geq\cdots\geq d_{n},\]
then \(\chi(G)\leq 1+\max_{i}\min\{d_{i},i-1\}\).
Proof. Use the greedy algorithm on the vertices, but listed in nonincreasing order by degree. \(\Box\)
Example. Consider the graph \(G\) below:
Example 6.1.1. Alice, Bob, and Chris each need to hook up gas, water, and electricity to their homes. The hookups don't need to be straight, but the lines cannot cross. Can it be done?
In other words, can we draw the graph of \(K_{3,3}\) in the plane without the edges crossing?
We still need to hook Chris up to gas!
Proposition 6.1.2. The graphs \(K_{5}\) and \(K_{3,3}\) cannot be drawn in the plane without edges crossing.
Proof. First, consider \(K_{3,3}\):
The proof that \(K_{5}\) cannot be drawn without crossings is similar.
Definition 6.1.4.
Definition 5.2.19. A subdivision of \(G\) is a graph obtained by successively replacing edges with paths. That is, an edge \(xy\in E(G)\) is replaced with the path \(x,z_{1},\ldots,z_{n},y\), where the new vertices \(z_{1},\ldots,z_{n}\) are only adjacent to the adjacent vertices in the path.
\(G\)
subdivision of \(G\)
Proposition 6.2.1. If a graph \(G\) has a subgraph that is a subdivision of \(K_{5}\) or \(K_{3,3}\), then it is nonplanar.
Theorem 6.2.2. A graph is planar if and only if it does not contain a subdivision of \(K_{5}\) or \(K_{3,3}\).
Proof. If a subdivision of a graph is planar, then removing degree \(2\) vertices and replacing them with edges would result in a planar graph. Thus, if a subdivision of \(K_{5}\) or \(K_{3,3}\) were planar, then \(K_{5}\) or \(K_{3,3}\) would be planar, which they are not. \(\Box\)
Theorem 6.1.21 (Euler's Formula). If a connected plane graph \(G\) has exactly \(n\) vertices, \(e\) edges, and \(f\) faces, then \(n-e+f=2\).
Definition 6.1.5.
How many faces?
Don't forget the unbounded face
4
X
5
Theorem 6.1.21 (Euler's Formula). If a connected plane graph \(G\) has exactly \(n\) vertices, \(e\) edges, and \(f\) faces, then \(n-e+f=2\).
Proof. Use induction on \(n\):
Inductive step: Suppose \(G\) has \(n>1\) vertices, \(e\) edges, and \(f\) faces.
\[2 = (n-1)-(e-1)+f = n-e+f.\ \Box\]
Theorem 6.1.23. If \(G\) is a simple planar graph with at least \(3\) vertices, then \(e(G)\leq 3n(G)-6\). If \(G\) is triangle free, then \(e(G)\leq 2n(G)-4\).
Proof. Let \(F_{1},\ldots,F_{f}\) be the faces of \(G\). Let \(\ell(F_{i})\) be the number of edges on the boundary of face \(F_{i}\). Each edge is counted twice, and thus \[2e(G) = \sum_{i=1}^{f}\ell(F_{i}).\]
Since \(G\) is simple and \(n(G)\geq 3\), each face has at least \(3\) edges on it's boundary, and thus \(2e(G)\geq 3f.\)
By Euler's formula \(f = 2-n(G)+e(G)\), substituting this in the above inequality gives
\[2e(G)\geq 3\big(2-n(G)+e(G)\big) = 6-3n(G)+3e(G).\]
If \(G\) is triangle free, then \(2e(G) \geq 4f\), and hence \[2e(G)\geq 4\big(2-n(G)+e(G)\big) = 8-4n(G)+4e(G).\ \Box\]
This face has 6 edges on its boundary
Theorem 6.1.23. If \(G\) is a simple planar graph with at least \(3\) vertices, then \(e(G)\leq 3n(G)-6\). If \(G\) is triangle free, then \(e(G)\leq 2n(G)-4\).
Example. Note \[e(K_{5}) = 10>9=3\cdot 5-6 = 3n(K_{5})-6,\] which implies \(K_{5}\) is not planar.
Similarly \[e(K_{3,3})=9>8 = 2\cdot 6-4 = 2n(K_{3,3}) - 4,\] and since \(K_{3,3}\) is triangle free, \(K_{3,3}\) is not planar.
Theorem 6.1.23. If \(G\) is a simple planar graph with at least \(3\) vertices, then \(e(G)\leq 3n(G)-6\). If \(G\) is triangle free, then \(e(G)\leq 2n(G)-4\).
Corollary. If \(G\) is simple and planar, then \(\delta(G)\leq 5\).
Proof. Assume toward a contradiction that \(\delta(G)>5\). For each \(v\in V(G)\) we have \(d(v)\geq 6\). By the degree-sum formula we have \[2e(G) \geq 6n(G).\]
By Theorem 6.1.23 \[3n(G)\leq e(G)\leq 3n(G)-6.\]
This is a contradiction, and shows \(\delta(G)\leq 5\). \(\Box\)
Theorem 6.3.1. Every planar graph is \(5\)-colorable.
Proof. We will use induction on \(n(G)\). For the basis step we note that any graph with \(n(G)\leq 5\) is \(5\)-colorable.
Next, suppose \(G\) is a planar graph with \(n(G)>5\):
\(P_{1,3}\)
Theorem 6.3.6. Every planar graph is \(4\)-colorable.
Proof...
A wedding has \(n\) guests, but some refuse to sit at the same table.
How many tables are needed so that no one is sitting at a table with someone they hate?
Consider the graph on \(n\) vertices, labeled \(1,2,3,\ldots,n\).
Draw an edge \(ij\) if guest \(i\) refuses to sit with guest \(j\).
The chromatic number of this graph is the minimum number of tables needed.