0% found this document useful (0 votes)
27 views

Graph Theory

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views

Graph Theory

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 83

Graph Theory

Graph G = (V , E).
V ={vertices}, E={edges}.
a b

h
d
k

e
f

V={a,b,c,d,e,f,g,h,k}
E={(a,b),(a,g),( a,h),(a,k),(b,c),(b,k),...,(h,k)} |E|=16.
Digraph D = (V , A).
V ={vertices}, E={edges}.
a b

h
d
k

e
f

V={a,b,c,d,e,f,g,h,k}
E={(a,b),(a,g),( h,a),(k,a),(b,c),(k,b),...,(h,k)} |E|=16.
Eulerian Graphs

Can you draw the diagram below without taking your pen off the
paper or going over the same line twice?
Bipartite Graphs

G is bipartite if V = X ∪ Y where X and Y are disjoint and every edge


is of the form (x, y) where x ∈ X and y ∈ Y .
In the diagram below, A,B,C,D are women and a,b,c,d are men.
There is an edge joining x and y iff x and y like each other. The thick
edges form a “perfect matching” enabling everybody to be paired with
someone they like. Not all graphs will have perfect matching!

A a

B b

C c

D d
Vertex Colouring

R
Colours {R,B,G}
B B

R G
R

Let C = {colours}. A vertex colouring of G is a map f : V → C.


We say that v ∈ V gets coloured with f (v ).
The colouring is proper iff (a, b) ∈ E ⇒ f (a) 6= f (b).
The Chromatic Number χ(G) is the minimum number of colours
in a proper colouring.
Subgraphs
G′ = (V ′ , E ′ ) is a subgraph of G = (V , E) if V ′ ⊆ V and E ′ ⊆ E.
G′ is a spanning subgraph if V ′ = V .

a f
d e
b g

c h
If V ′ ⊆ V then

G[V ′ ] = (V ′ , {(u, v ) ∈ E : u, v ∈ V ′ })

is the subgraph of G induced by V ′ .


a

b d e G[{a,b,c,d,e}]

c
Similarly, if E1 ⊆ E then G[E1 ] = (V1 , E1 ) where

V1 = {v ∈ V1 : ∃e ∈ E1 such that v ∈ e}

is also induced (by E1 ).

E 1 = {(a,b), (a,d)}

d G[E 1 ]
b
Isomorphism

G1 = (V1 , E1 ) and G2 = (V2 , E2 ) are isomorphic if there exists a


bijection f : V1 → V2 such that

(v , w) ∈ E1 ↔ (f (v ), f (w)) ∈ E2 .

a A

b d B D

c C

f(a)=A etc.
Complete Graphs
Kn = ([n], {(i, j) : 1 ≤ i < j ≤ n})
is the complete graph on n vertices.
Km,n = ([m] ∪ [n], {(i, j) : i ∈ [m], j ∈ [n]})
is the complete bipartite graph on m + n vertices.
(The notation is a little imprecise but hopefully clear.)

K5
Vertex Degrees

dG (v ) = degree of vertex v in G
= number of edges incident with v
δ(G) = min dG (v )
v
∆(G) = max dG (v )
v

G d G (a)=2, d G (g)=4 etc.


b
c
a
δ( G)=2, ∆ (G)=4.
g
d
f
e
Matrices and Graphs
Incidence matrix M: V × E matrix.

1 v ∈e
M(v , e) =
0 v∈/e

e1 e2 e3 e4 e5 e6 e7 e8
a 1 1 1
b 1 1 1
c 1 1 1
d 1 1 1
e 1 1 1 1
e 1
b c
e5
e e6
e2 e 4
e 8
e7
a e d
3
Adjacency matrix A: V × V matrix.

1 v , w adjacent
A(v , w) =
0 otherwise

a b c d e
a 1 1 1
b 1 1 1
c 1 1 1
d 1 1 1
e 1 1 1 1

e 1
b c
e5
e e6
e2 e 4
e 8
e7
a e d
3
Theorem
X
dG (v ) = 2|E|
v ∈V

Proof Consider the incidence matrix M. Row v has dG (v )


1’s. So X
# 1’s in matrix M is dG (v ).
v ∈V

Column e has 2 1’s. So

# 1’s in matrix M is 2|E|.


Corollary

In any graph, the number of vertices of odd degree, is even.

Proof Let ODD = {odd degree vertices} and


EVEN = V \ ODD.
X X
d(v ) = 2|E| − d(v )
v ∈ODD v ∈EVEN

is even.
So |ODD| is even. 
Paths and Walks

W = (v1 , v2 , . . . , vk ) is a walk in G if (vi , vi+1 ) ∈ E for 1 ≤ i < k .


A path is a walk in which the vertices are distinct.
W1 is a path, but W2 , W3 are not.
b d

a c e

g f

W1 = a,b,c,e,d
W2 =a,b,a,c,e
W3 =g,f,c,e,f
A walk is closed if v1 = vk . A cycle is a closed walk in which the
vertices are distinct except for v1 , vk .
b, c, e, d, b is a cycle.
b, c, a, b, d, e, c, b is not a cycle.

b d

a c e

g f
Theorem
Let A be the adjacency matrix of the graph G = (V , E) and let
Mk = Ak for k ≥ 1. Then for v , w ∈ V , Mk (v , w) is the number
of distinct walks of length k from v to w.

Proof We prove this by induction on k . The base case


k = 1 is immediate.

Assume the truth of the theorem for some k ≥ 1. For ℓ ≥ 0, let


Pℓ (x, y ) denote the set of walks of length ℓ from x to y . Let
Pk +1 (v , w; x) be the set of walks from v to w whose
penultimate vertex is x. Note that

Pk +1 (v , w; x) ∩ Pk +1 (v , w; x ′ ) = ∅ for x 6= x ′

and [
Pk +1 (v , w) = Pk +1 (v , w; x)
x∈V
So,
X
|Pk +1 (v , w)| = |Pk +1 (v , w; x)|
x∈V
X
= |Pk (v , x)|A(x, w)
x∈V
X
= Mk (v , x)A(x, w) induction
x∈V
= Mk +1 (v , w) matrix multiplication


Connected components

We define a relation ∼ on V .
a ∼ b iff there is a walk from a to b.

b d e

a c f
g

a ∼ b but a 6∼ d.
Claim: ∼ is an equivalence relation.
reflexivity v ∼ v as v is a (trivial) walk from v to v .
Symmetry u ∼ v implies v ∼ u.
(u = u1 , u2 . . . , uk = v ) is a walk from u to v
implies (uk , uk −1 , . . . , u1 ) is a walk from v to u.
Transitivity u ∼ v and v ∼ w implies u ∼ w.
W1 = (u = u1 , u2 . . . , uk = v ) is a walk from u to v
and W2 = (v1 = v , v2 , v3 , . . . , vℓ = w) is a walk
from v to w imples that
(W1 , W2 ) = (u1 , u2 . . . , uk , v2 , v3 , . . . , vℓ ) is a walk
from u to w.
The equivalence classes of ∼ are called connected
components.
In general V = C1 ∪ V2 ∪ · · · ∪ Cr where C1 , C2 , . . . ,
Cr are the connected comonents.
We let comp(G)(= r ) be the number of components of G.
G is connected iff comp(G) = 1 i.e. there is a walk between
every pair of vertices.
Thus C1 , C2 , . . . , Cr induce connected subgraphs
G[C1 ], . . . , G[Cr ] of G
For a walk W we let ℓ(W ) = no. of edges in W .

l(W)=6

Lemma
Suppose W is a walk from vertex a to vertex b and that W
minimises ℓ over all walks from a to b. Then W is a path.

Proof Suppose W = (a = a0 , a1 , . . . , ak = b) and ai = aj


where 0 ≤ i < j ≤ k . Then W ′ = (a0 , a1 , . . . , ai , aj+1 , . . . , ak ) is
also a walk from a to b and ℓ(W ′ ) = ℓ(W ) − (j − i) < ℓ(W ) –
contradiction. 
Corollary
If a ∼ b then there is a path from a to b.

So G is connected ↔ ∀a, b ∈ V there is a path from a to b.


Breadth First Search – BFS

Fix v ∈ V . For w ∈ V let

d(v , w) = length of shortest path from v to w.

For t = 0, 1, 2, . . . , let

At = {w ∈ V : d(v , w) = t}.

A2 A3 A4
A1

v A4 A4
A2 A3
A1
A2 A3
A0 = {v } and v ∼ w ↔ d(v , w) < ∞.
In BFS we construct A0 , A1 , A2 , . . . , by

At+1 = {w ∈
/ A0 ∪ A1 ∪ · · · ∪ At : ∃ an edge
(u, w) such that u ∈ At }.

Note : no edges (a, b) between Ak and Aℓ


for ℓ − k ≥ 2, else w ∈ Ak +1 6= Aℓ .
(1)

In this way we can find all vertices in the same component C as


v.
By repeating for v ′ ∈
/ C we find another component etc.
Characterisation of bipartite graphs

Theorem
G is bipartite ↔ G has no cycles of odd length.

Proof →: G = (X ∪ Y , E).

Y X

X Y Typical Cycle

Y X

Suppose C = (u1 , u2 , . . . , uk , u1 ) is a cycle. Suppose u1 ∈ X .


Then u2 ∈ Y , u3 ∈ X , . . . , uk ∈ Y implies k is even.
← Assume G is connected, else apply following argument to
each component.
Choose v ∈ V and construct A0 , A1 , A2 , . . . , by BFS.

X = A0 ∪ A2 ∪ A4 ∪ · · · and Y = A1 ∪ A3 ∪ A5 ∪ · · ·

We need only show that X and Y contain no edges and then


all edges must join X and Y . Suppose X contains edge (a, b)
where a ∈ Ak and b ∈ Aℓ .
(i) If k 6= ℓ then |k − ℓ| ≥ 2 which contradicts (1)
(ii)

k = ℓ:
a

v
vj b
There exist paths (v = v0 , v1 , v2 , . . . , vk = a) and
(v = w0 , w1 , w2 , . . . , wk = b).
Let j = max{t : vt = wt }.

(vj , vj+1 , . . . , vk , wk , wk −1 , . . . , wj )

is an odd cycle – length 2(k − j) + 1 – contradiction. 


Trees

A tree is a graph which is

(a) Connected and


(b) has no cycles (acyclic).
Lemma
Let the components of G be
C1 , C2 , . . . , Cr , Suppose e = (u, v ) ∈
/ E, u ∈ Ci , v ∈ Cj .
(a) i = j ⇒ comp(G + e) = comp(G).
(b) i 6= j ⇒ comp(G + e) = comp(G) − 1.

(a)

v
u

(b)

u v
Proof Every path P in G + e which is not in G must contain
e. Also,
comp(G + e) ≤ comp(G).
Suppose

(x = u0 , u1 , . . . , uk = u, uk +1 = v , . . . , uℓ = y )

is a path in G + e that uses e. Then clearly x ∈ Ci and y ∈ Cj .


(a) follows as now no new relations x ∼ y are added.
(b) Only possible new relations x ∼ y are for x ∈ Ci and y ∈ Cj .
But u ∼ v in G + e and so Ci ∪ Cj becomes (only) new
component. 
Lemma
G = (V , E) is acyclic (forest) with (tree) components
C1 , C2 , . . . , Ck . |V | = n. e = (u, v ) ∈
/ E, u ∈ Ci , v ∈ Cj .
(a) i = j ⇒ G + e contains a cycle.
(b) i 6= j ⇒ G + e is acyclic and has one less
component.
(c) G has n − k edges.
(a) u, v ∈ Ci implies there exists a path
(u = u0 , u1 , . . . , uℓ = v ) in G.
So G + e contains the cycle u0 , u1 , . . . , uℓ , u0 .

u
v
v
u

(b) Suppose G + e contains the cycle C. e ∈ C else C is a


cycle of G.
C = (u = u0 , u1 , . . . , uℓ = v , u0 ).
But then G contains the path (u0 , u1 , . . . , uℓ ) from u to v –
contradiction.
u2

u1
uℓ−1
u v
Drop in number of components follows from previous Lemma.
The rest follows from
(c) Suppose E = {e1 , e2 , . . . , er } and
Gi = (V , {e1 , e2 , . . . , ei }) for 0 ≤ i ≤ r .
Claim: Gi has n − i components.
Induction on i.
i = 0: G0 has no edges.
i > 0: Gi−1 is acyclic and so is Gi . It follows from part (a) that ei
joins vertices in distinct components of Gi−1 . It follows from (b)
that Gi has one less component than Gi−1 .
End of proof of claim
Thus r = n − k (we assumed G had k components). 
Corollary
If a tree T has n vertices then
(a) It has n − 1 edges.
(b) It has at least 2 vertices of degree 1, (n ≥ 2).

Proof (a) is part (c) of previous lemma. k = 1 since T is


connnected.
(b) Let s be the number of vertices of degree 1 in T . There are
no vertices of degree 0 – these would form separate
components. Thus
X
2n − 2 = dT (v ) ≥ 2(n − s) + s.
v ∈V

So s ≥ 2. 
Theorem
Suppose |V | = n and |E| = n − 1. The following three
statements become equivalent.
(a) G is connected.
(b) G is acyclic.
(c) G is a tree.

Let E = {e1 , e2 , . . . , en−1 } and


Gi = (V , {e1 , e2 , . . . , ei }) for 0 ≤ i ≤ n − 1.
(a) ⇒ (b): G0 has n components and Gn−1 has 1 component.
Addition of each edge ei must reduce the number of
components by 1. Thus Gi−1 acyclic implies Gi is acyclic. (b)
follows as G0 is acyclic.
(b) ⇒ (c): We need to show that G is connected. Since Gn−1 is
acyclic, comp(Gi ) = comp(Gi−1 ) − 1 for each i. Thus
comp(Gn−1 ) = 1.
(c) ⇒ (a): trivial.
Corollary
If v is a vertex of degree 1 in a tree T then T − v is also a tree.

v
Proof Suppose T has n vertices and n − 1 edges. Then
T − v has n − 1 vertices and n − 2 edges. It acyclic and so
must be a tree. 
How many trees? – Cayley’s Formula
n=4

4 12

n=5

5 60 60

n=6

6 120 360 90

360
360
Prüfer’s Correspondence

There is a 1-1 correspondence φV between spanning trees of


KV (the complete graph with vertex set V ) and sequences
V n−2 . Thus for n ≥ 2

τ (Kn ) = nn−2 Cayley’s Formula.

Assume some arbitrary ordering V = {v1 < v2 < · · · < vn }.


φV (T ):
begin
T1 := T ;
for i = 1 to n − 2 do
begin
si := neighbour of least leaf ℓi of Ti .
Ti+1 = Ti − ℓi .
end φV (T ) = s1 s2 . . . sn−2
end
5 3

11
8 4
7
14 6 2

10
9 13 1 12 15

6,4,5,14,2,6,11,14,8,5,11,4,2
Lemma
v ∈ V (T ) appears exactly dT (v ) − 1 times in φV (T ).

Proof Assume n = |V (T )| ≥ 2. By induction on n.


n = 2: φV (T ) = Λ = empty string.
Assume n ≥ 3:

s1
ℓ1
T1

φV (T ) = s1 φV1 (T1 ) where V1 = V − {s1 }.


s1 appears dT1 (s1 ) − 1 + 1 = dT (s1 ) − 1 times – induction.
v 6= s1 appears dT1 (v ) − 1 = dT (v ) − 1 times – induction. 
Construction of φ−1
V

Inductively assume that for all |X | < n there is an inverse


function φ−1
X . (True for n = 2).
Now define φ−1V by

φ−1 −1
V (s1 s2 . . . sn−2 ) = φV1 (s2 . . . sn−2 ) plus edge s1 ℓ1 ,

where ℓ1 = min{s ∈ V : s ∈
/ {s1 , s2 , . . . sn−2 }} and
V1 = V − {ℓ1 }. Then

φV (φ−1 −1
V (s1 s2 . . . sn−2 )) = s1 φV1 (φV1 (s2 . . . sn−2 ))
= s1 s2 . . . sn−2 .

Thus φV has an inverse and the correspondence is


established.
n = 10
s = 5, 3, 7, 4, 4, 3, 2, 6.
6
8
9
2
10 7
3
6
2
5 4
5
1 4
7 9
1
3

8
Number of trees with a given degree sequence

Corollary
If d1 + d2 + · · · + dn = 2n − 2 then the number of spanning trees
of Kn with degree sequence d1 , d2 , . . . , dn is
 
n−2 (n − 2)!
= .
d1 − 1, d2 − 1, . . . , dn − 1 (d1 − 1)!(d2 − 1)! · · · (dn − 1)!

Proof From Prüfer’s correspondence this is the number of


sequences of length n − 2 in which 1 appears d1 − 1 times, 2
appears d2 − 1 times and so on. 
Eulerian Graphs

An Eulerian cycle of a graph G = (V , E) ia closed walk which


uses each edge e ∈ E exactly once.
e

b h
c
g
f
d
a j

k
The walk using edges a, b, c, d, e, f , g, h, j, k in this order is an
Eulerian cycle.
Theorem
A connected graph is Eulerian i.e. has an Eulerian cycle, iff it
has no vertex of odd degree.

Proof Suppose W = (v1 , v2 , . . . , vm , v1 )


(m = |E|) is an Eulerian cycle. Fix v ∈ V . Whenever W visits v
it enters through a new edge and leaves through a new edge.
Thus each visit requires 2 new edges. Thus the degree of v is
even.
v i-1

v i+1
v

vj-1

v j+1
The converse is proved by induction on |E|. The result is true
for |E| = 3. The only possible graph is a triangle.
Assume |E| ≥ 4. G is not a tree, since it has no vertex of
degree 1. Therefore it contains a cycle C. Delete the edges of
C. The remaining graph has components K1 , K2 , . . . , Kr .
Each Ki is connected and is of even degree – deleting C
removes 0 or 2 edges incident with a given v ∈ V . Also, each
Ki has strictly less than |E| edges. So, by induction, each Ki
has an Eulerian cycle, Ci say.
We create an Eulerian cycle of G as follows: let
C = (v1 , v2 , . . . , vs , v1 ). Let vit be the first vertex of C which is in
Kt . Assume w.l.o.g. that i1 < i2 < · · · < ir .
W =
(v1 , v2 , . . . , vi1 , C1 , , vi1 , . . . , vi2 , C2 , vi2 , . . . , vir , Cr , vir , . . . , v1 )
is an Eulerian cycle of G. 
K1
i1
K 2

i2

C
i3

K3
Independent sets and cliques

S ⊆ V is independent if no edge of G has both of its endpoints


in S.

α(G)=maximum size of an independent set of G.


Theorem
If graph G has n vertices and m edges then

n2
α(G) ≥ .
2m + n

n
Note that this says that α(G) is at least d+1 where d is the
average degree of G.
Proof Let π(1), π(2), . . . , π(ν) be an arbitrary permutation
of V . Let N(v ) denote the set of neighbours of vertex v and let

I(π) = {v : π(w) > π(v ) for all w ∈ N(v )}.


Claim
I is an independent set.

Proof of Claim 1
Suppose w1 , w2 ∈ I(π) and w1 w2 ∈ E. Suppose π(w1 ) < π(w2 ).
Then w2 ∈/ I(π) — contradiction. 
f
b d
h

c e g

a b c d e f g h I
π1 c b f h a g e d {c, f }
π2 g f h d e a b c {g, a}
Claim
If π is a random permutation then
X 1
E(|I|) = .
d(v ) + 1
v ∈V


1 v ∈I
Proof: Let δ(v ) =
0 v∈/I
Thus
X
|I| = δ(v )
v ∈V
X
E(|I|) = E(δ(v ))
v ∈V
X
= Pr(δ(v ) = 1).
v ∈V
Now δ(v ) = 1 iff v comes before all of its neighbours in the
order π. Thus
1
Pr(δ(v ) = 1) =
d(v ) + 1
and the claim follows. 
Thus there exists a π such that
X 1
|I(π)| ≥
d(v ) + 1
v ∈V

and so
X 1
α(G) ≥ .
d(v ) + 1
v ∈V
We finish the proof of the theorem by showing that
X 1 n2
≥ .
d(v ) + 1 2m + n
v ∈V

This follows from the following claim by putting xv = d(v ) + 1


for v ∈ V .
Claim
If x1 , x2 , . . . xk > 0 then

1 1 1 k2
+ + ··· + ≥ . (2)
x1 x2 xk x1 + x2 + · · · + xk
Proof
Multiplying (2) by x1 + x2 + · · · + xk and subtracting k from both
sides we see that (2) is equivalent to
X  xi xj

+ ≥ k (k − 1). (3)
xj xi
1≤i<j≤k

But for all x, y > 0


x y
+ ≥2
y x
and (3) follows. 
Corollary
If G contains no clique of size k then

(k − 2)n2
m≤
2(k − 1)

For example, if G contains no triangle then m ≤ n2 /4.


Proof Let Ḡ be the complement of G i.e. G + Ḡ = Kn .

By assumption

n2
k − 1 ≥ α(Ḡ) ≥ .
n(n − 1) − 2m + n


Parallel searching for the maximum – Valiant

We have n processors and n numbers x1 , x2 , . . . , xn . In each


round we choose n pairs i, j and compare the values of xi , xj .
The set of pairs chosen in a round can depend on the results of
previous comparisons.
Aim: find i ∗ such that xi ∗ = maxi xi .
Claim
For any algorithm there exists an input which requires at least
1
2 log2 log2 n rounds.
9
8
7

4 10
3
6
5

2
1
Suppose that the first round of comparisons involves comparing
xi , xj for edge ij of the above graph and that the arrows point to
the larger of the two values. Consider the independent set
{1, 2, 5, 8, 9}. These are the indices of the 5 largest elements,
but their relative order can be arbitrary since there is no implied
relation between their values.
Let C(a, b) be the maximum number of rounds needed for a
processors to compute the maximum of b values in this way.
Lemma

b2
  
C(a, b) ≥ 1 + C a, .
2a + b

Proof The set of b comparisons defines a b-edge graph G


on a vertices where comparison of xi , xj produces an edge ij of
G. Now, & ' 
b2

b
α(G) ≥ 2a = .
b +1
2a + b
For any independent set I it is always possible to define values
for x1 , x2 , . . . , xa such I is the index set of the |I| largest values
and so that the comparisons do not yield any information about
the ordering of the elements xi , i ∈ I.
Thus after one round one has the problem of finding the
maximum among α(G) elements. 
Now define the sequence c0 , c1 , . . . by c0 = n and
& '
ci2
ci+1 = .
2n + ci

It follows from the previous lemma that

ck ≥ 2 implies C(n, n) ≥ k + 1.
Claim 4 now follows from
Claim
n
ci ≥ .
32i −1

By induction on i. Trivial for i = 0. Then

n2 1
ci+1 ≥ × n
32i+1 −2 2n + i
32 −1
n 3
= 2i+1 −1
× 1
3 2+ i
32 −1
n
≥ 2i+1 −1
.
3

We found an upper bound on the number of edges m ≤ n2 /4
on graphs without triangles. We find a smaller bound if we
exclude cycles of length four.
Theorem
If G contains no cycles of length four then m ≤ (n3/2 + n)/2.

Proof We count in two ways the number N of paths x, y , z


of length two.

For an unordered pair x, z there can be at most one y such that


x, y , z forms a path. Otherwise G will contain a C4 . Thus
 
n
N≤ .
2
Let d(y ) denote the degree of z for y ∈ V . In which case there
)
are d(y
2 choices of x, z to make a path x, y , z.

Thus
X d(y )
N =
2
y ∈V
1X
= −m + d(y )2
2
y ∈V

n 2m 2
 
≥ −m +
2 n

Thus
n2 − n 2m2
≥ −m + .
2 n
We re-arrange to give

n n3 − n2
m2 − m− ≤0
2 4

or

 n 2 n 3 n2
m− − − ≤0
4 4 16
which implies that

n n3/2 n
m− ≤ + .
4 2 4

Matchings
A matching M of a graph G = (V , E) is a set of edges, no two
of which are incident to a common vertex.
M-saturated

M={ }

M-unsaturated
M-alternating path

M not M M not M M

b d

(a,b,c,d,e,f) is an
M-alternating path
f

An M-alternating path joining 2 M-unsaturated vertices is called


an M-augmenting path.
M is a maximum matching of G if no matching M ′ has more
edges.
Theorem
M is a maximum matching iff M admits no M-augmenting paths.

Proof Suppose M has an augmenting path


P = (a0 , b1 , a1 , . . . , ak , bk +1 ) where
ei = (ai−1 , bi ) ∈
/ M, 1 ≤ i ≤ k + 1 and
fi = (bi , ai ) ∈ M, 1 ≤ i ≤ k .
a1 a2

b1 b3

a0 b2

M ′ = M − {f1 , f2 , . . . , fk } + {e1 , e2 , . . . , ek +1 }.
|M ′ | = |M| + 1.
M ′ is a matching
For x ∈ V let dM (x) denote  the degree of x in matching M, So
 dM (x) x 6∈ {a0 , b1 , . . . , bk +1 }
dM (x) is 0 or 1. dM ′ (x) = dM (x) x ∈ {b1 , . . . , ak }
dM (x) + 1 x ∈ {a0 , bk +1 }

So if M has an augmenting path it is not maximum.
Suppose M is not a maximum matching and |M ′ | > |M|.
Consider H = G[M∇M ′ ] where M∇M ′ = (M \ M ′ ) ∪ (M ′ \ M) is
the set of edges in exactly one of M, M ′ .
Maximum degree of H is 2 – ≤ 1 edge from M or M ′ . So H is a
collection of vertex disjoint alternating paths and cycles.

(a) (b)

x
Bipartite Graphs

Let G = (A ∪ B, E) be a bipartite graph with bipartition A, B.


For S ⊆ A let N(S) = {b ∈ B : ∃a ∈ S, (a, b) ∈ E}.
a1 b1

a2 b2

a3 b3

a4 b4

N({a 2 , a 3 }) ={ b 1 b 3 b4 }

Clearly, |M| ≤ |A|, |B| for any matching M of G.


Systems of Distinct Representatives

Let S1 , S2 , . . . , Sm be arbitrary sets. A set s1 , s2 , . . . , sm of m


disitinct elements is a system of distinct representatives if
si ∈ Si for i = 1, 2, . . . , m.

For example {1, 2, 4} is a system of distinct representatives for


{1, 2, 3}, {2, 5, 6}, {2, 4, 5}.

the bipartite graph G with vertex bipartition [m], S


Now define S
where S = m i=1 Si and an edge (i, s) iff s ∈ Si .

Then S1 , S2 , . . . , Sm has a system of distinct representatives iff


G has a matching of size m.
Hall’s Theorem

Theorem
G contains a matching of size |A| iff

|N(S)| ≥ |S| ∀S ⊆ A. (4)

a1 b1

a2 b2

a3 b3

a4 b4

N({a1 , a2 , a3 }) = {b1 , b2 } and so at most 2 of a1 , a2 , a3 can be


saturated by a matching.
: Suppose M = {(a, φ(a)) : a ∈ A} saturates A.

1 φ (2) ε N(S)

2 φ (4)
+non-matching
S
edges
3 φ (1) ε N(S)

4 φ (3) ε N(S)

|N(S)| ≥ |{φ(s) : s ∈ S}|


= |S|

and so (4) holds.


If: Let M = {(a, φ(a)) : a ∈ A′ } (A′ ⊆ A) is a maximum
matching. Suppose a0 ∈ A is M-unsaturated. We show that (4)
fails.
Let
A1 = {a ∈ A : such that a is reachable from a0 by an
M-alternating path.}
B1 = {b ∈ B : such that b is reachable from a0 by an
M-alternating path.}

B1 B1 B1 B1

a0 A1 A1 A1 A1

No A 1 - B\B 1
edges
• B1 is M-saturated else there exists an M-augmenting path.
• If a ∈ A1 \ {a0 } then φ(a) ∈ B1 .

a0 φ(a) a
• If b ∈ B1 then φ−1 (b) ∈ A1 \ {a0 }.
So |B1 | = |A1 | − 1. • N(A1 ) ⊆ B1

a0 b a
So |N(A1 )| = |A1 | − 1 and (4) fails to hold.
Marriage Theorem

Theorem
Suppose G = (A ∪ B, E) is k -regular. (k ≥ 1) i.e. dG (v ) = k for
all v ∈ A ∪ B. Then G has a perfect matching.

Proof k |A| = |E| = k |B| and so |A| = |B|.


Suppose S ⊆ A. Let m be the number of edges incident with S.
Then k |S| = m ≤ k |N(S)|. So (4) holds and there is a matching
of size |A| i.e. a perfect matching.
Edge Covers

A set of vertices X ⊆ V is a covering of G = (V , E) if every


edge of E contains at least one endpoint in X .

{ } is a covering

Lemma
If X is a covering and M is a matching then |X | ≥ |M|.

Proof Let M = {(a1 , bi ) : 1 ≤ i ≤ k }. Then |X | ≥ |M| since


ai ∈ X or bi ∈ X for 1 ≤ i ≤ k and a1 , . . . , bk are distinct. 
Konig’s Theorem

Let µ(G) be the maximum size of a matching.


Let β(G) be the minimum size of a covering.
Then µ(G) ≤ β(G).
Theorem
If G is bipartite then µ(G) = β(G).

Proof Let M be a maximum matching.


Let S0 be the M-unsaturated vertices of A.
Let S ⊇ S0 be the A-vertices which are reachable from S by
M-alternating paths.
Let T be the M-neighbours of S \ S0 .
T T T T

S0 S0 S0 S S S S

Let X = (A \ S) ∪ T .
• |X | = |M|.
|T | = |S \ S0 |. The remaining edges of M cover A \ S exactly
once.
• X is a cover.
There are no edges (x, y ) where x ∈ S and y ∈ B \ T .
Otherwise, since y is M-saturated (no M-augmenting paths) the
M-neightbour of y would have to be in S, contradicting y ∈
/ T. 

You might also like