vars.io

Introduction to Graph Theory


Graphs are the study of vertices and the edges “between” them. More formally, a simple graph or graph is a pair of sets (V,E)(\mathcal{V}, \mathcal{E}) where V\mathcal{V} is any set and E\mathcal{E} is defined as any family of doubletons from V\mathcal{V}.

This introduction is mostly about (simple) graphs but will briefly cover other varieties of graphs for reference.

Types of Edges

There are a few popular forms of graphs, and they are studied based on what properties the edges take on:

grapharrowlooparc
graph
multigraph
loop graph
loop multigraph
digraph
multidigraph
loop digraph
quiver

There’s an unfortunate amount of disagreement on the precise meaning of these terms; some authors use multigraph and pseudograph interchangeably and others permit multigraphs with loops.

There are also hypergraphs where edges may connect more than two vertices at once.

Notation

Let G=(V,E)\mathcal{G} = (\mathcal{V}, \mathcal{E}) be a graph. Then for convenience we may refer to the vertex set of G\mathcal{G} as V(G)V(\mathcal{G}) and the edge set as E(G)E(\mathcal{G}). For extra brevity one may also see vGv ∈ \mathcal{G} for vertices and eGe ∈ \mathcal{G} for edges.

Graphs

Let a graph be a pair of sets (V,E)(\mathcal{V}, \mathcal{E}) with an incidence function ϕϕ mapping primitive edges E={ei}\mathcal{E} = \{ e_i \} to a codomain that is a subset of V2\mathcal{V}^2.

Terms

Diagonal Subset

This encodes for self-loops.

ΔV:={(x,x)V2} \Delta_\mathcal{V} := \{ (x, x) ∈ \mathcal{V}^2 \}

Quotient Set

This encodes for undirected edges.

V2:={(x,y)V2(x,y)=(y,x)} \left\langle { \mathcal{V} \atop 2 } \right\rangle := \{ ( x, y ) ⊆ \mathcal{V}^2 \mid (x, y) = (y, x) \}

Quotient Set

This encodes a simple graph.

(V2):={(x,y)V2(x,y)=(y,x)xy} \left( {\mathcal{V} \atop 2} \right) := \{(x, y) ∈ \mathcal{V}^2 \mid (x, y) = (y, x) ∧ x ≠ y \, \}

Definitions

The incidence function ϕϕ and its codomain determines the kind of graph.

grapharrowlooparcdefinition
graphE(V2)\mathcal{E} ↪ \left( \mathcal{V} \atop 2 \right)
multigraphE(V2)\mathcal{E} → \left( \mathcal{V} \atop 2 \right)
loop graphEV2\mathcal{E} ↪ \left\langle {\mathcal{V} \atop 2} \right\rangle
loop multigraphEV2\mathcal{E} → \left\langle {\mathcal{V} \atop 2} \right\rangle
digraphEV2ΔV\mathcal{E} ↪ \mathcal{V}^2 ∖ Δ_\mathcal{V}
multidigraphEV2ΔV\mathcal{E} → \mathcal{V}^2 ∖ Δ_\mathcal{V}
loop digraphEV2\mathcal{E} ↪ \mathcal{V}^2
quiverEV2\mathcal{E} → \mathcal{V}^2

Let e1,e2e_1, e_2 be edges in a graph. If ϕ(e1)=ϕ(e2)ϕ(e_1) = ϕ(e_2) then they are parallel edges found in multigraphs. If the mapping is injective then there are no parallel edges.

Alternative Definition

Let V\mathcal{V} be a set of vertices. All of the following graphs may be defined as a pair of sets (V,E)(\mathcal{V}, \mathcal{E}) where E\mathcal{E} takes on different properties. These graphs are notable for being easily represented by an adjacency matrix.

Graph

A simple graph or graph may be defined as a pair of sets (V,E)(\mathcal{V}, \mathcal{E}) where E\mathcal{E} is any family of doubletons from V\mathcal{V}.

E{{x,y}Vxy} \mathcal{E} ⊆ \{ \{ x, y \} ⊆ \mathcal{V} \mid x ≠ y \, \}

Alternatively stated,

E{(x,y)V2(x,y)=(y,x)xy} \mathcal{E} ⊆ \{ (x, y) ∈ \mathcal{V}^2 \mid (x, y) = (y, x) ∧ x ≠ y \, \}

Directed Graph

A directed graph or digraph may be identified:

E{(x,y)V2xy} \mathcal{E} ⊆ \{ (x, y) ∈ \mathcal{V}^2 \mid x ≠ y \, \}

Loop Graph

A loop graph may be identified:

E{(x,y)V2(x,y)=(y,x)} \mathcal{E} ⊆ \{ ( x, y ) ⊆ \mathcal{V}^2 \mid (x, y) = (y, x) \}

Loop Digraph

A loop digraph may be identified:

EV2 \mathcal{E} ⊆ \mathcal{V}^2

Multigraph

A multigraph is a graph which permits parallel or multiple edges along any two distinct vertices. This may be represented in a variety of ways; for example we may have a multiplicity function ϕϕ which given any edge will return the multiplicity of that edge.

Directed Multigraph

A directed multigraph is a multigraph with directed edges (also known as arcs or arrows).

Graph Traversal

A closed walk is one where the starting and ending vertex is the same.

termrepeat vertexrepeat edgeclosed
walk???
trail??
circuit?
path
cycle

Subgraph

Let G0=(V0,E0)\mathcal{G}_0 = (\mathcal{V}_0, \mathcal{E}_0) and G1=(V1,E1)\mathcal{G}_1 = (\mathcal{V}_1, \mathcal{E}_1) be graphs. Then a subgraph relation G0G1\mathcal{G}_0 ⊆ \mathcal{G}_1 is defined:

G0G1:=(V0V1)(E0E1) \mathcal{G}_0 ⊆ \mathcal{G}_1 := (\mathcal{V}_0 ⊆ \mathcal{V}_1) ∧ (\mathcal{E}_0 ⊆ \mathcal{E}_1)

Spanning Subgraph and Supergraph

Let G0G1\mathcal{G}_0 ⊆ \mathcal{G}_1. If G0\mathcal{G}_0 can become G1\mathcal{G}_1 by only removing edges then G0\mathcal{G}_0 is a spanning subgraph. Conversely, a spanning supergraph is a graph attained by only adding edges.

Induced Subgraph

Let G0=(V0,E0)\mathcal{G}_0 = (\mathcal{V}_0, \mathcal{E}_0) be a subgraph of G1=(V1,E1)\mathcal{G}_1 = (\mathcal{V}_1, \mathcal{E}_1). A vertex induced subgraph is one where all possible edges are preserved from its supergraph.

G[V0] \mathcal{G}[\mathcal{V}_0]

Let E={ei}\mathcal{E} = \{ e_i \} be a set of edges. An edge induced subgraph of G\mathcal{G} is one where for any subset of edges {ei}\{ e_i \} we have all vertices incident to them. This may be denoted:

G[{ei}] \mathcal{G}[\{ e_i \}]

Properties

Order

The order of a graph G\mathcal{G} is the cardinality of its vertex set, and is denoted G|\mathcal{G}|.

Size

The size of a graph G\mathcal{G} is the cardinality of the edge set, and is denoted G\|\mathcal{G}\|.

Adjacency

Two vertices within a graph are adjacent if there is an edge which joins them together.

Neighborhood

The set of all vertices adjacent to a vertex vv is called the open neighborhood of vv, denoted N(v)N(v). The closed neighborhood of vv is the open neighborhood but also including vv itself, denoted N[v]N[v].

Incidence

If an edge ee has a vertex vv, then vv is incident to ee. This may be denoted vev ∈ e.

Degree

Let G\mathcal{G} be a graph. The degree of a vertex vGv ∈ \mathcal{G} is the cardinality of its open neighborhood, and is denoted d(v)d(v).

d(v):=N(v) d(v) := |N(v)|

The minimum degree and maximum degree of G\mathcal{G} is also defined:

δ(G):=min{d(v):vG} \delta (\mathcal{G}) := \min \, \{ d(v) : v ∈ \mathcal{G} \}
Δ(G):=max{d(v):vG} \Delta (\mathcal{G}) := \max \, \{ d(v) : v ∈ \mathcal{G} \}

When we use degree on a graph (as opposed to a vertex) we refer to its average degree.

d(G):=1VvVd(v) d(\mathcal{G}) := \frac{1}{|\mathcal{V}|} \sum_{v ∈ \mathcal{V}} d(v)

As an observation we have:

δ(G)d(G)Δ(G) \delta(\mathcal{G}) ≤ d(\mathcal{G}) ≤ \Delta(\mathcal{G})

Ratio of Edges to Vertices

The ratio of edges to vertices may be denoted:

ε(G):=E:V ε(\mathcal{G}) := |\mathcal{E}| : |\mathcal{V}|
ε(G)=12d(G) ε(\mathcal{G}) = \frac{1}{2} d(\mathcal{G})
E=12d(G)×V |\mathcal{E}| = \frac{1}{2} d(\mathcal{G}) \times |\mathcal{V}|

Color

A graph coloring labels each vertex in a graph with a color such that no two adjacent vertices have the same color.

The chromatic number of a graph G\mathcal{G} is the minimal number of colors necessary in a graph coloring, denoted χ(G)χ(\mathcal{G}).

Independent

A set of vertices and edges are independent when no two elements are adjacent.

Union and Intersection

Let G1=(V1,E1)\mathcal{G}_1 = (\mathcal{V}_1, \mathcal{E}_1) and G2=(V2,E2)\mathcal{G}_2 = (\mathcal{V}_2, \mathcal{E}_2) be graphs. Then their union and intersection is defined:

G1G2:=(V1V2, E1E2) \mathcal{G}_1 ∪ \mathcal{G}_2 := (\mathcal{V}_1 ∪ \mathcal{V}_2, \ \mathcal{E}_1 ∪ \mathcal{E}_2)
G1G2:=(V1V2, E1E2) \mathcal{G}_1 ∩ \mathcal{G}_2 := (\mathcal{V}_1 ∩ \mathcal{V}_2, \ \mathcal{E}_1 ∩ \mathcal{E}_2)

Bipartite Graph

Let G\mathcal{G} be a graph and let X,Y\mathcal{X}, \mathcal{Y} be a partition of the vertex set.

A bipartite graph is one where:

Complete Graph

Let nn be the number of vertices in a graph. Then a complete graph KnK_n is one where all possible edges exist.

Size of KnK_n

Since any pair of vertices may potentially have an edge, finding the total number of possible edges between all pairs of vertices is the same as finding all 22-element subsets, and thus is an nn choose 22 problem.

Kn=(n2)=n!2!(n2)!=n(n1)2\begin{align} K_n = {n \choose 2} &= \frac{n!}{2!(n - 2)!} \\[0.8em] &= \frac{n(n-1)}{2} \end{align}

If we allow loops in our graph then the size of KnK_n is:

(n+12)=n(n+1)2 {n + 1 \choose 2} = \frac{n(n + 1)}{2}

Tree

A forest is an acyclic graph and a (free) tree is a connected forest.

A rooted tree is a tree with a vertex (or node) labeled as the root.

Resources