Introduction: Graphs—Basic Definitions

Chapter
Part of the Applied and Numerical Harmonic Analysis book series (ANHA)

Abstract

By a graph, we don’t mean a chart or function plot or a diagram. We mean a combinatorial structure which consists of vertices, also called points or nodes, connected by edges, also called arcs. If you wish, think of vertices as destinations and edges as routes. A more precise statement is given below.

1.1 Graph theory

By a graph, we don’t mean a chart or function plot or a diagram. We mean a combinatorial structure which consists of vertices, also called points or nodes, connected by edges, also called arcs. If you wish, think of vertices as destinations and edges as routes. A more precise statement is given below.

Graphs are used in many branches of science but the only application we consider here is to cryptography—the Biggs cryptosystem studied briefly in Chapter  4.

1.1.1 Basic definitions

We begin with a precise definition of a graph.

Definition 1.1.1.

For any set S, let \(S^{(2)} =\{\{s,t\} \ |\ s, t\in S, s\not = t\}\), i.e., \(S^{(2)}\) is the set of unordered pairs of distinct elements of S. An undirected simple graph \(\Gamma = (V, E)\) is an ordered pair of sets, where V is a set of vertices (possibly with weights attached) and \(E \subseteq V^{(2)}\) is a set of edges (possibly with weights attached)1. We refer to \(V=V_\Gamma \) as the vertex set of \(\Gamma \), and \(E=E_\Gamma \) as the edge set.

A subgraph of \(\Gamma =(V, E)\) is a graph \(\Gamma '=(V', E')\) formed from subsets \(V'\subset V\) and \(E'\subset E\) such that \(V'\) includes the endpoints of each \(e\in E'\).

The neighborhood of a vertex v in a graph \(\Gamma \) is the set
$$ N(v) = N_\Gamma (v) = \{ v' \in V\ | \ (v, v')\ \mathrm{is\ an\ edge\ in}\ \Gamma \}. $$
If \(e\in E\) is an edge and \(v\in V\) is a vertex on either “end” of e, then we say v is incident to e (or that e is incident to v). If uv are vertices and \(e=(u, v)\in E\) is an edge, then u and v are called adjacent or neighboring vertices. The vertices u and v are sometimes called the endpoints of e.

Graphs can be used to model electrical networks and other situations involving flows. Various matching problems can be stated in terms of graphs. If you think of vertices as gamblers and edges as bets between them, then the weight of an edge could be the cost of a bet between those gamblers, and the weight of a vertex could represent the numbers of chips that gambler has to play with. Edge weights in a graph could also represent costs or flow capacities.

There are situations in which we may wish to generalize the concept of a graph to allow more than one edge between a pair of vertices. Such graphs are called multigraphs.

Definition 1.1.2.

An undirected multigraph \(\Gamma \) is an ordered pair of sets (VE), where V is a set of vertices and E is a set of edges, together with a map \(E \rightarrow V^{(2)}\), assigning to each edge an unordered pair of distinct vertices which are said to be incident to that edge.

Remark 1.1.3.

A loop is an edge of the form (vv), for some \(v\in V\). Unless stated otherwise, none of the graphs in this book will have loops. A graph with no multiple edges or loops is called a simple graph.

Unless stated otherwise, we will assume that both the vertex set V and the edge set E are finite sets.

Let \(\Gamma \) be a graph. The cardinality |V| of the vertex set V is called the order of \(\Gamma \), and the cardinality |E| of the edge set E is called the size of \(\Gamma \) .

Definition 1.1.4.

An orientation of the edges is an injective function \(\iota : E\rightarrow V\times V\). If \(e=\{u, v\}\) and \(\iota (e)=(u, v)\), then we call v the head of e and u the tail of e. We define the head and tail functions \(h:E\rightarrow V\) and \(t:E\rightarrow V\) by \(h(e)=v\) and \(t(e)=u\), i.e., h(e) is the head of e and t(e) is the tail of e. If the vertices of a graph are the set \(V=\{0,1,\dots , n-1\}\), then the default orientation of an edge \(e=(u, v)\) is defined by \(h(e)=\max \{u, v\}\), \(t(e)=\min \{u, v\}\). If the vertices of a graph are the set \(V=\{0,1,\dots , n-1\}\) and if the edges of a graph are indexed \(E=\{e_1,e_2,\dots , e_m\}\), then we can associate to each orientation \(\iota \) a vector,
$$ \vec {o}_\iota =(o_1,o_2,\dots , o_m)\in \{1,-1\}^m, $$
as follows: if \(e_i=\{u, v\}\) and \(h(e_i)=\max \{u, v\}\), then define \(o_i=1\), but if \(h(e_i)=\min \{u, v\}\), then define \(o_i=-1\). This \(\vec {o}_\iota \) is called the orientation vector associated to \(\iota \).
If u and v are two vertices in a graph \(\Gamma =(V, E)\), a uv walk, W, is an alternating sequence of vertices and edges starting with u and ending at v,
$$\begin{aligned} W: e_0 = (v_0,v_1), e_1 = (v_1,v_2), \dots , e_{k-1} = (v_{k-1}, v_k), \end{aligned}$$
(1.1)
where \(v_0=u\), \(v_k=v\), and each \(e_i\in E\). The number of edges in a walk is called its length, denoted \(len(W)=k\). Notice that consecutive vertices in a walk are adjacent to each other. We are allowed to have repeated vertices and edges in a walk. A cycle is a walk with the same starting and ending vertex. A cycle is also called a closed walk. A graph \(\Gamma =(V, E)\) is called connected provided it has the property that for any two vertices \(u, v\in V\) there exists a uv walk.

Definition 1.1.5.

We define2 the genus of a connected graph \(\Gamma \) to be
$$ \text {genus}(\Gamma ) = |E | - |V | +1. $$

Example 1.1.6.

The graph with n vertices and an edge connecting each pair of vertices is called the complete graph on n vertices and denoted \(K_n\). The graph \(K_4\) is also called the tetrahedron graph and is shown in Figure 1.1. It has genus 3.

Figure 1.1:

\(K_4\) or the tetrahedron graph.

Example 1.1.7.

The graph obtained from \(K_4\) by removing one edge is called the diamond graph and is shown in Figure 1.2. It has genus 2.

Figure 1.2:

The diamond graph.

Example 1.1.8.

A graph with n vertices \(v_1, v_2, \dots , v_n\) and edges \((v_1, v_2)\), \((v_2, v_3)\), \(\dots \), \((v_{n-1}, v_n)\), \((v_n, v_1)\) is called a cycle graph and denoted \(C_n\). All cycle graphs have genus 1. The cycle graph \(C_5\) is shown in Figure 1.3.

Figure 1.3:

The cycle graph \(C_5\).

Example 1.1.9.

Suppose we start with a cycle graph on \(n-1\) vertices and add a vertex q and an edge from q to each vertex of the cycle graph. The resulting graph is called a wheel graph and denoted \(W_n\). The vertices from the cycle graph are known as the spoke vertices and the corresponding edges from the spoke vertices to q are the spokes. The genus of \(W_n\) is \(n-1\). The wheel graph \(W_6\) is shown in Figure 1.4.

Figure 1.4:

The wheel graph \(W_6\).

Example 1.1.10.

A graph consisting of two vertices and \(n>1\) edges connecting the vertices is called a banana graph or dipole graph of order n. It has genus \(n-1\). The case \(n=3\) is also called a theta graph. A banana graph with 4 edges is shown in Figure 1.5.

Figure 1.5:

A banana graph.

There are various ways to describe a graph. For example, a simple graph \(\Gamma \) can be described using the vertices
$$ V=V_\Gamma = \{0, 1, 2, \dots , n-1\}, $$
and then \(\Gamma \) is uniquely determined by specifying an \(n\times n\) matrix \(A=(a_{ij})\), where \(a_{ij}=1\) if vertex i shares an edge with vertex j, and \(a_{ij}=0\) otherwise. This matrix A is called the (undirected, unweighted) adjacency matrix of the graph.
Figure 1.6:

A graph created using Sage.

If no weights on the vertices or edges are specified, we usually assume all the weights are implicitly 1 and call the graph unweighted. In this case, the degree of a vertex \(j\in V\) is the number of edges in \(\Gamma \) incident to j, denoted
$$ \deg _\Gamma (j)=\sum _{e\in E, \ j \in e} 1. $$
The degree sequence of \(\Gamma =(V, E)\) is the sequence of degrees, one for each vertex \(v_i=i\in V\): \([d_0,d_1, \dots , d_{n-1}]\), where \(d_i=\deg _\Gamma (i)\).
A graph with edge weights, that is to say a function \(wt:E\rightarrow \mathbb {R}_+\), is called a weighted graph or an edge-weighted graph. In the weighted case, the degree sometimes includes the weights:
$$ \deg _{\Gamma , wt}(j)=\sum _{e\in E, \ j \in e} wt(e). $$
A graph \(\Gamma =(V, E)\) having no cycles is called a forest (or a tree in the connected case). A spanning tree T of a connected graph is a tree that contains all the vertices of the graph. The smallest number of edges we can remove from \(\Gamma \) making it into a forest is called the circuit rank. For example, the circuit rank of the graph in Example 1.1.28 is 1. This is discussed further in §1.2.2.

Lemma 1.1.11.

Let \(\Gamma =(V, E)\) denote a connected graph and let T be a spanning tree of \(\Gamma \). For each edge \(e\in E\) not in T, there is a unique cycle cyc(Te) of \(\Gamma \) containing only e and edges in T.

This lemma defines cyc(Te), a so-called fundamental cycle. For a proof, see Biggs, Lemma 5.1 in [Bi93].

If \(\Gamma \) is a connected edge-weighted graph, where edge \(e\in E\) has weight \(w(e)\in \mathbb {R}_+\), then the edge-weighted length of a walk \(W\subset E\) is
$$ len(W)=\sum _{e\in W} w(e). $$
When the edge weight function is always 1, then we get the usual length. In that case, we define the distance between two neighboring vertices to be \(dist(u, v) = 1,\) if \((u, v)\in E.\) In general, the distance between \(u, v\in V\) is defined by
$$ dist(u, v) = {\left\{ \begin{array}{ll} \min _{W} \ len(W), &{} u\not = v,\\ 0, &{} u=v,\\ \end{array}\right. } $$
where the minimum runs over all uv walks W.

The girth of \(\Gamma \) is the length of a shortest cycle (if it exists) contained in \(\Gamma \). If no cycles exist in \(\Gamma \) the girth is, by convention, defined to be \(\infty \).

If \(\Gamma \) is connected, the diameter is
$$ diam(\Gamma ) = \max _{u,v\in V} dist(u, v). $$
The radius of a connected graph is the minimum value
$$ radius(\Gamma ) = \min _{u\in V}\max _{v\in V} dist(u, v). $$

Example 1.1.12.

For example, the girth of the Rubik’s cube graph in the quarter turn metric \(\Gamma _{QT}\) (see the Example in the Preface) is 4, while the radius is 26.

A bijection \(p:V\rightarrow V\) of the vertices which induces a bijection of the edges \(P:E\rightarrow E\) is called an automorphism of \(\Gamma =(V, E)\). The group of automorphisms of \(\Gamma \) is denoted as \(Aut(\Gamma )\).

If \(G\subset Aut(\Gamma )\) is a subgroup, then we say G acts transitively on \(\Gamma \) if for any two \(v, w\in V\), there is a \(g\in G\) such that \(w=g(v)\).

We say \(\Gamma = (V, E)\) is a distance-transitive graph provided, given any \(v, w\in V\) at any distance i, and any other two vertices x and y at the same distance, there is an automorphism of \(\Gamma \) sending v to x and w to y.

We say \(\Gamma \) is a distance-regular graph, provided it is a regular graph such that, for any \(v, w\in V\), the number of vertices at distance j from v, \(|\{x\in V\ |\ dist(v, x)=j\}|\), and at distance k from w, \(|\{x\in V\ |\ dist(w, x)=k\}|\), depends only upon j, k, and \(i = dist(v, w)\).

Recall a connected graph is one for which, given any distinct vertices uv, there is a walk in the graph connecting u to v. A connected component of \(\Gamma \) is a subgraph which is connected and not the proper subgraph of another connected subgraph of \(\Gamma \). The number of connected components of the graph \(\Gamma \) is denoted \(c(\Gamma )\).

Definition 1.1.13.

Let \(\Gamma =(V, E)\) denote the sensitivity graph of a Boolean function \(f:GF(2)^n\rightarrow GF(2)\), defined to be the (bipartite) graph containing only edges with different f-values:
$$ V=GF(2)^n, $$
$$ E = \{(u,v)\ |\ u, v\in GF(2)^n, f(u)\not = f(v)\}. $$
In general, the sensitivity of f, denoted s(f), is the maximum vertex degree of the sensitivity graph, \(\Gamma \).

When the sensitivity of f is small relative to the number of variables, it means that for every vertex \(v\in GF(2)^n\), flipping one coordinate will change the value of f only for relatively few coordinates.

Example 1.1.14.

Let f(x) denote the Boolean function
$$ f(x_0,x_1,x_2,x_3) = x_0x_1x_2x_3 + x_0x_1x_2 + x_1x_2x_3 + x_0x_1 + x_0x_2. $$
The sensitivity graph \(\Gamma \) of this function on \(GF(2)^4\) is depicted in Figure 1.7.
Figure 1.7:

The sensitivity graph associated to f.

One of the major outstanding problems about Boolean functions is the sensitivity conjecture, which states that the minimum degree of a real polynomial that interpolates a Boolean function f is bounded above by some fixed power of the sensitivity of f.

Exercise 1.1.

Compute the sensitivity of the graph in Figure 1.7.

A walk with no repeated vertices (except possibly the beginning and ending vertices, if they are the same) is called a path. A walk with no repeated edges is called a trail. Clearly a path is a trail, but the converse is not true in general. If there are \(n=|V|\) vertices, then no path can have length more than n. A path of length n is called a Hamiltonian path and a graph which has a Hamiltonian path is called traceable. A path whose start and end vertices are the same is called a simple cycle. An Eulerian cycle is a trail whose start and end vertices are the same which visits every edge exactly once. A cycle of length n is called a Hamiltonian cycle. A graph which has an Eulerian cycle is called an Eulerian graph and a graph which has a Hamiltonian cycle is called a Hamiltonian graph.

Let \(\Gamma =(V, E)\) be an undirected simple graph. If \(m=|V|\), then the adjacency matrix \(A = A_{\Gamma }\) is the \(m \times m\) matrix with entries \(a_{ij}\) given by
$$ a_{ij}= {\left\{ \begin{array}{ll} 1, &{} \{i, j\}\in E,\\ 0, &{} \mathrm{otherwise}. \end{array}\right. } $$
Note that the diagonal entries \(a_{ii}\) are 0 (no loops). If \(\Gamma \) is an undirected edge-weighted graph,3 the weighted adjacency matrix \(A_{\Gamma , w}\) is the \(m \times m\) matrix whose ij-th entry is the weight of the edge from i to j. The adjacency matrix of an undirected graph is symmetric.
We say f is a map from the graph \(\Gamma _2=(V_2,E_2)\) to the graph \(\Gamma _1=(V_1,E_1)\), denoted \(f : \Gamma _2 \rightarrow \Gamma _1\), if f is associated to a map \(f_V:V_2\rightarrow V_1\) which satisfies the edge-preservation condition:
$$ (i, j)\in E_2 \implies (f_V(i), f_V(j))\in E_1. $$
Therefore, the map \(f_E:E_2\rightarrow E_1\) given by \(f_E(i,j)=(f_V(i), f_V(j))\) is well-defined. We say f is an isomorphism if both \(f_V\) and \(f_E\) are bijections.

Lemma 1.1.15.

Two graphs \(\Gamma _1\) and \(\Gamma _2\) are isomorphic if and only if there is a permutation matrix P such that
$$ A_{\Gamma _{2}} = P^{-1}A_{\Gamma _{1}}P. $$

Proof.

We may, without loss of generality, identify the vertex sets \(V_2\) and \(V_1\) with \(\{0,1,\dots , n-1\}\). Suppose \(f : \Gamma _2 \rightarrow \Gamma _1\) is an isomorphism, so \(f_V:V_2\rightarrow V_1\) may be regarded as a permutation.

If a matrix \(P\in GL(n,\mathbb {Z})\) satisfies for each \(n\times n\) matrix \(M=(m_{ij})\), \(P^{-1}MP=(m_{\rho (i),\rho (j)})\), for all ij, for some permutation \(\rho :\mathbb {Z}/n\mathbb {Z}\rightarrow \mathbb {Z}/n\mathbb {Z}\) then P is a permutation matrix. Every permutation matrix arises in this way.

Therefore, \(A_{\Gamma _2} = P^{-1}A_{\Gamma _1}P\), for some P depending on \(f_V\).

The converse is left to the reader.    \(\Box \)

The characteristic polynomial of \(\Gamma \) is
$$ p_\Gamma (x) = \det (xI_n-A_\Gamma )=x^n+c_1x^{n-1}+\dots + c_{n-1}x+c_n, $$
where \(n=|V|\), and \(I_n\) denotes the \(n\times n\) identity matrix.
Since \(A=A_\Gamma \) is symmetric, it is diagonalizable. Therefore, A has an orthonormal set of eigenvectors \({\mathbf v}_1\), ..., \({\mathbf v}_n\) corresponding to eigenvalues \(\lambda _1\), ..., \(\lambda _n\). If \(E_k\) is the \(n\times n\) idempotent matrix
$$ E_k = {\mathbf v}_k\cdot {\mathbf v}_k^t,\ \ \ \ k=1,\dots , n, $$
then the spectral decomposition of A is
$$\begin{aligned} A = \sum _{i=1}^n \lambda _j E_i. \end{aligned}$$
(1.2)

Example 1.1.16.

Consider the cycle graph \(\Gamma \) having 4 vertices. This can be visualized as a square. The eigenvalues and eigenvectors of the adjacency matrix,
$$ A = \left( \begin{array}{rrrr} 0 &{} 1 &{} 0 &{} 1 \\ 1 &{} 0 &{} 1 &{} 0 \\ 0 &{} 1 &{} 0 &{} 1 \\ 1 &{} 0 &{} 1 &{} 0 \end{array}\right) , $$
are easy to compute and the spectral decomposition in (1.2) is easy to verify.

Definition 1.1.17.

The incidence matrix of an oriented graph \(\Gamma \), with orientation \(\iota \), is an \(n\times m\) matrix \(B=B_{\Gamma ,\iota } = (b_{ij})\), where m and n are the numbers of edges and vertices, respectively, such that \(b_{ij} = 1\) if the vertex \(v_i\) is the head of edge \(e_j\), \(b_{ij} = -1\) if the vertex \(v_i\) is the tail of edge \(e_j\), and \(b_{ij}=0\) otherwise. The incidence matrix of an undirected graph (or a graph without a prescribed orientation) \(\Gamma \) is an \(n\times m\) matrix \(B=B_\Gamma = (b_{ij})\) such that \(b_{ij} = 1\) if the edge \(e_j\) is incident to vertex \(v_i\), and \(b_{ij}=0\) otherwise.

When there is possible ambiguity, we call the matrix in the former case a signed incidence matrix and the latter an unsigned incidence matrix.

Exercise 1.2.

For the graph \(\Gamma \) in Figure 1.6, solve the following problems.

  1. (a)

    Find the adjacency matrix A of \(\Gamma \).

     
  2. (b)

    Fix an ordering of the edges and find the corresponding (unsigned) incidence matrix B of \(\Gamma \).

     
  3. (c)

    Is \(\Gamma \) Hamiltonian? If so, find a Hamiltonian cycle.

     
  4. (d)

    Is \(\Gamma \) Eulerian? If so, find an Eulerian trail.

     
  5. (e)

    Find the girth of \(\Gamma \).

     
  6. (f)

    Find the diameter of \(\Gamma \).

     

Unfortunately, the literature is not consistent in the definition of some of the technical terms in graph theory. For example, the rank of a graph \(\Gamma \) is sometimes defined to be the rank of its adjacency matrix \(A=A_\Gamma \) and sometimes defined to be the rank of its signed incidence matrix \(B=B_{\Gamma ,\iota }\) (as we’ll see below, this rank does not depend on the orientation \(\iota \) chosen). The lemma below concerns the latter definition.

We prove the following lemma for the oriented incidence matrix (see Godsil and Royle [GR01] for more details). In particular, the rank is independent of the orientation chosen.

Lemma 1.1.18.

Let \(\Gamma \) be a graph and B its incidence matrix. The rank of B is \(n-c(\Gamma )\), where n is the number of vertices of \(\Gamma \) and \(c(\Gamma )\) is its number of connected components.

Proof.

Suppose the matrix B is \(n\times m\) and \(z\in \mathbb {R}^n\) is in the left kernel of B: i.e., \(zB=0\). For each edge \((u, v)\in E\), \(zB=0\) implies \(z_u=z_v\). Therefore, z is constant on connected components. This implies that the left kernel of B has dimension equal to the number of connected components of the graph. The result now follows from the rank plus nullity theorem from matrix theory.    \(\Box \)

Definition 1.1.19.

If F is a field such as \(\mathbb {R}\) or GF(q) or a ring such as \(\mathbb {Z}\), let
$$ C^0(\Gamma , F)=\{f:V\rightarrow F\},\ \ \ \ C^1(\Gamma , F)=\{f:E\rightarrow F\}, $$
be the sets of F-valued functions defined on V and E, respectively. These sets are sometimes called the vertex space over F and the edge space over F.
If F is a field, then these are F-inner product spaces with inner product
$$\begin{aligned} (f, g)=\sum _{x\in X} f(x)g(x), \ \ \ \ \ (X=V,\ \ \mathrm{respectively}\ \ X=E), \end{aligned}$$
(1.3)
and
$$ \dim C^0(\Gamma , F)=|V|,\ \ \ \dim C^1(\Gamma , F)=|E|. $$
Index the sets V and E in some arbitrary but fixed way and define, for \(1\le i\le |V|\) and \(1\le j\le |E|\),
$$ f_i(v)= \left\{ \begin{array}{ll} 1,&{} v = v_i,\\ 0, &{} \mathrm{otherwise}, \end{array} \right. \ \ \ \ \ g_j(e)= \left\{ \begin{array}{ll} 1,&{} e = e_j,\\ 0, &{} \mathrm{otherwise}. \end{array} \right. $$

Lemma 1.1.20.

(a) \({\mathcal F}=\{f_i\}\subset C^0(\Gamma , F)\) is a basis. (b) \({\mathcal G}=\{g_j\}\subset C^1(\Gamma , F)\) is a basis.

Proof.

The proof is left as an exercise.    \(\Box \)

Define
$$\begin{aligned} B:C^1(\Gamma , F)\rightarrow C^0(\Gamma , F) \end{aligned}$$
by
$$\begin{aligned} (Bf)(v) = \sum _{h(e)=v} f(e) - \sum _{t(e)=v} f(e). \end{aligned}$$
(1.4)
With respect to these bases \({\mathcal F}\) and \({\mathcal G}\), the matrix representing the linear transformation \(B:C^1(\Gamma , F)\rightarrow C^0(\Gamma , F)\) is the incidence matrix (we use B to denote both the linear transformation and its matrix representation). Since both \(C^1(\Gamma , F)\) and \(C^0(\Gamma , F)\) are inner product spaces, we may define the dual transformation \(B^*:C^0(\Gamma , F)\rightarrow C^1(\Gamma , F)\) defined by
$$ (Bf, g)_{C^0(\Gamma ,F)} = (f, B^*g)_{C^1(\Gamma , F)}, $$
for all \(f\in C^1(\Gamma , f)\) and \(g\in C^0(\Gamma , F)\). The matrix representation of \(B^*\) is the transpose of the matrix representation of B.
Figure 1.8:

The house graph.

Example 1.1.21.

We use Sage to compute the incidence matrix of the house graph, depicted in Figure 1.8.
The unsigned incidence matrix is
$$ \left( \begin{array}{rrrrrr} 1 &{} 1 &{} 0 &{} 0 &{} 0 &{} 0 \\ 1 &{} 0 &{} 1 &{} 0 &{} 0 &{} 0 \\ 0 &{} 1 &{} 0 &{} 1 &{} 1 &{} 0 \\ 0 &{} 0 &{} 1 &{} 1 &{} 0 &{} 1 \\ 0 &{} 0 &{} 0 &{} 0 &{} 1 &{} 1 \end{array}\right) , $$
while the signed incidence matrix associated to the default orientation is
$$ \left( \begin{array}{rrrrrr} 1 &{} 1 &{} 0 &{} 0 &{} 0 &{} 0 \\ -1 &{} 0 &{} 1 &{} 0 &{} 0 &{} 0 \\ 0 &{} -1 &{} 0 &{} 1 &{} 1 &{} 0 \\ 0 &{} 0 &{} -1 &{} -1 &{} 0 &{} 1 \\ 0 &{} 0 &{} 0 &{} 0 &{} -1 &{} -1 \end{array}\right) . $$

Exercise 1.3.

Verify that the left kernel of a signed incidence matrix of an oriented connected simple graph is the space of constant functions.

If F is a field and \(\Gamma \) is a graph with orientation \(\iota \), then the kernel of the signed incidence map \(B=B_{\Gamma ,\iota }:C^1(\Gamma , F)\rightarrow C^0(\Gamma , F)\) is the cycle space 4,
$$ {\mathcal {Z}} = {\mathcal {Z}}_{\Gamma ,\iota } = \mathrm{ker}(B). $$
Via the natural basis, we may identify the cycle space with a subspace of \(F^m\) using the right kernel of the \(n\times m\) matrix representation of the map B.

As the example below shows, this space does depend on the orientation selected.

Example 1.1.22.

We use Sage to compute the cycle space of the house graph \(\Gamma \), depicted in Figure 1.8, for two distinct orientations of \(\Gamma \).
The signed incidence matrix associated to the default orientation is
$$ B_1 = \left( \begin{array}{rrrrrr} 1 &{} 1 &{} 0 &{} 0 &{} 0 &{} 0 \\ -1 &{} 0 &{} 1 &{} 0 &{} 0 &{} 0 \\ 0 &{} -1 &{} 0 &{} 1 &{} 1 &{} 0 \\ 0 &{} 0 &{} -1 &{} -1 &{} 0 &{} 1 \\ 0 &{} 0 &{} 0 &{} 0 &{} -1 &{} -1 \end{array}\right) , $$
while the signed incidence matrix associated to the orientation \((1,-1,1,-1,1,-1)\) (see Definition 1.1.4) is
$$ B_2 = \left( \begin{array}{rrrrrr} 1 &{} -1 &{} 0 &{} 0 &{} 0 &{} 0 \\ -1 &{} 0 &{} 1 &{} 0 &{} 0 &{} 0 \\ 0 &{} 1 &{} 0 &{} -1 &{} 1 &{} 0 \\ 0 &{} 0 &{} -1 &{} 1 &{} 0 &{} -1 \\ 0 &{} 0 &{} 0 &{} 0 &{} -1 &{} 1 \end{array}\right) . $$
Suppose \(\Gamma =(V, E)\) is given an orientation \(\iota \) and that \(\vec {o}\) is the associated orientation vector. Order the edges
$$ E = \{e_1,e_2,\dots , e_{m}\}, $$
in some arbitrary but fixed way. Consider a path from u to v in \(\Gamma \) (\(u, v\in V\)), which we may regard as a subgraph \(\Gamma '=(V', E')\) of \(\Gamma \), \(E'\subset E\), with a fixed orientation of the edges as in (1.1) so it is directed from \(u=v_0\) to \(v=v_k\). A vector representation of a path \(\Gamma '\) is an m-tuple
$$\begin{aligned} \vec {\Gamma '}=(a_1,a_2,\dots , a_{m}) \in \{1,-1,0\}^{m}, \end{aligned}$$
(1.5)
where \(a_i=1\), if \(e_i \in E'\) and the orientations of \(e_i\) in \(\Gamma \) and \(\Gamma '\) agree; \(a_i=-1\), if \(e_i \in E'\) and the orientations of \(e_i\) in \(\Gamma \) and \(\Gamma '\) are opposite; and \(a_i=0\), if \(e_i \notin E'\). In particular, this defines a mapping
$$ \{ \mathrm{cycles\ of\ }\Gamma =(V, E)\}\rightarrow \{1,-1,0\}^{m}, $$
$$ C\mapsto \vec {C}. $$

Example 1.1.23.

Consider the house graph \(\Gamma = (V, E)\) in Example 1.1.21. Label the edges as follows:
$$ E = \{e_1=(0,1), e_2=(0,2), e_3=(1,3), e_4 = (2,3), e_5 = (2,4), e_6 = (3,4)\}, $$
oriented with the default orientation, so \(\vec {o}=(1,1,1,1,1,1)\). Let \(\Gamma '\) denote the cycle \(2\rightarrow 3\rightarrow 4\rightarrow 2\), oriented as indicated. The vector representation of this cycle is \(\vec {\Gamma '}= (0,0,0,1,-1,1)\).

Lemma 1.1.24.

The cycle space of an oriented connected graph \(\Gamma =(V, E)\) is the vector space spanned by the vector representations of the cycles of \(\Gamma \).

Proof.

Let C be a cycle in \(\Gamma \), let \(\iota \) denote the given orientation, and let B denote the matrix representation of the oriented incidence map with respect to the standard basis. For each vertex v of C, there are exactly two edges of C incident to v. Regarding C as a subgraph of \(\Gamma \), let \(\vec {C}=\vec {C}(\iota )\) denote the associated vector representation as in (1.5). The i-th entry of \(B\vec {C}\) is the dot product of \(\vec {C}\) with the i-th row of B. The only nonzero entries of i-th row of B are those entries associated to the edges incident to the i-th vertex of \(\Gamma \). Either exactly two of those incident edges are in C or none are. In the latter case, it’s clear that the i-th entry of \(B\vec {C}\) is 0. In the former case, there are two possibilities: either the two incident edges in C are oriented with the same sign or they aren’t. If they are oriented with the same sign, then either both these edges go into the i-th vertex of \(\Gamma \) or both these edges go out of the i-th vertex of \(\Gamma \). In each of these cases, it’s clear that the i-th entry of \(B\vec {C}\) is 0. Finally, suppose the two incident edges in C are oriented with opposite signs. This means one of these edges goes into the i-th vertex and the other goes out. This implies that both of the corresponding nonzero entries of the i-th row of B have the same sign, by definition of B. Again, the i-th entry of \(B\vec {C}\) is 0.

Thus, the vector space spanned by the vector representations of the cycles is contained in the cycle space.    \(\Box \)

Indeed, let \(T=(V, E_T)\) be a spanning tree of \(\Gamma \). The set of fundamental cycles
$$ cyc(T, g)\ |\ g\in E-E_T\}, $$
defined via Lemma 1.1.11, is a set of linearly independent vectors in \({\mathcal {Z}}\). This is a basis of the cycle space \({\mathcal {Z}}\).

Definition 1.1.25.

For any nontrivial partition
$$ V = V_1\cup V_2,\ \ \ \ \ V_i\not = \emptyset , \ \ \ V_1\cap V_2= \emptyset , $$
the set of all edges \(e=(v_1,v_2)\in E\), with \(v_i\in V_i\) (\(i=1,2\)), is called a cocycle (or edge cut subgraph or disconnecting set or seg or edge cut set ) of \(\Gamma \). A cut is a partition of the vertex set of \(\Gamma =(V, E)\) into two subsets, \(V= S \cup T\). The cocycle of such a cut is the set
$$ \{(u, v)\in E\ |\ u\in S,\ v \in T\} $$
of edges that have one endpoint in S and the other endpoint in T. A cocycle with a minimal set5 of edges is a bond of \(\Gamma \).

Lemma 1.1.26.

Let \(\Gamma =(V, E)\) denote a connected graph and let T be a spanning tree of \(\Gamma \). For each edge \(h\in E\) which is also an edge in T, there is a unique cocycle coc(Th) of \(\Gamma \) containing only h and edges not in T.

This Lemma defines coc(Th).

Proof.

The proof is left as an exercise.    \(\Box \)

Suppose \(\Gamma =(V, E)\) is given an orientation \(\iota \) and that \(\vec {o}\) is the associated orientation vector. Order the edges
$$ E = \{e_1,e_2,\dots , e_{m}\}, $$
in some arbitrary but fixed way. Consider a cut H of \(\Gamma \) (associated to a partition \(V=V_1\cup V_2\)), which we may regard as a subgraph \(H=(V', E')\) of \(\Gamma \). We fix an orientation on H so that for any edge \((u, v)\in E'\), \(u\in V_1\) and \(v\in V_2\). A vector representation of H is an m-tuple
$$\begin{aligned} \vec {H}=(b_1,b_2,\dots , b_{m}) \in \{1,-1,0\}^{m}, \end{aligned}$$
(1.6)
where
$$ b_i=b_i(\Gamma ',\iota )= \left\{ \begin{array}{ll} \vec {o}_i,&{}\mathrm{if \ }e_i\in E', \\ 0,&{}\mathrm{if \ }e_i\notin E'. \end{array} \right. $$
In particular, this defines a mapping
$$ \{ \mathrm{cocycles\ of\ }\Gamma =(V, E)\}\rightarrow \{1,-1,0\}^{m}, $$
$$ H\mapsto \vec {H}. $$
The vector space spanned by the vector representations of the cocycles of \(\Gamma \) is the cocycle space (or cut space or bond space), \({\mathcal {B}}\).
We shall see later (see Lemma  3.2.2) that the orthogonal complement of the cycle space \({\mathcal {Z}}\) with respect to the inner product (1.3) is the cocycle space,
$$ {\mathcal {B}} = {\mathcal {Z}}^\perp . $$

1.1.2 Simple examples

Example 1.1.27.

The cube graph \(\Gamma \) is depicted Figure 1.9. It has incidence matrix
$$ B = \left( \begin{array}{rrrrrrrrrrrr} 0 &{} -1 &{} 0 &{} 0 &{} 0 &{} -1 &{} 0 &{} -1 &{} 0 &{} 0 &{} 0 &{} 0 \\ 0 &{} 0 &{} 0 &{} -1 &{} 0 &{} 1 &{} -1 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 \\ -1 &{} 1 &{} -1 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 \\ 1 &{} 0 &{} 0 &{} 1 &{} -1 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 \\ 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 1 &{} 0 &{} 0 &{} -1 &{} -1 \\ 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} 1 &{} 0 &{} 0 &{} -1 &{} 0 &{} 1 \\ 0 &{} 0 &{} 1 &{} 0 &{} 0 &{} 0 &{} 0 &{} 0 &{} -1 &{} 0 &{} 1 &{} 0 \\ 0 &{} 0 &{} 0 &{} 0 &{} 1 &{} 0 &{} 0 &{} 0 &{} 1 &{} 1 &{} 0 &{} 0 \end{array}\right) . $$
The cycle space \({\mathcal {Z}}\) has basis
$$ (1, 0, -1, 0, 1, 0, 0, 0, 0, -1, 1, -1), (0, 1, -1, 0, 0, 0, 1, 0, 0, -1, 0, 0), $$
$$ (0, 0, 0, 1, -1, 0, 0, 1, 0, 0, -1, 0), (0, 0, 0, 0, 0, 1, -1, 1, 0, 0, 0, -1), $$
and \((0, 0, 0, 0, 0, 0, 0, 0, 1, -1, 1, -1)\). The cocycle space \({\mathcal {B}}\) has basis
$$ (1, 0, 0, 0, 0, -1, 0, 0, 1, 0, 0, -1), (0, 1, 0, 0, 0, -1, 0, 0, 0, -1, 0, -1), $$
$$ (0, 0, 1, 0, 0, 0, 0, 0, -1, -1, 0, 0), (0, 0, 0, 1, 0, -1, 0, 0, 0, 0, -1, -1), $$
$$ (0, 0, 0, 0, 1, 0, 0, 0, -1, 0, -1, 0), (0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1), $$
$$ (0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1). $$
Note that \({\mathcal {B}}^\perp = {\mathcal {Z}}\).
Figure 1.9:

The cube graph in \(\mathbb {R}^3\).

Exercise 1.4.

Pick an orientation of the tetrahedron graph \(\Gamma \) depicted in Figure 1.10, for example the default orientation. Find a basis for the cycle space and a basis for the cocycle space of \(\Gamma \).

Figure 1.10:

The tetrahedron graph.

Example 1.1.28.

Consider the graph in Figure 1.11.
Figure 1.11:

An oriented graph with 5 vertices.

This graph has incidence matrix
$$ B = \left( \begin{array}{rrrrr} -1 &{} -1 &{} 0 &{} 0 &{} 0 \\ 0 &{} 1 &{} 1 &{} 0 &{} 0 \\ 1 &{} 0 &{} -1 &{} -1 &{} 0 \\ 0 &{} 0 &{} 0 &{} 1 &{} -1 \\ 0 &{} 0 &{} 0 &{} 0 &{} 1 \\ \end{array} \right) . $$

Example 1.1.29.

Paley graphs are described in detail in § 5.17. The Paley graph \(\Gamma \) having 9 vertices and 18 edges is depicted Figure 1.12. Its adjacency matrix is
$$ A= \left( \begin{array}{rrrrrrrrr} 0 &{} 1 &{} 1 &{} 0 &{} 1 &{} 0 &{} 0 &{} 0 &{} 1 \\ 1 &{} 0 &{} 1 &{} 0 &{} 0 &{} 1 &{} 1 &{} 0 &{} 0 \\ 1 &{} 1 &{} 0 &{} 1 &{} 0 &{} 0 &{} 0 &{} 1 &{} 0 \\ 0 &{} 0 &{} 1 &{} 0 &{} 1 &{} 1 &{} 0 &{} 1 &{} 0 \\ 1 &{} 0 &{} 0 &{} 1 &{} 0 &{} 1 &{} 0 &{} 0 &{} 1 \\ 0 &{} 1 &{} 0 &{} 1 &{} 1 &{} 0 &{} 1 &{} 0 &{} 0 \\ 0 &{} 1 &{} 0 &{} 0 &{} 0 &{} 1 &{} 0 &{} 1 &{} 1 \\ 0 &{} 0 &{} 1 &{} 1 &{} 0 &{} 0 &{} 1 &{} 0 &{} 1 \\ 1 &{} 0 &{} 0 &{} 0 &{} 1 &{} 0 &{} 1 &{} 1 &{} 0 \end{array}\right) . $$
The eigenvalues of A are \(4, 1, 1, 1, 1, -2, -2, -2, -2.\)
Figure 1.12:

A Paley graph created using Sage.

Example 1.1.30.

Consider the unoriented graph \(\Gamma \) below, with edges labeled as indicated, together with a spanning tree, depicted to its right, in Figure 1.13.
Figure 1.13:

A graph and a spanning tree for it.

You can see from Figure 1.13 that
  • by adding edge 2 to the tree, you get a cycle 0, 1, 2 with vector representation
    $$ g_1 = (1,1,1,0,0,0,0,0,0,0,0), $$
  • by adding edge 6 to the tree, you get a cycle 4, 5, 6 with vector representation
    $$ g_2 = (0,0,0,0,1,1,1,0,0,0,0), $$
  • by adding edge 10 to the tree, you get a cycle 8, 9, 10 with vector representation
    $$ g_3 = (0,0,0,0,0,0,0,0,1,1,1). $$

The vectors \(\{g_1,g_2,g_3\}\) form a basis of the cycle space of \(\Gamma \).

Example 1.1.31.

Consider the unoriented graph \(\Gamma \) below, with edges labeled as indicated, together with an example of a bond, depicted to its right, in Figure 1.14.
Figure 1.14:

A graph and a cocycle of it.

You can see from Figure 1.14 that
  • by removing edge 3 from the graph, you get a cocycle with vector representation
    $$ b_1 = (0,0,0,1,0,0,0,0,0,0,0), $$
  • by removing edge 7 from the graph, you get a cocycle with vector representation
    $$ b_2 = (0,0,0,0,0,0,0,1,0,0,0), $$
  • by removing edges 0, 1 from the graph, you get a cocycle with vector representation
    $$ b_3 = (1,1,0,0,0,0,0,0,0,0,0), $$
  • by removing edges 1, 2 from the graph, you get a cocycle with vector representation
    $$ b_4 = (0,1,1,0,0,0,0,0,0,0,0), $$
  • by removing edges 4, 5 from the graph, you get a cocycle with vector representation
    $$ b_5 = (0,0,0,0,1,1,0,0,0,0,0), $$
  • by removing edges 4, 6 from the graph, you get a cocycle with vector representation
    $$ b_6 = (0,0,0,0,1,0,1,0,0,0,0), $$
  • by removing edges 8, 9 from the graph, you get a cocycle with vector representation
    $$ b_7 = (0,0,0,0,0,0,0,0,1,1,0), $$
  • by removing edges 9, 10 from the graph, you get a cocycle with vector representation
    $$ b_8 = (0,0,0,0,0,0,0,0,0,1,1). $$

The vectors \(\{b_1,b_2,b_3,b_4,b_5,b_6,b_7,b_8\}\) form a basis of the cocycle space of \(\Gamma \).

Note that these vectors are not orthogonal to the basis vectors of the cycle space in Example 1.1.30 unless we work over GF(2).

Exercise 1.5.

Let \(V=\{0,1,2,\dots , 10\}\), and, for all \(u, v\in V\), let \((u, v)\in E\) if and only if \(u<v\) and \(v-u\) is a square \(\pmod {11}\). Is the undirected graph \(\Gamma =(V, E)\) connected? What is its order? What is its size?

Exercise 1.6.

Find the cycle space of the graph in Figure 1.6.

Exercise 1.7.

Find the cocycle space of the graph in Figure 1.6.

Definition 1.1.32.

A graph \(\Gamma \) is said to be planar if it has an embedding in the plane (roughly speaking, if it can be drawn in the plane without edge crossings). A dual graph \(\Gamma ^*\) of a planar graph \(\Gamma \) is a graph whose vertices correspond to the faces (or planar regions) of a such an embedding (including the infinite region). An edge of \(\Gamma ^*\) is adjacent to two vertices of \(\Gamma ^*\) if the corresponding regions of the embedding of \(\Gamma \) have a common edge.

Exercise 1.8.

Show that the n-cycle graph \(C_n\) and the banana graph with n edges are dual graphs.

Good sources for further reading on basic graph theory are Biggs [Bi93], Bollobás [Bo98], Godsil and Royle [GR01], and Marcus [Mar08].

1.2 Some polynomial invariants for graphs

Polynomial invariants for graphs include the (vertex) chromatic polynomial, the (factorial, respectively, geometric) cover polynomial (for directed graphs), and one introduced above: the characteristic polynomial of the adjacency matrix.

Some others are introduced below.

1.2.1 The Tutte polynomial of a graph

Let \(\Gamma =(V, E)\) be a graph. For any subset S of E, let \(\Gamma _S=(V, S)\) be the spanning subgraph of \(\Gamma \) containing all vertices of \(\Gamma \) and the edges S.

Definition 1.2.1.

We let
$$ c(S)=\text {the number of connected components of}\;\Gamma _S. $$
The rank of S is defined to be
$$ r(S)=|V|-c(S). $$
Thus the rank is the number of edges in a minimal spanning subgraph of \(\Gamma _S\), i.e., in a spanning forest (where trees of 0 edges are allowed). The nullity of S is defined to be
$$ n(S)=|S|-r(S)=|S|-|V|+c(S). $$

For example, if \(\Gamma \) is the complete graph on 4 vertices \(K_4\) and if \(\Gamma _S\) is the subgraph consisting of a 3-cycle and a disjoint 4th vertex, then \(c(\Gamma _S)=2\) and \(r(\Gamma _S)=2\). If \(\Gamma _S\) is the subgraph with 4 vertices and no edges, we say that \(c(\Gamma )=4\) and \(r(\Gamma )=0\).

Definition 1.2.2.

The Tutte polynomial of \(\Gamma \) is
$$ T_\Gamma (x, y) = \sum _{S\subset E} (x-1)^{r(E)-r(S)}(y-1)^{|S|-r(S)}, $$
where the sum is taken over all subsets S of E.
This formula can be rewritten in terms of the number of components and the nullity of spanning subgraphs as
$$ T_\Gamma (x, y) = \sum _{S\subset E} (x-1)^{c(S)-c(E)}(y-1)^{n(S)}. $$

Definition 1.2.3.

The Whitney rank generating function of \(\Gamma \) is defined as
$$ R_\Gamma (x, y) = \sum _{S\subset E} x^{r(E)-r(S)}y^{|S|-r(S)}. $$
Thus
$$ R_\Gamma (x-1,y-1)=T_\Gamma (x, y). $$
The Whitney rank generating polynomial may seem simpler to define than the Tutte polynomial, but the Tutte polynomial satisfies the nice duality formula
$$\begin{aligned} T_\Gamma (x,y)=T_{\Gamma ^*}(y, x), \end{aligned}$$
(1.7)
which relates the Tutte polynomial of any connected planar graph \(\Gamma \) with the Tutte polynomial of a dual graph \(\Gamma ^*\).

For example, recall from Exercise 1.8 that the n-cycle graph \(C_n\) and the banana graph with n edges are dual graphs. In Exercises 1.10 and 1.11, we will calculate the Tutte polynomials of a cycle graph and a banana graph and show that they satisfy Equation (1.7).

Example 1.2.4.

For example, consider the complete graph on 4 vertices, \(K_4\). There are 6 edges, so there are \(2^6\) subsets S of the edge set, with ranks given as follows:
  • The empty set has \(|S|=0\) and \(r(S)=0\).

  • There are 6 subsets with \(|S|=1\) and \(r(S)=1\).

  • There are 15 subsets with \(|S|=2\) and \(r(S)=2\) (12 two-paths and 3 sets of two disconnected edges).

  • There are 4 subsets with \(|S|=3\) and \(r(S)=2\) (the 4 three-cycles).

  • There are 16 subsets with \(|S|=3\) and \(r(S)=3\) (12 three-paths and the 4 complements of the three-cycles).

  • There are 15 subsets with \(|S|=4\) and \(r(S)=3\) (3 four-cycles and the 12 complements of the two-paths).

  • There are 6 subsets with \(|S|=5\) and \(r(S)=3\).

  • If S consists of all edges in \(K_4\), \(|S|=6\) and \(r(S)=3\).

Thus
$$\begin{aligned} T_{K_4}(x, y)&= (x-1)^3+6(x-1)^2+15(x-1)+4(x-1)(y-1)\\&\qquad +16+15(y-1)+6(y-1)^2+(y-1)^3\\&=x^3+3 x^2+4 x y+2 x+y^3+3 y^2+2 y. \end{aligned}$$

Example 1.2.5.

Computer calculations show that the Tutte polynomial of the cube graph on 8 vertices is
$$\begin{aligned} T_{\text {cube}}(x, y)&=x^7+5 x^6+15 x^5+6 x^4 y+29 x^4+24 x^3 y+40 x^3\\&\qquad +12 x^2 y^2+52 x^2 y +32 x^2+8 x y^3+39 x y^2+46 x y\\&\qquad +11 x+y^5+7y^4+20 y^3+25 y^2+11 y . \end{aligned}$$

We can see that calculating the Tutte polynomial by considering all subsets of |E| would take a prohibitively long time for even moderately sized graphs. Fortunately, there are other methods. We will describe a method that uses only spanning subsets of E. This method uses a fixed ordering on the edges of E. It is not evident, a priori, that the polynomial generated by this method is independent of the ordering chosen, but it can be shown that it is equal to the Tutte polynomial. First, we give some definitions.

Definition 1.2.6.

Let \(\Gamma =(V, E)\) be a connected graph with a fixed ordering on E. Let T be a subset of E which forms a spanning tree of \(\Gamma \). Let e be an edge in T. If we remove e from the tree T, the remaining graph has two components, with vertex sets \(V_1\) and \(V_2\), and with \(V(\Gamma )= V_1 \cup V_2\). (It is possible that a component consists of a single vertex.) The cut of \(\Gamma \) determined by T and e consists of all edges of \(\Gamma \) from a vertex in \(V_1\) to a vertex in \(V_2\). The edge e is in the cut determined by T and e. We say that e is an internally active edge of T if it is the smallest edge in the cut, with respect to the given ordering on the edges of \(\Gamma \). The number i of edges of T which are internally active in T is called the internal activity of T .

Definition 1.2.7.

Let \(\Gamma =(V, E)\) be a connected graph with a fixed ordering on E. Let T be a subset of E which forms a spanning tree of \(\Gamma \). Let e be an edge which is not in T. If we add the edge e to T, we obtain a graph with exactly one cycle. We say that e is an externally active edge for T if it is the smallest edge in the cycle it determines, with respect to the given ordering on the edges of \(\Gamma \). The number j of edges of \(E \setminus T\) which are externally active for T is called the external activity of T .

The following theorem describes the Tutte polynomial in terms of spanning trees. The proof can be found in Bollobás [Bo98].

Theorem 1.2.8.

Let \(\Gamma =(V, E)\) be a connected graph, with an ordering on the set of edges of \(\Gamma \). Then the Tutte polynomial of \(\Gamma \) is given by
$$ T_\Gamma (x,y) = \sum _{i, j} t_{ij} x^iy^j, $$
where \(t_{ij}\) denotes the number of spanning trees of internal activity i and external activity j.

Corollary 1.2.9.

For a connected graph \(\Gamma \), \(T_\Gamma (1,1)\) is the number of spanning trees of \(\Gamma \).

For example,
$$T_{K_4}(1,1)=16 \qquad \text {and} \qquad T_{\text {cube}}(1,1)=384. $$

Example 1.2.10.

Consider the complete graph on 4 vertices \(K_4\). Fix an ordering \(v_1, v_2, v_3, v_4\) of the vertices and order the edges lexicographically: \(e_1=v_1v_2\), \(e_2=v_1v_3\), \(e_3=v_1v_4\), \(e_4=v_2v_3\), \(e_5=v_2v_4\), and \(e_6=v_3v_4\), as shown in Figure 1.15.
Figure 1.15:

\(K_4\) with an edge ordering.

A spanning tree must have exactly 3 edges. There are 20 ways to pick 3 edges from 6, but 4 of these, \(\{e_1, e_2, e_4\}\), \(\{e_1, e_3, e_5\}\), \(\{ e_2, e_3, e_6\}\), and \(\{e_4, e_5, e_6\}\) give cycles, not spanning trees. This leaves 16 spanning trees.

As an example, consider the spanning tree \(T=\{e_2, e_3, e_4\}\). First, we examine the edges in T to see which are internally active. Edge \(e_2\) is not internally active, since \(e_1\) is an edge in the cut determined by T and \(e_2\). Edge \(e_3\) is internally active, since \(e_3\) is the smallest edge in the cut determined by T and \(e_3\) (\(e_1\) is not in this cut). Edge \(e_4\) is not internally active, since \(e_1\) is the smallest edge in the cut determined by T and \(e_2\). Next, we examine the edges in \(E \setminus T\) to see which are externally active. The edge \(e_1\) must be externally active, since it is the smallest edge in any cycle of which it is a member. The edges \(e_5\) and \(e_6\) cannot be externally active in any cycle, since each cycle in \(K_4\) has at least 3 edges, so must contain a smaller edge than \(e_5\) or \(e_6\).

We list the 16 spanning trees below, with the number i of internally active edges, and the number j of externally active edges for each.

  • The tree \(\{ e_1, e_2, e_3\}\) has \(i=3\) and \(j=0\), so \(t_{30}=1\).

  • The trees \(\{e_1, e_2, e_5\}\), \(\{e_1, e_2, e_6\}\), and \(\{e_1, e_3, e_4\}\) have \(i=2\) and \(j=0\), so \(t_{20}=3\).

  • The trees \(\{e_1, e_4, e_5\}\) and \(\{e_1, e_4, e_6\}\) have \(i=1\) and \(j=0\) so \(t_{10}=2\).

  • The trees \(\{e_1, e_3, e_6\}\), \(\{e_1, e_5, e_6\}\), \(\{e_2, e_3, e_4\}\), and \(\{e_2, e_3, e_5\}\) have \(i=1\) and \(j=1\), so \(t_{11}=4\).

  • The trees \(\{e_2, e_4, e_5\}\) and \(\{e_2, e_4, e_6\}\) have \(i=0\) and \(j=1\), so \(t_{01}=2\).

  • The trees \(\{e_2, e_5, e_6\}\), \(\{e_3, e_4, e_5\}\), and \(\{e_3, e_4, e_6\}\) have \(i=0\) and \(j=2\), so \(t_{02}=3\).

  • The tree \(\{e_3, e_5, e_6\}\) has \(i=0\) and \(j=3\), so \(t_{03}=3\).

Thus
$$\begin{aligned} T_{K_4}(x,y)&= \sum _{i, j} t_{ij} x^iy^j\\&=x^3+3 x^2+2 x+4 x y+2 y+3 y^2+y^3 \end{aligned}$$
as above.

Another approach to calculating the Tutte polynomial is to use reduction formulas under deletion and contraction of edges (see, e.g., Bollobás [Bo98]].

Several other evaluations of the Tutte polynomial are known (see D. Welsh [We99], for example).

Lemma 1.2.11.

The Tutte polynomial has the following additional properties.

  1. (a)

    \(T_{\Gamma }(1,2)\) is the number of connected spanning subgraphs of \(\Gamma \),

     
  2. (b)

    \(T_{\Gamma }(2,1)\) is the number of spanning forests of \(\Gamma \),

     
  3. (c)

    \(T_{\Gamma }(2,2)\) is the number of spanning subgraphs of \(\Gamma \),

     
  4. (d)

    \(T_{\Gamma }(1 - k, 0)\) is the number of proper k-vertex colorings of \(\Gamma \),

     
  5. (e)

    \(T_{\Gamma }(2,0)\) is the number of acyclic orientations of \(\Gamma \), and

     
  6. (f)

    \(T_{\Gamma }(0,-2)\) is the number of Eulerian orientations of \(\Gamma \).

     

From Merino [Me04], it is known in general that \(T_\Gamma (1,0)\) represents the number of critical configurations of level 0 (discussed further in Chapter  4). Using Sage, it is easy to compute this quantity.

Example 1.2.12.

Using Sage, we compute the Tutte polynomial of the cube graph and the tetrahedron graph.

Exercise 1.9.

Show that the Tutte polynomial of a tree with m edges is \(x^m\).

Exercise 1.10.

Show that the Tutte polynomial of the cycle graph \(C_n\) is
$$ T_{C_n}(x, y)=x^{n-1}+x^{n-2} + \cdots x + y. $$

Exercise 1.11.

Show that the Tutte polynomial of a banana graph \(\Gamma _n\) with n edges is
$$ T_{\Gamma _n}(x, y)=x+y+y^2 + \cdots + y^{n-1}, $$
i.e., \(T_{\Gamma _n}(x,y)=T_{C_n}(y, x)\).

Exercise 1.12.

Show that the Tutte polynomial of the diamond graph (\(K_4\) with one edge removed) is \(x^3+2 x^2+2 x y+x+y^2+y\).

Exercise 1.13.

Suppose that \(\Gamma \) is a connected graph with at least one edge and \(\Gamma _1\) and \(\Gamma _2\) are subgraphs of \(\Gamma \) with a single vertex (and no edges) in common, such that \(\Gamma \) is the union of \(\Gamma _1\) and \(\Gamma _2\). Show that
$$ T_\Gamma (x, y)=T_{\Gamma _1}(x, y)T_{\Gamma _2}(x, y). $$

1.2.2 The Ihara zeta function

Recall the circuit rank \(\chi (\Gamma )\) of an undirected graph \(\Gamma \) is the minimum number edges to remove from \(\Gamma \), making it into a forest.

Lemma 1.2.13.

The circuit rank is given by the simple formula
$$ m - n + c, $$
where m is the size of \(\Gamma \) (i.e., number of edges), n is the order of \(\Gamma \) (i.e., the number of vertices), and c is the number of connected components. The circuit rank is equal to the dimension of the cycle space of \(\Gamma \).

This is well known and the proof is omitted.

Let
$$ p = (u_0, \dots , u_{len(p)-1}, u_0) $$
be a cycle of the graph \(\Gamma = (V, E)\) of length len(p). We say p is a prime cycle if it is a closed cycle of \(\Gamma \) having no backtracks and is not a multiple of a cycle with a smaller number of edges.
The Ihara zeta function can be defined by the product formula:
$$ \frac{1}{\zeta _\Gamma (u)} = \prod _{p} ({1 - u^{len(p)}}). $$
This product is taken over all prime cycles p of the graph6.

It is known that for regular graphs the Ihara zeta function is a rational function.

Lemma 1.2.14.

(Ihara, Sunada) If \(\Gamma \) is k-regular with adjacency matrix A, then
$$ \zeta _{\Gamma }(u) = \frac{1}{(1-u^2)^{\chi (\Gamma )-1}\det (I - Au + (k-1)u^2I)} ,\ $$
where \(\chi (\Gamma )\) is the circuit rank of \(\Gamma \).
By Lemma 1.2.13, the circuit rank of \(\Gamma \) is given by the formula
$$ \chi (\Gamma ) = |E|-|V|+c, $$
where c denotes the number of connected components of \(\Gamma \).

Example 1.2.15.

For the cycle graph having 4 vertices, we have
$$ \chi (\Gamma )=4-4+1=1, $$
and
$$ A = \left( \begin{array}{rrrr} 0 &{} 1 &{} 0 &{} 1 \\ 1 &{} 0 &{} 1 &{} 0 \\ 0 &{} 1 &{} 0 &{} 1 \\ 1 &{} 0 &{} 1 &{} 0 \end{array}\right) , $$
so
$$ \begin{array}{rl} \zeta _{\Gamma }(u)^{-1}&{}=\det (I - Au + (2-1)u^2I)\\ &{} \\ &{}= \det \left( \begin{array}{rrrr} u^2 &{} -u &{} 0 &{} -u \\ -u &{} u^2 &{} -u &{} 0 \\ 0 &{} -u &{} u^2 &{} -u \\ -u &{} 0 &{} -u &{} u^2 \end{array}\right) \\ &{} \\ &{}=(u^2 + 1)^2(u + 1)^2(u - 1)^2. \end{array} $$
Here is some Sage code verifying this.

Note these last two outputs agree.

Indeed, there is this generalization (see Terras [Te10]).

Proposition 1.2.16.

(Hashimoto, Bass) Assume \(\Gamma =(V, E)\) is a connected graph having no vertices of degree 1 and \(|E|\ge |V|\). Let A denote the adjacency matrix of \(\Gamma \) and let \(\Delta _0\) denote the \(|V|\times |V|\) diagonal matrix whose entries are the values of \(\deg (v)-1\), \(v\in V\). Then
$$ \zeta _{\Gamma }(u) = \frac{1}{(1-u^2)^{\chi (\Gamma )-1}\det (I - Au + \Delta _0u^2I)}. $$

Exercise 1.14.

Show that for a graph \(\Gamma \) that is a square with one diagonal, we have
$$ \zeta _{\Gamma }(u)^{-1}= (1-u^2)(1-u)(1+u^2)(1+u+2u^2)(1-u^2-2u^3). $$

1.2.3 The Duursma zeta function

In a fascinating series of papers starting in the 1990s, Iwan Duursma introduced a new class of zeta functions. They are intended to be for linear codes, but they were implicitly introduced for other objects as well.

The Duursma zeta function of a code

Before we define the Duursma zeta function of a graph, we introduce the Duursma zeta function of a linear block code, following Duursma [Duu01], [Duu03a], [Duu03b], and [Duu04]. For more on codes, see Biggs [Bi08].

Let q denote a prime power. A linear (error-correcting) code C over GF(q) is a subspace of \(GF(q)^n\), where \(GF(q)^n\) is provided with the standard basis. The parameter n is called the length of the code C. The Hamming weight of \(v\in GF(q)^n\),
$$ wt(v)=|\{i\ |\ v_i\not = 0\}|, $$
is the number of nonzero coordinates of \(v=(v_1,\dots , v_n)\). The weight enumerator of C is
$$ A_C(x, y) = \sum _{i=0}^n A_ix^iy^{n-i}, $$
where \(A_i\) is the number of codewords in C of weight i. The minimum value on \(C-\{0\}\),
$$ d_C = \min _{c\in C, c\not = 0}wt(c), $$
is called the minimum distance of the code C.

Let C be an \([n,k, d]_q\) code, i.e., a linear code over GF(q) of length n, dimension k (as a vector space over GF(q)), and minimum distance \(d=d_C\). The Singleton bound states that \(k+d\le n+1\) (see for example [HP10] for a proof). If equality is satisfied in this bound, then we call C a minimum distance separable or MDS code.

Motivated by analogies with local class field theory, in [Duu04] Iwan Duursma introduced the zeta function \(Z=Z_C\) associated to a linear code C over a finite field,
$$\begin{aligned} Z(T)=\frac{P(T)}{(1-T)(1-qT)}, \end{aligned}$$
(1.8)
where P(T) is a polynomial of degree \(n+2-d-d^\perp \) (the Duursma zeta polynomial defined below)7.
If \(C^\perp \) denotes the dual code of C, with parameters \([n,n-k, d^\perp ]\), then the MacWilliams identity relates the weight enumerator of \(C^\perp \) to that of C:
$$ A_{C^\perp }(x, y) = |C|^{-1}A_C(x+(q-1)y, x-y). $$

Definition 1.2.17.

A polynomial P(T) for which
$$ \frac{(xT+(1-T)y)^n}{(1-T)(1-qT)}P(T)=\dots +\frac{A_C(x, y)-x^n}{q-1}T^{n-d}+\dots \ . $$
is called a Duursma zeta polynomial of C.

The Duursma zeta function is defined in terms of the zeta polynomial by means of (1.8) above.

Lemma 1.2.18.

If we expand \(\frac{(xT+y(1-T))^n}{(1-T)(1-qT)}\) in powers of T, we find it is equal to
$$\begin{array}{l} b_{0,0}y^nT^0+ (b_{1,1}xy^{n-1}+b_{1,0}y^n)T^1\\ \ \ \ \ \ \ \ +(b_{2,2}x^2y^{n-2}+b_{2,1}xy^{n-1}+b_{2,0}y^n)T^2+ \cdots \\ \ \ \ \ \ \ \ +(b_{n-d,n-d}x^{n-d}y^{d}+b_{n-d, n-d-1}x^{n-d-1}y^{d+1}+\cdots +b_{n-d, 0}y^n)T^{n-d}+ \cdots \ , \end{array}$$
where \(b_{i, j}\) are coefficients given by
$$ b_{k,\ell } = \sum _{i=\ell }^k \frac{q^{k-i+1-1}-1}{q-1} \Big ( \begin{array}{c} n\\ i \end{array} \Big ) \Big ( \begin{array}{c} i\\ \ell \end{array} \Big ). $$

Proof.

Define \(c_j\) by
$$ \frac{(xT+(1-T)y)^n}{(1-T)(1-qT)} = \sum _{k=0}^\infty c_k(x, y)T^k . $$
It is not hard to see that
$$ \frac{1}{(1-T)(1-qT)} = \sum _{j=0}^\infty \frac{q^{j+1}-1}{q-1}T^j , $$
and of course
$$ (xT+(1-T)y)^n = \sum _{i=0}^n \left( \begin{matrix} n\\ i \end{matrix} \right) y^{n-i}(x-y)^{i}T^i . $$
Therefore,
$$\begin{aligned} c_k(x, y)=\sum _{i+j=k} \frac{q^{j+1}-1}{q-1}\left( \begin{matrix} n\\ i \end{matrix} \right) y^{n-i}(x-y)^{i}. \end{aligned}$$
(1.9)
To finish the proof, use Equation (1.9) above and compare coefficients.    \(\Box \)

Proposition 1.2.19.

The Duursma zeta polynomial \(P=P_C\) exists and is unique, provided \(d^\perp \ge 2\).

For the proof, see Proposition 96 in Joyner and Kim [JK11].

The Duursma zeta function of a graph

This section will explore some of the properties of the analogous zeta function for graphs and give examples using the software package Sage.

Let \(\Gamma =(V, E)\) be a graph. One way to define the zeta function of \(\Gamma \) is via the binary code defined by the Duursma zeta function of the cycle space of \(\Gamma \) over GF(2). Indeed, the matroid attached to a graph is typically that vector matroid attached to the (oriented) incidence matrix of the graph (see Duursma [Duu04]).

As is well known (see for example, Dankelmann, Key, and Rodrigues [DKR13]), the binary code \(B=B_\Gamma \) generated by the incidence matrix of \(\Gamma \) is the cocycle space of \(\Gamma \) over GF(2), and the dual code \(B^\perp \) is the cycle space \(Z=Z_\Gamma \) of \(\Gamma \):
$$ B_\Gamma ^\perp = Z_\Gamma . $$

Proposition 1.2.20.

Let \(F=GF(2)\). The cycle code of \(\Gamma =(V, E)\) is a linear binary block code of length |E|, dimension \(g(\Gamma )\) (namely, the genus of \(\Gamma \)), and minimum distance equal to the girth of \(\Gamma \). If \(C\subset GF(2)^{|E|}\) is the cycle code associated to \(\Gamma \) and \(C^*\) is the cocycle code associated to \(\Gamma \), then \(C^*\) is the dual code of C. In particular, the cocycle code of \(\Gamma \) is a linear binary block code of length |E|, and dimension \(r(\Gamma )=|E|-n(\Gamma )\).

This follows from Hakimi and Bredeson [HB68] (see also Jungnickel and Vanstone [JV10]) in the binary case8.

Proof.

Let d denote the minimum distance of the code C. Let g denote the girth of \(\Gamma \), i.e., the smallest cardinality of a cycle in \(\Gamma \). If K is a cycle in \(\Gamma \), then the vector \(\mathrm{vec}(K)\in GF(2)^{|E|}\) is an element of the cycle code \(C\subset GF(2)^{|E|}\). This implies \(d\le g\).

In the other direction, suppose \(K_1\) and \(K_2\) are cycles in \(\Gamma \) with associated support vectors \(v_1=\mathrm{vec}(K_1)\), \(v_2=\mathrm{vec}(K_2)\). Assume that at least one of these cycles is a cycle of minimum length, say \(K_1\), so the weight of its corresponding support vector is equal to the girth g. The only way that \(\mathop {wt}(v_1+v_2)<\min \{\mathop {wt}(v_1),\mathop {wt}(v_2)\}\) can occur is if \(K_1\) and \(K_2\) have some edges in common. In this case, the vector \(v_1+v_2\) represents a subgraph which is either a cycle or a union of disjoint cycles. In either case, by minimality of \(K_1\), these new cycles must be at least as long. Therefore, \(d\ge g\), as desired.    \(\Box \)

Definition 1.2.21.

Define \(p_\Gamma \) to be the Duursma zeta polynomial \(P=P_{\mathcal {B}}\) of \(\Gamma \), in the notation of Proposition 1.2.19, where \({\mathcal {B}} = {\mathcal {B}}_\Gamma \) is the cocycle space of \(\Gamma \). Define the Duursma zeta function of \(\Gamma \) by
$$\begin{aligned} \zeta _\Gamma (t) = \frac{p_\Gamma (t)}{(1-t)(1-2t)}. \end{aligned}$$
(1.10)

Exercise 1.15.

Check that the Duursma zeta polynomial of the cycle graph \(\Gamma _4\) with 4 vertices is
$$ p_{\Gamma _4} (t)=\frac{2}{5}t^2 + \frac{2}{5}t + \frac{1}{5}. $$

Example 1.2.22.

The binary code given by the cycle space of the wheel graph \(W_5\) with 5 vertices has zeta polynomial
$$ \frac{2}{7}t^4 + \frac{2}{7}t^3 + \frac{3}{14}t^2 + \frac{1}{7}t + \frac{2}{14}. $$
The roots lie on the circle of radius \(1/\sqrt{2}\). The binary code given by the cycle space of the wheel graph \(W_6\) with 6 vertices has zeta polynomial
$$ \frac{1}{3}t^6 + \frac{11}{42}t^5 + \frac{1}{7}t^4 + \frac{1}{12}t^3 + \frac{1}{14}t^2 + \frac{11}{168}t + \frac{1}{24}. $$

Remark 1.2.23.

It is well known that the cycle space of a planar graph \(\Gamma \) is the cocycle space of its dual graph, \(\Gamma ^\perp \), and vice versa.

The (Duursma) genus of the cocycle space is the quantity
$$ \gamma = \gamma _\Gamma = m+1-\mathrm{rank}(B)-d_\Gamma , $$
where \(m=|E|\) denotes the number of edges in \(\Gamma \) (the number of columns of the incidence matrix of \(\Gamma \)), B is the incidence matrix over GF(2), and \(d_\Gamma \) denotes the minimum distance of the cocycle space \({\mathcal {B}}_{GF(2)}\) (as a binary linear code over GF(2) in the standard basis). It’s well known that for connected \(\Gamma \),
$$ \mathrm{rank}(B)=|V|-1, $$
and it’s known9, that
$$ d_\Gamma = \lambda (\Gamma ), $$
where \(\lambda (\Gamma )\) denotes the edge connectivity of \(\Gamma \), i.e., the minimum cardinality of an edge cut. Therefore,
$$ \gamma = |E|+2-|V|-\lambda (\Gamma ). $$
In any case, define the normalized Duursma zeta function by
$$ z_\Gamma (t) = t^{1-\gamma }\zeta _\Gamma (t). $$
If \(\Gamma \) is a planar graph, and if F denotes the set of faces of \(\Gamma \), then the formula for the Euler characteristic gives us
$$ |E|+2-|V|=|F|, $$
so that in this case, \(\gamma = |F|-\lambda (\Gamma )\). If \(\Gamma \) is a planar graph, then we also have the functional equation
$$\begin{aligned} z_{\Gamma ^\perp }(t) = z_\Gamma (1/2t), \end{aligned}$$
(1.11)
where \(\Gamma ^\perp \) denotes the planar dual graph of \(\Gamma \).

The following question asks when an analog of the Riemann hypothesis holds.

Open Question 1.

For which planar graphs \(\Gamma \) satisfying \(\Gamma ^\perp \cong \Gamma \), are all the roots of the Duursma zeta polynomial on the circle \(|t|=2^{-1/2}\)?

1.2.4 Graph theory and mathematical blackjack

In this section, we illustrate a connection between graph theory, (set-theoretic) combinatorics, and a combinatorial game called mathematical blackjack.

An m-(sub)set is a (sub)set with m elements. For integers \(k<m<n\), a Steiner system S(k, m, n) is an n-set X and a set S of m-subsets having the property that any k-subset of X is contained in exactly one m-set in S.

Example 1.2.24.

Let
$$ \mathbf {P}^1(GF(11)) =\{\infty , 0,1,2,\dots , 9,10\} $$
denote the projective line over the finite field GF(11) with 11 elements. Let
$$ Q=\{0,1,3,4,5,9\} $$
denote the quadratic residues and 0 and let
$$ L=\langle \alpha ,\beta \rangle \cong PSL(2,GF(11)), $$
where \(\alpha (y)=y+1\) and \(\beta (y)=-1/y\). Let
$$ S=\{\lambda (Q)\ |\ \lambda \in L\}. $$
In other words, each element of S is a subset of \(\mathbf {P}^1(GF(11))\) of size 6.

Lemma 1.2.25.

S is a Steiner system of type (5, 6, 12).

If \(X=\{1,2,\dots , 12\}\), a Steiner system S(5, 6, 12) is a set of 6-sets, called hexads, with the property that any set of 5 elements of X is contained in (“can be completed to”) exactly one hexad.

A decomposition of a graph \(\Gamma \) is a set of subgraphs \(H_1,\dots , H_k\) that partition the edges of \(\Gamma \). If all the \(H_i\) are isomorphic to a given group H, then we say the decomposition is an H-decomposition. In chapter  6, we shall run into graph decompositions in our discussion of the Cayley graph of a p-ary function.

From the perspective of Steiner systems, if H is any connected subgraph of \(K_n\) (the complete graph on n vertices), an H-decomposition of \(K_n\) gives rise to a S(kmn), where m is the number of vertices of H and k is the smallest number such that any k vertices of H must contain at least 2 neighbors.

Question 1.1.

Is the Steiner system S(5, 6, 12) described above associated to a graph decomposition of \(K_{12}\)?

The MINIMOG description

This section is devoted to Conway’s [Co84] construction of S(5, 6, 12) using a \(3\times 4\) array called the MINIMOG.

The tetracode words are
With \(\text {``0''}=0,\ \text {``+''}=1,\ \text {``-''}=2\), these vectors form a linear code over GF(3). (This notation is Conway’s. One must remember here that \(\text {``+''}+\text {``+''}=\text {``-''}\) and \(\text {``-''}+\text {``-''}=\text {``+''}\)!) They may also be described as the set of all 4-tuples in GF(3) of the form
$$ (0,a,a, a),\ \ (1,a,b, c),\ \ (2,c,b, a), $$
where abc is any cyclic permutation of 012.
The MINIMOG in the shuffle numbering is the \(3\times 4\) array
$$ \begin{array}{cccc} 6 &{} 3 &{} 0 &{} 9\\ 5 &{} 2 &{} 7 &{} 10 \\ 4 &{} 1 &{} 8 &{} 11 \end{array} $$
We label the rows as follows:
  • the first row has label 1,

  • the second row has label \(+\), and

  • the third row has label −.

A col (or column) is a placement of three + signs in a column of the array:
A tet (or tetrad) is a placement of 4 + signs having entries corresponding (as explained below) to a tetracode.

Each line in \(GF(3)^2\) with finite slope occurs once in the \(3\times 3\) part of some tet. The odd man out for a column is the label of the row corresponding to the nonzero digit in that column; if the column has no nonzero digit, then the odd man out is a “?”. Thus the tetracode words associated in this way to these patterns are the odd men out for the tets.

The signed hexads are the combinations 6-sets obtained from the MINIMOG from patterns of the form
$$ \text {col-col,}\ \ \text {col+tet,}\ \ \text {tet-tet,}\ \ \text {col+col-tet.} $$

Lemma 1.2.26.

(Conway [CS99], Chapter 11, p. 321) If we ignore signs, then from these signed hexads we get the 132 hexads of a Steiner system S(5, 6, 12). These are all possible 6-sets in the shuffle labeling for which the odd men out form a part (in the sense that an odd man out “?” is ignored or regarded as a “wild-card”) of a tetracode word and the column distribution is not 0, 1, 2, 3 in any order10.

Example 1.2.27.

Associated to the col-col pattern

is the tetracode \(0\ 0\ ?\ ?\) and the signed hexad \(\{-1,-2,-3,4,5,6\}\) and the hexad \(\{1,2,3,4,5,6\}\).

Associated to the col+tet pattern

is the tetracode \(0\ +\ +\ +\) and the signed hexad \(\{1,-2,3,6,7,10\}\) and the hexad \(\{1,2,3,6,7,10\}\).

Furthermore, it is known (see Conway [Co84]) that the Steiner system S(5, 6, 12) in the shuffle labeling has the following properties.

  • There are 11 hexads with total 21 and none with lower total.

  • The complement of any of these 11 hexads in \(\{0,1,\dots , 11\}\) is another hexad.

  • There are 11 hexads with total 45 and none with higher total.

Mathematical blackjack

Mathematical blackjack is a 2-person combinatorial game whose rules will be described below. What is remarkable about it is that a winning strategy, discovered by Conway and Ryba (see Conway and Sloane [CS86] and Kahane and Ryba [KR01]), depends on knowing how to determine hexads in the Steiner system S(5, 6, 12).

Mathematical blackjack is played with 12 cards, labeled \(0,\dots , 11\) (for example, \(\text { king}, \text { ace}, 2, 3, \dots , 10, \text { jack}\), where the king is 0 and the jack is 11). Divide the 12 cards into two piles of 6 (to be fair, this should be done randomly). Each of the 6 cards of one of these piles is to be placed face up on the table. The remaining cards are in a stack which is shared and visible to both players. If the sum of the cards face up on the table is less than or equal to 21, then no legal move is possible11 so you must shuffle the cards and deal a new game.

  • Players alternate moves.

  • A move consists of exchanging a card on the table with a lower card from the other pile.

  • The player whose move makes the sum of the cards on the table under 21 loses.

The winning strategy (given below) for this game is due to Conway and Ryba (see [CS86] and [KR01]). There is a Steiner system S(5, 6, 12) of hexads in the set \(\{0,1,\dots , 11\}\). This Steiner system is associated to the MINIMOG in the shuffle numbering.

Proposition 1.2.28.

(Ryba) For this Steiner system, the winning strategy is to choose a move which is a hexad from this system.

This result is proven in Kahane and Ryba [KR01].

If you are unfortunate enough to be the first player starting with a hexad from S(5, 6, 12) then, according to this strategy and properties of Steiner systems, there is no winning move. In a randomly dealt game, there is a probability of
$$ {132\over {\left( \begin{array}{c} 12 \\ 6\end{array}\right) }} =1/7 $$
that the first player will be dealt such a hexad, hence a losing position. In other words, we have the following result.

Lemma 1.2.29.

The probability that the first player has a win in mathematical blackjack (with a random initial deal) is 6 / 7.

Example 1.2.30.

We play a game.

  • Initial deal: 0, 2, 4, 6, 7, 11. The total is 30. The pattern for this deal is
    where \(\bullet \) is a ±. No combinations of ± choices will yield a tetracode odd men out, so this deal is not a hexad.
  • First player replaces 7 by 5: 0, 2, 4, 5, 6, 11. The total is now 28. (Note this is a square in the picture at 1.) This corresponds to the col+tet
    with tetracode odd men out \(-\ + \ 0\ -\).
  • Second player replaces 11 by 7: 0, 2, 4, 5, 6, 7. The total is now 24. Interestingly, this 6-set corresponds to the pattern
    (hence possible with tetracode odd men out \(0\ + \ +\ ?\), for example). However, it has column distribution 3, 1, 2, 0, so it cannot be a hexad.
  • First player replaces 6 by 3: 0, 2, 3, 4, 5, 7. (Note this is a cross in the picture at 0.) This corresponds to the tet-tet pattern
    with tetracode odd men out \(-\ - \ +\ 0\). Cards total 21. First player wins.

In addition to the references mentioned above, see also Curtis [Cu76] and [Cu84] for further reading related to mathematical blackjack.

Footnotes

  1. 1.

    When there is no ambiguity, we will abuse notation and write \((u, v)\in V^{(2)}\) or \(uv \in V^{(2)}\) if \(\{u, v\}\in V^{(2)}\), when the meaning is clear.

  2. 2.

    This is not the usual definition of genus: the minimal integer n such that the graph can be embedded in a surface of genus n.

  3. 3.

    In the case of an unweighted multigraph \(\Gamma \) without loops, we associate to that graph an edge-weighted graph \(\Gamma '\) whose edge weights are given by the corresponding edge multiplicities of \(\Gamma \).

  4. 4.

    Also called the flow space or the space of circulation functions.

  5. 5.

    In the sense of set theory. So, a bond is a cocycle that does not contain any other cocycle as a proper subset.

  6. 6.

    This formulation in a graph-theoretic setting is actually due to Sunada [Su86], rather than Ihara.

  7. 7.

    In general, if C is an [nkd]-code, then we use \([n,k^\perp , d^\perp ]\) for the parameters of the dual code, \(C^\perp \). It is a consequence of Singleton’s bound that \(n+2-d-d^\perp \ge 0\), with equality when C is an MDS code.

  8. 8.

    It is likely true in the nonbinary case as well, but no proof seems to be in the literature.

  9. 9.

    See Theorem 1 in Dankelmann, Key, and Rodrigues [DKR13].

  10. 10.

    That is to say, the following cannot occur: some column has 0 entries, some column has exactly 1 entry, some column has exactly 2 entries, and some column has exactly 3 entries.

  11. 11.

    Conway [Co76] calls such a game \(0=\{|\}\); in this game, the first player automatically loses and so a good player will courteously offer you the first move!

Copyright information

© Springer International Publishing AG 2017

Authors and Affiliations

  1. 1.Department of MathematicsUnited States Naval AcademyAnnapolisUSA

Personalised recommendations