Graph Theory
Graph Theory
Michlmas 2003
ii
Contents
1
Introduction
Graphs
11
Matchings
13
15
16
18
Graph colouring
7.1 Vertex colouring and Brooks theorem . . . . . . . . . . . . . . . . .
19
19
21
23
23
iii
iv
CONTENTS
Chapter 1
Introduction
The notes were typed up by me, John Fremlin [email protected].
These notes are based on the part IIA mathematics course Graph theory given
by Dr Fisher in Cambridge in Michlmas 2003. These notes are not connected to Dr
Fisher in any way. If there are any mistakes in them, it is more than very likely that
they are my fault.
I added a few clumsy elucidations, to the arguments that I initially did not understand, which will no doubt ensure that there are at least some errors, because I could
not find any in Dr Fishers lectures.
Furthermore these notes are very definitely no substitute for actually going to lectures, because they do not include all of the material and especially examples covered,
or any of the asides.
Finally, I would like to thank Dr Fisher for his supervisions, where he taught me a
lot about mathematics.
CHAPTER 1. INTRODUCTION
Chapter 2
Graphs
Definition 2.1 (Graph). A graph is a pair (V, E) with E V (2) .
Loops and multiple edges are forbidden.
Definition 2.2 (Vertices). V = V (G) is the set of vertices of G.
Definition 2.3 (Edges). E = E(G) is the set of edges of G.
Example 2.4 (Complete graph). Kn is the complete graph on n vertices (all
edges).
n
2
CHAPTER 2. GRAPHS
Definition 2.17 (Cycle). A cycle is a closed walk of length 3 with distinct vertices
except that the frist and last are equal (isomorphic to Cn ).
Definition 2.18 (Hamilton trail/circuit). A Hamilton path/cycle is a path/cycle which
goes through every vertex of the graph.
Definition 2.19 (Hamiltonian). A graph is Hamiltonian if it has a Hamilton cycle.
Definition 2.20 (Neighbours of a vertex). Let x be a vertex of G, its neighbours or
adjacent vertices are (x) = {y V (G) : xy E(G)}.
Definition 2.21 (Degree of a vertex). The degree of a vertex x is d(x) = k(x)k.
Definition 2.22 (Degree sequence of a graph). The degree sequence of a graph is a
graph with vertices v1 , , vn is d(v1 ), , d(vn ).
Definition 2.23 (Maximum, minimum degree). The minimum/maximum degree of a
vertex of G is denoted (G) or (G) respectively.
Definition 2.24 (Regular). A graph G is regular if (G) = (G).
Definition 2.25 (Size of a graph). e(G) = kE(G)k is the number of edges of G, its
size.
Definition 2.26 (Order of a graph). kGk = kV (G)k is the number of edges of G, its
order.
P
Lemma 2.27 (Handshaking lemma).
vV (G) d(v) = 2e(G)
Proof. Double count {(x, xy) : x V (G), xy E(g)}.
Observation 2.28. To solve problems try induction (on vertices, edges, and other
things), try double counting (counting something in more than one way), consider the
pigeon hole principle and consider extreme cases.
Definition 2.29 (Connected). A graph is connected if every pair of vertices is joined
by a path.
The relationship on V (G) where x y where is a path between x and y is an
equivalence relation. The equivalence classes are called components of G.
Definition 2.30 (Acyclic). A graph is acyclic if it has no cycles.
Definition 2.31 (Tree). A tree is a connected acyclic graph.
Definition 2.32 (Forest). A forest is an acycle graph.
Theorem 2.33 (Properties of a tree). The following are equivalent
1. G is a tree (connected, acyclic)
2. G is minimal connected
3. G is maximal acyclic
5
Proof. i = ii. Let G be connected and acyclic. Let uv E(G). If G uv were
connected then any u v path in G uv would give a cycle in G.
ii = i. If C were a cycle in G and uv E(G) then any x y path in G passing
via uv could be patched up to C uv to give a path in G uv. Contradiction.
i = iii. Let uv
/ E(G). Since G connected u v path in G so there is a cycle
in G + uv. Contradiction.
iii = i. Suppose G is not connected. Let u, v be vertices of G belonging to
different components. G + uv contains no cycles. Contradiction.
Corollary 2.34. A graph is connected iff it has a spanning tree (i.e. G has a subgroup
T , T a tree and V (T ) = V (G)).
Proof. Assume G has a spanning tree T . Then there is a path in T and so in G between
all vertices.
Let T be minimal connected spanning subgraph of G. By previous theorem it is a
tree.
Definition 2.35 (Leaf). A leaf is a vertex v with d(v) = 1.
Lemma 2.36 (Trees have leaves). Every tree T of order n 2 has at least two leaves.
Proof. Let P = x1 xk be a path of maximal length in T . Then (x1 ) P , since P
is maximal. T is acyclic so (x1 ) P = {x2 }. Similarly for xk .
Theorem 2.37 (Size of a tree). A tree of order n has size n 1. e(T ) = kT k 1. (In
fact a connected graph G with e(T ) = kT k 1 is a tree, exercise.)
Proof. By induction on n. Clearly true for n 2. Let T be a tree of order n and let
v V (T ) be a leaf. Let x, y be vertices of T v. There is an x y path in T . So
T connected implies T v connected so T v is a tree. By induction e(T v) =
n 2 = e(T ) = e(T v) + 1 = n 1.
Observation 2.38 (Number of possible graphs). If vertices are labelled 1, , n there
n
are n2 possible edges and each subset gives a graph so there are 2( 2 ) possible graphs.
If the vertices are unlabelled then each graph can be labelled in at most n! possible
(n2 )
ways. So there are at least 2 n! graphs.
Theorem 2.39 (Cayley). There are nn2 labelled trees of order n.
Proof. (Due to Prufer.) Given a labelled tree we constract a sequence of n 2 numbers
in the range 1, , n as follows.
Select the lowest labelled leaf. Write down its neighbour. Delete the leaf. Repeat
until just two vertices remain. Now have a function f from set of labelled trees of order
n to {1, n}n2 .
Claim: f is injective. Each vertex v appears d(v) 1 times in the sequence. Leaves
are vertices not appearing. Given a sequence (a1 , , an2 ) let v1 be the least vertex
not appearing, join it to a1 . Let v2 be the least vertex not appearing in the new sequence (v1 , a2 , , an2 ), join it to a2 . Repeat until there are only two nodes not in
(v1 , , vn2 ), join them together. The original graph is reconstructed.
CHAPTER 2. GRAPHS
7
Definition 2.48 (Bridgeless). In a bridgeless plane graph every edge separates two
different faces.
P
2e(G) = i ifi where fi is the number of i-sided faces.
Definition 2.49 (Girth). The girth of a graph G is the length of the shortest cycle.
Theorem 2.50 (Bound for number of edges in a planar graph). Let G be a bridgeless
g
(n 2). In particular a
plane graph with n vertices and girth g. Then e(G) g2
plane graph has at most 3n 6 edges.
Proof. Add edges ifPnecessary P
to ensure that G is connected. It remains bridgeless and
planar. Then 2e = i ifi g i fi = gf . So f 2e
g .
g2
By Eulers theorem n 2 = e f . But e f e 2e
g =
g e = e
g
(n
2).
g2
Theorem 2.51 (Kuratowski (unproved)). Kuratowski showed that the only non-planar
graphs are those that contain a subdivision of K5 or K3,3 obtained by replacing edges
with paths.
Theorem 2.52 (Eulerian condition). A graph is Eulerian iff it is connected and every
vertex has even degree.
Proof. If the graph is Eulerian it must be connected. If a vertex has odd degree the path
must pass in a different number of times from that which it passes out.
By induction on the number of edges. True for the empty graph. Since (G) 2
there are no leaves so G is not a tree. Therefore G must contain a cycle C. Each
component of G \ E(C) has vertices of even degree, so by induction hypothesis each
has an Euler circuit. By traversing C take time out to traverse each of these circuits
when first encountered. We produce an Euler circuit for G as G is connected.
Corollary 2.53. A connected graph G has an Euler trail from a vertex x to a vertex
y 6= x iff x and y are the only vertices of odd degree.
Proof. If there is an Euler trail then obvious.
If x and y are the only vertices of odd degree then form G by adding a new vertex
u and joining it to x and y. By the theorem G has an Euler circuit. Deleting u gives
an Euler trail from x to y.
CHAPTER 2. GRAPHS
Chapter 3
10
f
(yx))
=
t1 , , tk S.
Corollary 3.12 (MFMC for multiple sources and sinks). In a multiple source network
the maximum value of a flow is equal to the minimum cut capacity.
Proof. We construct a new network by joining a supersource s to s1 , , sk and a
supersink t to t1 , , tl using edges of infinite capacity.
Apply MFMC. Note that any cut of finite capacity cannot touch edges ssi or tj t so
cut can be applied to original graph.
Definition 3.13 (Vertex capacities). We can consider vertex capacities instead of edge
capacities. The capacity function is now C : V (D) \ {s, t} 7 R0 and we want
0 f+ (v) = f (v) c(v) v V (D) \ {s, P
t}. A cut is now a set of vertices S such
that D S has no s t path. It has capacity vS c(v).
Corollary 3.14 (Vertex capacity version of MFMC). The maximum value of a flow in
a network with vertex capacities is equal to the minimum cut capacity.
Proof. Construct from D a new network D with edge capacities. Replace each vertex
v by two vertices v and v+ and an edge v v+ . For each edge xy E(D) add an
edge x+ y to D . We give v v+ capacity c(v) give x+ y infinite capacity. Apply
MFMC.
Chapter 4
12
Proof. Vertex form. Replace all edges uv E(G) with two directed edges and give
each vertex capacity 1. Apply vertex form of max-flow min-cut to get an integer flow
from a b, (a, b; G) since each vertex has capacity 1 or 0.
Edge form. Do the same thing but use the edge form of max-flow min-cut.
Definition 4.12 (Line graph). The line graph L(G) is the graph with a vertex ve for
each e E(G) and an edge ve vf whenever e and f have a common end vertex in G.
Observation 4.13. The edge form can be deduced from the vertex from, using the line
graph.
Observation 4.14. Given a set P of independent a b paths then certainly |P |
(a, b; G), but it is not necessarily possible to add paths to P to form (a, b; G) independent paths.
Observation 4.15. There is a multiple source - sink version of Mengers theorem.
Lemma 4.16. Assume ab E(G) and let G = G ab. Then (a, b; G ) (G) 1.
Proof. Let k = (a, b; G ). Choose S V (G) \ {a, b} with |S| = k and G S
disconnected. Let x and y be vertices in different components of G S, so that
|{x, y} {a, b}| is minimal. Then either
S
1. a 6= x, y so G (S a) is disconnected; or
S
2. b 6= x, y so G (S b) is disconnected; or
S
3. {x, y} = {a, b} so V (G) = S {a, b}, so |G| k + 2.
All cases imply that (G) k + 1.
Corollary 4.17. A graph is k-connected iff any two vertices are joined by at least k
independent paths.
Proof. If G is not a complete graph, (G) = min (a, b; G). Apply Mengers theorem.
Kn is k-connected iff n k + 1, so true for a complete graph.
Corollary 4.18. A graph is k-edge-connected iff any two vertices are joined by at least
k edge disjoint paths.
Chapter 5
Matchings
Definition 5.1 (k-factor). A k-factor of a graph G is a k-regular spanning subgraph,
that is, a subgraph H with (H) = (H) = k.
Definition 5.2 (Matching). Let G be a bipartite graph with vertex classes X and Y . A
matching in G is a set of |X| independent edges.
If |X| = |Y | then a matching is a 1-factor.
Theorem 5.3 (Halls marriage theorem). Let G be a bipartite graph with vertex classes
X and Y . Then G has a matching iff |(S)| |S| for every S X.
Using Mengers theorem. Join a new vertex a to all elements of X and a new vertex b
to all elements of Y to form G .
Suppose C is a set of vertices separating a from b. Then (X \ C) Y C. Now
|C| = |C X| + |C Y |. So |C| |C X| + |(X \ C)|. By Halls condition
|(X \ C)| |X \ C|. So |C| |C X| + |X \ C| = |X|. By the choice of C,
(a, b; G) |X|.
Using Mengers theorem there are |X| independent paths, giving a matching in G.
Direct. By induction on |X|.
The case |X| 1 is trivial.
Suppose that for every S X with S 6= , X we have |(S)| > |S|. Then take any
xy E(G). G x satisfies Halls condition. By the induction hypothesis G {x, y}
has a matching, so G has a matching.
Otherwise
S there exists a critical set T S X, T 6= , X with |(T )| = |T |. Let
G1 = G[T (T )] and G2 = G[(X \ T ) (Y \ (T ))].
S
G1 clearly satisfies Halls condition. Let S X \ T . Now G2 (S) = G (S T ) \
G (T ).
|G2 (S)| |G (S
|S
T )| |G (T )|
T | |T | = |S|
13
14
CHAPTER 5. MATCHINGS
Chapter 6
n
2
then G is Hamiltonian.
Theorem 6.6. Let G be a graph with n vertices and no path of length k. Then e(G)
(k 1) n2 with equality iff G is a union of copies of Kk .
Proof. By induction on n.
If n k then e(G) n2 (k 1) n2 with equality iff G = Kk .
15
16
Consider n > k. If G is disconnected apply induction to each component. Otherwise G is connected and Kk 6 G, or there would be a vertex w that could be joined to
a path traversing the Kk to make a path of length k.
By theorem 6.4 at least one v V (G) has d(v) k1
2 . By the induction hypothek1
sis e(G v) < k1
(n
1).
Therefore
e(G)
<
n.
2
2
(6.1)
(6.2)
6.1. COMPLETE SUBGRAPHS AND TURANS
THEOREM
17
18
Chapter 7
Graph colouring
7.1 Vertex colouring and Brooks theorem
Definition 7.1 (Vertex colouring). A vertex k-colouring of a graph G is a function
c : V (G) 7 {1, 2, , k}, such that c(x) 6= c(y) xy E(G).
We say G is k-colourable if there is a k-colouring of G. Clearly G is k-colourable
iff it is k-partite.
Definition 7.2 (Chromatic number). The chromatic number (G) of a graph G is the
minimum k for which G is k-colourable.
Definition 7.3 (Greedy algorithm). Given an ordering v1 , , vn of V (G), the greedy
algorithm colours the vertices sequentially, giving vertex vi the smallest colour in
{1, 2, , n} that is not in c((vi ) {v1 , v2 , , vi1 }).
Clearly the number of colours used by the greedy algorithm depends on the order of
the vertices. Furthermore given a colouring that uses only (G) colours it is possible
to order the vertices so that the greedy algorithm will use no more than (G) colours.
Lemma 7.4 (Upper bound on (G)). Given a graph G, (G) 1 + (G)
Proof. Given a vertex x, then the greedy colouring algorithm will not give it a colour
value more than d(x) + 1.
Therefore the greedy colouring algorithm colours all graphs with no more than
(G) + 1 colours, so (G) 1 + (G).
Theorem 7.5 (Upper bound on (G)). (G) 1 + maxHG (H) where H ranges
over all induced subgraphs of G (including G).
Proof. We constructively describe a way of colouring G, by specifying a vertex order
for the greedy colouring algorithm.
Let n = kV k. Let Hn = G. Let xn be a vertex in Hn with degree (Hn ). Certainly
(G) < 1 + maxHG (H). Let Hn1 = Hn {xn }, n > 1.
The sequence x1 , x2 , x3 , , xn presents to the greedy colouring algorithm a series of vertices which have had at most maxHG (H) neighbours already coloured.
Therefore at most 1 + maxHG (H) colours can be used.
This bound is certainly exact for a complete graph.
19
20
Chapter 8
22
Select a component that contains exactly one of these vertices. Now swap over red
and blue in this component. Now one of the conditions above must apply.
Theorem 8.4 (Edge chromatic number of a bipartite graph). If G is bipartite, then
(G) = (G).
Proof. We embed G in a (G)-regular bipartite multi-graph as follows: We replace
G by two copies of G and for v , v , the copies of v V (G), we join v to v with
(G)d
S G (v) parallel
S edges. This creates a bipartite multi-graph H with vertex classes
(X Y ) and (Y X ) if X and Y were the original vertex classes in G.
Now we prove the theorem for -regular bipartite multi-graphs H by induction on
kHk + (H).
Clearly true for (H) = 1.
Let uv be an edge of H, Delete the vertices u and v. Because u and v were in
different vertex classes, it is possible to add fewer than new edges to make a new
-regular bipartite multi-graph H . Now we colour H by the induction hypothesis.
Certainly not all the colours were used to colour the new edges. Let red be one of these
colours. Certainly the red edges in H with uv form a 1-factor in G. Deleting this
1-factor gives a ( 1)-regular bipartite multigraph H .
Now colour H by the induction hypothesis, then add the 1-factor back, to obtain
a colouring of H.
Definition 8.5 (List colouring, L-choosable). Let L : V (G) 7 { finite subsets of N
}, so that each vertex v has a paint box L(v). We say that G is L-choosable if
c : V (G) 7 N such that c(v) L(v) v and c is a vertex colouring.
Definition 8.6 (k-choosable). We say that G is k-choosable if G is L-choosable whenever kL(v)k = k, v V (G).
Clearly if G is k-choosable it is k + 1-choosable. However it is not necessarily true
that if G is k-choosable it is k-colourable.
Definition 8.7 (List chromatic number l (G)). The list chromatic number l (G) of a
graph G is the least k such that G is k-choosable.
Chapter 9
23