You are on page 1of 99

Lecture Notes on

GRAPH THEORY
Tero Harju
Department of Mathematics
University of Turku
FIN-20014 Turku, Finland
e-mail: harju@utu.fi
2007
Contents

1 Introduction :::::::::::::::::::::::::::::::::::::::::::::::::::::::: 2
1.1 Graphs and their plane figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.2 Subgraphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.3 Paths and cycles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

2 Connectivity of Graphs ::::::::::::::::::::::::::::::::::::::::::::::: 16


2.1 Bipartite graphs and trees . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
2.2 Connectivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

3 Tours and Matchings ::::::::::::::::::::::::::::::::::::::::::::::::: 30


3.1 Eulerian graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
3.2 Hamiltonian graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
3.3 Matchings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

4 Colourings ::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 43
4.1 Edge colourings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
4.2 Ramsey Theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
4.3 Vertex colourings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52

5 Graphs on Surfaces :::::::::::::::::::::::::::::::::::::::::::::::::: 60


5.1 Planar graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
5.2 Colouring planar graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
5.3 Genus of a graph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74

6 Directed Graphs ::::::::::::::::::::::::::::::::::::::::::::::::::::: 83


6.1 Digraphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
6.2 Network Flows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89

Index :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 96
1

Introduction

Graph theory can be said to have its beginning in


1736 when E ULER considered the (general case of
the) Königsberg bridge problem: Is there a walk-
ing route that crosses each of the seven bridges
of Königsberg exactly once? (Solutio Problema-
tis ad geometriam situs pertinentis, Commentarii
Academiae Scientiarum Imperialis Petropolitanae 8
(1736), pp. 128-140.)
It took 200 years before the first book on graph theory was written. This was done by
KÖNIG in 1936. (“Theorie der endlichen und unendlichen Graphen”, Teubner, Leipzig, 1936.
Translation in English, 1990.) Since then graph theory has developed into an extensive and
popular branch of mathematics, which has been applied to many problems in mathematics,
computer science, and other scientific and not-so-scientific areas. For the history of early
graph theory, see
N.L. B IGGS , R.J. L LOYD AND R.J. W ILSON, “Graph Theory 1736 – 1936”, Clarendon
Press, 1986.
There seem to be no standard notations or even definitions for graph theoretical objects.
This is natural, because the names one uses for these objects reflect the applications. So,
for instance, if we consider a communications network (say, for email) as a graph, then the
computers, which take part in this network, are called nodes rather than vertices or points.
On the other hand, other names are used for molecular structures in chemistry, flow charts in
programming, human relations in social sciences, and so on.
These lectures study finite graphs and majority of the topics is included in
J.A. B ONDY AND U.S.R. M URTY, “Graph Theory with Applications”, Macmillan, 1978.
R. D IESTEL, “Graph Theory”, Springer-Verlag, 1997.
F. H ARARY, “Graph Theory”, Addison-Wesley, 1969.
D.B. W EST, “Introduction to Graph Theory”, Prentice Hall, 1996.
R.J. W ILSON, “Introduction to Graph Theory”, Longman, (3rd ed.) 1985.
In these lectures we study combinatorial aspects of graphs. For more algebraic topics and
methods, see
N. B IGGS, “Algebraic Graph Theory”, Cambridge University Press, (2nd ed.) 1993.
and for computational aspects, see
S. E VEN, “Graph Algorithms”, Computer Science Press, 1979.
3

In these lecture notes we mention several open problems that have gained respect among
the researchers. Indeed, graph theory has the advantage that it contains easily formulated open
problems that can be stated early in the theory. Finding a solution to any one of these problems
is on another layer of difficulty.

Sections with a star () in their heading are optional.

Notations and notions


 For a finite set X , jX j denotes its size (cardinality, the number of its elements).
 Let
[1;n℄ = f1;2;::: ;ng;
and in general,
[i;n℄ = fi;i + 1;::: ;ng
i n
for integers  .
x x are the integers
 For a real number , the floor and the ceiling of
bx = maxfk 2 Z j k  xg and dxe = minfk 2 Z j x  kg:
 A family fX ;X ;::: ;Xk g of subsets Xi  X of a set X is a partition of X , if
1 2
[
X= Xi and Xi \ Xj = ; for all different i and j :
i2[1;k℄
 For two sets X and Y ,
X  Y = f(x;y) j x 2 X; y 2 Y g
is their Cartesian product.
X
 For two sets and , Y
X 4Y = (X n Y ) [ (Y n X)
is their symmetric difference. Here X n Y = fx j x 2 X;x 2 = Y g.
 Two numbers n;k 2 N (often n = jX j and k = jY j for sets X and Y ) have the same
parity, if both are even, or both are odd, that is, if n  k (mod2). Otherwise, they have
opposite parity.

Graph theory has abundant examples of NP-complete problems. Intuitively, a problem is


in P 1 if there is an efficient (practical) algorithm to find a solution to it. On the other hand,
a problem is in NP 2 , if it is first efficient to guess a solution and then efficient to check that
=
this solution is correct. It is conjectured (and not known) that P 6 NP. This is one of the
great problems in modern mathematics and theoretical computer science. If the guessing in
=
NP-problems can be replaced by an efficient systematic search for a solution, then P NP. For
any one NP-complete problem, if it is in P, then necessarily P NP. =
1 Solvable – by an algorithm – in polynomially many steps on the size of the problem instances.
2 Solvable nondeterministically in polynomially many steps on the size of the problem instances.
1.1 Graphs and their plane figures 4

1.1 Graphs and their plane figures

Let V be a finite set, and denote by


E(V ) = ffu;vg j u;v 2 V; u 6= vg :
the subsets of V of two distinct elements.

D EFINITION . A pair G = (V;E)


with  E E(V ) V
is called a graph (on ). The elements
V E
of are the vertices, and those of the edges of the graph. The vertex set of a graph is G
V E
denoted by G and its edge set by G . Therefore G = (V ;E )
G G .

In literature, graphs are also called simple graphs; vertices are called nodes or points; edges
are called lines or links. The list of alternatives is long (but still finite).
A pair f u;v uv
g is usually written simply as . Notice that then uv = vu. In order to
v G
simplify notations, we also write 2 instead of 2 G . v V
D EFINITION . For a graph G, we denote
G = jVGj " = jEG j :
and G

The number G of the vertices is called the order of G, and "G is the size of G. For an edge
e = uv 2 EG, the vertices u and v are its ends. Vertices u and v are adjacent or neighbours,
if e = uv 2 EG . Two edges e = uv and e = uw having a common end, are adjacent with
1 2
each other.

G
A graph can be represented as a plane figure by drawing
u v
a line (or a curve) between the points and (representing v1 v3 v6
vertices) if e = uv G
is an edge of . The figure on the right is
G V = v ;v ;v ;v ;v ;v
a drawing of the graph with G f 1 2 3 4 5 6g v2 v4 v5
E = v v ;v v ;v v ;v v ;v v
and G f 1 2 1 3 2 3 2 4 5 6 g.
Often we shall omit the identities (names v ) of the vertices in our figures, in which case
the vertices are drawn as anonymous circles.
vv
Graphs can be generalized by allowing loops and parallel (or multiple) edges between
vertices to obtain a multigraph G = (V;E; ) , where E = e ;e ;::: ;e
f1 2 m g is a set (of
symbols), and !: E E(V ) vv v V
[ f j 2 g is a function that attaches an unordered pair of
vertices to each 2 : e E (e) = uv .
Note that we can have (e ) = (e )
1 2 . This is drawn in the
G
figure of by placing two (parallel) edges that connect the b
common ends. On the right there is (a drawing of) a multi-
G V = a;b;
graph with vertices f g and edges 1 (e ) = aa
, a
(e ) = ab (e ) = b
2 , 3 (e ) = b
, and 4 .
1.1 Graphs and their plane figures 5

Later we concentrate on (simple) graphs.

D EFINITION . We also study directed graphs or digraphs


D = (V;E), where the edges have a direction, that is, the
edges are ordered: E  V  V . In this case, uv 6= vu.

The directed graphs have representations, where the edges are drawn as arrows. A digraph
can contain edges and uv vu
of opposite directions.
Graphs and digraphs can also be coloured, labelled, and weighted:

D EFINITION . A function G ! : V K
is a vertex colouring of by a set G
of colours. A K
function : E
G ! is anKedge colouring of . Usually, G for some K = [1;k℄
 . k 1
K K
If  R (often  N ), then is a weight function or a distance function.

Isomorphism of graphs

D EFINITION . Two graphs and G H are isomorphic, denoted by G = H , if there exists a


bijection : V V
G ! H such that

uv 2 EG () (u) (v) 2 EH
for all u;v 2 G.
Hence and G H
are isomorphic if the vertices of H
are renamings of those of . Two G
isomorphic graphs enjoy the same graph theoretical properties, and they are often identified.
In particular, all isomorphic graphs have the same plane figures (excepting the identities of
the vertices). This shows in the figures, where we tend to replace the vertices by small circles,
and talk of ‘the graph’ although there are, in fact, infinitely many of such graphs.

Example 1.1. The following graphs are iso- v2 v3 2 4


morphic. Indeed, the required isomorphism
v 1 v
is given by 1 7! , 2 7! , 3 7! , 3 v 4 v5 1

v 2v
4 7! , 5 7! . 5 v1 v4 3 5

Isomorphism Problem. Does there exist an efficient algorithm to check whether any two
given graphs are isomorphic or not?

2( )n
The following table lists the number 2 of graphs on a given set of vertices, and the n
n
number of nonisomorphic graphs on vertices. It tells that at least for computational purposes
an efficient algorithm for checking whether two graphs are isomorphic or not would be greatly
appreciated.
1.1 Graphs and their plane figures 6

n 1 2 3 4 5 6 7 8 9
graphs 1 2 8 64 1024 32768 2097152 268435456 2 > 6  10 36 10

nonisomorphic 1 2 4 11 34 156 1044 12346 274668

Other representations

Plane figures catch graphs for our eyes, but if a problem on graphs is to be programmed, then
these figures are (to say the least) unsuitable. Matrices of integers are ideal for computers,
since every respectable programming language has array structures for these, and computers
are good in crunching numbers.
V = v ;::: ;v
Let G f 1 n g be ordered. The adjacency matrix 0
0 1 1 0 11
G n n M
of is the  -matrix M =1 M =
with entries ij or ij
B1 0 0 1 1C
0 vv E
according to whether i j 2 G or not. For instance, B
B1 0 0 1 0C
C
B C
0 1 1 0 0A
the graphs of Example 1.1 has an adjacency matrix on the
right. Notice that the adjacency matrix is always symmetric
(with respect to its diagonal consisting of zeros). 1 1 0 0 0

A graph has usually many different adjacency matrices, one for each ordering of its set G V
of vertices. The following result is obvious from the definitions.

Theorem 1.1. Two graphs andG H


are isomorphic if and only if they have a common ad-
jacency matrix. Moreover, two isomorphic graphs have exactly the same set of adjacency
matrices.

= X ;X ;::: ;X
Graphs can also be represented by sets. For this, let X f 1 2 n g be a fam-
X G
ily of subsets of a set , and define the intersection graph X as the graph with vertices
X ;::: ;X
1 XX i
n , and edges i j for all and ( 6j i=j X X =
) with i \ j 6 ;.

Theorem 1.2. Every graph is an intersection graph of some family of subsets.

Proof. Let G be a graph, and define, for all v 2 G, a set


Xv = ffv;ug j vu 2 EGg:
Then Xu \ Xv 6= ; if and only if uv 2 EG . ut
Let s(G) be the smallest size of a base set X such that G can be represented as an inter-
section graph of a family of subsets of X , that is,

s(G) = minfjX j j G = GX for some X  2X g :


How small can s(G) be compared to the order G (or the size "G ) of the graph? It was shown
by KOU , S TOCKMEYER AND W ONG (1976) that it is algorithmically difficult to determine
the number s(G) – the problem is NP-complete.
1.2 Subgraphs 7

A
Example 1.2. As yet another example, let  N be a finite set of natural numbers, and let
G = (A;E)
A be the graph defined on GA V =A such that 2 rs E (= E )
GA if and only if
r s r=s
and (for 6 ) have a common divisor >1
. As an exercise, we state: All graphs can be
G A
represented in the form A for some set of natural numbers.

1.2 Subgraphs

Ideally, in a problem the local properties of a graph determine a solution. In such a situation
we deal with (small) parts of the graph (subgraphs), and a solution can be found to the problem
by combining the information determined by the parts. For instance, as we shall see later on,
the existence of an Euler tour is very local, it depends only on the number of the neighbours
of the vertices.

Degrees of vertices
D EFINITION . Let v 2 G be a vertex a graph G. The neighbourhood of v is the set
NG (v) = fu 2 G j vu 2 EGg :
The degree of v is the number of its neighbours:
dG(v) = jNG(v)j :
If dG (v) = 0, then v is said to be isolated in G, and if dG (v) = 1, then v is a leaf of the graph.
The minimum degree and the maximum degree of G are defined as

Æ(G) = minfdG (v) j v 2 Gg and (G) = maxfdG (v) j v 2 Gg :


The following lemma, due to E ULER (1736), tells that if several people shake hands, then
the number of hands shaken is even.

Lemma 1.1 (Handshaking lemma). For each graph G,


X
dG(v) = 2  "G :
v2G
Moreover, the number of vertices of odd degree is even.

Proof. Every edge e 2 EG has two ends. The second claim follows immediately from the
first one. ut
Lemma 1.1 holds equally well for multigraphs, when G d (v)
is defined as the number of
v
edges that have as an end, and when a loop vv
is counted twice.
Note that the degrees of a graph G do not determine G. Indeed, there are graphs G =
(V;EG ) and H = (V;EH ) on the same set of vertices that are not isomorphic, but for which
dG(v) = dH (v) for all v 2 V .
1.2 Subgraphs 8

v y v y
G
D EFINITION . Let 2 be a graph. A -switch
(u;v;x;y) G uv;xy E
of , for ux;vy =2 G and 2
EG , replaces uv xy ux vy
the edges and by and . u x u x

Before proving Berge’s switching theorem we need the following tool.

G n d d
Lemma 1.2. Let be a graph of order with a degree sequence 1  2      n , whered
d (v ) = d
G i i . There is a graph G G 2
0 which is obtained from by a sequence of -switches such
N (v ) = v ;::: ;v
that G0 1 f2 d1 +1 g.

Proof. Denote d = (G) (= d ). Suppose that there exists a vertex vi with 2  i  d + 1


1
such that v vi 2
1 = EG. Since dG (v ) = d, there exists a vj
1
with j  d + 2 such that v vj 2 EG . Here di  dj , since
1
j > i. Since v vj 2 EG, there exists a vt (2  t  n) v1
1 v v i j

such that vi vt 2 EG , but vj vt 2


= EG. We can now perform
a 2-switch with respect to the vertices v ;vj ;vi ;vt . This
1 v
gives a new graph H , where v vi 2 EH and v vj 2 = EH ,
t

1 1
and the other neighbours of v remain to be its neighbours.
When we repeat this process for all indices i with v vi 2= EG for 2  i  d+1, we obtain
1
1
a graph G as in the claim.
0 ut
Theorem 1.3 (B ERGE (1973)). Two graphs G and H on a common vertex set V satisfy
dG(v) = dH (v) for all v 2 V if and only if H can be obtained from G by a sequence of
2-switches.
Proof. If a graph H is obtained from G by a 2-switch, then clearly H has the same degrees
as G.
In the other direction, we use induction on the order G . Let G and H have the same
degrees, and let d = (G). By Lemma 1.2, there are sequences of 2-switches that transform
G to G0 and H to H 0 such that NG0 (v ) = fv ;::: ;vd g = NH 0 (v ). Now the graphs
1 2 +1 1
G0 v and H 0 v have the same degrees. By induction hypothesis, G0, and thus also G,
1 1
can be transformed to H 0 by a sequence of 2-switches. Finally, we observe that H 0 can be
transformed to H by the ‘inverse sequence’ of 2-switches, and this proves the claim. ut
D EFINITION . Let d ;d ;::: ;dn be a descending sequence of nonnegative integers, that is,
1 2
d  d      dn. Such a sequence is said to be graphical, if there exists a graph G =
1 2
(V;E) with V = fv ;v ;::: ;vn g such that di = dG (vi) for all i.
1 2

Using the next result recursively one can decide whether a sequence of integers is graphical
or not.
1.2 Subgraphs 9

Theorem 1.4 (H AVEL (1955), H AKIMI (1962)). A sequence d ;d ;::: ;dn (with d  1 and
1 2 1
n 2
 ) is graphical if and only if
d 1; d 1;::: ;dd1
2 3 +1 1; dd1 ; dd1 ;::: ;dn :
+2 +3 (1.1)

is graphical (when put into nonincreasing order).

Proof. (() Consider G of order n 1 with vertices (and degrees)


dG(v ) = d 1;::: ;dG(vd1 ) = dd1 1;
2 2 +1 +1

dG(vd1 ) = dd1 ;::: ;dG(vn ) = dn


+2 +2

as in (1.1). Add a new vertex v and the edges v vi for all i 2 [2;dd1 ℄. Then in this new
1 1 +1
graph H , dH (v ) = d , and dH (vi ) = di for all i.
1 1

()) Assume dG (vi ) = di . By Lemma 1.2 and Theorem 1.3, we can suppose that
NG(v ) = fv ;::: ;vd1 g. But now the degree sequence of G v is in (1.1).
1 2 +1 1 ut
Example 1.3. Consider the sequence s = 4;4;4;3;2;1. By Theorem 1.4,

s is graphical () 3;3;2;1;1 is graphical v2 v4


2;1;1;0 is graphical v6
0;0;0 is graphical:
The last sequence corresponds to a discrete graph K , and 3 v1 v3 v5
hence also our original sequence s is graphical. Indeed, the
graph G on the right has this degree sequence.

Special graphs

D EFINITION . A graph G = (V;E) is trivial, if it has only one vertex, i.e., G = 1; otherwise
G is nontrivial.
The graph G = KV is the complete graph on V , if every
two vertices are adjacent: E = E(V ). All complete graphs
of order n are isomorphic with each other, and they will be
denoted by Kn .
K 6

G
The complement of is the graph on G , where G G V f 2 E = e E(V ) e = E
j 2 Gg. The
complements G=K V of the complete graphs are called discrete graphs. In a discrete graph
E = n
G ;. Clearly, all discrete graphs of order are isomorphic with each other.
G G
A graph is said to be regular, if every vertex of has the same degree. If this degree is
r G r
equal to , then is -regular or regular of degree . r
1.2 Subgraphs 10

Note that a discrete graph is 0-regular, and a complete graph n is K (n 1)-regular. In


" = n(n 1)=2
particular, Kn , and therefore G  " n(n 1)=2
for all graphs G that have order
n.

Example 1.4. The graph on the right is the Petersen graph


that we will meet several times (drawn differently). It is a
3 10
-regular graph of order .

Example 1.5. Letk  1 be an integer, and consider the set B k of all binary strings of length k.
= f000;001;010;100; 011;101;110;111g. Let Qk be the graph, called the
For instance, B 3
k V = B k , where uv 2 EQ if and only if the strings u and v differ in exactly
-cube, with Qk k

one place.
110 111

Q  =2
The order of k is Qk k , the number of binary strings of 101
k Q k
100
length . Also, k is -regular, and so, by the handshaking
" =k 2
lemma, Qk 3
 k 1. On the right we have the -cube, or 010 011

simply the cube.


000 001

n 4
Example 1.6. Let  be any even number. We show by induction that there exists a - 3
G  =n
regular graph with G 3
. Notice that all -regular graphs have even order by the hand-
shaking lemma.
x y
If n = 4 K 3 G 3
, then 4 is -regular. Let be a -regular
graph of order 2m 2 uv;uw E
, and suppose that 2 G. w v
Let H V = V x;y
G [ f E = (E uv;uw )
g , and H G n f g [ u
f ux;xv;uy;yw;xy : H 3 2m
g Then is -regular of order .

Subgraphs

H
D EFINITION . A graph is a subgraph of a graph , denoted by G H G V
 , if H  G and V
E E
H  G . A subgraphH G G H
 spans (and is a spanning subgraph of ), if every G
G H V =V
vertex of is in , i.e., H G.
H G
Also, a subgraph  is an induced subgraph, if H G\ E =E E(V )
H . In this case, H
V
is induced by its set H of vertices.

In an induced subgraph H  G, the set EH of edges consists of all e 2 EG such that


e 2 E(VH ). To each nonempty subset A  VG, there corresponds a unique induced subgraph
G[A℄ = (A;EG \ E(A)) :
1.3 Paths and cycles 11

To each subset F  EG of edges there corresponds a unique spanning subgraph of G,


G[F℄ = (VG ;F) :

G subgraph spanning induced

For a set F  EG of edges, let


G F = G[EG n F℄
G
be the subgraph of obtained by removing (only) the edges 2 e F G
from . In particular,
G e G e E
is obtained from by removing 2 G .
Similarly, we write G+F e F F E(V ))
, if each 2 (for  G is added to . G
For a subset A  VG of vertices, we let G A  G be the subgraph induced by VG n A,
that is,
G A = G[VG n A℄ ;
and, e.g., G v is obtained from G by removing the vertex v together with the edges that have
v as their end.
Many problems concerning (induced) subgraphs are algorithmically difficult. For instance,
K
to find a maximal complete subgraph (a subgraph m of maximum order) of a graph is un-
likely to be even in NP.

Reconstruction Problem. The famous open problem, Kelly-Ulam problem or the Recon-
3
struction Conjecture, states that a graph of order at least is determined up to isomorphism
by its vertex deleted subgraphsG vv G ( 2 ): if there exists a bijection : V V
G ! H such
that 
G v = H (v) v G=H
for all , then  .

1.3 Paths and cycles

The most fundamental notions in graph theory are practically oriented. Indeed, many graph
theoretical questions ask for optimal solutions to problems such as: find a shortest path (in a
complex network) from a given point to another. This kind of problems can be difficult, or
at least nontrivial, because there are usually choices what branch to choose when leaving an
intermediate point.
1.3 Paths and cycles 12

Walks

D EFINITION . Let i e = uu E
i i+1 2 G be edges of for G i 2 [1;k℄. Here ei and ei +1 are
e e
compatible in the sense that i is adjacent to i+1 for all 2 i [1;k 1℄. The sequence
W = e e ::: ek
1 2

is a walk of length k from u 1 u


to k+1 .

We write, more informally,

W : u ! u ! ::: ! uk ! uk
1 2 W: u !
+1
k
uk :
or 1 +1

Write u ! v to say that there is a walk of some length from u to v . Here we understand that
?

W : u ! v is always a specific walk, W = e e ::: ek , although we sometimes do not care


?
1 2
to mention the edges ei it uses. The length of a walk W is denoted by jW j.

D EFINITION . Let W = e e ::: e e = u u


1 2 k( i i i+1 ) be a walk.
W is closed, if 1 u =u k+1 .
W u =u
is a path, if i 6 i=j
j for all 6 .
W u =u i=j
is a cycle, if it is closed, and i 6 j for 6 except that 1 u = uk +1 .
W is a trivial path, if its length is 0. A trivial path has no edges.
For a walk W: u=u 1 !::: u = v
! k+1 , also
W : v = uk ! ::: ! u = u
1
+1 1

is a walk in G, called the inverse walk of W .


A vertex u is an end of a path P , if P starts or ends in u.
The join of two walks W : u ! v and W : v ! w is the walk W W : u ! w. (Here
1
?
2
?
1 2
?

the end v must be common to the walks.)


Paths P and Q are disjoint, if they have no vertices in common, and they are independent,
if they can share only their ends.

Clearly, the inverse walk P 1


of a path P is a path (the inverse path of P ). The join of
two paths need not be a path.

A (sub)graph, which is a path (cycle) of length


k 1 (k, resp.) having k vertices is denoted
by Pk (Ck , resp.). If k is even (odd), we say
that the path or cycle is even (odd). Clearly,
all paths of length k are isomorphic. The same P C
5 6
holds for cycles of fixed length.

Lemma 1.3. Each walk W: u


!
?
with 6 v u=v
contains a path !
?
P: u
, that is, there is v
a path P: u v W
! that is obtained from by removing edges and vertices.
?
1.3 Paths and cycles 13

Proof. Let W : u = u ::: u = v i < j


1 ! ! k+1 . Let u =u be indices such that i j . If
i j W W =WWW :u u
no such and exist, then , itself, is a path. Otherwise, in 1 2 3 !
?
i !
?

u ?
v
j ! the portion 1 U =W W :u u =u v
1 3 ! i j ! is a ?shorter walk. By repeating this
? ?

U ;U ;::: ;U
argument, we obtain a sequence 1 2 u v W >U > >
m of walks ! with j j j 1 j   
U
j m j. When the procedure stops, we have a path as required. (Notice that in the above it may
W W
very well be that 1 or 3 is a trivial walk.) ut
D EFINITION . If there exists a walk (and hence a path) from tou v in G, let
d (u;v) = min k u v
G f j ! k
g
be the distance between u and v . If there are no walks u ! v , let dG (u;v) = 1 by conven-
?

tion. A graph G is connected, if dG (u;v) < 1 for all u;v 2 G; otherwise, it is disconnected.
The maximal connected subgraphs of G are its connected components. Denote
(G) = the number of connected components of G :
If (G) = 1, then G is, of course, connected.

H G
The maximality condition means that a subgraph  is a connected component if and
only if H H v=H
is connected and there are no edges leaving , i.e., for every vertex 2 , the
subgraph G[V v℄
H [f g is disconnected. Apparently, every connected component is an induced
subgraph, and
N (v) = u d (v;u) <

G f j G 1g
G v G
is the connected component of that contains 2 . In particular, the connected components
form a partition of .G
Shortest paths
D EFINITION . Let G be an edge weighted graph, that is, G is a graph G together with a
weight function : EG ! R on its edges. For H  G, let
X
(H) = (e)
e2EH
be the (total)
Pk
H
weight of . In particular, if P = e e ::: e
1 2 k is a path, then its weight is
(P) = i=1 (e )
i . The minimum weighted distance between two vertices is

Gd (u;v) = min (P) P : u
f j !
?
g v :
In extremal problems we seek for optimal subgraphs  H G satisfying specific conditions.
G
In practice we encounter situations where might represent
 a distribution or transportation network (say, for mail), where the weights on edges are
distances, travel expenses, or rates of flow in the network;
 a system of channels in (tele)communication or computer architecture, where the weights
present the rate of unreliability or frequency of action of the connections;
 a model of chemical bonds, where the weights measure molecular attraction.
1.3 Paths and cycles 14

In these examples we look for a subgraph with the smallest weight, and which connects
two given vertices, or all vertices (if we want to travel around). On the other hand, if the graph
represents a network of pipelines, the weights are volumes or capacities, and then one wants
to find a subgraph with the maximum weight.
We consider the minimum problem. For this, let G
be a graph with an integer weight
function : E
G ! N . In this case, call the length of . (uv) uv
The shortest path problem: Given a connected graph G with a weight function : EG ! N ,
find Gd (u;v)
for given 2 . u;v G
Assume that G is a connected graph. Dijkstra’s algorithm solves the problem for every pair
u;v, where u is a fixed starting point and v 2 G. Let us make the convention that (uv) = 1,
if uv 2
= EG.
Dijkstra’s algorithm:

(i) Set u = u, t(u ) = 0 and t(v) = 1 for all v 6= u .


0 0 0

(ii) For i 2 [0;G 1℄: for each v 2 = fu ;::: ;ui g, 1

replace t(v) by minft(v);t(ui ) + (ui v)g :

Let ui 2 = fu ;::: ;uig be any vertex with the least value t(ui ).
+1 1 +1

(iii) Conclusion: d G (u;v) = t(v).

G. Apply Dijkstra’s algorithm to the


Example 1.7. Consider the following weighted graph
v
vertex 0 .

 u = v , t(u ) = 0, others are 1.


0 0 0

 t(v ) = minf1;2g = 2, t(v ) = minf1;3g = 3,


1 2
2

others are 1. Thus u = v . 1 1


v1 v3 1

 t(v ) = minf3;t(u ) + (u v )g = minf3;4g = 3, v0


2 1
2 1 1 2
v5
t(v ) = 2+1 = 3, t(v ) = 2+3 = 5, t(v ) = 2+2 =
3 4 5
2 3 2

4. Thus choose u = v .
3 2
2 3 v2 v4 1

 t(v ) = minf3; 1g = 3, t(v ) = minf5;3+2g = 5,


2 4
t(v ) = minf4;3 + 1g = 4. Thus set u = v .
5 3 2

 t(v ) = minf5;3 + 1g = 4, t(v ) = minf4; 1g = 4. Thus choose u = v .


4 5 4 4

 t(v ) = minf4;4 + 1g = 4. The algorithm stops.


5

We have obtained:

t(v ) = 2; t(v ) = 3; t(v ) = 3; t(v ) = 4; t(v ) = 4 :


1 2 3 4 5

These are the minimal weights from v to each vi . 0


1.3 Paths and cycles 15

The steps of the algorithm can also be rewritten as a table:

v 2
1 - - - -
v 3
2 3 3 - -
v 1
3 3 - - -
v 1
4 5 5 4 -
v 1
5 4 4 4 4

The correctness of Dijkstra’s algorithm can verified be as follows.


v V
Let 2 be any vertex, and let P: u 0 !
?
u v
!
?
u v
be a shortest path from 0 to , where
u u=v
is any vertex 6 on such a path, possibly u=u 0 . Then, clearly, the first part of the path,
u u u u
0 ! , is a shortest path from 0 to , and the latter part
?
!u
?
v u
is a shortest path from to
v P
. Therefore, the length of the path equals the sum of the weights of 0 ! u ?
u and !u ?
v
.
Dijkstra’s algorithm makes use of this observation iteratively.
2

Connectivity of Graphs

2.1 Bipartite graphs and trees

In problems such as the shortest path problem we look for minimum solutions that satisfy
the given requirements. The solutions in these cases are usually subgraphs without cycles.
Such connected graphs will be called trees, and they are used, e.g., in search algorithms for
databases. For concrete applications in this respect, see
T.H. C ORMEN , C.E. L EISERSON AND R.L. R IVEST, “Introduction to Algorithms”, MIT
Press, 1993.

Certain structures with operations are representable as trees.


+
These trees are sometimes called construction trees, de-  y
composition trees, factorization trees or grammatical trees.
Grammatical trees occur especially in linguistics, where syn- x +
tactic structures of sentences are analyzed. On the right there
x (y+z)+y
is a tree of operations for the arithmetic formula  . y z

Bipartite graphs

G V
D EFINITION . A graph is called bipartite, if G has a partition to two subsets and X Y
such that each edgeuv E X Y
2 G connects a vertex of and a vertex of . In this case, (X;Y )
G G (X;Y )
is a bipartition of , and is -bipartite.
G
A bipartite graph (as in the above) is a complete (m;k)
-
X =m Y =k
bipartite graph, if j j ,j j , and uv E
2 G for all
u X2 and 2 . v Y
All complete (m;k) -bipartite graphs are isomorphic. Let
K m;k denote such a graph.
A subset X  VG is stable, if G[X℄ is a discrete graph. K;
23

The following result is clear from the definitions.

Theorem 2.1. A graph G is bipartite if and only if VG has a partition to two stable subsets.
Example 2.1. The k -cube Qk of Example 1.5 is bipartite for all k . Indeed, consider A = fu j
u has an even number of 10sg and B = fu j u has an odd number of 10sg: Clearly, these sets
partition B k , and they are stable in Qk .
2.1 Bipartite graphs and trees 17

Theorem 2.2. A graph G is bipartite if and only if it has no odd cycles.


Proof. ()) Let G be (X;Y )-bipartite. For a cycle C : v ! ::: ! vk = v of length k ,
1 +1 1
v 2 X implies v 2 Y , v 2 X , . . . , v i 2 Y , v i 2 X . Consequently, k + 1 = 2m + 1 is
1 2 3 2 2 +1
odd, and k = jC j is even.
(() Suppose that all cycles in G are even. First, we observe that it suffices to show the
claim for connected graphs. Indeed, if G is disconnected, then each cycle of G is contained in
one of the connected components, G ;::: ;Gp , of G. If Gi is (Xi ;Yi )-bipartite, then (X [
1 1
X [    [ Xp;Y [ Y [    [ Yp) is a bipartition of G.
2 1 2

Assume thus that G is connected. Let v 2 G be a chosen vertex, and define

X = fx j dG(v;x) is eveng; Y = fy j dG(v;y) is oddg :


Since G is connected, VG = X [ Y . Also, by the definition of distance, X \ Y = ;.
Let u;w 2 G be both in X or both in Y , and let P : v ! u and Q: v ! w be (among
? ?

the) shortest paths from v to u and w.


Assume that x is the last common vertex of P and Q: P = P P , Q = Q Q , where 1 2 1 2
P : x ! u and Q : x ! w are independent. Since P and Q are shortest paths, P and Q
2
?
2
?
1 1
are shortest paths v ! x. Consequently, jP j = jQ j.
?
1 1

So jP j and jQ j have the same parity. Therefore


2 2
Q P : w ! u is an even path. It follows that
1
2
?

P P u
u and w are not adjacent in G, since otherwise v
2 2
1

Q P (uw) would be an odd cycle. Therefore G[X℄


1 x uw
2 2
and G[Y ℄ are discrete induced subgraphs, and G is Q Q w 1

ut
2
bipartite as claimed.
Checking whether a graph is bipartite is easy. In-
deed, this can be done by using two ‘opposite’
1 2
colours, say and . Start from any vertex 1 , and v 1
1
colour it by . Then colour the neighbours of 1 by v 1 2
2, and proceed by colouring all neighbours of an al-
ready coloured vertex by an opposite colour. 2 2 2
If the whole graph can be coloured, then is G 1 1
(X;Y ) X
-bipartite, where consists of those vertices
with colour , and 1 Y
of those vertices with colour 1 2
2; otherwise, at some point one of the vertices gets
G
both colours, and in this case, is not bipartite.

Theorem 2.3 (E RDÖS (1965)). Each graph G has a bipartite subgraph H  G such that
"H  2 G.
1
"
Proof. Let G V =X Y
[ be a partition such that the number of edges between X and Y is as
large as possible. Denote

F = EG \ fuv j u 2 X;v 2 Y g ;
2.1 Bipartite graphs and trees 18

and let H = G[F℄. Obviously H is a spanning subgraph, and it is bipartite. By the maximum
dH (v)  21 dG(v) ;
condition,

since, otherwise, v is on the wrong side. (That is, if v 2 X , then the pair X 0 = X n fv g,
Y 0 = Y [ fvg does better that the pair X;Y .) Now
"H = 12 dH (v)  21 12 dG (v) = 12 "G :
X X

v2H v2G ut
Bridges

e E
D EFINITION . An edge 2 G is a bridge of the graph , G
ifG e G
has more connected components than , that is, if
(G e) > (G) .

In particular, and most importantly, an edge e in a connected


G is a bridge if and only if G e is disconnected. On the right
the two horizontal lines are bridges. The rest are not.

Theorem 2.4. An edge e 2 EG is a bridge if and only if e is not in any cycle of G.


Proof. First of all, note that e = uv is a bridge if and only if u and v belong to different
connected components of G e.
()) If there is a cycle in G containing e, then there is a cycle C = eP : u ! v ! u, ?

where P : v ! u is a path in G e, and so e is not a bridge.


?

(() Assume that e = uv is not a bridge. Hence u and v are in the same connected com-
ponent of G e. If P : v ! u is a path in G e, then eP : u ! v ! u is a cycle in G that
? ?

contains e. ut
Lemma 2.1. Let e be a bridge in a connected graph G.
(i) Then (G e) = 2.
(ii) Let H be a connected component of G e. If f 2 EH is a bridge of H , then f is a bridge
of G.

Proof. For (i), let e = uv . Since e is a bridge, the ends u and v are not connected in G e.
Let w 2 G. Since G is connected, there exists a path P : w ! v in G. This is a path of G e,
?

unless P : w ! u ! v contains e = uv , in which case the part w ! u is a path in G e.


? ?

For (ii), if f 2 EH belongs to a cycle C of G, then C does not contain e (since e is in no


cycle), and therefore C is inside H , and f is not a bridge of H . ut
2.1 Bipartite graphs and trees 19

Trees

D EFINITION . A graph is called acyclic, if it has no cycles. An acyclic graph is also called a
forest. A tree is a connected acyclic graph.

By Theorem 2.4 and the definition of a tree, we have

Corollary 2.1. A connected graph is a tree if and only if all its edges are bridges.

Example 2.2. The following enumeration result for trees has many different proofs, the first
n V n
of which was given by C AYLEY in 1889: There are n 2 trees on a vertex set of elements.
We omit the proof.
On the other hand, there are only a few trees up to isomorphism:

n 1 2 3 4 5 6 7 8
trees 1 1 1 2 3 6 11 23

n 9 10 11 12 13 14 15 16
47 106 235 551 1301 3159 7741 19320
trees

The nonisomorphic trees of order 6 are:

Theorem 2.5. The following are equivalent for a graph . T


T
(i) is a tree.
(ii) Any two vertices are connected inT by a unique path.
T " = 1
(iii) is acyclic and T T .

Proof. Let T = n. If n = 1, then the claim is trivial. Suppose thus that n  2.


(i))(ii) Let T be a tree. Assume the claim does not hold, and let P;Q: u ! v be two
?

different paths between the same vertices u and v . Suppose that jP j  jQj. Since P 6= Q, there
exists an edge e which belongs to P but not to Q. Each edge of T is a bridge, and therefore
u and v belong to different connected components of T e. Hence e must also belong to Q; a
contradiction.
n
(ii))(iii) We prove the claim by induction on . Clearly, the claim holds for n=2
, and
n T n
suppose it holds for graphs of order less than . Let be any graph of order satisfying (ii).
T
In particular, is connected, and it is clearly acyclic.
Let P: u !
?
v T e
be a maximal path in , that is, there are no edges , for which Pe eP
or is
 d (v) = 1
a path. Such paths exist, because T is finite. It follows that T , since, by maximality,
2.1 Bipartite graphs and trees 20

ifvw 2 ET , then w belongs to P ; otherwise P(vw) would be a longer path. In this case,
P : u ! w ! v, where vw is the unique edge having an end v. The subgraph T v is
?

connected, and therefore it satisfies the condition (ii). By induction hypothesis, "T v = n 2,
and so "T = "T v + 1 = n 1, and the claim follows.
(iii))(i) Assume (iii) holds for T . We need to show that T is connected. Indeed, let the
connected components of T be Ti = (Vi ;Ei ), for i 2 [1;k℄. Since T is acyclic, so are the
connected graphs
Pk
Ti, and hence theyPk
are trees, for which we have proved that jEi j = jVi j 1.
Now, T = i jVi j, and "T = i jEi j. Therefore,
=1 =1

k
X k
X
n 1 = "T = (jVi j 1) = jVij k = n k ;
i=1 i=1
which gives that k = 1, that is, T is connected. ut
Example 2.3. Consider a cup tournament of n teams. If during a round there are k teams left
in the tournament, then these are divided into bk pairs, and from each pair only the winner
continues. If k is odd, then one of the teams goes to the next round without having to play.
How many plays are needed to determine the winner?
So if there are 14 7
teams, after the first round teams continue, and after the second round
4 teams continue, then . So 2 13
plays are needed in this example.
The answer to our problem is n 1
, since the cup tournament is a tree, where a play
corresponds to an edge of the tree.

Spanning trees

Theorem 2.6. Each connected graph has a spanning tree, that is, a spanning graph that is a
tree.

H G
Proof. Let  be a minimal connected spanning subgraph, that is, a connected spanning
G
subgraph of such that H e e E
is disconnected for all 2 H . Such a subgraph is obtained
G
from by removing nonbridges:
 To start with, let 0H =G .
 i 0
For  , let i+1 H =H e e
i i , where i is a not a bridge of Hi. Since ei is not a bridge,
H i+1 is a connected spanning H
subgraph of i and thus of . G
 H =H k , when only bridges are left.
By Corollary 2.1, H is a tree. ut
Corollary 2.2. For each connected graph G, "G  G 1. Moreover, a connected graph G
is a tree if and only if G G" =. 1
T
Proof. Let be a spanning tree of G. Then "G  "T = T 1 = G 1. The second claim
is also clear. ut
2.1 Bipartite graphs and trees 21

Corollary 2.3. Each tree T with T  2 has at least two leaves.


Proof. Let ` be the number of leaves of T . By Corollary 2.2 and the handshaking lemma,
X X
2  T 2 = 2  "T = dT (v) = dT (v) + `
v2T dT (v)>1
 2  (T `) + ` = 2  T ` ;
from which it follows that `  2, as required. ut
Example 2.4. In Shannon’s switching game a positive player P
and a negative player N
G s rP
play on a graph with two special vertices: a source and a sink . and alternate turns N
P + N
so that designates an edge by , and by . Each edge can be designated at most once.
P
It is ’s purpose to designate a path !?
s r
(that is, to designate all edges in one such path),
N s r
and tries to block all paths ! (that is, to designate at least one edge in each such path).
?

We say that a game (G;s;r) is


 P
positive, if has a winning strategy no matter who begins the game,
 N
negative, if has a winning strategy no matter who begins the game,
 neutral, if the winner depends on who begins the game.

r
The game on the right is neutral.
s
L EHMAN proved in 1964 that Shannon’s switching game (G;s;r) is positive if and only if
there exists H  G such that H contains s and r and H has two spanning trees with no edges
in common.
In the other direction the claim can be proved along the following lines. Assume that there
exists a subgraph H s r
containing and and that has two spanning trees with no edges in
P N
common. Then plays as follows. If marks by an edge from one of the two trees, then
P +
marks by an edge in the other tree such that this edge reconnects the broken tree. In this
P
way, always has two spanning trees for the subgraph H
with only edges marked by in +
common.
In converse the claim is considerably more difficult to prove.
There remains the problem to characterize those Shannon’s switching games (G;s;r)
that
are neutral (negative, respectively).

The connector problem

n
To build a network connecting nodes (towns, computers, chips in a computer) it is desirable
to decrease the cost of construction of the links to the minimum. This is the connector prob-
lem. In graph theoretical terms we wish to find an optimal spanning subgraph of a weighted
2.1 Bipartite graphs and trees 22

graph. Such an optimal subgraph is clearly a spanning tree, for, otherwise a deletion of any
nonbridge will reduce the total weight of the subgraph.
G G
Let then be a graph together with a weight function : E
G ! R (positive reals)
+

on the edges. Kruskal’s algorithm (also known as the greedy algorithm) provides a solution
to the connector problem.
Kruskal’s algorithm: For a connected and weighted graph of order : G n
(i) Let e 1 be an edge of smallest weight, and set E = fe g.
1 1

(ii) For each i = 2;3;::: ;n 1


in this order, choose an edge i e 2= Ei of smallest possible
1
e
weight such that i does not produce a cycle when added to G[Ei ℄, and let Ei = Ei [
1 1
e
f i g.
The final outcome is T = (V ;E )
G n 1 .

By the construction, T = (V ;En ) is a spanning tree of G, because it contains no


G 1
cycles, it is connected and has n 1 edges. We now show that T has the minimum total
weight among the spanning trees of G.
Suppose T is any spanning tree of G. Let ek be the first edge produced by the algorithm
1
that is not in T . If we add ek to T , then a cycle C containing ek is created. Also, C must
1 1
contain an edge e that is not in T . When we replace e by ek in T , we still have a spanning
1
tree, say T . However, by the construction, (ek )  (e), and therefore (T )  (T ). Note
2 2 1
that T has more edges in common with T than T .
2 1

Repeating the above procedure, we can transform T to T by replacing edges, one by one,
1
such that the total weight does not increase. We deduce that (T)  (T ). 1

The outcome of Kruskal’s algorithm need not be unique. Indeed, there may exist several
optimal spanning trees (with the same weight, of course) for a graph.

Example 2.5. When applied to the weighted


graph on the right, the algorithm produces the
e =vv e =vv e =vv v1 v2 v3
3 2
sequence: 1 2 4, 2 4 5, 3 3 6,
e =v v e =v v
4 2 3 and 5 1 2 . The total weight of the
1
2
1 2
spanning tree is thus 9. 4

e =vv e =vv e =
Also, the selection 1 2 5, 2 4 5, 3
2

v v e =v v e =v v
5 6 , 4 3 6 , 5 1 2 gives another optimal v4 1 v5 2 v6
solution (of weight 9). 3

T
Problem. Consider trees with weight functions : E
T ! N . Each tree of order has T n
exactly n2 paths. (Why is this so?) Does there
 exist a weighted tree of order such that T n
the (total) weights of its paths are 1;2;::: ;
n
2
?
2.1 Bipartite graphs and trees 23

T
In such a weighted tree different paths have differ-
n is a weight of one
ent weights, and each 2 i [1; ℄ 1 4


2
5
path. Also, must be injective. 2 8

No solutions are known for any n  7.


TAYLOR (1977) proved: if T of order n exists, then necessarily n = k 2
or n = k + 2 for
2

k 1
some  .

G
Example 2.6. A computer network can be presented as a graph , where the vertices are the
v
node computers, and the edges indicate the direct links. Each computer has an address , a(v)
a bit string (of zeros and ones). The length of an address is the number of its bits. A message
v
that is sent to is preceded by the address a(v) . The Hamming distance h(a(v);a(u))
of
two addresses of the same length is the number of places, where a(v)
and differ. Fora(u)
example, h(00010;01100) = 3 and h(10000;00000) = 1 .
It would be a good way to address the vertices so that the Hamming distance of two vertices
G
is the same as their distance in . In particular, if two vertices were adjacent, their addresses
should differ by one symbol. This would make it easier for a node computer to forward a
message.

A graph G is said to be addressable, if it 010

has an addressing a
such that G d (u;v) = 000 110 111
h(a(u);a(v)).
100

T
We prove that every tree is addressable. Moreover, the addresses of the vertices of T can

be chosen to be of length T . 1
 2
The proof goes by induction. If T  , then the claim is obvious. In the case T , the  =2
addresses of the vertices are simply 0 and 1.
Let then TV = v ;::: ;v
f1 d (v ) = 1
k+1 g, and assume that T 1 (a leaf) and 1 2 2 T . vv E
By the induction hypothesis, we can address the tree T v
1 by addresses of length . k 1
a
We change this addressing: let i be the address of i in v T v 1 , and change it to i . Set 0a
v 1a
the address of 1 to 2 . It is now easy to see that we have obtained an addressing for as T
required.
K
The triangle 3 is not addressable. In order to gain more generality, we modify the address-
ing for general graphs by introducing a special symbol  in addition to 0 and 1. A star address
will be a sequence of these three symbols. The Hamming distance remains as it was, that is,
h(u;v) u v
is the number of places, where and have a different symbol 0 or 1. The special
symbol  does not affect h(u;v) h(10 01;0 101) = 1
. So,   and h(1
   . ; 00 )=0
We still want to have h(u;v) = d (u;v)
G .
2.2 Connectivity 24

We star address this graph as follows:


a(v ) = 0000 a(v ) = 10 0
1 , 2  , v3
a(v ) = 1 01 a(v ) = 11
3  , 4  . v1 v2
These addresses have length 4. Can you design a
star addressing with addresses of length 3? v4

W INKLER proved in 1983 a rather unexpected result: The minimum star address length of
G
a graph is at most G  1
.
For the proof of this, see VAN L INT AND W ILSON, “A Course in Combinatorics”.

2.2 Connectivity

Spanning trees are often optimal solutions to problems, where cost is the criterion. We may
also wish to construct graphs that are as simple as possible, but where two vertices are always
connected by at least two independent paths. These problems occur especially in different
aspects of fault tolerance and reliability of networks, where one has to make sure that a break-
down of one connection does not affect the functionality of the network. Similarly, in a reliable
network we require that a break-down of a node (computer) should not result in the inactivity
of the whole network.

Separating sets

D EFINITION . A vertex 2 v G
is a cut vertex, if
(G v) > (G) A V
. A subset  G is a separating
G A
set, if A
is disconnected. We also say that sep-
u v u v
arates vertices and , if and belong to different
connected components of G A .

G v
If is connected, then is a cut vertex if and only if G v is disconnected, that is, fvg is
A V
a separating set. We remark also that if  G separates u and v, then every path P : u ! v
?

A
visits a vertex of .

Lemma 2.2. If a connected graph G has no separating sets, then it is a complete graph.
Proof. If G  2, then the claim is clear. For G  3, assume that G is not complete, and let
uv 2= EG. Now VG n fu;vg is a separating set. The claim follows from this. ut
(G) of G is defined as
D EFINITION . The (vertex) connectivity number

(G) = minfk j k = jAj; G A disconnected or trivial;A  VGg :


A graph G is k -connected, if (G)  k .
2.2 Connectivity 25

In other words,
 (G) = 0, if G is disconnected,
 (G) = G 1, if G is a complete graph, and
 otherwise (G) equals the minimum size of a separating set of G.
Clearly, if G is connected, then it is 1-connected.
D EFINITION . An edge cut F of G consists of edges so that G F is disconnected. Let
0(G) = minfk j k = jF j; G F disconnected;F  EGg :
For trivial graphs, let 0 (G) = 0. A graph G is k -edge connected, if 0 (G)  k . A minimal
edge cut F  EG is a bond (F n feg is not an edge cut for any e 2 F ).

Example 2.7. Again, if G


is disconnected, then
 (G) = 0
0 . On the right, (G) = 2 and 0  (G) =
2. Notice that the minimum degree is Æ(G) = 3
.

Lemma 2.3. Let G be connected. If e = uv is a bridge, then either G = K 2 or one of u or v


is a cut vertex.

Proof. Assume that 6G=K  3


2 and thus that G  , since G
is connected. Let uG = N (u)

G e
and vG = N (v)

G e be the connected components of G e u v
containing and . Now, either
 2 u  2 v
Gu  (and is a cut vertex) or Gv  (and is a cut vertex). ut
Lemma 2.4. If F be a bond of a connected graph G, then (G F) = 2.

Proof. Since G F is disconnected, and F is minimal, the subgraph G (F nfeg) is connected


for each e 2 F . Hence e is a bridge in G (F n feg). By Lemma 2.1, G F has exactly two
connected components. ut
Theorem 2.7 (W HITNEY (1932)). For any graph G,
(G)  0 (G)  Æ(G) :
Proof. Assume G is nontrivial. Clearly, 0 (G)  Æ(G), since if we remove all edges with an
end v , we disconnect G. If 0 (G) = 0, then G is disconnected, and in this case also (G) = 0.
If 0 (G) = 1, then G is connected and contains a bridge. By Lemma 2.3, either G = K or G 2
has a cut vertex. In both of these cases, also (G) = 1.
Assume then that 0 (G)  2. Let F be an edge cut of G with jF j = 0 (G), and let
e = uv 2 F . Then F is a bond, and G F has two connected components.
2.2 Connectivity 26

e
H = G (F n feg) = (G F) + e; G H
Consider the connected subgraph
.. .. .. ..
. . . .
where e is a bridge.
F
f F e u v
Now for each 2 nf g choose an end different from and . (The choices for different
edges need not be different.) Note that since 6 f=e f
, either end of is different from or . u v
S S F 1 =  (G) 1
Let be the collection of these choices. Thus j j  j j 0 , and G S
does not
F e
contain edges from n f g.
G S
If S
is disconnected, then is a separating set and so(G) S j j 0  (G) 1
and
we are done. On the other hand, if G S G S=K
is connected, then either 2 ( ), =e
or either
u v
or (or both) is a cut vertex of G S (since H S=G S , and therefore G S H
 is
H G S
an induced subgraph of ). In both of these cases, there is a vertex of , whose removal
(G) S + 1
results in a trivial or a disconnected graph. In conclusion,  j j  0 , and the  (G)
claim follows. ut
Menger’s theorem

Theorem 2.8 (M ENGER (1927)). Let u;v G


2 be nonadjacent vertices of a connected graph
G u v
. Then the minimum number of vertices separating and is equal to the maximum number
u v
of independent paths from to .

S V u v
Proof. If a subset  G separates and , then every path !
?
u v G
of visits . HenceS
S
j j is at least the number of independent paths from to . u v
Conversely, we use induction on m= +" G G to show that if S = w ;w ;::: ;w
f 1 2 k g is a
u v G
minimum set (that is, a subset of the smallest size) that separates and , then has at least
k
(and thus exactly) independent paths ! u v ?
.
The case for k=1 m
is clear, and this takes care of the small values of , required for the
induction.
u v
(1) Assume first that and have a common neighbour w
N (u) N (v)
2 G \ G . Then
w S
necessarily 2 . In the smaller graph G w S w
the set n f g is a minimum set that separates
u v
and , and so the induction hypothesis yields that there are k 1 u v
independent paths ! ?

in G w u w v k u v G
. Together with the path ! ! , there are independent paths ! in as ?

required.
N (u) N (v) = ;, and denote by Hu = NG S (u) and Hv =
(2) Assume then that G \ G
N (v)

G S G S for u and v.
the connected components of
(2.1) Suppose next that S * NG (u) and S * NG (v).
2.2 Connectivity 27

v G
Let b be a new vertex, and define u to be the graph on
H S v
u [ [fbg having the edges of G[H S℄ vw
u [ together with b i
i [1;k℄
for all 2 G
. The graph u is connected and it is smaller wk
G S
than . Indeed, in order for to be a minimum separating :::
w S
set, all i 2 have to be adjacent to some vertex in v . H w2 vb
" "
This shows that Gu  G , and, moreover, the assumption
u
w1
H = v
(2.1) rules out the case v H
f g, and therefore j v j  2
 <
and so Gu G in the present case.
S u v G S u
If is any subset that separates and b in u , then 0 will separate from all i 2 n 0
0 w S S
G S u v G k
in . This means that 0 separates and in . Since is the size of a minimum separating
S k G G
set, j 0 j  . We noted that u is smaller than , and thus by the induction hypothesis, there
k
are independent paths u v G
!
?
k
b in u . This is possible only if there exist paths u w
!
?
i,
one for each 2 i [1;k℄ u
, that have only the end in common.
By the present assumption, also u is nonadjacent to some vertex of S . A symmetric argu-
ment applies to the graph Gv (with a new vertex u b) , which is defined similarly to Gu . This
yields that there are k paths wi ! v that have only the end v in common. When we combine
?

these with the above paths u ! wi , we obtain k independent paths u ! wi ! v in G.


? ? ?

(2.2) There remains the case, where for all separating sets S of k elements, either S 
NG(u) or S  NG(v). (Note that then, by (2), S \ NG(v) = ; or S \ NG(u) = ;.)
Let P = efQ be a shortest path u ! v in G, where e = ux, f = xy , and Q: y ! v .
? ?

Notice that, by the assumption (2), jP j  3, and so y 6= v . In the smaller graph G f , let S 0
be a minimum set that separates u and v .
If jS 0 j  k , then, by the induction hypothesis, there are k independent paths u ! v in
?

G f . But these are paths of G, and the claim is clear in this case.
If, on the other hand, jS 0 j < k , then u and v are still connected in G S 0 . Indeed, every
path u ! v in G S 0 necessarily travels along the edge f = xy , and so x;y 2
?
= S0.
Let
Sx = S 0 [ fxg and Sy = S 0 [ fyg :
These sets separate u and v in G (by the above fact), and they have size k . By our current
assumption, the vertices of Sy are adjacent to v , since the path P is shortest and so uy 2
= EG
(meaning that u is not adjacent to all of Sy ). The assumption (2) yields that u is adjacent to
all of Sx , since ux 2 EG . But now both u and v are adjacent to the vertices of S 0 , which
contradicts the assumption (2). ut
G k
Theorem 2.9 (M ENGER (1927)). A graph is -connected if and only if every two vertices
k
are connected by at least independent paths.

k
Proof. If any two vertices are connected by independent paths, then it is clear that (G)

k.
In converse, suppose that (G) = k , but that G u v
has vertices and connected by at
most k 1 independent paths. By Theorem 2.8, it must be that e = uv E
2 G. Consider the
graph G e u v
. Now and are connected by at most k 2
independent paths in G e
, and by
2.2 Connectivity 28

u v G e
Theorem 2.8, and can be separated in S
by a set with j jS =k 2  >k
. Since G
(G) = k
(because w G
), there exists a 2 that is not in [ f S u;v g. The w
vertex is separated
inG e S u v
by from or from ; otherwise there would be a path u v (G e) S
!
?
in . Say,
u S v k 1
this vertex is . The set [ f g has u w G
elements, and it separates from in , which
(G) = k
contradicts the assumption that . This proves the claim. ut
We state without a proof the corresponding separation property for edge connectivity.

G uv
D EFINITION . Let be a graph. A -disconnecting set is a set F  EG such that every
path !u?
v
contains an edge from . F
Theorem 2.10. Let u;v 2 G with u 6= v in a graph G. Then the maximum number of edge-
disjoint paths !
?
u v equals the minimum number k of edges in a uv-disconnecting set.
Corollary 2.4. A graph G is k -edge connected if and only if every two vertices are connected
by at least k edge disjoint paths.

Example 2.8. Recall the definition of the cube Qk from Example 1.5. We show that (Qk ) =
k.
First of all, (Qk )  Æ(Qk ) = k . In converse, we show the claim by induction. Extract
from Qk the disjoint subgraphs: G induced by f0u j u 2 B k g and G induced by f1u j
0
1
1
u 2 B k g. These are (isomorphic to) Qk , and Qk is obtained from the union of G and
1
1 0
G by adding the 2k edges (0u;1u) for all u 2 B k .
1
1 1

Let S be a vertex cut of Qk . Then jS j  k . If both G S and G S were connected,


0 1
also Qk S would be connected, since one pair (0u;1u) necessarily remains in Qk S . So we
can assume that G S is disconnected. (The case for G S is symmetric.) By the induction
0 1
hypothesis, (G ) = k 1, and hence S contains at least k 1 vertices of G (and so
0 0
jS j  k 1). If there were no vertices from G in S , then, of course, G S is connected, and
1 1
the edges (0u;1u) of Qk would guarantee that Qk S is connected; a contradiction. Hence
jS j  k.
Example 2.9. We have 0 (Qk ) = k for the k -cube. Indeed, by Whitney’s theorem, (G) 
0(G)  Æ(G). Since (Qk ) = k = Æ(Qk ), also 0 (Qk ) = k.
Algorithmic Problem. The connectivity problems tend to be algorithmically difficult. In the
(u ;v )
disjoint paths problem we are given a set i i of pairs of vertices for i = 1;2;::: ;k
,
P:u v
and it is asked whether there exist paths i i ! i that have no vertices in common. This
?

k
problem was shown to be NP-complete by K NUTH in 1975. (However, for fixed , the problem
has a fast algorithm due to ROBERTSON and S EYMOUR (1986).)
2.2 Connectivity 29

Dirac’s fans

D EFINITION . Let 2v G S V
and  G such that 2 in v=S
G v S
:::
a graph . A set of paths from to a vertex in is called a
(v;S) v
-fan, if they have only in common.

v 
G k
Theorem 2.11 (D IRAC (1960)). A graph is -connected if
 S
 >k
and only if G v G S V
and for every 2 and  G with
S k v=S
j j  and 2 , there exists a (v;S) k
-fan of paths.

Proof. Exercise. ut
G k
Theorem 2.12 (D IRAC (1960)). Let be a -connected graph for k  2. Then for any k
G
vertices, there exists a cycle of containing them.

Proof. First of all, since(G) 2 G


 , has no cut vertices, and thus no bridges. It follows that
G
every edge, and thus every vertex of belongs to a cycle.
S V C
Let  G be such that j j S =k G, and let be a cycle of that contains the maximum
S S V v ;::: ;v
number of vertices of . Let the vertices of \ C be 1 C r listed in order around so
(v ;v ) r C
that each pair i i+1 (with indices modulo ) defines a path along (except in the special
case wherer=1 C C
). Such a path is referred to as a segment of . If contains all vertices of
S v S C
, then we are done; otherwise, suppose 2 is not on .
(v;V ) min k; V
It follows from Theorem 2.11 that there is a C -fan of at least f j C jg paths.
P : v u Q: v w
Therefore there are two paths ! and ?
?
! ?in such a fan that end in the same
?

(v ;v ) C W: u w w u
segment i i+1 of . Then the path C ! (or ! ) along contains all vertices
S V PWQ
of \ C . But now G 1
v v i [1;r℄
is a cycle of that contains and all i for 2 . This
C
contradicts the choice of , and proves the claim. ut
3

Tours and Matchings

3.1 Eulerian graphs

The first proper problem in graph theory was the Königsberg bridge problem. In general, this
problem concerns about travels around a graph such that one tries to avoid using the same
edge twice. In practice these eulerian problems occur, for instance, in optimizing distribution
networks – such as delivering mail, where in order to save time each street should be travelled
only once. The same problem occurs in mechanical graph plotting, where one avoids lifting
the pen off the paper while drawing the lines.

Euler tours
D EFINITION . A walk W = e e ::: e
1 2 e =e
n is a trail, if i 6 j for all 6 i=j
. An Euler trail of
G G
a graph is a trail that visits every edge once. A connected graph is eulerian, if it has a
G
closed trail containing every edge of . Such a trail is called an Euler tour.

W = e e ::: e
Notice that if 1 2 n is an Euler tour (and so G E = e ;e ;::: ;e
f1 2 n g), also
e e ::: e e ::: e
i i+1 n 1 i 1 is an Euler tour for all 2 i [1;n℄
. A complete proof of the following
Euler’s Theorem was first given by H IERHOLZER in 1873.
Theorem 3.1 (E ULER (1736), H IERHOLZER (1873)). A connected graph G is eulerian if and
only if every vertex has an even degree.

Proof. ()) Suppose W: u u!


?
is an Euler tour. Let 6v (= u)
be a vertex that occurs k times
W v v
in . Every time an edge arrives at , another edge departs from , and therefore G d (v) = 2k.
Also, G d (u)
is even, since W starts and ends at . u
G
(() Assume is a nontrivial connected graph such that G d (v)
is even for all 2 v G. Let
W = e e ::: en : v ! vn with
1 2 0
?
ei = vi vi
1

be a longest trail in G. It follows that all e = vn w 2 EG are among the edges of W , for,
otherwise, W could be prolonged to We. In particular, v = vn , that is, W is a closed trail.
0
(Indeed, if it were vn 6= v and vn occurs k times in W , then dG (vn ) = 2(k 1) + 1 and that
0
would be odd.)
If W G
is not an Euler tour, then, since is connected, there exists an edge f = viu 2 EG
i W
for some , which is not in . However, now
ei ::: ene ::: ei f
+1 1

is a trail in G, and it is longer than W . This contradiction to the choice of W proves the claim.
ut
3.1 Eulerian graphs 31

k
Example 3.1. The -cube Qk is eulerian for even integers k, because Qk is k-regular.
Theorem 3.2. A connected graph has an Euler trail if and only if it has at most two vertices
of odd degree.

Proof. If G has an Euler trail u ! v, then, as in the proof of Theorem 3.1, each vertex
?

w 2= fu;vg has an even degree.


Assume then that G is connected and has at most two vertices of odd degree. If G has no
vertices of odd degree then, by Theorem 3.1, G has an Euler trail. Otherwise, by the hand-
shaking lemma, every graph has an even number of vertices with odd degree, and therefore
G has exactly two such vertices, say u and v. Let H be a graph obtained from G by adding a
vertex w, and the edges uw and vw. In H every vertex has an even degree, and hence it has an
Euler tour, say u ! v ! w ! u. Here the beginning part u ! v is an Euler trail of G. u
? ?
t
The Chinese postman

The following problem is due to G UAN M EIGU (1962). Consider a village, where a postman
wishes to plan his route to save the legs, but still every street has to be walked through. This
problem is akin to Euler’s problem and to the shortest path problem.
G
Let be a graph with a weight function : E G ! R . The Chinese postman problem
+

G
is to find a minimum weighted tour in (starting from a given vertex, the post office).
G
If is eulerian, then any Euler tour will do as a solution, because such a tour traverses
each edge exactly once and this is the best one can do. In this case the weight of the optimal
G
tour is the total weight of the graph , and there is a good algorithm for finding such a tour:
Fleury’s algorithm:

 v G W
Let 0 2 be a chosen vertex, and let 0 be the trivial path on 0 . v
 Repeat the following procedure for i = 1;2;::: as long as possible: suppose a trail Wi =
e e ::: e
1 2 e =v v
i has been constructed, where j j 1 j.
e
Choose an edge i+1 (6 =e j for j [1;i℄
2 ) so that
e v
(i) i+1 has an end i , and
e G = G e ;::: ;e
(ii) i+1 is not a bridge of i f1 i g, unless there is no alternative.

(e) play no role in the eulerian case.


Notice that, as is natural, the weights

Theorem 3.3. If G is eulerian, then any trail of G constructed by Fleury’s algorithm is an


Euler tour of G.

Proof. Exercise. ut
3.2 Hamiltonian graphs 32

G
If is not eulerian, the poor postman has to walk at least one street twice. This happens,
e.g., if one of the streets is a dead end, and in general if there is a street corner of an odd
number of streets. We can attack this case by reducing it to the eulerian case as follows. An
edge e = uv G
will be duplicated, if it is added to parallel to an existing edge 0 e = uv with
the same weight, (e ) = (e)
0 .

4 3 4 3 4 3
3
3 3
3

1 1 1
2 2 2 2 2 2 2 2

Above we have duplicated two edges. The rightmost multigraph is eulerian.


There is a good algorithm by E DMONDS AND J OHNSON (1973) for the construction of
an optimal eulerian supergraph by duplications. Unfortunately, this algorithm is somewhat
complicated, and we shall skip it.

3.2 Hamiltonian graphs

In the connector problem we reduced the cost of a spanning graph to its minimum. There are
different problems, where the cost is measured by an active user of the graph. For instance,
in the travelling salesman problem a person is supposed to visit each town in his district,
and this he should do in such a way that saves time and money. Obviously, he should plan the
travel so as to visit each town once, and so that the overall flight time is as short as possible.
In terms of graphs, he is looking for a minimum weighted Hamilton cycle of a graph, the
vertices of which are the towns and the weights on the edges are the flight times. Unlike for
the shortest path and the connector problems no efficient reliable algorithm is known for the
travelling salesman problem. Indeed, it is widely believed that no practical algorithm exists
for this problem.

Hamilton cycles

P G
D EFINITION . A path of a graph is a Hamilton path,
P
if visits every vertex of G
once. Similarly, a cycle C
is
a Hamilton cycle, if it visits each vertex once. A graph is
hamiltonian, if it has a Hamilton cycle.

C : u ! u !    ! un is a Hamilton cycle, then so is ui ! ::: un !


Note that if 1 2
u ! ::: ui
1 1 for i 2 [1;n℄, and thus we can choose where to start the cycle.
each

Example 3.2. It is obvious that each Kn is hamiltonian whenever n  3. Also, as is easily


seen, Kn;m is hamiltonian if and only if n = m  2. Indeed, let Kn;m have a bipartition
3.2 Hamiltonian graphs 33

(X;Y ), where jX j = n and jY j = m. Now, each cycle in Kn;m has even length as the graph
is bipartite, and thus the cycle visits the sets X;Y equally many times, since X and Y are
stable subsets. But then necessarily jX j = jY j.

Unlike for eulerian graphs (Theorem 3.1) no good characterization is known for hamilto-
G
nian graphs. Indeed, the problem to determine if is hamiltonian is NP-complete. There are,
however, some interesting general conditions.

Lemma 3.1. If G is hamiltonian, then for every nonempty subset S  VG,


(G S)  jS j :
Proof. Let ; 6= S  VG , u 2 S , and let C : u ! u be a Hamilton cycle of G. Assume G S
?

has k connected components, Gi , i 2 [1;k℄. The case k = 1 is trivial, and hence suppose that
k > 1. Let ui be the last vertex of C that belongs to Gi, and let vi be the vertex that follows
ui in C . Now vi 2 S for each i by the choice of ui , and vj 6= vt for all j 6= t, because C is a
cycle and ui vi 2 EG for all i. Thus jS j  k as required. ut
Example 3.3. Consider the graph on the right. In G,
(G S) = 3 > 2 = jS j for the set S of black ver-
tices. Therefore G does not satisfy the condition of
Lemma 3.1, and hence it is not hamiltonian. Interest-
ingly this graph is (X;Y )-bipartite of even order with
jX j = jY j. It is also 3-regular.
Example 3.4. Consider the Petersen graph on the
right, which appears in many places in graph theory as
a counter example for various conditions. This graph
is not hamiltonian, but it does satisfy the condition
(G S) S S=
 j j for all 6 ;. Therefore the conclusion
of Lemma 3.1 is not sufficient to ensure that a graph is
hamiltonian.
The following theorem, due to O RE, generalizes an earlier result by D IRAC (1952).

Theorem 3.4 (O RE (1962)). Let G be a graph of order G  3, and let u;v 2 G be such that
dG (u) + dG (v)  G :
Then G is hamiltonian if and only if G + uv is hamiltonian.

Proof. Denote n = G . Let u;v 2 G be such that dG (u) + dG (v)  n. If uv 2 EG , then


there is nothing to prove. Assume thus that uv 2
= EG.
()) This is trivial since if G has a Hamilton cycle C , then C is also a Hamilton cycle of
G + uv.
(() Denote e = uv and suppose that G + e has a Hamilton cycle C . If C does not use the
edge e, then it is a Hamilton cycle of G. Suppose thus that e is on C . We may then assume
3.2 Hamiltonian graphs 34

thatC: u v u!
?
u=v
! . Now 1 ! 2 ! ! n v ::: v = v is a Hamilton path of G.
i 1<i<n
There exists an with such that i 2 G and uv E vi v 2 EG: For, otherwise,
1
d (v) < n d (u)
G G would contradict the assumption.

v1 v2 Æ Æ v i 1 v i Æ Æ v n

But now u = v ! vi ! vn ! vn
1
?
1 1 ! vi ! vi ! v = u is a Hamilton cycle in
?
+1 1
G. ut

Closure
D EFINITION . For a graph G, define inductively a sequence G ;G ;::: ;Gk of graphs such 0 1
that
G = G and Gi = Gi + uv ;
0 +1

where u and v are any vertices such that uv 2


= EG and dG (u)+dG (v)  G. This procedure
stops when no new edges can be added to Gk for some k , that is, in Gk , for all u;v 2 G either
i i i

uv 2 EG or dG (u) + dG (v) < G. The result of this procedure is the closure of G, and it
is denoted by l(G) (= Gk ) .
k k k

In each step of the construction of l(G)


there are usually alternatives which edge is to uv
be added to the graph, and therefore the above procedure is not deterministic. However, the
final result l(G)is independent of the choices.

Lemma 3.2. The closure l(G) is uniquely defined for all graphs G of order G  3.
Proof. Denote n = G . Suppose there are two ways to close G, say
H = G + fe ;::: ;er g and H 0 = G + ff ;::: ;fsg ;
1 1

where the edges are added in the given orders. Let Hi = G + fe ;::: ;ei g and Hi0 = G + 1
ff ;::: ;fig. For the initial values, we have G = H = H 0 . Let ek = uv be the first edge
1 0
such that ek 6= fi for all i. Then dH 1 (u)+dH 1 (v)  n, since ek 2 EH , but ek 2 = EH 1 .
0

By the choice of ek , we have Hk  H , and thus also dH 0 (u) + dH 0 (v)  n, which means
0k k k k

1
that e = uv must be in H 0 ; a contradiction. Therefore H  H 0 . Symmetrically, we deduce
that H 0  H , and hence H 0 = H . ut
Theorem 3.5. Let G be a graph of order G  3.
(i) G is hamiltonian if and only if its closure l(G) is hamiltonian.
(ii) If l(G) is a complete graph, then G is hamiltonian.

Proof. First, G  l(G) and G spans l(G), and thus if G is hamiltonian, so is l(G).
In the other direction, let G = G ;G ;::: ;Gk = l(G) be a construction sequence of the
0 1
closure of G. If l(G) is hamiltonian, then so are Gk ;::: ;G and G by Theorem 3.4. 1 1 0

The Claim (ii) follows from (i), since each complete graph is hamiltonian. ut
3.2 Hamiltonian graphs 35

G  3
Theorem 3.6. Let be a graph of order G  . Suppose that for all nonadjacent vertices u
and , Gv d (u) + d (v) 
G G
 G. Then is hamiltonian. In particular, if Æ(G)
 12 G, then is  G
hamiltonian.

Proof. Since Gd (u)+d (v) 


G  G for all nonadjacent vertices, we have l(G) = Kn for n =
 G
G , and thus is hamiltonian. The second claim is immediate, since now G d (u)+dG (v)  G
for all u;v G
2 whether adjacent or not. ut
Chvátal’s condition

The hamiltonian problem of graphs has attracted much attention, at least partly because the
problem has practical significance. (Indeed, the first example where DNA computing was
applied, was the hamiltonian problem.)
There are some general improvements of the previous results of this chapter, and quite
many improvements in various special cases, where the graphs are somehow restricted. We
become satisfied by two general results.

G
Theorem 3.7 (C HVÁTAL (1972)). Let be a graph with GV = v ;v ;::: ;vn g, for n  3,
f 1 2
d d d d = d (v )
ordered so that 1  2      n , for i i < n=2,
G i . If for every

di  i =) dn i  n i ; (3.1)

then G is hamiltonian.
G
Proof. First of all, we may suppose that is closed, G = l(G) G
, because is hamiltonian if
and only if l(G) G
is hamiltonian, and adding edges to does not decrease any of its degrees,
G G+e
that is, if satisfies (3.1), so does e
for every . We show that, in this case, G=K n , and
G
thus is hamiltonian.
Assume on the contrary that 6 G=K uv = E
n , and let d (u) d (v)
2 G with G  G be such that
d (u)+d (v)
G G is as large as possible. BecauseG is closed, d (u)+d (v) < n
we must have G G ,
d (u) = i < n=2 A = w vw = E ;w = v
and therefore G . Let f j 2 G 6 g. By our choice, G  d (w) i
w A
for all 2 , and, moreover,

jAj = (n 1) dG(v)  dG(u) = i :


Consequently, there are at least i vertices w with dG (w)  i, and so di  dG (u) = i.
Similarly, for each vertex from B = fw j uw 2 = EG ;w 6= ug, dG(w)  dG (v) <
n dG (u) = n i, and
jB j = (n 1) dG(u) = (n 1) i :
Also dG (u) < n i, and thus there are at least n i vertices w with dG (w) < n i.
Consequently, dn i < n i. This contradicts the obtained bound di  i and the condition
(3.1). ut
Note that the condition (3.1) is easily checkable for any given graph.
3.3 Matchings 36

3.3 Matchings

In matching problems we are given an availability relation between the elements of a set. The
problem is then to find a pairing of the elements so that each element is paired (matched)
uniquely with an available companion.
A special case of the matching problem is the marriage problem, which is stated as fol-
X Y
lows. Given a set of boys and a set of girls, under what condition can each boy marry a
girl who cares to marry him? This problem has many variations. One of them is the job as-
n m
signment problem, where we are given applicants and jobs, and we should assign each
applicant to a job he is qualified. The problem is that an applicant may be qualified for several
jobs, and a job may be suited for several applicants.

Maximum matchings

G M E
D EFINITION . For a graph , a subset G M
 G is a matching of , if contains no adjacent
edges. The two ends of an edge 2e M M
are matched under . A matching M
is a maximum
matching, if for no matching M M <M
0 , j j j j. 0

The two vertical edges on the right constitute a matching M


that is not a maximum matching, although you cannot add
any edges to M to form a larger matching. This matching
is not maximum because the graph has a matching of three
edges.

M
D EFINITION . A matching v G v
saturates 2 , if is an
M M
end of an edge in . Also, A V
saturates  G , if it sat-
v A M
urates every 2 . If V
saturates G , then M
is a perfect
matching.

It is clear that every perfect matching is maximum.


On the right the horizontal edges form a perfect matching.

D EFINITION . Let M be a matching of G. An odd path P =


e e ::: e k is M -augmented, if
1 2 2 +1

 P alternates between EG n M and M


(that is, e i 2 EG M and e i 2 M ), and
2 +1 2
 the ends of P are not saturated.

Lemma 3.3. If G is connected with (G)  2, then G is a path or a cycle.


Proof. Exercise. ut
3.3 Matchings 37

We start with a result that states a necessary and sufficient condition for a matching to
be maximal. One can use the first part of the proof to construct a maximum matching in an
iterative manner starting from any matching M M
and from any -augmented path.

Theorem 3.8 (B ERGE (1957)). A matching M of G is a maximum matching if and only if


there are no M -augmented paths in G.

Proof. ()) Let a matching M have an M -augmented path P = e e ::: e k in G. Here


1 2 2 +1
e ;e ;::: ;e k 2 M , e ;e ;::: ;e k 2= M . Define N  EG by
2 4 2 1 3 2 +1

N = (M n fe i j i 2 [1;k℄g) [ fe i j i 2 [0;k℄g :
2 2 +1

Now, N is a matching of G, and jN j = jM j + 1. Therefore M is not a maximum matching.


(() Assume N is a maximum matching, but M is not. Hence jN j > jM j. Consider the
subgraph H = G[M 4 N℄ for the symmetric difference M 4 N . We have dH (v)  2 for each
v 2 H , because v is an end of at most one edge in M and N . By Lemma 3.3, each connected
component A of H is either a path or a cycle.
Since no v 2 A can be an end of two edges from N or from M , each connected component
(path or a cycle) A alternates between N and M . Now, since jN j > jM j, there is a connected
component A of H , which has more edges from N than from M . This A cannot be a cycle,
because an alternating cycle is even, and it thus contains equally many edges from N and
M . Hence A: u ! v is a path, which starts and ends with an edge from N . Because A is a
?

connected component of H , the ends u and v are not saturated by M , and, consequently, A is
an M -augmented path. This proves the theorem. ut
Example 3.5. Consider the k -cube Qk for k  1. Each maximum matching of Qk has 2k 1

edges. Indeed, the matching M = f(0u;1u) j u 2 B k g, has 2k edges, and it is clearly


1 1

perfect.

Hall’s theorem

For a subsetS  VG of a graph G, denote


NG(S) = fv j uv 2 EG for some u 2 S g :
If G is (X;Y )-bipartite, and S  X , then NG (S)  Y .

The following result, known as the

Theorem 3.9 (H ALL (1935)). Let G be a (X;Y )-bipartite graph. Then G contains a matching
M X
saturating if and only if

jS j  jNG (S)j for all S  X: (3.2)


3.3 Matchings 38

Proof. ()) Let M


be a matching that saturates X . If jS j > jNG (S)j for some S  X , then
x S
not all 2 can be matched with different 2 y NG(S).
(() Let G satisfy Hall’s condition (3.2). We prove the claim by induction on jX j.
If jX j = 1, then the claim is clear. Let then jX j  2, and assume (3.2) implies the existence
of a matching that saturates every proper subset of X .
If jNG (S)j  jS j + 1 for every nonempty S  X with S 6= X , then choose an edge uv 2
EG with u 2 X , and consider the induced subgraph H = G fu;vg. For all S  X n fug,
jNH (S)j  jNG (S)j 1  jS j ;
and hence, by the induction hypothesis, H contains a matching M saturating X n fug. Now
M [ fuvg is a matching saturating X in G, as was required.
Suppose then that there exists a nonempty subset R  X with R 6= X such that
jNG(R)j = jRj. The induced subgraph H = G[R [ NG(R)℄ satisfies (3.2) (since G does),
1
and hence, by the induction hypothesis, H contains a matching M that saturates R (with the
1 1
other ends in NG (R)).
Also, the induced subgraph H = G[VG n A℄, for A = R [ NG (R), satisfies (3.2). Indeed,
2
if there were a subset S  X n R such that jNH2 (S)j < jS j, then we would have

jNG (S [ R)j = jNH2 (S)j + jNH1 (R)j < jS j + jNG(R)j = jS j + jRj = jS [ Rj


(since S \ R = ;), which contradicts (3.2) for G. By the induction hypothesis, H has a 2
matching M that saturates X n R (with the other ends in Y n NG (R)). Combining the match-
2
ings for H and H , we get a matching M [ M saturating X in G.
1 2 1 2 ut
Second proof. This proof of the direction (() uses Menger’s theorem. Let H be the graph
obtained from G by adding two new vertices x;y such that x is adjacent to each v 2 X and y
is adjacent to each v 2 Y . There exists a matching saturating X if (and only if) the number of
independent paths x ! y is equal to jX j. For this, by Menger’s theorem, it suffices to show
?

that every set S that separates x and y in H has at least jX j vertices.

Let S = A [ B , where A  X and B  Y . Now, vertices in x


y
X nA are not adjacent to vertices of Y nB , and hence we have X nA Y nB
NG(X nA)  B , and thus that jX nAj  jNG(X nA)j  jB j A B
using the condition (3.2).

We conclude that jS j = jAj + jB j  jX j. ut


Corollary 3.1 (F ROBENIUS (1917)). If G is a k -regular bipartite graph with k > 0, then G
has a perfect matching.

G k (X;Y )
Proof. Let be -regular k X =" =k Y
-bipartite graph. By regularity,  j j G  j j, and
X =Y
hence j j S X E S
j j. Let  . Denote by 1 the set of the edges with an end in , and by
E N (S)
2 the set of the edges with an end in E E k N (S) =
G . Clearly, 1  2 . Therefore,  j G j
E E =k S N (S) S G
j 2 j  j 1 j j j, and so j G j  j j. By Theorem 3.9, has a matching that saturates
X X=Y
. Since j j j j, this matching is necessarily perfect. ut
3.3 Matchings 39

Applications of Hall’s theorem


D EFINITION . Let S = S ;S ;::: ;S
f1 2 m g be a family of finite nonempty subsets of a set . S
S
( i need not be distinct.) A transversal (or a system of distinct representatives) of S is a
T S m
subset  of distinct elements one from each i . S
As an example, letS = [1;6℄ , and let 1 S = S = 1;2 S = 2;3
2 f g, 3 f g and 4 S =
f1;4;5;6 = S ;S ;S ;S
g. For S f 1 2 3 4g, the set T = 1;2;3;4
f g is a transversal. If we add
S = 2;3
the set 5 f g to S, then it is impossible to find a transversal for this new family.
The connection of transversals to the Marriage Theorem is as follows. Let S=Yand
X = [1;m℄ . Form an (X;Y ) G
-bipartite graph such that there is an edge (i;s)
if and only if
s S T
2 i. The possible transversals of S are then obtained from the matchings saturating M
X G Y
in by taking the ends in of the edges of . M
Corollary 3.2. Let S be a family of finite nonempty sets. Then S has a transversal if and only
k S k
if the union of any of the subsets i of S contains at least elements.
Example 3.6. An mn latin rectangle is an mn integer matrix M with entries Mij 2 [1;n℄
such that the entries in the same row and in the same column are different. Moreover, if m = n,
then M is a latin square. Note that in a m  n latin rectangle M , we always have that m  n.
We show the following: Let M be an m  n latin rectangle (with m < n). Then M can be
extended to a latin square by the addition of n m new rows.
The claim follows when we show that M can be extended to an (m+1)  n latin rectangle.
Let Ai  [1;n℄ be the set of those elements that do not occur in the i-th column of M . Clearly,
jAij = n m for each i, and hence Pi2I jAij = jI j(n m) for all subsets I  [1;n℄. Now
j[i2I Aij  jI j, since otherwise at least one element from the union would be in more than
n m of the sets Ai with i 2 I . However, each row has all the n elements, and therefore each i
is missing from exactly n m columns. By Marriage Theorem, the family fA ;A ;::: ;An g
1 2
has a transversal, and this transversal can be added as a new row to M . This proves the claim.

Tutte’s theorem
The next theorem is a classic characterization of perfect matchings.

G
D EFINITION . A connected component of a graph is said to be odd (even), if it has an odd
(even) number of vertices. Denote by odd (G)
the number of odd connected components in
G .

m(G) be the number of edges in a maximum matching of a graph G.


Denote by
Theorem 3.10 (Tutte-Berge Formula). Each maximum matching of a graph G has

m(G) = Smin G + jS j (G S) odd


V G 2 (3.3)

elements.
3.3 Matchings 40

Note that the condition in (ii) includes the case, where S = ;.


Proof. We prove the result for connected graphs. The result then follows for disconnected
graphs by adding the formulas for the connected components.
S V
We observe first that  holds in (3.3), since, for all  G ,

m(G)  jS j + m(G S)  jS j + jVG n S j 2 (G S) = G + jS j 2 (G S) :


odd odd

Indeed, each odd component of G S must have at least one unsaturated vertex.
The proof proceeds by induction on G . If G = 1, then the claim is trivial. Suppose that
G  2.
Assume first that there exists a vertex v 2 G such that v is saturated by all maximum
matchings. Then m(G v) = m(G) 1. For a subset S 0  G v , denote S = S 0 [ fv g. By
the induction hypothesis, for all S 0  G v ,

m(G) 1  12 (G 1) + jS 0j (G (S 0 [ fvg)) = 12 ((G + jS j (G S))) 1:


odd odd

The claim follows from this.


v
Suppose then that for each vertex , there is a maximum matching that does not saturate
v. We show that each maximum matching leaves exactly one vertex unsaturated. Suppose to
M
the contrary, and let u
be a maximum matching having two different unsaturated vertices
v
and , and choose M d (u;v)
so that the distance G d (u;v) 2
is as small as possible. Now G  ,
since otherwise uv E M M w
2 G could be added to ? , contradicting the maximality of . Let
u v
be an intermediate vertex on a shortest path ! . By assumption, there exists a maximum
N w N M N
matching that does not saturate . We can choose such that the intersection \ is
d (u;w) < d (u;v) d (w;v) < d (u;v) N
maximal. Since G G and G u v G , saturates both and .
N M
The (maximum) matchings and leave equally many vertices unsaturated, and hence there
x=w
exists another vertex 6 M saturated by N e = xy E
but which is unsaturated by . Let 2 G
M
be the edge in x y N N e
incident with . If is also unsaturated by , then [ f g is a matching,
N y=w
contradicting maximality of . It also follows that 6 . Therefore there exists an edge
e = yz N
0 z=x
in , where 6 N =N e e
. But now 0 0
[ f g n f g is a maximum matching that does
w N M N M
not saturate . However, \ N
 0 \ contradicts the choice of . Therefore, every
m(G) = ( 1)=2
maximum matching leaves exactly one vertex unsaturated, i.e., G .
S=
In this case, for ( 1)=2
;, the right hand side of (3.3) gets value G , and hence, by
the beginning of the proof, this must be the minimum of the right hand side. ut
For perfect matchings we have the following corollary, since for a perfect matching we
have m(G) = (1=2) G.

Theorem 3.11 (T UTTE (1947)). Let G be a nontrivial graph. The following are equivalent.
G
(i) has a perfect matching.
S V (G S)  jS j.
(ii) For every proper subset  G , odd
3.3 Matchings 41

Tutte’s theorem does not provide a good algorithm for constructing a perfect matching,
because the theorem requires ‘too many cases’. Its applications are mainly in the proofs of
other results that are related to matchings. There is a good algorithm due to E DMONDS (1965),
which uses ‘blossom shrinkings’, but this algorithm is somewhat involved.

Example 3.7. The simplest connected graph that has no perfect matching is the path P . Here
4
removing the middle vertex creates two odd components.
The next 3-regular graph (known as the Sylvester
graph) does not have a perfect matching, because
removing the black vertex results in a graph with
three odd connected components. This graph is
the smallest regular graph with an odd degree that
has no perfect matching.

Using Theorem 3.11 we can give a short proof of P ETERSEN’s result for 3-regular graphs
(1891).

Theorem 3.12 (P ETERSEN (1891)). If G is a bridgeless 3-regular graph, then it has a perfect
matching.

S V G i [1;t℄
Proof. Let be a proper subset of G , and let i , 2 , be the odd connected components
ofG S m G
. Denote by i the number of edges with one end in i and the other in . SinceS G
is 3-regular, X X
d (v) = 3 
G  Gi and G d (v) = 3 S :
j j
v2Gi v2S
The first of these implies that
X
mi = dG(v) 2  "G i

v2Gi
m =1
is odd. Furthermore, i 6 G
, because has no bridges, and therefore mi  3. Hence the
number of odd connected components of G Ssatisfies

t  3 mi  13 dG (v) = jS j ;
1 X t X

i =1 v2S
and so, by Theorem 3.11, G has a perfect matching. ut
Stable Marriages
G
D EFINITION . Consider a bipartite graph (X;Y )
with a bipartition of the vertex set. In
x G
addition, each vertex 2 N (x)
supplies an order of preferences of the vertices of G . We
u< v x
write v u u;v Y x X u;v X x Y
x , if prefers to . (Here 2 , if 2 , and 2 , if 2 .) A
M G
matching xy = M x X
of is said to be stable, if for each unmatched pair 2 (with 2 and
y Y x y
2 ), it is not the case that and prefer each other better than their matched companions:
xv 2 M and y <x v; or uy 2 M and x <y u:
3.3 Matchings 42

We omit the proof of the next theorem.

Theorem 3.13. For bipartite graphs G, a stable matching exists for all lists of preferences.
Example 3.8. That was the good news. There is a catch, of 4 8

course. A stable matching need not saturate X Y


and . For 3 7
instance, the graph on the right does have a perfect matching
4
(of edges).
2

1
6

Suppose the preferences are the following:

1: 5 2: 6 < 8 < 7 3: 8 < 5 4: 7 < 5


5: 4 < 1 < 3 6: 2 7: 2 < 4 8: 3 < 2
Then there is no stable matchings of four edges. A stable matching of G is the following:
M = f28;35;47g; which leaves 1 and 6 unmatched. (You should check that there is no stable
matching containing the edges 15 and 26.)

Theorem 3.14. Let G = Kn;n be a complete bipartite graph. Then G has a perfect and stable
matching for all lists of preferences.

Proof. Let the bipartition be (X;Y ). The algorithm by GALE AND SHAPLEY (1962) works
as follows.
Procedure.
M =
Set 0 ;, and P(x) = x X
; for all 2 .
Then iterate the following process until all vertices are saturated:
Choose a vertex 2 x X M y Y
that is unsaturated in i 1 . Let 2 be the most
x
preferred vertex for such that 2 y = P(x)
.
(1) Add y to P(x).
(2) If y is not saturated, then set Mi = Mi [ fxy g.
1
(3) If zy 2 Mi and z <y x, then set Mi = (Mi n fzy g) [ fxy g.
1 1

First of all, the procedure terminates, since a vertex x 2 X takes part in the iteration at
most n times (once for each y 2 Y ). The final outcome, say M = Mt , is a perfect matching,
since the iteration continues until there are no unsaturated vertices x 2 X .
Also, the matching M = Mt is stable. Note first that, by (3), if xy 2 Mi and zy 2 Mj
for some x 6= z and i < j , then x <y z . Assume the that xy 2 M , but y <x z for some
z 2 Y . Then xy is added to the matching at some step, xy 2 Mi, which means that z 2 P(x)
at this step (otherwise x would have ‘proposed’ z ). Hence x took part in the iteration at an
earlier step Mk , k < i (where z was put to the list P(x), but xz was not added). Thus, for
some u 2 X , uz 2 Mk and x <z u, and so in M the vertex z is matched to some w with
1
x <z w.
Similarly, if x <y v for some v 2 X , then y <v z for the vertex z 2 Y such that vz 2 M .
ut
4

Colourings

4.1 Edge colourings

G
Colourings of edges and vertices of a graph are useful, when one is interested in classifying
relations between objects.
G
There are two sides of colourings. In the general case, a graph with a colouring is
given, and we study the properties of this pair G = (G; )
. This is the situation, e.g., in
transportation networks with bus and train links, where the colour (buss, train) of an edge
tells the nature of a link.
G
In the chromatic theory, is first given and then we search for a colouring that the satisfies
required properties. One of the important properties of colourings is ‘properness’. In a proper
colouring adjacent edges or vertices are coloured differently.

Edge chromatic number

k
D EFINITION . A -edge colouring : E
G! [1;k℄ G
of a graph is an assignment of colours k
G G
to its edges. We write to indicate that has the edge colouring .
v G
A vertex 2 and a colour 2 i [1;k℄are incident with each other, if (vu) = i
for some
vu E v G i i
2 G. If 2 is not incident with a colour , then is available for . v

The colouring is proper, if no two adjacent edges obtain the same colour: 1 6 (e ) = (e )
2
e e
for adjacent 1 and 2 .
The edge chromatic number 0  (G) G
of is defined as

0(G) = minfk j k
there exists a proper -edge colouring of Gg :
A k -edge colouring can be thought of as a partition fE ;E ;::: ;Ek g of EG , where
1 2
Ei = fe j (e) = ig. Note that it is possible that Ei = ; for some i. We adopt a simplified
notation
G [i ;i ;::: ;it ℄ = G[Ei1 [ Ei2 [    [ Ei ℄
1 2 t

for the subgraph of G consisting of those edges that have a colour i , i , . . . , or it . That is, the
1 2
edges having other colours are removed.

Ei in a proper k-edge colouring is a matching. Moreover, for


Lemma 4.1. Each colour set
each graph , G (G)  (G)  "G.
 0
Proof. This is clear. ut
4.1 Edge colourings 44

Example 4.1. The three numbers in Lemma 4.1 can be equal. This happens, for instance,
when G=K 1;n is a star. But often the inequalities are strict.

A star, and a graph with 0(G) = 4.


Optimal colourings

We show that for bipartite graphs the lower bound is always optimal: 0(G) = (G).
G
Lemma 4.2. Let be a connected graph that is not an odd cycle. Then there exists a 2-edge
colouring (that need not be proper), in which both colours are incident with each vertex with v
d (v) 2
G  .
Proof. Assume that G is nontrivial; otherwise, the claim is trivial.
(1) Suppose first that G is eulerian. If G is an even cycle, then a 2-edge colouring exists
as required. Otherwise, since now dG (v) is even for all v , G has a vertex v with dG (v )  4.
1 1
Let e e ::: et be an Euler tour of G, where ei = vi vi (and vt = v ). Define
1 2 +1 +1 1

(
(ei ) = 2;1; ifif ii isis odd ;
even :

Hence the ends of the edges ei for i 2 [2;t 1℄ are incident with both colours. All vertices are
among these ends. The condition dG (v )  4 guarantees this for v . Hence the claim holds in
1 1
the eulerian case.
(2) Suppose then that G is not eulerian. We define a new graph G 0 by adding a vertex v 0
to G and connecting v to each v 2 G of odd degree.
0

In G every vertex has even degree including v (by


0 0
the handshaking lemma), and hence G is eulerian. Let
0
e e ::: et be an eulerian tour of G , where ei = vivi .
0 1 0 +1 1

By the previous case, there is a required colouring of G


2

as above. Now, restricted to EG is a colouring of G as


0
v0 1 2
ut
required by the claim, since each vertex vi with odd degree 2
1

dG(vi )  3 is entered and departed at least once in the tour


by an edge of the original graph G: ei ei .
1

D EFINITION . For a k -edge colouring of G, let

(v) = jfi j v is incident with i 2 [1;k℄gj :


A k -edge colouring is an improvement of , if
4.1 Edge colourings 45
X X
(v) > (v) :
v2G v2G
Also, is optimal, if it cannot be improved.
Notice that we always have (v) d (v)
 G , and if is proper, then (v) = d (v)
G , and

in this case is optimal. Thus an improvement of a colouring is a change towards a proper
G k
colouring. Note also that a graph always has an optimal -edge colouring, but it need not
k
have any proper -edge colourings.
The next lemma is obvious.

Lemma 4.3. An edge colouring of G is proper if and only if (v) = dG (v) for all vertices
v 2 G.
k G v G
Lemma 4.4. Let be an optimal -edge colouring of , and let 2 . Suppose that the
i v j v
colour is available for , and the colour is incident with at least twice. Then the connected
H G [i;j℄
component of v
that contains , is an odd cycle.

Proof. Suppose the connected component H


is not an odd cycle. By Lemma 4.2, H
has a
2-edge colouring : E
H ! f g i;j
, in which both i j
and are incident with each vertex with x
d (x) 2
H 1 2 i j
 . (We have renamed the colours and to and .) We obtain a recolouring of
G as follows: (
(e) = (e); e E ;
if 2 H
(e); e = E :
if 2 H
Since dH (v)  2 (by the assumption on the colour j ) and in both colours i and j are
now incident with v , (v) = (v) + P 1. Furthermore, Pby the construction of , we have
(u)  (u) for all u 6= v. Therefore u2G (u) > u2G (u), which contradicts the
optimality of . Hence H is an odd cycle. ut
Theorem 4.1 (KÖNIG (1916)). If G is bipartite, then 0 (G) = (G).

Proof. Let be an optimal -edge colouring of a bipartite G, where  = (G). If there


were a v 2 G with (v) < dG (v), then by Lemma 4.4, G would contain an odd cycle. But a
bipartite graph does not contain such cycles. Therefore, for all vertices v , (v) = dG (v). By
Lemma 4.3, is a proper colouring, and  = 0 (G) as required. ut
Vizing’s theorem
In general we can have 0  (G) > (G) as one of our examples did show. The following
important theorem, due to V IZING, shows that the edge chromatic number of a graph missesG
(G) by at most one colour.

Theorem 4.2 (V IZING (1964)). For any graph G, (G)  0 (G)  (G) + 1.
Proof. Let  = (G). We need only to show that 0 (G)   + 1. Suppose on the contrary
that 0 (G) >  + 1, and let be an optimal ( + 1)-edge colouring of G.
4.1 Edge colourings 46

d (u) <  + 1 < 0(G) for all u 2 G, and so


We have (trivially) G
Claim 1. For each u 2 G, there exists an available colour b(u) for u.
Moreover, by the counter hypothesis, is not a proper colouring, and hence there exists a
v 2 G with (v) < dG(v), and hence a colour i that is incident with v at least twice, say
1

(vu ) = i = (vx) : 1 1 (4.1)

Claim 2. There is a sequence of vertices u ;u ;::: such that


1 2

(vuj ) = ij and ij = b(uj ) :+1

u
Indeed, let 1 be as in (4.1). Assume we have already found the vertices 1 j , with u ;::: ;u
j 1
 , such that the claim holds for these. Suppose, contrary to the claim, that is not v
incident with j b(u ) = i
j +1 .
We can recolour the edges ` by `+1 for 2 vu i , and ` [1;j℄
ur 1
ur

obtain in this way an improvement of . Here gains a new v
i u
colour j +1 . Also, each ` gains a new colour `+1 (and may i ..
ir = it+1
.

i u
..
loose the colour ` ). Therefore, for each ` either its num- . ir 1
ber of colours remains the same or it increases by one. This v it ut

contradicts the optimality of , and proves Claim 2. u2 i2
i1 i1
t
Now, let be the smallest index such that for some , u 1 r<t
x
i =i
t+1 r . Such an index exists,tbecause G is finite.d (v)
ur
ur 1
Let be a recolouring of G such that for 1  j  r 1,
(vuj ) = ij , and for all other edges e, (e) = (e).
+1 . ir = it+1
..
.
ir
Claim 3. is an optimal ( + 1)-edge colouring of G.
..

v it ut
Indeed, (v) = (v) and (u)  (u) for all u, since u2 i3
each uj (1  j  r 1) gains a new colour ji although it +1
i2 i1
may loose one of its old colours. u1
x

ur

Let then the colouring be obtained from by recolouring ur 1
vu i
the edges j by j +1 for   . Now, r j t vut is recoloured ..
by ri =i t+1 . ..
. ir
ir+1
.

Claim 4. is an optimal ( + 1)-edge colouring of G. v ir ut


Indeed, the fact ir = it ensures that ir is a new colour
u2 i3
+1 i2 i1
incident with ut , and thus that (ut )  (ut ). For all other u1
vertices, (u)  (u) follows as for . x
4.2 Ramsey Theory 47

i = b(v)
By Claim 1, there is a colour 0 v
that is available for . By Lemma 4.4, the connected
H G [i ;i ℄ H G [i ;i ℄ v
components 1 of 0 r and 2 of 0 r containing the vertex are cycles, that is,
H (vu )P (u v) H
1 is a cycle r 1 1 r and 2 is a cycle (vu )P (u v) P :u
r 1 2 t , where both 1 r 1 ! r u?

P :u
and 2 r 1 ! ?
u P P
t are paths. However, the edges of 1 and 2 have the same colours with
i i P u P
respect to and (either 0 or r ). This is not possible, since 1 ends in r while 2 ends in
u
a different vertex t . This contradiction proves the theorem. ut
Example 4.2. We show that 0 (G) = 4 for the Petersen graph. Indeed, by Vizing’ theorem,
0(G) = 3 or 4. Suppose 3 colours suffice. Let C : v ! ::: ! v ! v be the outer cycle
1 5 1
and C 0 : u ! ::: ! u ! u the inner cycle of G such that vi ui 2 EG for all i.
1 5 1

Observe that every vertex is adjacent to all colours 1;2;3. Now C uses one colour (say 1)
once and the other two twice. This can be done uniquely (up to permutations):

v !v !v !v !v !v :
1
1
2
2
3
3
4
2
5
3
1

Hence v ! u , v ! u , v ! u , v ! u , v ! u . However, this means that 1 cannot


2 3 1 1 1
1 1 2 2 3 3 4 4 5 5
be a colour of any edge in C 0 . Since C 0 needs three colours, the claim follows.

Edge Colouring Problem. Vizing’s theorem (nor its present proof) does not offer any char-
acterization for the graphs, for which 0  (G) = (G) + 1
. In fact, it is one of the famous
open problems of graph theory to find such a characterization. The answer is known (only)
for some special classes of graphs. By H OLYER (1981), the problem whether 0 is  (G) (G)
or(G) + 1 is NP-complete.

The proof of Vizing’s theorem can be used to obtain a proper colouring of with at most G
(G) + 1 colours, when the word ‘optimal’ is forgotten: colour first the edges as well as you
can (if nothing better, then arbitrarily in two colours), and use the proof iteratively to improve
the colouring until no improvement is possible – then the proof says that the result is a proper
colouring.

4.2 Ramsey Theory

In general, Ramsey theory studies unavoidable patterns in combinatorics. We consider an


instance of this theory mainly for edge colourings (that need not be proper). A typical example
of a Ramsey property is the following: given 6 persons each pair of whom are either friends
or enemies, there are then 3 persons who are mutual friends or mutual enemies. In graph
theoretic terms this means that each colouring of the edges of 6 with 2 colours results in a K
monochromatic triangle.

Turan’s theorem for complete graphs

We shall first consider the problem of finding a general condition for p to appear in a graph. K
K
It is clear that every graph contains 1 , and that every nondiscrete graph contains 2 . K
4.2 Ramsey Theory 48

p
D EFINITION . A complete -partite graph G
p
consists of discrete and disjoint induced sub-
G ;G ;::: ;G
graphs 1 2 G
p  , where uv E2 G
u v
if and only if and belong to different parts,
G G i=j
i and j with 6 .

p
Note that a complete -partite graph is com-
G i
pletely determined by its discrete parts i , 2
[1;p℄.

Let p  3, and let H = Hn;p be the complete (p 1)-partite graph of order n = t(p 1)+r,
where r 2 [1;p 1℄ and t  0, such that there are r parts H ;::: ;Hr of order t + 1 and
1
p 1 r parts Hr ;::: ;Hp of order t (when t > 0). (Here r is the positive residue of n
+1 1
modulo (p 1), and is thus determined by n and p.)
By its definition, Kp * H . One can compute that the number "H of edges of H is equal to
 
p 2 r
T(n;p) = 2(p 1) n 2 1 p 1 :
2 r (4.2)

The next result shows that the above bound T(n;p) is optimal.

Theorem 4.3 (T URÁN (1941)). If a graph G of order n has "G > T(n;p) edges, then G
contains a complete subgraph Kp .

Proof. Let n = (p 1)t + r for 1  r  p 1 and t  0. We prove the claim by induction


on t. If t = 0, then T(n;p) = n(n 1)=2, and there is nothing to prove.
Suppose then that t  1, and let G be a graph of order n such that "G is maximum subject
to the condition Kp * G.
Now G contains a complete subgraph G[A℄ = Kp , since adding any one edge to G
1
results in a Kp , and p 1 vertices of this Kp induce a subgraph Kp  G. 1

Each v 2 = A is adjacent to at most p 2 vertices of A; otherwise G[A [ fvg℄ = Kp.


Furthermore, Kp * G A, and G A = n p + 1. Because n p + 1 = (t 1)(p 1) + r ,
we can apply the induction hypothesis to obtain "G A  T(n p + 1;p). Now

"G  T(n p + 1;p) + (n p + 1)(p 2) + (p 1)(p 2


2) = T(n;p) ;
which proves the claim. ut
K , we have the following interesting case.
When Theorem 4.3 is applied to triangles 3

Corollary 4.1 ( M ANTEL (1907)). If a graph G has "G > G edges, then G contains a
1 2

triangle K .
4
3
4.2 Ramsey Theory 49

Ramsey’s theorem

D EFINITION . Let G
be an edge colouring of . A subgraph H  G is said to be (i-)
H
monochromatic, if all edges of have the same colour . i
The following theorem is one of the jewels of combinatorics.

p;q 2
Theorem 4.4 (R AMSEY (1930)). Let  be any integers. Then there exists a (smallest)
integer R(p;q) n R(p;q)
such that for all  , any 2-edge colouring of n ! K [1;2℄
contains a
1 K 2 K
-monochromatic p or a -monochromatic q .

Before proving this, we give an equivalent statement. Recall that a subset X  VG is


G[X℄
stable, if is a discrete graph.

p;q 2
Theorem 4.5. Let  be any integers. Then there exists a (smallest) integer R(p;q)
such
n R(p;q)
that for all  G n
, any graph of order contains a complete subgraph of order or p
q
a stable set of order .

Be patient, this will follow from Theorem 4.6. The number R(p;q)
is known as the Ram-
p q
sey number for and .
R(p;2) = p
It is clear that and R(2;q) = q.
Theorems 4.4 and 4.5 follow from the next result which shows (inductively) that an upper
bound exists for the Ramsey numbers R(p;q)
.

Theorem 4.6 (E RDÖS and S ZEKERES (1935)). The Ramsey number R(p;q) exists for all
p;q 2
 , and
R(p;q)  R(p;q 1) + R(p 1;q) :
Proof. We use induction on p + q . It is clear that R(p;q) exists for p = 2 or q = 2, and it is
thus exists for p + q  5.
It is now sufficient to show that if G is a graph of order R(p;q 1) + R(p 1;q), then it
has a complete subgraph of order p or a stable subset of order q .
Let v 2 G, and denote by A = VG n (NG (v) [ fv g) the set of vertices that are not
adjacent to v . Since G has R(p;q 1) + R(p 1;q) 1 vertices different from v , either
jNG(v)j  R(p 1;q) or jAj  R(p;q 1) (or both).
Assume first that jNG (v)j  R(p 1;q). By the definition of Ramsey numbers, G[NG (v)℄
contains a complete subgraph B of order p 1 or a stable subset S of order q . In the first case,
B [ fvg induces a complete subgraph Kp in G, and in the second case the same stable set of
order q is good for G.
If jAj  R(p;q 1), then G[A℄ contains a complete subgraph of order p or a stable subset
S of order q 1. In the first case, the same complete subgraph of order p is good for G, and
in the second case, S [ fv g is a stable subset of G of q vertices. This proves the claim. ut
A concrete upper bound is given in the following result.
4.2 Ramsey Theory 50

Theorem 4.7 ( E RDÖS and S ZEKERES (1935)). For all p;q  2,


 
R(p;q)  p +p q 1 2 :
Proof. For p = 2 q = 2, the claim is clear. We use induction on p + q for the general
or
p;q  3. By Theorem 4.6 and the induction hypothesis,
statement. Assume that
R(p;q)  R(p;q 1)+ R(p

1;q)   
 p +p q 1 3 + p +p q 2 3 = p +p q 1 2 ;
which is what we wanted. ut
In the table below we give some known values and estimates for the Ramsey numbers
R(p;q) . As can be read from the table1 , not so much is known about these numbers.

pnq 3 4 5 6 7 8 9 10
3 6 9 14 18 23 28 36 40-43
4 9 18 25 35-41 49-61 55-84 69-115 80-149
5 14 25 43-49 58-87 80-143 95-216 121-316 141-442

The first unknown R(p;p) (where p = q ) is for p = 5. It has been verified that 43 
R(5;5)  49, but to determine the exact value is an open problem.
Generalizations
Theorem 4.4 can be generalized as follows.
q 2
Theorem 4.8. Let i  be integers for 2 i [1;k℄ with k  2. Then there exists an inte-
R = R(q ;q ;::: ;q )
ger 1 2 k such that for all n  R, any k-edge colouring of Kn has an
i K i
-monochromatic qi for some .

k
Proof. The proof is by induction on . The case k=2 k>2
is treated in Theorem 4.4. For ,
we show that R(q ;::: ;q ) R(q ;::: ;q ;p)
1 k  1 k 2 , where p = R(q ;q )
k 1 k .
Let n = R(q ;::: ;q ;p)
1 k 2 , and let : E
Kn ! [1;k℄
be an edge colouring. Let
: E Kn ! [1;k 1℄
be obtained from by identifying the colours k 1 kand :
(
(e) = k (e)1 ifif (e) <k 1;
(e) = k 1 or k :
By the induction hypothesis, Kn has an i-monochromatic Kq for some 1  i  k 2 (and we
are done, since this subgraph is monochromatic in Kn ) or Kn has a (k 1)-monochromatic
i

subgraph H = Kp . In the latter case, by Theorem 4.4, H and thus Kn has a (k 1)-
monochromatic or a k -monochromatic subgraph, and this proves the claim. ut
1 S.P. R ADZISZOWSKI, Small Ramsey numbers, Electronic J. of Combin., 2000 on the Web
4.2 Ramsey Theory 51

Since for each graphH , H  Km for m = H , we have


Corollary 4.2. Let k  2 and H ;H ;::: ;Hk be arbitrary graphs. Then there exists an inte-
1 2
ger R(H ;H ;::: ;Hk ) such that for all complete graphs Kn with n  R(H ;H ;::: ;Hk )
1 2 1 2
and for all k -edge colourings of Kn , Kn contains an i-monochromatic subgraph Hi for
some i.

This generalization is trivial from Theorem 4.8. However, the generalized Ramsey num-
bers R(H ;H ;::: ;H )
1 2 k can be much smaller than their counter parts (for complete graphs)
in Theorem 4.8.

Example 4.3. We leave the following statement as an exercise: If T is a tree of order m, then
R(T;Kn) = (m 1)(n 1) + 1 ;
that is, any graph G of order at least R(T;Kn ) contains a subgraph isomorphic to T , or the
complement of G contains a complete subgraph Kn .

Examples of Ramsey numbers

Some exact values are known in Corollary 4.2, even in more general cases, for some dear
graphs (see R ADZISZOWSKI’s survey). Below we list some of these results for cases, where
the graphs are equal. To this end, let

Rk (G) = R(G;G;::: ;G) (k times G):


The best known lower bound of R (G) for connected graphs was obtained by B URR AND
2
E RDÖS (1976),  
R (G)  3 4 G 1
(G connected):
2

Here is a list of some special cases:

R (Pn ) = n + n2 1;
j k
2
8
<6
> if n = 3 or n = 4;
R (Cn ) = >2n 1 if n  5 and n odd ;
2
:
3n=2 1 if n  6 and n even;
(
R (K ;n ) = 2n2n 1 if n is even;
if n is odd;
2 1

R (K ; ) = 10; R (K ; ) = 18:
2 23 2 33

The values R (K ;n ) are known for n  16, and in general, R (K ;n )  4n 2. The value
2 2 2 2
R (K ; ) is either 65 or 66.
2 2 17

Let Wn denote the wheel on n vertices. It is a cycle Cn , where a vertex v with degree
1
n 1 is attached. Note that W = K . Then R (W ) = 15 and R (W ) = 17:
4 4 2 5 2 6
4.3 Vertex colourings 52

For three colours, much less is known. In fact, the only nontrivial result for complete
R (K ) = 17
graphs is: 3 3 . Also, 128 R (K ) 235 385 R (K )
 3 4  , and  3 5 , but no nontrivial
R (K ) C
upper bound is known for 3 5 . For the square 4 , we know that 3 4 R (C ) = 11.
R (K ) k 4 n 3
Needless to say that no exact values are known for k n for  and  .
It follows from Theorem 4.4 that for any complete Kn , there exists a graph G (well, any
sufficiently large complete graph) such that any 2-edge colouring of G has a monochromatic
(induced) subgraph Kn . Note, however, that in Corollary 4.2 the monochromatic subgraph Hi
is not required to be induced.
The following impressive theorem improves the results we have mentioned in this chapter
and it has a difficult proof.
Theorem 4.9 (D EUBER, E RDÖS, H AJNAL, P ÓSA, and RÖDL (around 1973)). Let be any H
G 2 G
graph. Then there exists a graph such that any -edge colouring of has an monochromatic
induced subgraph . H
Example 4.4. As an application of Ramsey’s theorem, we shortly describe Schur’s theorem.
1;4;10;13 ; 2;3;11;12 ; 5;6;7;8;9
For this, consider the partition f g f g f =
g of the set N 13
[1;13℄. We observe that in no partition class there are three integers such that x+y = z .
However, if you try to partition N 14 into three classes, then you are bound to find a class,
where x+y =z has a solution.
S CHUR (1916) solved this problem in a general setting. The following gives a short proof
using Ramsey’s theorem.
n 1
For each  , there exists an integer S(n)
such that any partition S ;::: ;Sn of N S n
1 ( ) has
S
a class i containing two integers x;y
such that x+y S
2 i.
Indeed, let S(n) = R(3;3;::: ;3), where 3 occurs n times, and let K be a complete on
N S n . For a partition S ;::: ;Sn of N S n , define an edge colouring of K by
( ) 1 ( )

(ij) = k; if ji j j 2 Sk :
By Theorem 4.8, K has a monochromatic triangle, that is, there are three vertices 1  i <
j < t  S(n) such that t j;j i;t i 2 Sk for some k. But (t j) + (j i) = t i
proves the claim.

There are quite many interesting corollaries to Ramsey’s theorem in various parts of math-
ematics including not only graph theory, but also, e.g., geometry and algebra, see

R.L. G RAHAM , B.L. ROTHSCHILD AND J.L. S PENCER, “Ramsey Theory”, Wiley, (2nd ed.)
1990.

4.3 Vertex colourings


G
The vertices of a graph can also be classified using colourings. These colourings tell that
certain vertices have a common property (or that they are similar in some respect), if they
share the same colour. In this chapter, we shall concentrate on proper vertex colourings, where
adjacent vertices get different colours.
4.3 Vertex colourings 53

The chromatic number

D EFINITION . A k -colouring (or a k -vertex colouring) of a graph G is a mapping : VG !


[1;k℄. The colouring is proper, if adjacent vertices obtain a different colour: for all uv 2
EG, we have (u) 6= (v). A colour i 2 [1;k℄ is said to be available for a vertex v, if no
neighbour of v is coloured by i.
A graph G is k -colourable, if there is a proper k -colouring for G. The (vertex) chromatic
number (G) of G is defines as

(G) = minfk j there exists a proper k-colouring of Gg :


If (G) = k , then G is k -chromatic.

Each proper vertex colouring : VG ! [1;k℄ provides a partition fV ;V ;::: ;Vk g of the
1 2
V
vertex set G , where i f j V = v (v) = ig.
Example 4.5. The graph on the right, which is often called a
7 3
wheel (of order ), is -chromatic.

G 2
By the definitions, a graph is -colourable if and only if it
is bipartite.
Again, the ‘names’ of the colours are immaterial:

k G 
Lemma 4.5. Let be a proper -colouring of , and let be any permutation of the colours.
Then the colouring =  k
is a proper -colouring of . G
Proof. Indeed, if : VG ! [1;k℄ is proper, and if : [1;k℄ ! [1;k℄ is a bijection, then
uv 2 EG implies that (u) 6= (v), and hence also that  (u) 6=  (v). It follows that 
is a proper colouring. ut
Example 4.6. A graph is triangle-free, if it has no subgraphs isomorphic to K . We show
3
that there are triangle-free graphs with arbitrarily large chromatic numbers.
The following construction is due to G RÖTZEL: Let G be any triangle-free graph with
VG = fv ;v ;::: ;vn g. Let Gt be a new graph obtained by adding n + 1 new vertices v and
1 2
u ;u ;::: ;un such that Gt has all the edges of G plus the edges uiv and uix for all x 2 N(vi )
1 2
and for all i 2 [1;n℄.
Claim. Gt is triangle-free and it is k + 1-chromatic
Indeed, let U = fu ;::: ;un g. We show first that Gt is triangle-free. Now, U is stable, and
1
so a triangle contains at most (and thus exactly) one vertex ui 2 U . If fui ;vj ;vk g induces a
triangle, so does fvi ;vj ;vk g by the definition of Gt , but the latter triangle is already in G; a
contradiction.
For the chromatic number we notice first that (Gt )  (k+1). If is a proper k-colouring
G
of , extend it by setting i (u ) = (v )
i and (v) = k + 1.
4.3 Vertex colourings 54

Secondly, (G ) > k


t k
. Assume that is a proper -colouring of Gt, say with (v) = k.
Then (u ) = k
i 6 . Recolour v (u )
each i by i . This gives a proper (k 1)-colouring to G; a
(G ) = k + 1
contradiction. Therefore t .
Now using inductively the above construction starting from the triangle-free graph K , we
2
obtain larger triangle -free graphs with high chromatic numbers.

Critical graphs

k
D EFINITION . A -chromatic graph G is said to be k-critical, if (H) < k for all H  G
H=G
with 6 .

In a critical graph an elimination of any edge and of any vertex will reduce the chromatic
number: (G e) < (G) (G v) < (G) e E
and v G
for 2 G and 2 . Each n is - K n
K (uv)
critical, since in n u v
the vertices and can gain the same colour.

Example 4.7. The graph K = P is the only 2-critical graph. The 3-critical graphs are ex-
2 2
actly the odd cycles C n for n  1, since a 3-chromatic G is not bipartite, and thus must
2 +1
have a cycle of odd length.

Theorem 4.10. If G is k-critical for k  2, then it is connected, and Æ(G)  k 1.


Proof. Note that for any graph G with the connected components G ;G ;::: ;Gm , (G) =
1 2
maxf(Gi) j i 2 [1;m℄g : Connectivity claim follows from this observation.
Let then G be k -critical, but Æ(G) = dG (v)  k 2 for v 2 G. Since G is critical, there
is a proper (k 1)-colouring of G v . Now v is adjacent to only Æ(G) < k 1 vertices. But
there are k colours, and hence there is an available colour i for v . If we recolour v by i, then a
proper (k 1)-colouring is obtained for G; a contradiction. ut
The case (iii) of the next theorem is due to S ZEKERES AND W ILF (1968).

Theorem 4.11. Let G be any graph with k = (G).


(i) G has a k -critical subgraph H .
(ii) G has at least k vertices of degree  k 1.
(iii) k  1 + maxH G Æ(H).

Proof. For (i), we observe that a k -critical subgraph H  G is obtained by removing vertices
and edges from G as long as the chromatic number remains k .
For (ii), let H  G be k -critical. By Theorem 4.10, dH (v)  k 1 for every v 2 H .
Of course, also dG (v)  k 1 for every v 2 H . The claim follows, because, clearly, every
k-critical graph H must have at least k vertices.
For (iii), let H  G be k -critical. By Theorem 4.10, (G) 1  Æ(H), which proves this
claim. ut
4.3 Vertex colourings 55

v
Lemma 4.6. Let be a cut vertex of a connected graph , and letG Ai, for i 2 [1;m℄, be the
connected components of G v . Denote i G = G[A v℄
i [ f g . Then (G) = maxf(Gi) j i 2
[1;m℄g. In particular, a critical graph does not have cut vertices.
G k
Proof. Suppose each i has a proper -colouring i . By Lemma 4.5, we may take i (v) = 1
i k k
for all . These -colourings give a -colouring of . G ut

Brooks’ theorem

For edge colourings we have Vizing’s theorem, but no such strong results are known for vertex
colouring.

Lemma 4.7. For all graphs G, (G)  (G) + 1. In fact, there exists a proper colouring
: VG ! [1;(G) + 1℄ such that (v)  dG(v) + 1 for all vertices v 2 G.
Proof. We use greedy colouring to prove the claim. Let VG = fv ;::: ;vn g be ordered in
1
some way, and define : VG ! N inductively as follows: (v ) = 1, and
1

(vi ) = minfj j (vt ) 6= j for all t < i with vivt 2 EGg :


Then is proper, and (vi )  dG (vi ) + 1 for all i. The claim follows from this. ut
Although, we always have (G)  (G) + 1, the chromatic number (G) usually takes
much lower values – as seen in the bipartite case. Moreover, the maximum value (G) + 1 is
obtained only in two special cases as was shown by B ROOKS in 1941.
The next proof of Brook’s theorem is by L OVÁSZ (1975) as modified by B RYANT (1996).

Lemma 4.8. Let G be a 2-connected graph. Then the following are equivalent:
G
(i) is a complete graph or a cycle.
(ii) For all u;v G uv = E u;v
2 , if 2 G, then f g is a separating set.
(iii) For all u;v G d (u;v) = 2
2 , if G u;v
, then f g is a separating set.
Proof. It is clear that (i) implies (ii), and that (ii) implies (iii). We need only to show that (iii)
implies (i). Assume then that (iii) holds.
G
We shall show that either is a complete graph or G d (v) = 2 v G
for all 2 , from which
the theorem follows.
d (v) 2
First of all, G v G 2 w
 for all , since is -connected. Let be a vertex of maximum
degree, G d (w) = (G) .
If the neighbourhood GN (w) G
induces a complete subgraph, then is complete. Indeed,
G u = N (w) w
otherwise, since is connected, there exists a vertex 2 G u [f g such that is adjacent
v N (w)
to a vertex 2 G d (v) > d (w)
. But then G G w
, and this contradicts the choice of .
u;v N (w)
Assume then that there are different vertices uv = E
2 G such that 2 G. This
means that G d (u;v) = 2 u w v u;v
(the shortest path is ! ! ), and by (iii), f g is a separating
4.3 Vertex colourings 56

G
set of . Consequently, there is a partition G V = W u;vg [ U , where w 2 W , and all
[f
paths from a vertex of W U
to a vertex of go through either u or v.
We claim that W = fwg, and thus that (G) = 2 as required. Suppose on the contrary
that jW j  2. Since w is not a cut vertex (since G has no cut vertices), there exists an x 2 W
with x 6= w such that xu 2 EG or xv 2 EG , say xu 2 EG .

v y U
Since is not a cut vertex, there exists a 2 such
thatuy E d (x;y) = 2
2 G. Hence G x;y, and by (iii), f g u
V = W x;y U
is a separating set. Accordingly, G 1 [f g[ 1 ,
W U x y
where all paths from 1 to 1 pass through or . w x y
w W u;v W
Assume that 2 1 , and hence that also 2 1. v
(Since uw;vw E 2 VG fx;yg ).
z U
There exists a vertex 2 1 . Note that 1  U W U z W
[ . If 2 (or z 2 U , respectively),
z u x y
then all paths from to must pass through (or , respectively), and x (or y, respectively)
G
would be a cut vertex of . This contradiction, proves the claim. ut
G
Theorem 4.12 ( B ROOKS (1941)). Let be connected. Then (G) = (G) + 1 if and only
G
if either is an odd cycle or a complete graph.

=
Proof. (( ) Indeed, (C k ) = 3, (C k ) = 2, and (Kn ) = n, (Kn) = n 1.
2 +1 2 +1

(=)) Assume that k = (G). We may suppose that G is k -critical. Indeed, assume the
claim holds for k -critical graphs. Let k = (G) + 1, and let H  G be a k -critical proper
subgraph. Since (H) = k = (G) + 1 > (H), we must have (H) = (H) + 1, and
thus H is a complete graph or an odd cycle. Now G is connected, and therefore there exists
an edge uv 2 EG with u 2 H and v 2 = H . But then dG(u) > dH (u), and (G) > (H),
since H = Kn or H = Cn .
Let then G be any k -critical graph for k  2. By Lemma 4.6, it is 2-connected. If G is an
even cycle, then k = 2 = (G). Suppose now that G is neither complete nor a cycle (odd or
even). We show that (G)  (G).
By Lemma 4.8, there exist v ;v 2 G with dG (v ;v ) = 2, say v w;wv 2 EG with
1 2 1 2 1 2
v v 2= EG , such that H = G fv ;v g is connected. Order VH = fv ;v ;::: ;vng such that
1 2 1 2 3 4
vn = w, and for all i  3,
dH (vi;w)  dH (vi ;w) : +1

Therefore for each i 2 [1;n 1℄, we find at least one j > i such that vi vj 2 EG (possibly
vj = w). In particular, for all 1  i < n,
jNG(vi ) \ fv ;::: ;vi gj < dG (vi)  (G) :
1 1 (4.3)

Then colour v ;v ;::: ;vn in this order as follows: (v ) = 1 = (v ) and


1 2 1 2

(vi ) = minfr j r 6= (vj ) for all vj 2 NG(vi ) with j < ig :


4.3 Vertex colourings 57


The colouring is proper.
By (4.3), (v ) (G)
i  for all 2 i [1;n 1℄. Also, w=v
n has two neighbours, 1 and v
v 1 v
2 , of the same colour , and since n has at most (G)
neighbours, there is an available
v
colour for n , and so (v ) (G)
n  . This shows that hasGa proper (G)
-colouring, and,
consequently, (G) (G)
 . ut
Example 4.8. Suppose we have n objects V = fv ;::: ;vn g, some of which are not compati-
1
ble (like chemicals that react with each other, or worse, graph theorists who will fight during a
conference). In the storage problem we would like to find a partition of the set V with as few
classes as possible such that no class contains two incompatible elements. In graph theoretical
terminology we consider the graph G = (V;E), where vi vj 2 E just in case vi and vj are
incompatible, and we would like to colour the vertices of G properly using as few colours as
possible. This problem requires that we find (G).

Unfortunately, no good algorithms are known for determining (G), and, indeed, the chro-
matic number problem is NP-complete. Already the problem if (G) = 3 is NP-complete.
(However, as we have seen, the problem whether (G) = 2 has a fast algorithm.)

The chromatic polynomial


G
A given graph has many different proper vertex colourings G! : V [1;k℄ for sufficiently
k
large natural numbers . Indeed, see Lemma 4.5 to be certain on this point.

D EFINITION . The chromatic polynomial of G is the function G : N ! N , where


G(k) = jf j : VG ! [1;k℄ a proper colouringgj :
This notion was introduced by B IRKHOFF (1912), B IRKHOFF AND L EWIS (1946), to at-
4
tack the famous -Colour Theorem, but its applications have turned out to be elsewhere.
Ifk < (G) , then clearly G (k) = 0
, and, indeed,
(G) = minfk j G(k) 6= 0g :
Therefore, if we can find the chromatic polynomial of G, then we easily compute the chro-
matic number (G) just by evaluating G (k) for k = 1;2;::: until we hit a nonzero value.
Theorem 4.13 will give the tools for constructing G .
Example 4.9. Consider the complete graph K on fv ;v ;v ;v g. Let k  (K ) = 4. The
4 1 2 3 4 4
vertex v can be first given any of the k colours, after which k 1 colours are available
1
for v . Then v has k 2 and finally v has k 3 available colours. Therefore there are
2 3 4
k(k 1)(k 2)(k 3) different ways to properly colour K with k colours, and so
4

K4 (k) = k(k 1)(k 2)(k 3) :


On the other hand, in the discrete graph K has no edges, and thus any k -colouring is a proper
4
colouring. Therefore
K4 (k) = k : 4
4.3 Vertex colourings 58

Remark. The considered method for checking the number of possibilities to colour a ‘next
vertex’ is exceptional, and for more nonregular graphs it should be avoided.

D EFINITION . Let G be a graph, e = uv 2 EG, and let x = x(uv) be a new contracted


vertex. The graph G  e on
VGe = (VG n fu;vg) [ fxg
is obtained from G by contracting the edge e, when
EGe = ff j f 2 EG; f has no end u or vg [ fwx j wu 2 EG or wv 2 EG g :
Hence G  e is obtained by introducing a new
vertex x, and by replacing all edges wu and wv u x
by wx, and the vertices u and v are deleted. e
(Of course, no loops or parallel edges are al- v
lowed in the new graph G  e.)
Theorem 4.13. Let G be a graph, and let e 2 EG . Then
G(k) = G e(k) Ge(k):
Proof. Let e = uv . The proper k -colourings : VG ! [1;k℄ of G e can be divided into two
disjoint cases, which together show that G e (k) = G (k) + Ge (k):
(1) If (u) 6= (v), then corresponds to a unique proper k -colouring of G, namely .
Hence the number of such colourings is G (k).
(2) If (u) = (v), then corresponds to a unique proper k -colouring of G  e, namely
, when we set (x) = (u) for the contracted vertex x = x(uv). Hence the number of such
colourings is Ge (k). ut
Theorem 4.14. The chromatic polynomial is a polynomial.

"
Proof. The proof is by induction on G . Indeed, K n  (k) = k n for the discrete graph, and
P P
for two polynomials 1 and 2 , also 1P P 2 is a polynomial. The claim follows from Theo-
G e G e
rem 4.13, since there and  have less edges than . G ut
The connected components of a graph can be coloured independently, and so

Lemma 4.9. Let the graph G have the connected components G ;G ;::: ;Gm . Then
1 2

G(k) = G1 (k)G2 (k)::: G (k) :


m

Theorem 4.15. Let T be a tree of order n. Then T (k) = k(k 1)n . 1

Proof. We use induction on n. For n  2, the claim is obvious. Suppose that n  3, and
let e = vu 2 ET , where v is a leaf. By Theorem 4.13, T (k) = T e (k) T e (k). Here
T  e is a tree of order n 1, and thus, by the induction hypothesis, T e(k) = k(k 1)n . 2

The graph T e consists of the isolated v and a tree of order n 1. By Lemma 4.9, and the
induction hypothesis, T e (k) = k  k(k 1)n . Therefore T (k) = k(k 1)n .
2 1
ut
4.3 Vertex colourings 59

Example 4.10. Consider the graph G of order 4 from the above. Then we have the following
reductions.

e =
G G e Ge

f =
G e G fe;f g (G e)  f

Theorem 4.13 reduces the computation of G to the discrete graphs. However, we know
the chromatic polynomials for trees (and complete graphs, as an exercise), and so there is no
need to prolong the reductions beyond these. In our example, we have obtained

G e(k) = G fe;f g(k)  G e f (k)


( )

= k(k 1) k(k 1) = k(k 1) (k 2) ;


3 2 2

and so

G(k) = G e(k) Ge(k) = k(k 1) (k 2) k(k 1)(k 2)


2

= k(k 1)(k 2) = k 5k + 8k 4k :
2 4 3 2

For instance, for 3 colours, there are 6 proper colourings of the given graph.

Chromatic Polynomial Problems. It is difficult to determine G of a given graph, since the


reduction method provided by Theorem 4.13 is time consuming. Also, there is known no char-
acterization, which would tell from any polynomial P(k) whether it is a chromatic polynomial
of some graph. For instance, the polynomial k 4
3k + 3k is not a chromatic polynomial
3 2

of any graph, but it seems to satisfy the general properties (that are known or conjectured) of
these polynomials. R EED (1968) conjectured that the coefficients of a chromatic polynomial
should first increase and then decrease in absolute value. R EED (1968) and T UTTE (1974)
G
proved that for each of order G  =n :
 The degree of G (k) equals n.
 The coefficient of k n equals 1.
 The coefficient of k n equals "G .
1

 The constant term is 0.


 The coefficients alternate in sign.
 G(m)  m(m 1)n 1 for all positive integers m, when G is connected.
 G(x) 6= 0 for all real numbers 0 < x < 1.
5

Graphs on Surfaces

5.1 Planar graphs

G
The plane representations of graphs are by no means unique. Indeed, a graph can be drawn
in arbitrarily many different ways. Also, the properties of a graph are not necessarily immedi-
ate from one representation, but may be apparent from another. There are, however, important
families of graphs, the surface graphs, that rely on the (topological or geometrical) properties
of the drawings of graphs. We restrict ourselves in this chapter to the most natural of these,
the planar graphs. The geometry of the plane will be treated intuitively.
A planar graph will be a graph that can be drawn in the plane so that no two edges intersect
with each other. Such graphs are used, e.g., in the design of electrical (or similar) circuits,
where one tries to (or has to) avoid crossing the wires or laser beams. Planar graphs come into
use also in some parts of mathematics, especially in group theory and topology.
There are fast algorithms (linear time algorithms) for testing whether a graph is planar or
not. However, the algorithms are all rather difficult to implement. Most of them are based on
an algorithm designed by AUSLANDER AND PARTER (1961) see Section 6.5 of
S. S KIENA, “Implementing Discrete Mathematics: Combinatorics and Graph Theory with
Mathematica”, Addison-Wesley, 1990.

Definition

G
D EFINITION . A graph is a planar graph, if it has
a plane figure P(G) , called the plane embedding
G
of , where the lines (or continuous curves) corre-
sponding to the edges do not intersect each other ex-
cept at their ends.

The complete bipartite graph K;


24 is a planar graph.

D EFINITION . An edge e = uv E
2 G is subdivided, when it is replaced by a path ! ! u x
v x H G
of length two by introducing a new vertex . A subdivision of a graph is obtained from
G by a sequence of subdivisions.
5.1 Planar graphs 61

The following result is clear.

Lemma 5.1. A graph is planar if and only if its subdivisions are planar.

Geometric properties
G
It is clear that the graph theoretical properties of are inherited by all of its plane embeddings.
G
For instance, the way we draw a graph in the plane does not change its maximum degree
or its chromatic number. More importantly, there are – as we shall see – some nontrivial
topological (or geometric) properties that are shared by the plane embeddings.
F
We recall first some elements of the plane geometry. Let be an open set of the plane
x F x
R  R, that is, every point 2 has a disk centred at and contained in . Then is a F F
region, if any two points x;y F 2 can be joined by a continuous curve the points of which
F
are all in . The boundary (F) of a region F consists of those points for which every
F
neighbourhood contains points from and its complement.
G
Let be a planar graph, and P(G) one of its plane embeddings. Regard now each edge
e = uv E u v ( ) E
2 G as a line from to . The set R  R n G is open, and it is divided into a
finite number of disjoint regions, called the faces of P(G) .

D EFINITION . A face of P(G) is an interior face, if it is bounded.


The (unique) face that is unbounded is called the exterior face of
P(G) F
F F
. The edges that surround a face constitute the boundary
(F) F of . The exterior boundary is the boundary of the exte- 2
3

rior face. The vertices (edges, resp.) on the exterior boundary are F 1
called exterior vertices exterior edges, resp.). Vertices (edges,
resp.) that are not on the exterior boundary are interior vertices
F 0

interior edges, resp.).

Embeddings P(G) satisfy some properties that we accepts at face value.


Lemma 5.2. Let P(G) be a plane embedding of a planar graph G.
(i) Two different faces F and F are disjoint, and their boundaries can intersect only on
1 2
edges.
P(G)
(ii) has a unique exterior face.
e
(iii) Each edge belongs to the boundary of at most two faces.
G
(iv) Each cycle of surrounds (that is, its interior contains) at least one internal face of P(G).
G
(v) A bridge of belongs to the boundary of only one face.
(vi) An edge that is not a bridge belongs to the boundary of exactly two faces.
5.1 Planar graphs 62

IfP(G) G P (G)
is a plane embedding of a graph , then so is any drawing 0 which is obtained
from P(G) by an injective mapping of the plane that preserves continuous curves. This means,
in particular, that every planar graph has a plane embedding inside any geometric circle of
arbitrarily small radius, or inside any geometric triangle.

Euler’s formula

Lemma 5.3. A plane embedding P(G) G


of a planar graph has no interior faces if and only
G G
if is acyclic, that is, if and only if the connected components of are trees.

Proof. This is clear from Lemma 5.2. ut


The next general form of Euler’s formula was proved by L EGENDRE (1794).

Theorem 5.1 (Euler’s formula). Let G be a connected planar graph, and let P(G) be any of
its plane embeddings. Then
G "G + ' = 2 ;
where ' is the number of faces of P(G).

Proof. We shall prove the claim by induction on the number of faces ' of a plane embedding
P(G). First, notice that '  1, since each P(G) has an exterior face.
If ' = 1, then, by Lemma 5.3, there are no cycles in G, and since G is connected, it is a
tree. In this case, by Theorem 2.5, we have "G = G 1, and the claim holds.
Suppose then that the claim is true for all plane embeddings with less than ' faces for
'  2. Let P(G) be a plane embedding of a connected planar graph such that P(G) has '
faces.
e E
Let 2 G be an edge that is not a bridge. The subgraph G e is planar with a plane
embeddingP(G e) = P(G) e e
obtained by simply erasing the edge . Now P(G e) has
' 1 P(G)
faces, since the two faces of e
that are separated by are merged into one face of
P(G e) 
. By the induction hypothesis, G e " + (' 1) = 2
G e  ("
, and hence G G
1) + (' 1) = 2 , and the claim follows. ut
In particular, we have the following invariant property of planar graphs.

Corollary 5.1. Let G be a planar graph. Then every plane embedding of G has the same
number of faces:
'G = "G G + 2

Maximal planar graphs

G
Lemma 5.4. If is a planar graph of order G   3, then "G  3G 6. Moreover, if G has
C "
no triangles 3 , then G  G 2 . 4
5.1 Planar graphs 63

G
Proof. If is disconnected with connected components i , for 2 G i [1;k℄, and if the claim
G
holds for these smaller (necessarily planar) graphs i , then it holds for G, since
G
X G
X
"G = "G  3
i
G 6k = 3G 6k  3G 6 :
i

i=1 i=1
It is thus sufficient to prove the claim for connected planar graphs.
" 2
Also, the case where G  is clear. Suppose thus that G  . " 3
F
Each face of an embedding P(G)
contains at least three edges on its boundary (F)
.
Hence 3' 2"
 G , since each edge lies on at most two faces. The first claim follows from
Euler’s formula.
The second claim is proved similarly except that, in this case, each face of F P(G)
contains
G
at least four edges on its boundary (when is connected and G  ). " 4 ut
An upper bound for Æ(G) for planar graphs was achieved by HEAWOOD.
Theorem 5.2 (H EAWOOD (1890)). If G is a planar graph, then Æ(G)  5.

Proof. If G  2, then there is nothing to prove. Suppose G  3. By the handshaking lemma


and the previous lemma,
X
Æ(G)  G  dG(v) = 2"G  6G 12 :
v2G
It follows that Æ(G)  5. ut
D EFINITION . A planar graph G is maximal, if G + e is nonplanar for every e 2= EG.
K
Example 5.1. Clearly, if we remove one edge from 5 , the result is a maximal planar graph.
K
However, if an edge is removed from 3;3 , the result is not maximal!

F
Lemma 5.5. Let be a face of a plane embedding P(G)
that has at least four edges on its
boundary. Then there are two nonadjacent vertices on the boundary of . F
F
Proof. Assume that the set of the boundary vertices of induces a complete subgraph . K
K F
The edges of are either on the boundary of or they are not inside (since is a face.) Add F
x F K x
a new vertex inside , and connect the vertices of to . The result is a plane embedding
H
of a graph with H V =V x G
G [f g (that has as its induced subgraph). The induced subgraph
H[K x℄ H K <4
[ f g is complete, and since is planar, we have j j as required. ut
By the previous lemma, if a face has a boundary of at least four edges, then an edge can
be added to the graph (inside the face), and the graph remains to be planar. Hence we have
proved

G  3 G
Corollary 5.2. If is a maximal planar graph with G  , then is triangulated, that is,
every face of a plane embedding P(G)
has a boundary of exactly three edges.
5.1 Planar graphs 64

Theorem 5.3. For a maximal planar graph G of order G  3, "G = 3G 6 :


Proof. Each face F of an embedding P(G) is a triangle having three edges on its boundary.
Hence 3' = 2"G , since there are now no bridges. The claim follows from Euler’s formula.
ut
Kuratowski’s theorem

Theorem 5.5 will give a simple criterion for planarity of graphs. This theorem (due to K URA -
TOWSKI in 1930) is one of the jewels of graph theory. In fact, the theorem was proven earlier
by P ONTRYAGIN (1927-1928), and also independently by F RINK AND S MITH (1930). For
history of the result, see
J.W. K ENNEDY, L.V. Q UINTAS , AND M.M. S YSLO, The theorem on planar graphs. Historia
Math. 12 (1985), 356 – 368.

Theorem 5.4. K 5 and K;


33 are not planar graphs.

K
Proof. By Lemma 5.4, a planar graph of order 5 has at most 9 edges, but 5 has 5 vertices
and 10 edges. By the second claim of Lemma 5.4, a triangle-free planar graph of order 6 has
K
at most 8 edges, but 3;3 has 6 vertices and 9 edges. ut
K K
The graphs 5 and 3;3 are the smallest nonplanar graphs, and, by Lemma 5.1, if G
K K G
contains a subdivision of 5 or 3;3 as a subgraph, then is not planar. We prove the converse
of this result in what follows. Therefore

Theorem 5.5 (K URATOWSKI (1930)). A graph is planar if and only if it contains no subdivi-
K K
sion of 5 or 3;3 as a subgraph.

3
We prove this result along the lines of T HOMASSEN (1981) using -connectivity.

Q
Example 5.2. The cube k is planar only for k = 1;2;3 Q
. Indeed, the graph 4 contains a
K
subdivision of 3;3 , and thus by Theorem 5.5 it is not planar. On the other hand, each k with Q
k 4 Q
 has 4 as a subgraph, and therefore they are nonplanar. The subgraph of 4 that is a Q
K
subdivision of 3;3 is given below.

0000 1010 1001

0100 1110 1101 0001

0011

1000 1100 0010


5.1 Planar graphs 65

D EFINITION . A graph G is called a Kuratowski graph, if it is a subdivision of K 5 or K;. 33

E E
Lemma 5.6. Let  G be the set of the boundary edges of a face F in a plane embedding
G
of . Then there exists a plane embedding P(G)
, where the edges of E are exterior edges.
Proof. This is a geometric proof. Choose a circle that contains every point of the plane em-
bedding (including all points of the edges) such that the centre of the circle is inside the given
face. Then use geometric inversion with respect to this circle. This will map the given face as
the exterior face of the image plane embedding. ut
G "
Lemma 5.7. Let be a nonplanar graph without Kuratowski graphs such that G is minimal
G 3
in this respect. Then is -connected.

Proof. We show first that G is 2-connected. On the contrary, assume that v is a cut vertex of
G, and let A ;::: ;Ak be the connected components of G v.
1

Since G is minimal nonplanar with respect to "G , the sub-


graphs Gi = G[Ai [ fv g℄ have plane embeddings P(Gi ),
where v is an exterior vertex. We can glue these plane em-
A 1 A 2

beddings together at v to obtain a plane embedding of G, and


this will contradict the choice of G.
Assume then that G has a separating set S = fu;v g. Let G and G be any subgraphs of
1 2
G such that EG = EG1 [ EG2 , S = VG1 \ VG2 , and both G and G contain a connected
1 2
component of G S . Since G is 2-connected (by the above), there are paths u ! v in G and
?
1
G . Indeed, both u and v are adjacent to a vertex of each connected component of G S . Let
2
Hi = Gi + uv. (Maybe uv 2 EG.)
If both H and H are planar, then, by Lemma 5.6, they have
1 2
plane embeddings, where uv is an exterior edge. It is now H H
easy to glue H and H together on the edge uv to obtain a
1 2
1 2
plane embedding of G + uv , and thus of G.
We conclude that H or H is nonplanar, say H . Now "H1 < "G , and so, by the minimality
1 2 1
of G, H contains a Kuratowski graph H . However, there is a path u ! v in H , since
1
?
2
G  H . This path can be regarded as a subdivision of uv, and thus G contains a Kuratowski
2 2
graph. This contradiction shows that G is 3-connected. ut
Lemma 5.8. Let G be a 3-connected graph of order G  5. Then there exists an edge e 2 EG
such that the contraction G  e is 3-connected.

Proof. On the contrary suppose that for any e 2 EG , the graph G  e has a separating set S
with jS j = 2. Let e = uv , and let x = x(uv) be the contracted vertex. Necessarily x 2 S , say
S = fx;zg (for, otherwise, S would separate G already). Therefore T = fu;v;zg separates
G. Assume that e and S are chosen such that G T has a connected component A with the
least possible number of vertices.
5.1 Planar graphs 66

There exists a vertex y A


2 with 2 G. (Otherwisezy E
u;v G
f g would separate .) The graph  G (zy)
is not - 3 u B
connected by assumption, and hence, as in the above, there
w
exists a vertex such that f R = z;y;w
g separates . It can G Tv A
be thatw u;v
2 f g, but by symmetry we can suppose that z y
w=u
6 .
Sinceuv E G R
2 G, B
has a connected component such that u;v = B
2 . For each 0 2 , y B
P : u y G z;w
there exists a path ?
G 3
0
! in f g, since is -connected, and hence this goes P
y y y G T
through . Therefore 0 is connected to also in y A
, that is, 0 2 , and so  . The B A
y=B B<A
inclusion is proper, since 2 . Hence j j j j, and this contradicts the choice of . ut A
By the next lemma, a Kuratowski graph cannot be created by contractions.

G
Lemma 5.9. Let be a graph. If for some e 2 EG the contraction G  e has a Kuratowski
subgraph, then so does . G
Proof. The proof consists of several cases depending on the Kuratowski graph, and how the
subdivision is made. We do not consider the details of these cases.
H
Let be a Kuratowski graph of  , where G e x = x(uv)
is the contracted vertex for
e = uv d (x) = 2
. If H , then the claim is obviously true. Suppose then that H d (x) = 3 4
or . If
there exists at most one edge xy E uy E vy E
2 H such that 2 G (or 2 G ), then one easily sees
G
that contains a Kuratowski graph.
There remains only one case, where H K
is a subdivision of 5 , and both and have u v 3
G H
neighbours in the subgraph of corresponding to . In this case, contains a subdivisionG
K
of 3;3 . ut

v2 v4 v2 v4

x u v
v1 v3 v1 v3

3
Lemma 5.10. Every -connected graph G without Kuratowski subgraphs is planar.
Proof. The proof is by induction on G . The only 3-connected graph of order 4 is the planar
graph K . Therefore we can assume that G  5.
4

By Lemma 5.8, there exists an edge e = uv 2 EG such that G  e (with a contracted vertex
x) is 3-connected. By Lemma 5.9, G  e has no Kuratowski subgraphs, and hence G  e has a
plane embedding P(G  e) by the induction hypothesis. Consider the part P(G  e) x, and
let C be the boundary of the face of P(G  e) x containing x (in P(G  e)). Here C is a cycle
of G (since G is 3-connected).
Now since G fu;v g = (G  e) x, P(G  e) x is a plane embedding of G fu;v g, and
NG(u)  VC [fvg and NG(v)  VC [fug. Assume, by symmetry, that dG(v)  dG (u). Let
5.2 Colouring planar graphs 67

NG(v) n fug = fv ;v ;::: ;vk g in order along the cycle C . Let Pi;j : vi ! vj be the path
1 2
?

along C from vi to vj . We obtain a plane embedding of G u by drawing (straight) edges vvi


for 1  i  k .
(1) If NG (u) n fv g 2 Pi;i (i + 1 is taken modulo k ) for some i, then, clearly, G has a
+1
plane embedding (obtained from P(G) u by putting u inside the triangle (v;vi ;vi ) and by
+1
drawing the edges with an end u inside this triangle).

y
(2) Assume there are y;z N (u) v
2 G n f g such that 2y
P z=P i j
ij and 2 ij for some and , where y;z = v ;v
2 f i j g. z u
u;v ;v
Now, f i i+1 g [ f v;z;y K
g form a subdivision of 3;3. v

N (u) v N (v)
By (1) and (2), we can assume that G nf g  G .
N (u) v = N (v) u
Therefore, G nf g G nf g by the assumption u
d (v) d (u)
G d (v) = d (u) > 3
 G . Also, by (1), G G . But v
now u;v;v ;v ;v
1 2 K
3 give a subdivision of 5. ut
Proof of Theorem 5.5. By Theorem 5.4 and Lemma 5.1, we need to show that each nonpla-
G G
nar graph contains a Kuratowski subgraph. On the contrary, suppose that is a nonplanar
" G
graph that has a minimal size G such that does not contain a Kuratowski subgraph. Then,
G 3
by Lemma 5.7, is -connected, and by Lemma 5.10, it is planar. This contradiction proves
the claim. ut
G
Example 5.3. Any graph can be drawn in the plane so that three of its edges never intersect
at the same point. The crossing number  (G) is the minimum number of intersections of its
G G
edges in such plane drawings of . Therefore is planar if and only if  (G) = 0 , and, for
(K ) = 1
instance,  5 .
(K ) = 3
We show that  6 (K ) 3
. For this we need to show that  6  . For the equality, one
3
is invited to design a drawing with exactly crossings.
LetX(K ) 6 be a drawing of K
6 using crossings so that two edges cross at most once.
G +6
Add a new vertex at each crossing. This results in a planar graph on vertices and
2 + 15 3
edges. Now  , since G " = 2 + 15 3( + 6) 6 = 3 6
 G .

5.2 Colouring planar graphs

The most famous problem in the history of graph theory is that of the chromatic number of
4
planar graphs. The problem was known as the -Colour Conjecture for more than 120 years,
G
until it was solved by A PPEL AND H AKEN in 1976: if is a planar graph, then (G) 4
 .
4
The -Colour Conjecture has had a deep influence on the theory of graphs during the last 150
4
years. The solution of the -Colour Theorem is difficult, and it requires the assistance of a
computer.
5.2 Colouring planar graphs 68

The 5-colour theorem


5
We prove H EAWOOD’s result (1890) that each planar graph is properly -colourable.

Lemma 5.11. If G is a planar graph, then (G)  6.


Proof. The proof is by induction on G . Clearly, the claim holds for G  6. By Theorem 5.2,
a planar graph G has a vertex v with dG (v)  5. By the induction hypothesis, (G v)  6.
Since dG (v)  5, there is a colour i available for v in the 6-colouring of G v , and so (G) 
6. ut
The proof of the following theorem is partly geometric in nature.

Theorem 5.6 (H EAWOOD (1890)). If G is a planar graph, then (G)  5.


Proof. Suppose the claim does not hold, and let G be a 6-critical planar graph. Recall that for
k-critical graphs H , Æ(H)  k 1, and thus there exists a vertex v with dG(v) = Æ(G)  5.
By Theorem 5.2, dG (v) = 5.

Let be a proper 5-colouring of G v . Such a colouring v5 v1


exists, because G is 6-critical. By assumption, (G) > 5,
and therefore for each i 2 [1;5℄, there exists a neighbour v v2 P13
vi 2 NG(v) such that (vi ) = i. Suppose these neighbours v4 v3
vi of v occur in the plane in the geometric order of the figure.
Consider the subgraph G[i;j℄  G made of colours i and j . The vertices vi and vj are in
the same connected component of G[i;j℄ (for, otherwise we interchange the colours i and j
in the connected component containing vj to obtain a recolouring of G, where vi and vj have
the same colour i, and then recolour v with the remaining colour j ).
Let Pij : vi ! vj be a path in G[i;j℄, and let C = (vv )P (v v). By the geometric
?
1 13 3
assumption, exactly one of v , v lies inside the region enclosed by the cycle C . Now, the path
2 4
P must meet C at some vertex of C , since G is planar. This is a contradiction, since the
24
vertices of P are coloured by 2 and 4, but C contains no such colours.
24 ut
The final word on the chromatic number of planar graphs was proved by A PPEL AND
H AKEN in 1976.

Theorem 5.7 (4-Colour Theorem). If G is a planar graph, then (G)  4.


By the following theorem, each planar graph can be decomposed into two bipartite graphs.

Theorem 5.8. Let G = (V;E) 4


be a -chromatic graph, (G)  4. Then the edges of G can
E E
be partitioned into two subsets 1 and 2 such that (V;E ) and (V;E ) are both bipartite.
1 2

Proof. Let Vi = (i) be the set of vertices coloured by i in a proper 4-colouring of G.


1

The define E as the subset of the edges of G that are between the sets V and V ; V and V ;
1 1 2 1 4
V and V . Let E be the rest of the edges, that is, they are between the sets V and V ; V and
3 4 2 1 3 2
V ; V and V . It is clear that (V;E ) and (V;E ) are bipartite, since the sets Vi are stable. ut
3 2 4 1 2
5.2 Colouring planar graphs 69

Map colouring

4
The -Colour Conjecture was originally stated for maps. In the map-colouring problem we
are given several countries with common borders, and we wish to colour each country so that
no neighbouring countries obtain the same colour. How many colours are needed?
A border between two countries is assumed to have a positive length – in particular, coun-
tries that have only one point in common are not allowed in the map colouring.
Formally, we define a map as a connected planar (embedding of a) graph with no bridges.
The edges of this graph represent the boundaries between countries. Hence a country is a face
of the map, and two neighbouring countries share a common edge (not just a single vertex).
We deny bridges, because a bridge in such a map would be a boundary inside a country.
The map-colouring problem is restated as fol-
lows:
How many colours are needed for the faces of a
plane embedding so that no adjacent faces obtain
the same colour.
4
The illustrated map can be -coloured, and it can-
3
not be coloured using only colours, because ev-
ery two faces have a common border.

LetF ;F ;::: ;Fn be the countries of a map M , and define a graph G with VG =
1 2
fv ;v ;::: ;vn g such that vivj 2 EG if and only if the countries Fi and Fj are neighbours.
1 2
It is easy to see that G is a planar graph. Using this notion of a dual graph, we can state the
map-colouring problem in new form: What is the chromatic number of a planar graph? By
the 4-Colour Theorem it is at most four.
Map-colouring can be used in rather generic topological setting, where the maps are de-
fined by curves in the plane. As an example, consider finitely many simple closed curves in
2
the plane. These curves divide the plane into regions. The regions are -colourable.
That is, the graph where the vertices corre- 2
spond to the regions, and the edges correspond 1 1
to the neighbourhood relation, is bipartite. To
1 2 1
see this, colour a region by , if the region is in- 2
1 1 2
side an odd number of curves, and, otherwise, 2
colour it by . 2 2 1

History of the 4-Colour Theorem

That four colours suffice planar maps was conjectured around 1850 by F RANCIS G UTHRIE,
a student of D E M ORGAN at University College of London. During the following 120 years
many outstanding mathematicians tried to solve the problem, and some of them even thought
that they had been successful.
5.2 Colouring planar graphs 70

In 1879 C AYLEY pointed out some difficulties that lie in the conjecture. The same year
A LFRED K EMPE published a paper, where he claimed a proof of the 4CC. The basic idea in
K EMPE’s argument (known later as Kempe chains) was the same as later used by H EAWOOD
5
to prove the -Colour Theorem, (Theorem 5.6).
For more than 10 years K EMPE’s proof was considered to be valid. For instance, TAIT
published two papers on the 4CC in the 1880’s that contained clever ideas, but also some
further errors. In 1890 H EAWOOD showed that K EMPE’s proof had serious gaps. As we shall
see in the next chapter, H EAWOOD discovered the number of colours needed for all maps on
other surfaces than the plane. Also, he proved that if the number of edges around each region
3 4
is divisible by , then the map is -colourable.
G
One can triangulate any planar graph (drawn in the plane), by adding edges to divide
the faces into triangles. B IRKHOFF introduced one of the basic notions (reducibility) needed
in the proof of the 4CC. In a triangulation, a configuration is a part that is contained inside a
cycle. An unavoidable set is a set of configurations such that any triangulation must contain
one of the configurations in the set. A configuration is said to be reducible, if it is not contained
in a triangulation of a minimal counter example to the 4CC.
The search for avoidable sets began in 1904 with work of W EINICKE, and in 1922
F RANKLIN showed that the 4CC holds for maps with at most 25
regions. This number was
increased to 27 by R EYNOLDS (1926), to 35
by W INN (1940), to 39by O RE AND S TEMPLE
(1970), to 95 by M AYER (1976).
The final notion for the solution was due to H EESCH, who in 1969 introduced discharging.
v
This consists of assigning to a vertex the charge 6 d (v)
G . From Euler’s formula we see
that for the sum of the charges, we have
X
(6 dG (v)) = 12:
v
S
Now, a given set of configurations can be proved to be unavoidable, if for a triangulation,
S
that does not contain a configuration from , one can ‘redistribute’ the charges so that no v
comes up with a positive charge.
According to H EESCH one might be satisfied with a set of 8900
configurations to prove
the 4CC. There were difficulties with his approach that were solved in 1976 by A PPEL AND
H AKEN. They based the proof on reducibility using Kempe chains, and ended up with an
unavoidable set with over 1900configurations and some 300
discharging rules. The proof used
1200 hours of computer time. (KOCH assisted with the computer calculations.) A simplified
proof by ROBERTSON , S ANDERS , S EYMOUR AND T HOMAS (1997) uses 633
configurations
32
and discharging rules. Because of these simplifications also the computer time is much less
than in the original proof.
4
The following book contains the ideas of the proof of the -Colour Theorem.
T.L. S AATY AND P.C. K AINEN, “The Four-Color Problem”, Dover, 1986.
5.2 Colouring planar graphs 71

List colouring

D EFINITION . Let G v (v)


be a graph so that each of its vertices is given a list (set) of
colours. A proper colouring : V [1;m℄ G 
G ! of is av( -)list colouring, if each vertex gets
a colour from its list, (v) (v)
2 .
The list chromatic number `  (G) k G 
is the smallest integer such that has a -list colour-
k (v) = k
ing for all lists of size , j G k  (G) k
j g. Also, is -choosable, if `  .
f1; 2g f1; 3g f2; 3g
K
Example 5.4. The bipartite graph 3;3 is not - 2 y1 y2 y3
choosable. Indeed, let the bipartition of 3;3 be K
(X;Y ) , where X = x ;x ;x
f 1 2 3 g and Y =
y ;y ;y
f 1 2 3g. The lists for the vertices shown in the x1 x2 x3
 (K ) > 2
figure show that ` 3;3 . f; g f; g f; g
1 2 1 3 2 3

Obviously (G)  ` (G), since proper colourings are special cases of list colourings,
but equality does not hold in general. However, it was proved by V IZING (1976) and E RDÖS ,
RUBIN AND TAYLOR (1979) that

`(G)  (G) + 1 :
For planar graphs we do not have a ‘4-list colour theorem’. Indeed, it was shown by VOIGT
(1993) that there exists a planar graph with ` (G) = 5. At the moment, the smallest such a
graph was produced by M IRZAKHANI (1996), and it is of order 63.

Theorem 5.9 (T HOMASSEN (1994)). Let G be a planar graph. Then ` (G)  5.

In fact, T HOMASSEN proved a stronger statement:

G
Theorem 5.10. Let be a planar graph and let C be the cycle that is the boundary of the

exterior face. Let consist of lists such that j (v)j = 3 for all v 2 C , and j(v)j = 5 for all
v=C G 
2 . Then has a -list colouring .
G
Proof. We can assume that the planar graph is connected, and that it is given by a near-
triangulation; an embedding, where the interior faces are triangles. (If the boundary of a face
3
has more than edges, then we can add an edge inside the face.) This is because adding edges
to a graph can only make the list colouring more difficult. Note that the exterior boundary is
unchanged by a triangulation of the interior faces.

The proof is by induction on G under the additional constraint that one of the vertices of
C has a fixed colour. (Thus we prove a stronger statement than claimed.) For G  , the  3

claim is obvious. Suppose then that G  . 4
x C
Let 2 be a vertex, for which we fix a colour (x) (x)
2 . Let 2 v C
be a vertex
x
adjacent to , that is, C: v x
! ! . ?
v
5.2 Colouring planar graphs 72

N (v) = x;v ;::: ;v ;y


Let G f 1 y C v
k g, where 2 , and i
are ordered such that the faces are triangles as in the v
N (v) = x;y
figure. It can be that G f g, in which case y x
xy E 2 G. vk v1
H=G v
Consider the subgraph . The exterior bound- ::: 2
v
H x v v y x:
ary of is the cycle ! 1 !    ! k ! ! ?

(v) = 3
Since j r;s (v)
j , there are two colours 2
(x)
that differ from .
H
We define new lists for  (v ) (v ) r;s
as follows: 0 i   (v ) = 3
i n f g such that j
0 ij for
i [1;k℄
each 2  (z) = (z)
, and otherwise 0 .
 = 1
Now H G (x) H
, and by the induction hypothesis (with  still fixed), has a 0 -list
v (v) = r s
colouring . For the vertex , we choose (v) = (y)
or such that 6 . This gives a
 G  (z) (z)
0 -list colouring for . Since 0  z 
for all , we have that is a -list colouring of
G . ut
Straight lines and kissing circles

We state an interesting result of WAGNER, the proof of which can be deduced from the above
proof of Kuratowski’s theorem. The result is known as Fáry’s Theorem.

Theorem 5.11 (WAGNER (1936)). A planar graph G has a plane embedding, where the edges
are straight lines.

This raises a difficult problem:


Integer Length Problem. Can all planar graphs be drawn in the plane such that the edges are
straight lines of integer lengths?

We say that two circles kiss in the plane, if they in- 


tersect in one point and their interiors do not intersect.
For a set of circles, we draw a graph by putting an edge   
between two midpoints of kissing circles.  
The following improvement of the above theorem is
due to KOEBE (1936), and it was rediscovered indepen-  
dently by A NDREEV (1970) and T HURSTON (1985).

Theorem 5.12 (KOEBE (1936)). A graph is planar if and only if it is a kissing graph of circles.

Graphs can be represented as plane figures in many different ways. For this, consider a set
S of curves of the plane (that are continuous between their end points). The string graph of
S is the graph G = (S;E) , where uv E u v
2 if and only if the curves and intersect. At first
it might seem that every graph is a string graph, but this is not the case.
It is known that all planar graphs are string graphs (this is a trivial result).
5.2 Colouring planar graphs 73

Line Segment Problem. A graph is a line segment graph if it is a string graph for a set of L
straight line segments in the plane. Is every planar graph a line segment graph for some set L
of lines?
Note that there are also nonplanar graphs that are line segment graphs. Indeed, all complete
graphs are such graphs.

The above question remains open even in the case


when the slopes of the lines are +1 1 0
, , and 1. +1 1 0 1
4
A positive answer to this -slope problem for pla-
4
nar graphs would prove the -Colour Theorem.

The Minor Theorem

H G
D EFINITION . A graph is a minor of , denoted by 4 , if H G H is isomorphic to a graph
G
obtained from a subgraph of by successively contracting edges.

A recent result of ROBERTSON AND S EYMOUR (1983-2000) on graph minors is (one of)
the deepest results of graph theory. The proof goes beyond these lectures. Indeed, the proof of
Theorem 5.13 is around 500 pages long.

G a subgraph a contraction

H G
Note that every subgraph  is a minor, 4 . H G
The following properties of the minor relation are easily established:
(i) G 4 G,
(ii) H 4 G and G 4 H imply G = H ,
(iii) H 4 L and L 4 G imply H 4 G.
The conditions (i) and (iii) ensure that the relation 4 is a quasi-order, that is, it is reflexive and
G ;G ;:::
transitive. It turns out to be a well-quasi-order, that is, every infinite sequence 1 2 of
G
graphs has two graphs i and j with G i<j G G
such that i 4 j .

Theorem 5.13 (Minor Theorem). The minor order 4 is a well-quasi-order on graphs. In


particular, in any infinite family F of graphs, one of the graphs is a (proper) minor of another.

Each property P of graphs defines a family of graphs, namely, the family of those graphs
that satisfy this property.
5.3 Genus of a graph 74

D EFINITION . A family F of graphs is said to be minor closed, if every minor H of a graph


G 2 F is also in F. A property P of graphs is said to be inherited by minors, if all minors of
a graph G satisfy P whenever G does.

The following families of graphs are minor closed: the family of (1) all graphs, (2) planar
graphs (and their generalizations to other surfaces), (3) acyclic graphs.
The acyclic graphs include all trees. However, the family of trees is not closed under taking
subgraphs, and thus it is not minor closed. More importantly, the subgraph order of trees
T T
( 1  2 ) is not a well-quasi-order.
WAGNER proved a minor version of Kuratowski’s theorem:

Theorem 5.14 (WAGNER (1937)). A graph G is nonplanar if and only if K 4 G or K ; 4


5 33
G.

Proof. Exercise. ut
ROBERTSON AND S EYMOUR (1998) proved the Wagner’s conjecture:

Theorem 5.15 (Minor Theorem 2). Let P be a property of graphs inherited by minors. Then
G G
there exists a finite set F of graphs such that satisfies P if and only if does not have a
minor from F.

One of the impressive application of Theorem 5.15 concerns embeddings of graphs on


surfaces, see the next chapters. By Theorem 5.15, one can test (with a fast algorithm) whether
a graph can be embedded onto a surface.
3
Every graph can be drawn in the -dimensional space without crossing edges. An old
problem asks if there exists an algorithm that would determine whether a graph can be drawn
so that its cycles do not form (nontrivial) knots. This problem is solved by the above results,
since the property ‘knotless’ is inherited by minors: there exists a fast algorithm to do the job.
However, this algorithm is not known!

Hadwiger’s Problem. H ADWIGER conjectured in 1943 that for every graph G,


K G 4 G ;
( )

that is, if (G)  r , then G has a complete graph Kr as its minor. The conjecture is trivial
for r = 2, and it is known to hold for all r  6. The cases for r = 5 and 6 follow from the
4-Colour Theorem.

5.3 Genus of a graph

A graph is planar, if it can be drawn in the plane without crossing edges. A plane is an im-
portant special case of a surface. In this section we study shortly drawing graphs in other
surfaces.
5.3 Genus of a graph 75

There are quite many interesting surfaces many of which are rather difficult to draw. We
shall study the ‘easy surfaces’ – those that are compact and orientable. These are surfaces that
have both an inside and an outside, and can be entirely characterized by the number of holes in
them. This number is the genus of the surface. There are also non-orientable compact surfaces
such as the Klein bottle and the projective plane.

Background on surfaces
We shall first have a quick look at the general surfaces and their classification without going
into the details. Consider the space R 3 , which has its (usual) distance function d(x;y) 2 R of
its points.
A B
Two figures (i.e., sets of points) and are topologically equivalent (or homeomorphic)
if there exists a bijectionf: A B f f :B A
! such that and its inverse 1 ! are continuous.
In particular, two figures are topologically equivalent if one can be deformed to the other by
bending, squeezing, stretching, and shrinking without tearing it apart or gluing any of its parts
together. All these deformations should be such that they can be undone.
X X
A set of points is a surface, if is connected (there is a continuous line inside be- X
x X
tween any two given points) and every point 2 has a neighbourhood that is topologically
equivalent to an open planar disk D(a) = x dist(a;x) < 1
f j g.
We deal with surfaces of the real space, and in this case a surface X X
is compact, if is
closed and bounded. Note that the plane is not compact, since it it not bounded. A subset of
a compact surface X is a triangle if it is topologically equivalent to a triangle in the plane.
T i = 1;2;::: ;m
A finite set of triangles i , X X=
, is a triangulation of if T
[mi=1 i and any
T T
nonempty intersection i \ j with 6 i=j is either a vertex or an edge.
The following is due to R ADÓ (1925).

Theorem 5.16. Every compact surface has a triangulation.

Each triangle of a surface can be oriented by choosing an order for its vertices up to cyclic
permutations. Such a permutation induces a direction for the edges of the triangle. A triangu-
lation is said to be oriented if the triangles are assigned orientations such that common edges
of two triangles are always oriented in reverse directions. A surface is orientable if it admits
an oriented triangulation.
Equivalently, orientability can be described as follows.

Theorem 5.17. A compact surface Xis orientable if and only if it has no subsets that are
topologically equivalent to the Möbius band.
In the Möbius band (which itself is not a surface according
the above definition) one can travel around and return to the
starting point with left and right reversed.
A connected sum X#Y of two compact surfaces is obtained by cutting an open disk
off from both surfaces and then gluing the surfaces together along the boundary of the disks.
(Such a deformation is not allowed by topological equivalence.)
The next result is known as the classification theorem of compact surfaces.
5.3 Genus of a graph 76

Theorem 5.18 (D EHN AND H EEGAARD (1907)). Let X be a compact surface. Then
(i) if X is orientable, then it is topologically equivalent to a sphere S = S or a connected
0
sum of tori: Sn = S #S #::: #S for some n  1, where S is a torus.
1 1 1 1

(ii) if X is nonorientable, then X is topologically equivalent to a connected sum of projective


planes: Pn = P#P#::: #P for some n  1, where P is a projective plane.

It is often difficult to imagine how a figure (say, a graph) can be drawn in a surface. There
is a helpful, and difficult to prove, result due to R ADÓ (1920), stating that every compact
surface (orientable or not) has a description by a plane model, which consists of a polygon in
the plane such that
 each edge of the polygon is labelled by a letter,
 each letter is a label of exactly two edges of the polygon, and
 each edge is given an orientation (clockwise or counter clockwise).
M
Given a plane model , a compact surface is obtained by gluing together the edges having
the same label in the direction that they have.

a a a a
a b b b b b a b
b a a b
Sphere Torus Klein bottle Projective plane

From a plane model one can easily determine if the surface is oriented or not. It is nonori-
a a
ented if and only if, for some label , the edges labelled by have the same direction when
read clockwise. (This corresponds to the Möbius band.)
A plane model, and thus a compact surface, can also be represented by a (circular) word
by reading the model clockwise, and concatenating the labels with the convention that 1 a
is chosen if the direction of the edge is counter clockwise. Hence, the sphere is represented
by the word abb a 1 1
aba b
, the torus by 1 1
, the Klein bottle by aba b
1
and the projective
plane by abb a 1
.
These surfaces, as do the other surfaces, have many
other plane models and representing words as well. A
word representing a connected sum of two surfaces,
W W
represented by words 1 and 2 , is obtained by con-
WW
catenating these words to 1 2 . By studying the rela-
tions of the representing words, Theorem 5.18 can be
proved.
Klein bottle
5.3 Genus of a graph 77

Drawing a graph (or any figure) in a surface can be elaborated compared to drawing in a
plane model, where a line that enters an edge of the polygon must continue by the correspond-
ing point of the other edge with the same label (since these points are identified when we glue
the edges together).
a
e4 e5

Example 5.5. On the right we have drawn 6 K


in the Klein bottle. The black dots indicate,
where the lines enter and leave the edges of the e3 e1
plane model. Recall that in the plane model for b e2 e2 b
e1 e3
the Klein bottle the vertical edges of the square
have the same direction.

e4 e5
a

Sphere

S
D EFINITION . In general, if is a surface, then a graph G has an S -embedding, if G can be
S
drawn in without crossing edges.

S
Let 0 be (the surface of) a sphere. According to the next
theorem a sphere has exactly the same embeddings as do
G
the plane. In the one direction the claim is obvious: if is
a planar graph, then it can be drawn in a bounded area of
the plane (without crossing edges), and this bounded area
can be ironed on the surface of a large enough sphere.


Clearly, if a graph can be embedded in one sphere, then it can be embedded in any sphere –
G
the size of the sphere is of no importance. On the other hand, if is embeddable in a sphere
S 0 , then there is a small area of the sphere, where there are no points of the edges. We then
puncture the sphere at this area, and stretch it open until it looks like a region of the plane. In
G
this process no crossings of edges can be created, and hence is planar.

Another way to see this is to use projection


of the sphere to a plane:

Theorem 5.19. A graph G has an S -embedding if and only if it is planar.


0

Therefore instead of planar embeddings we can equally well study embeddings of graphs
in a sphere. This is sometimes convenient, since the sphere is closed and it has no boundaries.
5.3 Genus of a graph 78

Most importantly, a planar graph drawn in a sphere has no exterior face – all faces are bounded
(by edges).
If a sphere is deformed by pressing or stretching, its embeddability properties will remain
the same. In topological terms the surface has been distorted by a continuous transformation.


Torus


Consider next a surface which is obtained from the sphere
S S
0 by pressing a hole in it. This is a torus 1 (or an ori-
S
entable surface of genus 1). The 1 -embeddable graphs
are said to have genus equal to 1.
Sometimes it is easier to consider handles than holes: a torus S 1 can be deformed (by a con-

  


tinuous transformation) into a sphere with a handle.

G S -embeddable, then it can be drawn in any one of the above surfaces without
If a graph is


1


crossing edges.

  1 1

K
5
Example 5.6. The smallest nonplanar graphs 5
K 1 K 1
2
and 3;3 have genus . Also, 7 has genus as can 6
be seen from the plane model (of the torus) on the 3

right. 7
4
1 1

Genus
S n 0 n S
Let n (  ) be a sphere with holes in it. The drawing of an 4 can already be quite
complicated, because we do not put any restrictions on the places of the holes (except that we
S
must not tear the surface into disjoint parts). However, once again an n can be transformed
n
(topologically) into a sphere with handles.
 
 
5.3 Genus of a graph 79

D EFINITION . We define the genus g(G) of a graph G as the smallest integer n, for which G
S
is n -embeddable.

For planar graphs, we have g(G) = 0 , and, in particular,g(K ) = 0 K


4 . For 5 , we have
g(K ) = 1
5 K
, since 5 is nonplanar, but is embeddable in a torus. Also,g(K ) = 1
3;3 .
G S n 0
The next theorem states that any graph can be embedded in some surface n with  .


Theorem 5.20. Every graph has a genus.
This result has an easy intuitive verification. Indeed,


consider a graph G and any of its plane (or sphere)
drawing (possibly with many crossing edges) such that
no three edges cross each other in the same point (such
a drawing can be obtained). At each of these crossing
points create a handle so that one of the edges goes be-


low the handle and the other uses the handle to cross
over the first one.


We should note that the above argument does not deter-
mine g(G) G
, only that can be embedded in some n . S
However, clearly g(G) n
 , and thus the genus g(G)
G
of exists.
The same handle can be utilized by several edges.

Euler’s formula with genus

G
The drawing of a planar graph in a sphere has the advantage that the faces of the embedding
G
are not divided into internal and external. The external face of becomes an ‘ordinary face’
G
after has been drawn in 0 . S
G S
In general, a face of an embedding of in n (with g(G) = n S
) is a region of n surrounded
G ' G S
by edges of . Let again G denote the number of faces of an embedding of in n . We omit
the proof of the next generalization of Euler’s formula.

Theorem 5.21. If G is a connected graph, then


G "G + 'G = 2 2g(G) :
5.3 Genus of a graph 80

G
If is a planar graph, then g(G) = 0, and the above formula is the Euler’s formula for
planar graphs.

D EFINITION . A face of an embedding P(G) 2


in a surface is a -cell, if every simple closed
curve (that does not intersect with itself) can be continuously deformed to a single point.

K
The complete graph 4 can be embedded in a torus such that it has a face that is not a 2-cell.
But this is because g(K ) = 0
4 1
, and the genus of the torus is . We omit the proof of the
general condition discovered by YOUNGS:

Theorem 5.22 (YOUNGS (1963)). The faces of an embedding of a connected graph G in a


surface of genus g(G)
are 2-cells.

Lemma 5.12. For a connected G with G  3 we have 3'G  2"G .


Proof. If G = 3, then the claim is trivial. Assume thus that G  4. In this case we need the
knowledge that 'G is counted in a surface that determines the genus of G (and in no surface
with a larger genus). Now every face has a border of at least three edges, and, as before, every
nonbridge is on the boundary of exactly two faces. ut
Theorem 5.23. For a connected G with G  3,
g(G)  16 "G 12 (G 2) :
Proof. By the previous lemma, 3'G  2"G , and by the generalized Euler’s formula, 'G =
"G G + 2 2g(G). Combining these we obtain that 3"G 3G + 6 6g(G)  2"G , and
the claim follows. ut
By this theorem, we can compute lower bounds for the genus g(G)
without drawing any
embeddings. As an example, let G=K 8 . In this case G  = 8 " = 28
, G , and so g(G)
 35 .
g(G) 2
Since the genus is always an integer, K
 . We deduce that 8 cannot be embedded in
S
the surface 1 of the torus.
IfH G , then clearly g(H) g(G)
 , since H G
is obtained from by omitting vertices
and edges. In particular,

Lemma 5.13. For a graph G of order n, g(G)  g(Kn ).


For the complete graphs Kn a good lower bound was found early.

Theorem 5.24 (H EAWOOD (1890)). If n  3, then

g(Kn )  (n 3)(n 12
4) :
Proof. The number of edges in Kn is equal to "G = n(n 1). By Theorem 5.23, we obtain
1

g(Kn )  (1=6)"G (1=2)(n 2) = (1=12)(n 3)(n 4) : ut


2
5.3 Genus of a graph 81

This result was dramatically improved to obtain

Theorem 5.25 (R INGEL AND n  3, then


YOUNGS (1968)). If

g(Kn ) = (n 3)(n 4)  :
12
Therefore g(K ) = d3  2=12e = d1=2e = 1. Also, g(K ) = 1, but g(K ) = 2.
6 7 8

By Theorem 5.25,

Theorem 5.26. For all graphs G of order n  3,


 
g(G)  (n 3)(n 4) :
12
Also, we know the exact genus for the complete bipartite graphs:

Theorem 5.27 ( R INGEL (1965)). For the complete bipartite graphs,


 
g(Km;n ) = (m 2)(n 2) :
4
Chromatic numbers

G 4
For the planar graphs , the proof of the -Colour Theorem, (G) 4 , is extremely long
4
and difficult. This in mind, it is surprising that the generalization of the -Colour Theorem for
1
genus  is much easier. H EAWOOD proved a hundred years ago:

Theorem 5.28 (H EAWOOD ). If g(G) = g  1, then



7 + p1 + 48g 
(G)  2 :
Notice that for g = 0 this theorem would be the 4-colour theorem. H EAWOOD proved it
‘only’ for g  1.
Using the result of R INGEL AND YOUNGS and some elementary computations we can
prove that the above theorem is the best possible.

Theorem 5.29. For each g  1, there exists a graph G with genus g(G) = g so that

7 + p1 + 48g 
(G) = 2 :
nonplanar graph G can be embedded in a torus, then g(G) = 1, and (G)  b(7 +
p1If+a48g)=2 = 7. Moreover, for G = K we have that (K ) = 7 and g(K ) = 1.
7 7 7
5.3 Genus of a graph 82

Three dimensions

3
Every graph can be drawn without crossing edges in the -dimensional space. Such a drawing
is called spatial embedding of the graph. Indeed, such an embedding can be achieved by
G
putting all vertices of on a line, and then drawing the edges in different planes that contain
G
the line. Alternatively, the vertices of can be put in a sphere, and drawing the edges as
straight lines crossing the sphere inside.

G G
A spatial embedding of a graph is said to have linked cycles, if two cycles of form a
link (they cannot be separated in the space). By C ONWAY and G ORDON in 1983 every spatial
K
embedding of 6 contains linked cycles.
It was shown by ROBERTSON , S EYMOUR AND T HOMAS (1993) that there is a set of 7
G
graphs such that a graph has a spatial embedding without linked cycles if and only if G
does not have a minor belonging to this set.
This family of forbidden graphs was originally found by S ACHS (without proof), and it
K
contains 6 and the Petersen graph. Every graph in the set has 15
edges, which is curious.

For further results and proofs concerning graphs in surfaces, see

B. M OHAR AND C. T HOMASSEN, “Graphs on Surfaces”, Johns Hopkins, 2001.


6

Directed Graphs

6.1 Digraphs

In some problems the relation between the objects is not


symmetric. For these cases we need directed graphs, where
the edges are oriented from one vertex to another.
As an example consider a map of a small town. Can you
make the streets one-way, and still be able to drive from one
house to another (or exit the town)?

Definitions

D EFINITION . A digraph (or a directed graph) D = (V ;E ) V


D D consists of the vertices D
E V V vv
and (directed) edges D  D  D (without loops ). We still writeuv (u;v)
for , but note
that now uv = vu
6 . For each pair e = uv e e = vu (= (v;u))
define the inverse of as 1 .

Note that e 2 ED does not imply e 2 ED .


1

D be a digraph. Then A is its


D EFINITION . Let
 subdigraph, if VA  VD and EA  ED ,
 induced subdigraph, A = D[X℄, if VA = X and EA = ED \ (X  X).

The underlying graph U(D)


of a digraph D
V e E
is the graph on D such that if 2 D , then
the undirected edge with the same ends is in
U(D) .

D G G = U(D) and e 2 ED implies e 2= ED .


A digraph is an orientation of a graph , if 1

D
In this case, is said to be an oriented graph.

D
D EFINITION . Let be a digraph. A walk W = e e ::: e : u
1 2 k !?
v U(D)
of is a directed
e E
walk, if i 2 D for all 2 i [1;k℄
. Similarly, we define directed paths and directed cycles as
directed walks and closed directed walks without repetitions of vertices.
D
The digraph is di-connected, if, for all 6 u=v , there exist directed paths u !?
v and
v u
! . The maximal induced di-connected subdigraphs are the di-components of .
?
D
6.1 Digraphs 84

Note that a graph G = U(D) might be connected, although the digraph D is not di-
connected.

D EFINITION . The indegree and the outdegree of a vertex are defined as follows

dID (v) = jfe 2 ED j e = xvgj; dOD (v) = jfe 2 ED j e = vxgj :


We have the following handshaking lemma. (You offer and accept a handshake.)

Lemma 6.1. Let D be a digraph. Then


X X
dID (v) = jED j = dOD (v):
v2D v2D

Directed paths

The relationship between paths and directed paths is in gen-


eral rather complicated. This digraph has a path of length
five, but its directed paths are of length one.

There is a nice connection between the lengths of directed paths and the chromatic number
(D) = (U(D)).
Theorem 6.1 (ROY (1967),G ALLAI (1968)). A digraph D has a directed path of length
(D) 1 .

A E
Proof. Let  D be a minimal set of edges such that the subdigraph D A contains no
k D A
directed cycles. Let be the length of the longest directed path in .
v D
For each vertex 2 , assign a colour (v) = i v
, if a longest directed path from has
length i 1 D A in 1 i k+1
. Here   .
P = e e ::: e r 1
First we observe that if 1 2 u v D A
r (  ) is any directed path ! in
?
, then
(u) = (v)
6 (v) = i
. Indeed, if Q: v w
, then there exists a directed path i 1 ! of length ? ,
?

and PQ D A
is a directed path, since PQ: u w
does not contain directed cycles. Since ! ,
(u) = i = (v)
6 e = uv E
. In particular, if (u) = (v)
2 D A , then 6 .
e = vu A
Consider then an edge A (D A) + e
2 . By the ?minimality of , contains a
C: u v u
directed cycle !
?
u v
! , where the part ! D A
is a directed path in , and hence
(u) = (v)6 U(D)
. This shows that is a proper colouring of (D) k + 1
, and therefore  ,
k (D) 1
that is,  . ut
The bound (D) 1 is the best possible in the following sense:

Theorem 6.2. Every graph G has an orientation D , where the longest directed paths have
lengths (G) 1.
6.1 Digraphs 85

Proof. Let k = (G) k G


and let be a proper -colouring of . As usual the set of colours is
[1;k℄. We orient each edge uv E
2 G by setting 2 D , if uv E (u) < (v)
. Clearly, the so
D
obtained orientation has no directed paths of length  . k 1 ut
D EFINITION . An orientation D
of an undirected graph G is acyclic, if it has no directed
cycles. Leta(G) be the number of acyclic orientations of G.
The next result is charming, since G  ( 1) measures the number of proper colourings of
G using 1 colours!
Theorem 6.3 (S TANLEY (1973)). Let G be a graph of order n. Then the number of the acyclic
G
orientations of is
a(G) = ( 1)nG( 1) ;
where G is the chromatic polynomial of G.

Proof. The proof is by induction on "G . First, if G is discrete, then G (k) = k n , and a(G) =
1 = ( 1)n ( 1)n = ( 1)n G( 1) as required.
Now G (k) is a polynomial that satisfies the recurrence G (k) = G e (k) Ge (k). To
prove the claim, we show that a(G) satisfies the same recurrence.
Indeed, if
a(G) = a(G e) + a(G  e) (6.1)
then, by the induction hypothesis,

a(G) = ( 1)n G e( 1) + ( 1)n Ge( 1) = ( 1)n G( 1) :


1

For (6.1), we observe that every acyclic orientation of G gives an acyclic orientation of G e.
On the other hand, if D is an acyclic orientation of G e for e = uv , it extends to an acyclic
orientation of G by putting e : u ! v or e : v ! u. Indeed, if D has no directed path
1 2
u ! v, we choose e , and if D has no directed path v ! u, we choose e . Note that since
?
2
?
1
D is acyclic, it cannot have both ways u ! v and v ! u.
? ?

We conclude that a(G) = a(G e)+b, where b is the number of acyclic orientations D of
G e that extend in both ways e and e . The acyclic orientations D that extend in both ways
1 2
are exactly those that contain

u ! v nor v ! u as a directed path.


neither ? ?
(6.2)

Each acyclic orientation of G  e corresponds in a natural way to an acyclic orientation D


of G e that satisfies (6.2). Therefore b = a(G  e), and the proof is completed. ut
One-way traffic
Every graph can be oriented, but the result may not be di-connected. In the one-way traffic
problem the resulting orientation should be di-connected, for otherwise someone is not able
to drive home. ROBBINS’ theorem solves this problem.
6.1 Digraphs 86

D EFINITION . A graph G is di-orientable, if there is a di-connected oriented graph D such


thatG = U(D) .

Theorem 6.4 (ROBBINS (1939)). A connected graph G is di-orientable if and only if G has
no bridges.

G e
Proof. If has a bridge , then any orientation of G has at least two di-components (both
sides of the bridge).
G G C
Suppose then that has no bridges. Hence has a cycle , and a cycle is always di-
H G
orientable. Let then  be maximal such that it has a di-orientation H . If D
, then H=G
we are done.
Otherwise, there exists an edge e = vu E
2 G such that u e v
u H v=H G
2 but 2 (because is connected). The edge is e
not a bridge and thus there exists a cycle P0 P Q
C 0 = ePQ: v ! u ! w ! v
? ?
w
in G, where w is the last vertex inside H .
In the di-orientation DH of H there is a directed path P 0 : u ! w. Now, we orient e: v !
?

u and the edges of Q in the direction Q: w ! v to obtain a directed cycle eP 0 Q: v ! u !


? ?

w ! v. In conclusion, G[VH [ VC ℄ has a di-orientation, which contradicts the maximality


?

assumption on H . This proves the claim. ut


Example 6.1. Let D be a digraph. A directed Euler tour of D is a directed closed walk that
uses each edge exactly once. A directed Euler trail of D is a directed walk that uses each
edge exactly once.
The following two results are left as exercises.
D
(1) Let be a digraph such that U(D) D
is connected. Then has a directed Euler tour if and
d (v) = d (v)
I
only if D O
D for all vertices .v
D
(2) Let be a digraph such that U(D) D
is connected. Then has a directed Euler trail if and
d (v) = d (v)
I
only if D O
D v
for all vertices with possibly excepting two vertices x;y
for which
d (v) d (v) = 1
j ID O j
D .
The above results hold equally well for multidigraphs, that is, for directed graphs, where
we allow parallel directed edges between the vertices.

Example 6.2. The following problem was first studied by H UTCHINSON AND W ILF (1975)
with a motivation from DNA sequencing. Consider words over an alphabet A = a ;a ;::: ;a
f1 2 ng
n w
of letters, that is, each word is a sequence of letters. In the case of DNA, the let-
A;T;C;G
ters are s r
. In a problem instance, we are given nonnegative integers i and ij for
1 i;j n w
  , and the question is: does there exist a word in which each letter i occurs a
s a a r
exactly i times, and i is followed by j exactly ij times.
n=2 s =3 r =1 r =2 r =1 r =0
For instance, if , 1 , and 11 , 12 , 21 , 22 , then the word
aaaaa
1 2 1 1 2 is a solution to the problem.
6.1 Digraphs 87

Consider a multidigraph D V =A
with D r aa
for which there are ij edges i j . It is rather
D
obvious that a directed Euler trail of gives a solution to the sequencing problem.

Tournaments

D EFINITION . A tournament T is an orientation of a complete graph.


Example 6.3. There are four tournaments of four vertices that are not isomorphic with each
other. (Isomorphism of directed graphs is defined in the obvious way.)

Theorem 6.5 (R ÉDEI (1934)). Every tournament has a directed Hamilton path.

K (Kn ) = n, and hence by Theorem 6.1, a tournament


Proof. The chromatic number of n is
T n n 1. This is then a directed Hamilton path visiting
of order has a directed path of length
each vertex once. ut
The vertices of a tournament can be easily reached from one vertex (sometimes called the
king).

v T
Theorem 6.6 (L AUDAU (1953)). Let be a vertex of a tournament of maximum outdegree.
u v u
Then for all , there is a directed path !
?
of length at most two.

Proof. Let T be an orientation of Kn , and let dO


T (v) = d be the maximum outdegree in T .
Suppose that there exists an x, for which the directed distance from v to x is at least three.
It follows that xv 2 ET and xu 2 ET for all u with vu 2 ET . But there are d vertices in
A = fy j vy 2 ET g, and thus d + 1 vertices in fy j xy 2 ET g = A [ fvg. It follows that the
outdegree of x is d + 1, which contradicts the maximality assumption made for v . ut
D
Problem. Ádám’s conjecture states that in every digraph with a directed cycle there exists
an edge uv the reversal of which decreases the number of directed cycles. Here the new
digraph has the edge vu uv
instead of .

n
Example 6.4. Consider a tournament of teams that play once against each other, and sup-
pose that each game has a winner. The situation can be presented as a tournament, where the
v vv v v
vertices correspond to the teams i , and there is an edge i j , if i won j in their mutual
game.

v v
D EFINITION . A team is a winner (there may be more than one winner), if comes out with
the most victories in the tournament.
6.1 Digraphs 88

v u v
Theorem 6.6 states that a winner either defeated a team or defeated a team that
defeated . u
A ranking of a tournament is a linear ordering of the teams i1 i2 v >v >
   in >v
that should reflect the scoring of the teams. One way of ranking a tournament could be by a
Hamilton path: the ordering can be obtained from a directed Hamilton path i1 ! i2 !P:v v
::: v
! in . However, a tournament may have several directed Hamilton paths, and some of
these may do unjust for the ‘real’ winner.

Example 6.5. Consider a tournament of six teams


1;2;::: ;6 , and let T
be the scoring digraph as in 1 2

1 2 4 5 6 3
the figure. Here ! ! ! ! ! is a di-
rected Hamilton path, but this extends to a directed 6 3

Hamilton cycle (by adding 3 1 ! )! So for every


team there is a Hamilton path, where it is a winner, 5 4

and in another, it is a looser.

s (j) = d (j)
Let 1 O
T j
be the winning number of the team (the number of teams beaten by
j ). In the above tournament,

s (1) = 4; s (2) = 3; s (3) = 3; s (4) = 2; s (5) = 2; s (6) = 1 :


1 1 1 1 1 1

So, is team 1 the winner? If so, is 2 or 3 next? Define the second-level scoring for each team
by X
s (j) =
2 s (i) :
1
ji2ET
j
This tells us how good teams beat. In our example, we have

s (1) = 8; s (2) = 5; s (3) = 9; s (4) = 3; s (5) = 4; s (6) = 3 :


2 2 2 2 2 2

Now, it seems that 3 is the winner,but 4 and 6 have the same score. We continue by defining
m
inductively the th-level scoring by
X
sm(j) = sm (i) :
1
ji2ET

It can be proved (using matrix methods) that for a di-connected tournament with at least four
teams, the level scorings will eventually stabilize in a ranking of the tournament: there exits an
m m
for which the th-level scoring gives the same ordering as do the (m+k)
th-level scorings
k 1 T
for all  . If is not di-connected, then the level scoring should be carried out with respect
to the di-components.
1 3 2
In our example the level scoring gives ! ! ! ! ! as the ranking of the 5 4 6
tournament.
6.2 Network Flows 89

6.2 Network Flows

Various transportation networks or water pipelines are conveniently represented by weighted


directed graphs. These networks usually possess also some additional requirements. Goods are
transported from specific places (warehouses) to final locations (marketing places) through a
network of roads. In modeling a transportation network by a digraph, we must make sure that
the number of goods remains the same at each crossing of the roads. The problem setting for
such networks was proposed by T.E. Harris in the 1950s. The connection to Kirchhoff’s Cur-
rent Law (1847) is immediate. According to this law, in every electrical network the amount
of current flowing in a vertex equals the amount flowing out that vertex.

Flows

D EFINITION . A network N consists of 4


 an underlying digraph D = (V;E),
 two distinct vertices s and r, called the source and 5
5
2

the sink of N , and s 4 2 r


 a capacity function : V  V ! R (nonnegative
+
4

real numbers), for which (e) = 0, if e 2 = E. 6 5

Denote VN = V and EN = E .

Let A  VN be a set of vertices, and f : VN  VN ! R any function such that f(e) = 0,


if e 2
= EN . We adopt the following notations:
[A;A℄ = feX2 ED j e = uv; u 2 A; v 2= Ag ;
X
f (A) =
+
f(e) and f (A) = f(e) :
e2[A;A℄ e2[A;A℄

In particular, X X
f (u) =
+
f(uv) and f (u) = f(vu) :
v2N v2N

D EFINITION . A flow in a network N is a function f : VN  VN ! R such that


+

0  f(e)  (e) for all e; and f (v) = f (v) for all v 2= fs;rg :
+

Example 6.6. The value f(e) can be taught of as the rate at which transportation actually
e
happens along the channel which has the maximum capacity (e)
. The second condition
states that there should be no loss.
6.2 Network Flows 90
4

IfN = (D;s;r; ) is a network of water 4

(e)
pipes, then the value gives the capacity 5 1

x m =min
( 3
e
) of the pipe . s 3
3
0 r
The previous network has a flow that is indicated 4 4
on the right. 4
f N
A flow in is something that the network can handle. E.g., in the above figure the
source should not try to feed the network the full capacity ( 3
11 m =min
) of its pipes, because
the junctions cannot handle this much water.

D EFINITION . Every network N has a zero flow defined byf(e) = 0 e


for all . For a flow f
A V A f
and each subset  N , define the resultant flow from and the value of as the numbers
val(fA) = f (A) f (A) and val(f) = val(fs) (= f (s) f (s)) :
+ +

A flow f of a network N is a maximum flow, if there does not exist any flow f 0 such that
val(f) < val(f 0).
The value val(f) of a flow is the overall number of goods that are (to be) transported
through the network from the source to the sink. In the above example, val(f) = 9
.
Lemma 6.2. Let N = (D;s;r; ) be a network with a flow f .
(i) If A  N n fs;r g, then val(fA ) = 0.
(ii) val(f) = val(fr ).

Proof. Let A  N n fs;r g. Then


X X X
0 = (f (v) f (v)) = f (v)
+ +
f (v) = f (A) f (A) = val(fA);
+

v2A v2A v2A


where the third equality holds since the values of the edges uv with u;v 2 A cancel each out.
The second claim is also clear. ut
Improvable flows
f N
Let be a flow in a network , and let P = e e ::: e
1 2 n be an undirected path in N where an
e P e =vv
edge i is along , if i E P e =v v E
i i+1 2 N , and against , if i i+1 i 2 N .
We define a nonnegative number (P) P
for as follows:
(
(P) = min (e); where (e) =
(e) f(e) if e is along P ;
e i f(e) if e is against P .

f
D EFINITION . Let be a flow in a network N. A 4

P: s r f (P) > 0.
5 1
path !
?
is ( -)improvable, if
s 3 0 r
3

(P) = 1,
4
On the right, the bold path has value 4

and therefore this path is improvable. 4


6.2 Network Flows 91

Lemma 6.3. Let N be a network. If f is a maximum flow of N , then it has no improvable


paths.

Proof. Define 8
>
<f(e) + (P) e
if is along P ;
f 0(e) = >
f(e) (P) e
if is against P ;
:
f(e) e
if is not in P :
f
Then 0 is a flow, since at each intermediate ver-
4

v = s;r (f ) (v) = (f ) (v)


4
tex 2 f g, we have 0 0+ ,
5 2
and the capacities of the edges are not exceeded.
Now val(f ) = val(f)+(P)
0 P
, since has exactly
s 3
2
0 r ut
one edge sv E s
2 N for the source . Hence, if 5 4

(P) > 0 , then we can improve the flow. 4

Max-Flow Min-Cut Theorem


D EFINITION . Let N = (D;s;r; ) be a network. For a subset S  VN with s 2 S and r 2= S ,
S
let the cut by be

[S℄ = [S;S℄ (= fuv 2 EN j u 2 S;v 2= S g) :


The capacity of the cut [S℄ is the sum
X
[S℄ = (S) = (e) :
+

e2[S ℄

A cut [S℄ is a minimum cut, if there is no cut [R℄


[R℄ < [S℄.
4
with 5

5 2
Example 6.7. In our original network the capac-
ity of the cut for the indicated vertices is equal s 4 2 r
10
4
to . 6 5

Lemma 6.4. For a flow f and a cut [S℄ of N , 4

val(f) = val(fS ) = f (S) f (S) :


+

Proof. Let SI = S n fsg. Now val(SI ) = 0 (since SI  N n fs;r g), and val(f) = val(fs ).
Hence
X X
val(fS ) =val(fs) f(sv) + f(vs)
v2SI v2SI
X X
+ val(fS ) +
I
f(sv) f(vs)
v2SI v2SI
=val(fs) = val(f) :
ut
6.2 Network Flows 92

f
Theorem 6.7. For a flow and any cut [S℄ of N , val(f)  [S℄. Furthermore, equality holds
u S v=S
if and only if for each 2 and 2 ,
(i) if e = uv 2 EN , then f(e) = (e),
(ii) if e = vu 2 EN , then f(e) = 0.

Proof. By the definition of a flow,


X X
f (S) =
+
f(e)  (e) = [S℄ ;
e2[S ℄ e2[S ℄

and f (S)  0. By Lemma 6.4, val(f) = val(fS ) = f (S) f (S), and hence val(f) 
+

[S℄, as required. Also, the equality val(f) = [S℄ holds if and only if
(1) f (S) = [S℄ and (2) f (S) = 0. This holds if and only if f(e) = (e) for all e 2 [S℄
+

(since f(e)  (e)), and


(2) f(e) = 0 for all e = vu with u 2 S , v 2
= S.
This proves the claim. ut
f is a maximum flow and [S℄ a minimum cut, then
In particular, if

val(f)  [S℄ :
Corollary 6.1. If f is a flow and [S℄ a cut such that val(f) = [S℄, then f is a maximum flow
and [S℄ a minimum cut.

The following main result of network flows was proved independently by E LIAS , F EIN -
STEIN ,S HANNON, by F ORD AND F ULKERSON, and by ROBACKER in 1955 – 56. The present
approach is due to Ford and Fulkerson.

Theorem 6.8. A flow f of a network N is maximum if and only if there are no f -improvable
paths in . N
Proof. By Lemma 6.3, a maximum flow cannot have improvable paths.
N f
Conversely, assume that contains no -improvable paths, and let

SI = fu 2 N j for some path P : s ! u; (P) > 0g :


?

Set S=S I [ f g. s
Consider an edge e = uv E u S v=S u S
2 N , where 2 and 2 . Since 2 , there exists a
path P : s u (P) > 0
! with
?
v = S (Pe) = 0
. Moreover, since 2 , Pe: s
for the path ! .
?
v
Therefore (e) = 0 f(e) = (e)
, and so .
By the same argument, for an edgee = vu E v = S u S f(e) = 0
2 N with 2 and 2 , .
By Theorem 6.7, we have val(f) = [S℄ f
. Corollary 6.1 implies now that is a maximum
flow (and [S℄
is a minimum cut). ut
6.2 Network Flows 93

N
Theorem 6.9. Let be a network, where the capacity function : V  V ! N has integer
N
values. Then has a maximum flow with integer values.

f
Proof. Let 0 be the zero flow, 0f (e) = 0 e V V
for all 2  . A maximum flow is constructed
using Lemma 6.3 by increasing and decreasing the values of the edges by integers only. ut
The proof of Theorem 6.8 showed also

Theorem 6.10 (Max-Flow Min-Cut). In a network N , the value val(f) of a maximum flow
equals the capacity [S℄
of a minimum cut.

Applications to graphs?
The Max-Flow Min-Cut Theorem is a strong result, and many of our previous results follow
from it.
G
We mention a connection to the Marriage Theorem, Theorem 3.9. For this, let be a
bipartite graph with a bipartition (X;Y ) N
, and consider a network s;r
with vertices f g [
X Y sx E (sx) = 1 yr E (yr) = 1
[ . Let the edges (with their capacities) be 2 N ( ), 2 N( )
x Xy Y
for all 2 , 2 together with the edges xy E (xy) = X + 1 xy E
2 N( j j ), if 2 G for
x Xy Y G X N
2 , 2 . Then has a matching that saturates if and only if has a maximum flow
X
of value j j. Now Theorem 6.10 gives Theorem 3.9.
Next we apply the theorem to unit networks, where the capacities of the edges are equal
(e) = 1
to one ( e E
for all 2 N ). We obtain results for (directed) graphs.

Lemma 6.5. Let N be a unit network with source s and sink r.


(i) The value val(f) of a maximum flow equals the maximum number of edge-disjoint directed
paths s ! r .
?

(ii) The capacity of a minimum cut [S℄ equals the minimum number of edges whose removal
destroys the directed connections s ! r from s to r .
?

Proof. Exercise. ut
u v D
Corollary 6.2. Let and be two vertices of a digraph . The maximum number of edge-
u
disjoint directed paths ! v?
equals the minimum number of edges, whose removal destroys
u v D
all the directed connections !
?
from .

Proof. A network N with source s and sink r is obtained by setting the capacities equal to 1.
The claim follows from Lemma 6.5 and Corollary 6.10. ut
u v G
Corollary 6.3. Let and be two vertices of a graph . The maximum number of edge-
disjoint paths u!
?
v
equals the minimum number of edges, whose removal destroys all the
u
connections ! from .
?
v D
D G
Proof. Consider the digraph that is obtained from by replacing each (undirected) edge
uv E uv E vu E
2 G by two directed edges 2 D and 2 D . The claim follows then easily from
Corollary 6.2. ut
6.2 Network Flows 94

The next corollary is Menger’s Theorem for edge connectivity.


G k
Corollary 6.4. A graph is -edge connected if and only if any two distinct vertices of G are
k
connected by at least independent paths.

Proof. The claim follows immediately from Corollary 6.3. ut


Seymour’s 6-flows
k
D EFINITION . A -flow (H; ) of an undirected graph G is an orientation H of G together
with an edge colouring : EH ! [0;k 1℄ such that for all vertices v 2 V ,
X X
(e) = (f) ; (6.3)
e=vu2EH f =uv2EH
that is, the sum of the incoming values equals the sum of the outgoing values. A -flow is k
nowhere zero, if (e) = 0 e E
6 for all 2 H .
k
In the -flows we do not have any source or sink. For convenience, let (e ) = (e)
1

e E H G
for all 2 H in the orientation of so that the condition (6.3) becomes
X
(e) = 0: (6.4)
e=vu2EH

1 1
2

Example 6.8. A graph with a nowhere zero -flow.4


1 2
3

The condition (6.4) generalizes to the subsets A  VG in a natural way,


X
(e) = 0 ; (6.5)
e2[A;A℄
A cancel out each other. In particular,
since the values of the edges inside
Lemma 6.6. If G has a nowhere zero k -flow for some k , then G has no bridges.
Tutte’s Problem. It was conjectured by T UTTE (1954) that every bridgeless graph has a
5 5
nowhere zero -flow. The Petersen graph has a nowhere zero -flow but does not have any
4 5
nowhere -flows, and so is the best one can think of. Tutte’s conjecture resembles the - 4
Colour Theorem, and indeed, the conjecture is known to hold for the planar graphs. The proof
4
of this uses the -Colour Theorem.
In order to fully appreciate Seymour’s result, Theorem 6.11, we mention that it was proved
as late as 1976 (by JAEGER) that every bridgeless G k
has a nowhere zero -flow for some
k
integer .
S EYMOUR’s remarkable result reads as follows:
6.2 Network Flows 95

Theorem 6.11 (S EYMOUR’s (1981)). Every bridgeless graph has a nowhere zero -flow. 6
Proof. Omitted. ut
D EFINITION . The flow number f(G) of a bridgeless graph G is the least integer k for which
G k
has a nowhere zero -flow.

Theorem 6.12. A connected graph G has a flow number f(G) = 2 if and only if it is eulerian.
Proof. Suppose G is eulerian, and consider an Euler tour W of G. Let D be the orientation
of G corresponding to the direction of W . If an edge uv 2 ED , let (e) = 1. Since W arrives
and leaves each vertex equally many times, the function is a nowhere zero 2-flow.
Conversely, let be a nowhere zero 2-flow of an orientation D of G. Then necessarily the
degrees of the vertices are even, and so G is eulerian. ut
Example 6.9. For each 3-regular bipartite graph G, we have f(G)  3. Indeed, let G be
(X;Y )-biparte. By Corollary 3.1, a 3-regular graph has a perfect matching M . Orient the
edges e 2 M from X to Y , and set (e) = 2. Orient the edges e 2 = M from Y to X , and set
(e) = 1. Since each x 2 X has exactly one neighbour y 2 Y such that xy 2 M , and two
1 1
neighbours y ;y 2 Y such that xy ;xy 2
2 3 2 3 = M , we have that f(G)  3.
Theorem 6.13. We have f(K ) = 4, and if n > 4, then
4

(
f(Kn) = 32 ifif nn isis odd ;
even :

Proof. Exercise. ut
Index

acyclic, 17 directed
digraph, 81 Euler tour, trail, 82
addressable, 21 walk, path, cycle, 80
adjacency matrix, 6 directed graphs (digraph), 4
adjacent, 4 disconnected, 12
augmented path, 34 disconnecting set, 25
available colour, 41, 50 discrete graph, 9
disjoint walks, 11
bipartite, 15 distance, 12
bond, 23 distance function, 5
boundary, 58
edge, 4
edge chromatic number 0 ( ), 41
 G
bridge, 17
edge colouring, 5, 41
capacity, 87
edge cut, 23
capacity function, 85
embedding, 73
choosable, 67
G
chromatic number ( ), 50
end (of a path), 11

chromatic polynomial G , 54
end (of an edge), 4
Euler trail, tour, 28
closed walk, 11
Euler’s formula, 59
colouring, 50
G
complement , 9
eulerian, 28
K
complete bipartite m;k , 15
even component, 37
K
complete graph n , 9
even cycle, 11
exterior: face, boundary,vertex,edge, 58
connected, 23
connected (component), 12 face, 58
connected sum, 72 fan, 26
G
connectivity number ( ), 23 flow, 85
contracted vertex, 55 flow number, 90
critical, 51 forest, 17
crossing number, 64
cube, 9 genus, 75
cut (in a network), 87 graph, 4
cut vertex, 22 graphical sequence, 8
cycle, 11 Hamilton path, cycle, 30
d v
degree G ( ), 7
hamiltonian, 30
Hamming distance, 21
di-connected di-component, 80 homeomorphic, 71
di-orientable, 82
digraph, 79 improvable (path), 86
Index 97

improvement (colouring), 42 orientable surface, 71


incident colours, 41 orientation, 79
indegree, 80 oriented, 71
independent paths, 11 oriented graph, 79
induced subdigraph, 79 outdegree, 80
induced subgraph, 10
interior: face, vertex, edge, 58 parallel edges, 4
intersection graph, 6 partition, 3
inverse pair, 79 path, 11
inverse walk (path), 11 perfect matching, 34
isolated vertex, 7 Petersen graph, 9, 31
isomorphic, 5 planar graph, 57
plane embedding, 57
join of walks, 11 plane model, 72
proper colouring, 41, 50
king, 83
kiss (circles), 68 Ramsey number, 47
Kuratowski graph, 61 ranking, 83
regular graph, 9
latin rectangle, 37
resultant flow, 85
latin square, 37
leaf, 7
same parity, 3
line segment graph, 69
saturate (matching), 34
linked cycles, 77
separates, 22
list chromatic number, 67
separating set, 22
list colouring, 67
Shannon’s switching game, 19
loop, 4
sink and source, 85
Möbius band, 71 "
size G , 4
map, 65 spanning subgraph, 10
matching, 34 spanning tree, 19
maximal planar graph, 60 spatial embedding, 77
maximum sphere, 73
G
degree ( ), 7 sphere with a handle, 74
stable matching, 39
flow, 85
matching, 34 stable set, 15
minimum subdigraph, 79
cut, 87 subdivision, 57
ÆG
degree ( ), 7 subgraph, 10
surface, 71
weighted distance, 12
minor, 69 symmetric difference, 3
monochromatic, 46
multigraph, 4 topologically equivalent, 71
torus, 74
near-triangulation, 67 tournament, 83
neighbour, 4 trail, 28
N v
neighbourhood G ( ), 7 transversal, 36
network, 85 tree, 17
nontrivial graph, 9 triangle, 71
NP-complete problems, 3 triangle-free, 51
triangulation, 71
odd component, 37 trivial graph, 9
odd cycle, 11 trivial path, 11
optimal colouring, 42 2-cell, 76

order G , 4 2-switch, 7
Index 98

underlying digraph, 85 walk, 11


underlying graph, 79 weight, 12
unit networks, 88 weight function, 5
wheel, 49
winning number, 84
vertex, 4
vertex colouring, 5 zero flow, 85

You might also like