Graph theory

It's just dots and lines

An example

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 example

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.

An example

\(\leadsto\)

An example

\(\leadsto\)

An example

A Disconnected example

\(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:

Is it Connected?

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?

Is it Connected?

The Graph Laplacian

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=\)

Part 1:

Fundamental Concepts

Graphs

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\)

Simple Graphs

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. 

  • The complement \(\overline{G}\) of a simple graph \(G\) is the simple graph with vertex set \(V(G)\) defined by \(uv\in E(\overline{G})\) if and only if \(uv\notin E(G)\).
  • A clique in a graph is a set of pariwise adjacent vertices.
  • An independent set (or stable set) in a graph is a set of pairwise nonadjacent vertices.

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.

  • A path is a simple graph whose vertices can be ordered so that two vertices are adjacent if and only if  they are consecutive in the list.
  • A cycle is a graph with an equal number of vertices and edges whose vertices can be placed around a circle so that two vertices are adjacent if and only if they appear consecutively along a circle.

Path

Path

Cycle

Cycle

Neither

Definition 1.1.16.

  • A subgraph of a graph \(G\) is a graph \(H\) such that \(V(H)\subseteq V(G)\) and \(E(H)\subseteq E(G)\) and the assignment of endpoints in \(H\) is the same as in \(G\). We write \(H\subseteq G\) and say "\(G\) contains \(H\)".
  • A graph \(G\) is connected if each pair of vertices in \(G\) belongs to a path contained in \(G\).

Example. The red vertices and edges are a subgraph. This subgraph is a path.

Example. 

Matrices and IsoMorphism

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]\]

Are these graphs "the same"?

Graph isomorphism

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}\]

Permutation matrices

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\)

Connection

in

Graphs

Definition 1.2.2.

  • A walk is a list \(v_{0},e_{1},v_{1},\ldots,e_{k},v_{k}\) of vertices and edges such that, for      \(i\in\{1,2,\ldots,k\}\), the edge \(e_{i}\) has endpoints \(v_{i-1}\) and \(v_{i}\).
  • A trail is a walk with no repeated edge.
  • A \(u,v\)-walk or \(u,v\)-trail has first vertex \(u\) and last vertex \(v\); the vertices \(u\) and \(v\) are called its endpoints.
  • A \(u,v\)-path is a path whose endpoints are \(u\) and \(v\); the other vertices are called internal vertices.
  • The length of a walk, trail, path, or cycle is its number of edges. A walk or trail is closed if its endpoints are the same.

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.

  • A cut-edge or cut-vertex of a graph is an edge or vertex, respectively, whose deletion increases the number of components.
  • We write \(G-e\) or \(G-M\) for the subgraph of \(G\) obtained by deleting an edge \(e\) or a set of edges \(M\).
  • We write \(G-v\) or \(G-S\) for the subgraph obtained by deleting a vertex \(v\) or a set of vertices \(S\).
  • An induced subgraph is a subgraph obtained by deleting a set of vertices. 
  • We write \(G[T]\) for \(G-\overline{T}\), where \(\overline{T} = V(G)-T\); this is called the subgraph of \(G\) induced by \(T\).

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

Eulerian Circuits

Seven Bridges of Konigsberg

Is there a path that crosses all 7 bridges exactly once?

Seven Bridges of Konigsberg

Is there a path that crosses all 7 bridges exactly once?

Seven Bridges of Konigsberg

Is there a path that crosses all 7 bridges exactly once?

Definition 1.2.24.

  • A graph is Eulerian if it has a closed trail containing all its edges.
  • A circuit is a closed trail with vertices listed in cyclic order.
  • An Eulerian circuit or Eulerian trail is a circuit or a trail (resp.) containing all the edges.
  • An even graph is a graph with vertex degrees all even. We call a vertex odd or even when it has odd or even degree, respectively.

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.

Vertex Degrees  and counting

Definition 1.3.1.

  • The degree  of a vertex \(v\) in a graph \(G\), written \(d_{G}(v)\) or \(d(v)\), is the number of edges incident to \(v\), except that each loop at \(v\) counts twice.
  • The maximum degree is denoted \(\Delta(G)\), the minimum degree is denoted \(\delta(G)\), and \(G\) is regular if \(\Delta(G) = \delta(G)\).
  • The graph \(G\) is \(k\)-regular if \(\Delta(G) = \delta(G) = k\).
  • The neighborhood of \(v\), denoted \(N_{G}(v)\) or \(N(v)\), is the set of vertices adjacent to \(v\).

Regular graphs and Degree

\(1\)

\(1\)

\(2\)

\(2\)

\(2\)

\(4\)

\(\Delta(G) = 4\) and \(\delta(G) = 1\)

Example.

The Petersen Graph

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.

  • The path and cycle with \(n\) vertices are denoted \(P_{n}\) and \(C_{n}\), respectively. An \(n\)-cycle is a cycle with \(n\) vertices.
  • A complete graph is a simple graph whose vertices are pairwise adjacent. The complete graph on \(n\) vertices is denoted \(K_{n}\)
  • A complete bipartite graph or biclique is a simple bipartite graph such that two vertices are adjacent if and only if they are in different partite sets. When the partite sets have sizes \(r\) and \(s\), the graph is denoted \(K_{r,s}\)

Some important graphs

Definition 1.3.2.

  • The order of a graph \(G\), written \(n(G)\), is the number of vertices in \(G\). 
  • An \(n\)-vertex graph is a graph of order \(n\).
  • The size of a graph \(G\), written \(e(G)\), is the number of edges in \(G\). 
  • For \(n\in\mathbb{N}\), we define \([n]: = \{1,2,3,\ldots,n\}\).

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.

regular bipartite graphs

\(X\)

\(Y\)

Example. Consider the \(2\)-regular bipartite graph below

  • 4 vertices in \(X\)
  • Each is incident with \(2\) edges
  • This is all the edges!
  • Same is true for \(Y\)

Proof. Let \(X\) and \(Y\) be the partite sets, then \[e(G) = k|X| = k|Y|.\] Thus \(|X| = |Y|\). \(\Box\)

6-cycles in the petersen graph

6-cycles in the petersen graph

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:

6-cycles in the petersen graph

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.

Vertex-deleted subgraphs

Examples.

  • The vertex-deleted subgraphs of the cycle of length \(n\), \(C_{n}\), are all \(P_{n-1}\).
  • The vertex-deleted subgraphs of the path of length, \(P_{n}\), are \[P_{n-1},P_{1}+P_{n-2},P_{2}+P_{n-3},\ldots,P_{n-2}+P_{1},P_{n-1}.\]

Example. Consider the following vertex-deleted subgraphs:

What order 5 graph?

Example. Consider the graph \(G\) and its vertex-deleted subgraphs:

Extremal Problems

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\).

degree sequences

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.

Graphic sequences

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}\)

Directed graphs

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.

What is a Directed graph

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:

  • A loop is an edge whose endpoints are equal.
  • Multiple edges are edges having the same ordered pair of endpoints.
  • The digraph is simple if each ordered pair is the head and tail of at most one edge (Note: loops are allowed!)

In a simple digraph:

  • We write \(uv\) for an edge with tail \(u\) and head \(v\).
  • If \(u\neq v\), then the edges \(uv\) and \(vu\) are different.
  • If there is an edge from \(u\) to \(v\), then \(u\) is a predecessor of \(v\), and \(v\) is a successor of \(u\).
  • We use \(u\to v\) to denote "there is an edge from \(u\) to \(v\)."

 

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

Example: Markov Chain

\[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.

Example: Markov Chain

\[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\)

Digraph degrees

Definition 1.4.17. Let \(v\) be a vertex in a digraph.

  • The outdegree \(d^{+}(v)\) is the number of edges with tail \(v\).
  • The indegree is the number of edges with head \(v\). 
  • The out-neighborhood or successor set \(N^{+}(v)\) is the set \[\{x\in V(G) : v\to x\}.\]
  • The in-neighborhood or predecessor set \(N^{-}(v)\) is the set \[\{x\in V(G) : x\to v\}.\]
  • The minimum and maximum indegree are \(\delta^{-}(G)\) and \(\Delta^{-}(G)\); for outdegree we use \(\delta^{+}(G)\) and \(\Delta^{+}(G)\).

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.

Eulerian Digraphs

Definition 1.4.22.

  • An Eulerian trail in a digraph is a trail containing all edges.
  • An Eulerian circuit is a closed trial containing all edges.
  • A digraph is Eulerian if it has an Eulerian circuit.

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?

Trees

Definition 2.1.1.

  • A graph with no cycle is acyclic.
  • A forest is an acyclic graph.
  • A tree is a connected acyclic graph.
  • A leaf is a vertex of degree \(1\).
  • A spanning subgraph of \(G\) is a subgraph with vertex set \(V(G)\).
  • A spanning tree is a spanning subgraph that is also a tree.

Some floral definitions

\[\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.

Some other characterizations of trees

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\).

Spanning Trees

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\):

  • For \(k=0\) we have a tree \(T\) with no edges, that is, an isolated vertex.
  • Clearly an isolated vertex is a subgraph of any graph.

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. 

  • Let \(v\) be any leaf in \(T\) and let \(T'=T-v\).
  • Let \(u\) be the neighbor of \(v\) in \(T\)
  • \(T'\) is a tree with \(k-1\) edges.
  • \(\delta(G)\geq k>k-1\)
  • By the inductive hypothesis \(T'\) is a subgraph of \(G\).
  • Since \(d_{G}(u)\geq k\), the vertex \(u\) has at least \(k\) neighbors in \(G\).
  • Since \(T'\) has \(k-1\) edges, \(u\) has at most \(k-1\) neighbors in \(T'\).
  • There exists a vertex \(\tilde{v}\in G-T'\) such that \(\tilde{v}\leftrightarrow u\)
  • Make \(T\) by adding the edge between \(u\) and \(\tilde{v}\) to \(T'\).

Distance in Graphs

Definition 2.1.9.

  • If \(G\) has a \(u,v\)-path, then the distance from \(u\) to \(v\), written \(d_{G}(u,v)\) or simply \(d(u,v)\), is the length of the shortest \(u,v\)-path.
  • If there is no \(u,v\)-path in \(G\), then \(d(u,v) = \infty\).
  • The diameter of \(G\) is given by \[\operatorname{diam}G = \max\{d(u,v) : u,v\in V(G)\}.\]
  • The eccentricity of a vertex \(u\) is given by \[\epsilon(u) = \max\{d(u,v) : v\in V(G)\}.\]
  • The radius of a graph \(G\) is given by \[\operatorname{rad}G = \min\{\epsilon(u) : u\in V(G)\}.\]

\(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}\)).

the center

Proof. We use induction on the number of vertices in a tree \(T\).

 

Inductive step:

  • Suppose \(n(T)>2\) and the theorem is true for trees with \(<n(T)\) vertices.
  • Let \(T'\) be the graph obtained by deleting every leaf of \(T\).
  • For \(u\in V(T)\) the farthest vertex was a leaf, thus \(\epsilon_{T'}(u)=\epsilon_{T}(u)-1\).
  • Leaves of \(T\) are not in the center of \(T\).
  • The center of \(T'\) is the same as the center of \(T\).
  • By the inductive hypothesis the center of \(T'\) is a vertex or an edge. \(\Box\)

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}\).

Optimization and Trees

Weighted graphs

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.

Kruskal's Algorithm

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.

  • By construction, the graph \(H\) is acyclic at each step, and thus the final graph \(T\) is acyclic.
  • If \(T\) has \(>1\) component, then a path in \(G\) between two components of \(T\) includes an edge with endpoints in different components.
  • The algorithm terminated, so such an edge does not exist.

Suppose \(T^{\ast}\) is a spanning tree of minimum weight. If \(T=T^{\ast}\) then we're done.

  • Let \(e\in E(T)\) denote the first edge that we added to \(T\) that is not in \(T^{\ast}\). 
  • (Proposition 2.1.7)There exists \(e'\in E(T^{\ast})-E(T)\) such that \(T^{\ast}+e-e'\) is a spanning tree.
  • Since (when performing the algorithm) we chose \(e\) and not \(e'\) we know that the weight of \(e\) is at most the weight of \(e'\)
  • Thus the weight of \(T^{\ast}+e-e'\) is at most the weight of \(T^{\ast}\).
  • \(T^{\ast}+e-e'\) is minimum-weight, and agrees with \(T\) for one more step in the algorithm.
  • Repeat to find a minimum-weight tree that agrees with \(T\). \(\Box\)

Proof. First, we see that the output, which we call \(T\), is a spanning tree

Dijkstra's Algorithm

\(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. 

  1. Pick unvisited vertex w/ smallest distance (currently)
  2. For all neighbors update distance to neighbors, if shorter

Dijkstra's Algorithm

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. 

  1. Pick unvisited vertex w/ smallest distance (currently)
  2. For all neighbors update distance to neighbors, if shorter

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)\).

Dijkstra's Algorithm (It works!)

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}\).

Dijkstra's Algorithm (It works!)

Proof continued.

  • By induction \(t_{k-1}(z_{j})\) is the length of the shortest \(v,z_{j}\)-path through vertices \(z_{1},\ldots,z_{k-2}\).
  • Since \(t_{k-1}(z_{k-1})\geq t_{k-1}(z_{j})\), the shortest \(v,z_{j}\)-path through \(z_{1},\ldots,z_{k-1}\) does not go through \(z_{k-1}\).
  • Thus, \(t_{k-1}(z_{j})\) is the length of the shortest \(v,z_{j}\)-path through \(z_{1},\ldots,z_{k-1}\). 

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

Breadth-first search

\(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.

Matchings and Covers

Definition 3.1.1.

  • A matching in a graph \(G\) is a set of non-loop edges with no shared endpoints.
  • The vertices incident to the edges of a matching \(M\) are saturated by \(M\); the others are unsaturated.
  • A perfect matching in a graph is a matching that saturates every vertex.

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.

Saturating partite sets

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:

  • A bipartite graph \(G\) with partite sets \(X\) and \(Y\) is called an \(X,Y\)-bigraph.
  • Given a set of vertices \(S\), the set neighborhood of \(S\) is the set \[N(S) = \{v\in V(G) : v\leftrightarrow w\text{ for some }w\in S\}.\]
  • Given a finite set \(X\), the cardinality of \(S\) is the number of elements in \(S\), denoted \(|S|\).

Hall's Matching condition

Corollary (the Marriage Theorem). An \(X,Y\)-bigraph \(G\) contains a perfect matching if and only if both of the following hold:

  • \(|X|=|Y|\)
  • For every \(S\subseteq X\), \(|N(S)|\geq |S|\).

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?

Min-max Theorems

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\).

  1. The blue edges form a maximum matching \(M\).
  2. A vertex cover \(Q\) must include one endpoint of each of these edges.
  3. There might be more vertices, not incident with any edge in \(M\).

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.

  • Set \(R = Q\cap X\quad\text{and}\quad T = Q\cap Y\).
  • Let \(H\) and \(H'\) be the subgraphs induced by \(R \cup (Y-T)\) and \(T\cup (X-R)\), respectively.

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'\).

Independent Sets and Covers

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. 

  • \(\alpha(G)\) is the maximum size of an independent set in \(G\)
  • \(\alpha'(G)\) is the maximum size of an matching in \(G\)
  • \(\beta(G)\) is the minimum size of an vertex cover in \(G\)
  • \(\beta'(G)\) is the minimum size of an edge cover in \(G\)

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:

  • \(S\) is independent
  • every edge has at most one endpoint in \(S\)
  • every edge has at least one endpoint in \(\overline{S}\).   \(\Box\)

Theorem 3.1.22. If \(G\) is a graph without isolated vertices, then \[\alpha'(G) + \beta'(G) = n(G).\]

Definition 3.1.20. 

  • \(\alpha'(G)\) is the maximum size of an matching in \(G\)
  • \(\beta'(G)\) is the minimum size of an edge cover in \(G\)

Proof that \(\alpha'(G)+\beta'(G)\leq n(G)\).

  • Let \(M\) be a maximum matching in \(G\). We will construct an edge cover of size \(n(G)-|M|\). 
  • For each vertex \(v\) not saturated by \(M\), add to \(M\) an edge incident with \(v\). This produces an edge cover, call it \(\tilde{M}\)
  • Each edge in \(M\) covers two vertices, the rest cover exactly one, thus \[|\tilde{M}| = |M|+(n(G)-2|M|) = n(G) - |M|.\]
  • Thus \(\beta'(G)\leq |\tilde{M}|=n(G)-|M| =n(G)-\alpha'(G).\)

Theorem 3.1.22. If \(G\) is a graph without isolated vertices, then \[\alpha'(G) + \beta'(G) = n(G).\]

Definition 3.1.20. 

  • \(\alpha'(G)\) is the maximum size of an matching in \(G\)
  • \(\beta'(G)\) is the minimum size of an edge cover in \(G\)

Proof that \(\alpha'(G)+\beta'(G)\geq n(G)\).

  • Suppose \(L\) is a minimum edge cover in \(G\).
  • For an edge \(e\), if both of its endpoints are covered by edges in \(L\), then      \(e\notin L\), since otherwise \(L-\{e\}\) would be a smaller edge cover.
  • Thus, the graph formed by the edges in \(L\) contains no paths of length \(>2\). It's a forest and each component is a star!
  • For each component, take one edge, this forms a matching \(\tilde{L}\).
  • If \(k\) is the number of components, then \(n(G) = |L|+k\) (each edge counts one leaf, but we also must count the central vertex in each star).
  • Thus, \(\alpha'(G)\geq |\tilde{L}| = k = n(G)-|L| = n(G)-\beta'(G).\ \Box\)

Maximum Bipartite Matching

Augmenting Path Algorithm

\(\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\).

  1.  If \(y\) is unsaturated by \(M\): there's an \(M\)-alt. path to from \(U\) to \(x\), adding the edge \(xy\) gives an \(M\)-augmenting path.
  2. If \(y\) is sat. by \(M\), then \(\exists w\in X\) an \(M\)-alternating path from \(U\) to \(w\). Add \(w\) to \(S\) and \(y\) to \(T\).

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.

Connectivity

Definition 4.1.1. 

  • A separating set or vertex cut of a graph \(G\) is a set \(S\subseteq V(G)\) such that \(G-S\) has more than one component.
  • The connectivity of \(G\), written \(\kappa(G)\), is the minimum size of a separating set, or \(n(G)-1\) if no separating set exists.
  • A graph is \(k\)-connected if its connectivity is at least \(k\).

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.

Harary graphs

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\).

Harary graphs

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\).

  • Suppose \(S\subseteq V(G)\) with \(|S|<k\)
  • We'll find a path from between any two vertices in \(G-S\)
  • Consider the two paths around the circle
  • One path contains \(>k/2\) internal vertices not in \(S\).
  • Each of these vertices is adjacent, so we have a path

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.

  • A disconnecting set of edges is a set \(F\subseteq E(G)\) such that \(G-F\) has more than one component.
  • A graph is \(k\)-edge-connected if every disconnecting set has at least \(k\) edges.
  • The edge-connectivity of \(G\), denoted \(\kappa'(G)\), is the is minimum size of a disconnecting set.
  • Given \(S,T\subseteq V(G)\), we write \([S,T]\) for the set of edges having one endpoint in \(S\) and one endpoint in \(T\). 
  • An edge cut is an edge set of the form \([S,\overline{S}]\), where \(S\neq\varnothing\) and \(S\subsetneq V(G)\).

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?

Disconnecting sets vs. Separating sets

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).\]

Disconnecting sets vs. Separating sets

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)\):

  • First note that \(\kappa(G)\leq n(G)-1\).
  • Let \([S,\overline{S}]\) be a smallest edge cut.
  • If every vertex of \(S\) is adjacent to every vertex of \(\overline{S}\), then \[\kappa'(G) = \big|[S,\overline{S}]\big| = |S||\overline{S}|\geq n(G)-1\geq \kappa(G).\]
  • Otherwise, take \(x\in S\) and \(y\in\overline{S}\) with \(x\not\leftrightarrow y\).
  • Let \(T\) be vertices in \(\overline{S}\) adj. to \(x\) and in \(S-\{x\}\) adj. to \(\overline{S}\).
  • Choose one edge for each vertex in \(T\)
  • Any \(x,y\)-path has a vert. in \(T\) (red vertex)
  • \(T\) is a separating set
  • blue edges \(\subseteq [S,\overline{S}]\)
  • \(\kappa'(G) = [S,\overline{S}]\geq |T|\geq \kappa(G)\)

Vertex Coloring

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

Its a graph theory problem!

Its a graph theory problem!

Its a graph theory problem!

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.

  • A \(k\)-coloring of a graph \(G\) is a labeling \(f: V(G)\to S\), where \(|S| = k\).
  • The labels are colors; the vertices of one color form a color class.
  • A \(k\)-coloring is proper if adjacent vertices have different labels.
  • A graph is \(k\)-colorable if it has a proper \(k\)-coloring.
  • The chromatic number \(\chi(G)\) is the least \(k\) such that \(G\) is \(k\)-colorable.

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\)

The US map has a chromatic number of \(4\)

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\)

Bounds on the chromatic number

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\).

A better bound

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:

  • \(\Delta(G) = 5\), so Theorem 5.1.13 gives \(\chi(G)\leq 6\).
  • The degree sequence is \(5,3,3,3,3,3\), so Proposition 5.1.14 gives \(\chi(G)\leq 4\).

Planar graphs

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}\):

  • Suppose \(K_{3,3}\) can be drawn in the plane without edges crossing. 
  • Let \(C\) be a \(6\)-cycle in \(K_{3,3}\). (\(C\) is in blue, the partite sets are red and black vertices)
  • The rest of the edges must be entirely within the curve formed by \(C\) or entirely outside it.
  • Two of the three remaining edges must be both inside or both outside.
  • If two are inside, then the first cuts the inside into two pieces. The endpoints of the remaining edge are in different pieces. 
  • Similarly, if there are two edges outside.

The proof that \(K_{5}\) cannot be drawn without crossings is similar.

Definition 6.1.4. 

  • A graph is planar if it has a drawing without crossings.
  • Such a drawing is a planar embedding of \(G\).
  • A plane graph is a particular planar embedding of a planar graph.
  • A curve is closed if its first and last points are the same.
  • It is simple if it has no repeated points other than possibly the first and last.

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\)

Characterization of Planar graphs

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\).

Faces of a planar graph and Euler's formula

Definition 6.1.5.

  • An open set in the plane is a set \(U\subseteq\mathbb{R}^{2}\) such that for every \(p\in U\), there is a small distance \(\varepsilon\) such that all points with in \(\varepsilon\) from \(p\) are also in \(U\).
  • A region is an open set that contains a continuous path between any two points in the set.
  • The faces of a plane graph are the maximal regions of the plane that contain no point used in the embedding.

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\).

Faces of a planar graph and Euler's formula

Proof. Use induction on \(n\):

  • Basis step (\(n=1\)): \(G\) is just a bunch of loops.
  • One face for each edge, plus the "unbounded face", thus \(f=e+1\).

Inductive step: Suppose \(G\) has \(n>1\) vertices, \(e\) edges, and \(f\) faces.

  • Since \(G\) is connected some edge is not a loop.
  • Contract the edge.
  • The new graph has \(n-1\), vertices \(e-1\) edges, and \(f\) faces.
  • By the inductive assumption

\[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\).

An application of Euler's Formula

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\).

An application of Euler's Formula

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\).

An application of Euler's Formula

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\)

The Five color theorem

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\):

  • By the previous corollary, there is a vertex \(v_{0}\in V(G)\) with \(d(v_{0})\leq 5\).
  • By the inductive hypothesis, the graph \(G-v_{0}\) is \(5\)-colorable. 
  • If \(d(v_{0})<5\), then we're done.
  • Label the neighbors \(v_{1},v_{2},v_{3},v_{4},v_{5}\) (In order!)
  • In the \(5\)-coloring of \(G-v_{0}\) each of these vertices has a different color, so suppose \(v_{i}\) is colored \(i\).
  • Consider the subgraph \(G_{i,j}\) induced by the vertices colored \(i\) and \(j\).
  • If \(v_{i}\) and \(v_{j}\) are in different components, we can switch colors in one of them.
  • Now, suppose that for each pair \((i,j)\), the vertices \(v_{i}\) and \(v_{j}\) are in the same component of \(G_{i,j}\).
  • Let \(P_{i,j}\) be a path from \(v_{i}\) to \(v_{j}\) in \(G_{i,j}\). 
  • Since we listed the vertices in order, the path \(P_{1,3}\) cuts off \(v_{2}\) from \(v_{4}\). 
  • More precisely, form the cycle by adding \(v_{0}\) to \(P_{1,3}\). This forms a face.
  • By the ordering of the vertices \(v_{2}\) and \(v_{4}\) cannot both be inside or outside the face.
  • Thus, the path \(P_{2,4}\) must cross \(P_{1,3}\).
  • This contradicts the assumption that \(G\) is planar

\(P_{1,3}\)

  • Thus there's a pair \((i,j)\) such that \(v_{i}\) and \(v_{j}\) must be in different components of \(G_{i,j}\).
  • Switching colors on one of those components frees up a color to color \(v_{0}\).
  • Thus, we have the desired \(5\)-coloring. \(\Box\)

The four color theorem

Theorem 6.3.6. Every planar graph is \(4\)-colorable.

Proof...

An application graph coloring

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.