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

MATPMD2 Notes Session 4 With Additional Notes-1

Uploaded by

59613
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
70 views

MATPMD2 Notes Session 4 With Additional Notes-1

Uploaded by

59613
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

UNIVERSITY OF STIRLING MATPMD2

Computing Science & Mathematics 2020

4 Traversability
In this section we look at how we can move around a graph. This is relevant to solving puzzles such as
- “can you trace over this picture without lifting your pen from the paper?”,

and “can I get take 12 steps from any starting point and return to the starting point without retracing
my steps?”

Expressing these questions in graph theoretic terms we are asking (a) if we have an Eulerian graph?,
and (b) is this graph Hamiltonian?

Definition 4.1 The graph G is Eulerian if it is connected and has a closed trail containing each edge of
G, called an Eulerian trail.

Theorem
The following are equivalent:
(i) G is Eulerian,
(ii) G is connected and of even degree,
(iii) G is connected and E(G) can be partitioned into cycles.
Proof
(i) =⇒ (ii) G is connected by definition. Each vertex in the Eulerian trail contributes 2 to the degree
count of a vertex v, all edges of G are used and so deg(v) is even.
(ii) =⇒ (iii) If G has no edges then G is K1 and Eulerian. Otherwise each vertex has degree at least
2 and so G contains a cycle Z. Delete edges in Z to obtain another Eulerian graph; repeat until no
edges remain.
(iii) =⇒ (i) Suppose E(G) is partitioned into cycles Z1 , Z2 , . . . If G is Z1 then Z1 is an Eulerian
trail. Otherwise G contains cycle Z2 such that Z1 and Z2 have a common vertex v. Construct a
“figure-of -eight” Eulerian trail using Z1 and Z2 which passes through v twice. Repeat as necessary.
UNIVERSITY OF STIRLING MATPMD2
Computing Science & Mathematics 2020
UNIVERSITY OF STIRLING MATPMD2
Computing Science & Mathematics 2020

Example 4.1
If possible, find the Eulerian trail in the following graph.
UNIVERSITY OF STIRLING MATPMD2
Computing Science & Mathematics 2020

Examples 4.2

(i) All cycles are Eulerian.

(ii) 3C3 is not Eulerian because not connected.

(iii) The following graph G is not Eulerian since it contains a vertex of odd degree.
UNIVERSITY OF STIRLING MATPMD2
Computing Science & Mathematics 2020

Definition 4.2 A graph is Hamiltonian if it contains a cycle through all its vertices, called a
Hamiltonian cycle.

Example 4.3

The followiing graph is Hamiltonian because it contains a Hamiltonian cycle.

Determining whether or not a graph is Hamiltonian is not an easy matter. If G is a graph on n vertices
then we need to consider all possible n-cycles through n vertices and see if one or more of these
cycles is present in the graph.

Suppose we label the n vertices 1, 2, 3, . . . , n, then the number of possible cycles is n!, the number of
permutations of the n labels. However the cycle 1, 2, 3, . . . , n, 1 is the same as cycle 3, 4, . . . , n, 1, 2, 3
and is also the same as cycle 3, 2, 1, n, n − 1, . . . , 4, 3 thus for any given cycle on n vertices we have n
possible starting points and we can go around the cycle two ways. This means that in a worse case
scenario we would need to inspect 2n n!
= (n−1)!
2
possible cycles to see if they gave us a Hamiltonian
cycle.

There are certain strategies which we can use to attempt to show a graph is not Hamiltonian.

Suppose G is a graph on n vertices. If G is Hamiltonian the Hamiltonian cycle will be an n-cycle.

(i) A Hamiltonian cycle passes through each vertex precisely once and so uses precisely two edges
incident with each vertex. Mark all edges incident with vertices of degree 2.

(a) If these edges form a cycle smaller than an n cycle then the graph is not Hamiltonian
because an n-cycle does not contain a cycle shorter than an n-cycle.
(b) Inclusion of these edges may exclude other edges from consideration, either to avoid a
cycle of length less than n, or because they use two edges from a vertex of degree greater
than 2. Mark all excluded edges.

Repeat until all edges are either excluded or included. If all the included edges form a
Hamiltonian cycle then the graph is Hamiltonian. If not then the problem may have been
sufficiently simplified to determine by inspection whether or not a Hamiltonian cycle exists.

(ii) Recall that a bipartite graph contains two sets of isolated vertices. If we colour one set black and
the other set white then we have obtained a 2-colouring of the graph; we have coloured the
graph with two colours in such a way that adjacent vertices are of different colours. Any graph
UNIVERSITY OF STIRLING MATPMD2
Computing Science & Mathematics 2020

with a 2-colouring is bipartite. Also a bipartite graph does not contain an odd cycle since the
vertices in a cycle must be taken from alternate independent sets and in an odd cycle the last
edge would need to be between two non-adjacent vertices. Thus a bipartite graph with an odd
number of vertices is not Hamiltonian. Furthermore, a graph with an odd number of vertices
which has a 2-colouring is not Hamiltonian since bipartite.

Examples 4.4

(i) The following graph is not Hamiltonian.

(ii) K3,3 is Hamiltonian.


UNIVERSITY OF STIRLING MATPMD2
Computing Science & Mathematics 2020

(iii) Find a Hamiltonian cycle in the following graph which contains the edge (4, 7).

We conclude with a theorem which helps us show a graph is Hamiltonian.

Theorem [Ore]
If |V (G)| = n ≥ 3 and deg v+ deg u ≥ n whenever u 6∼ v then G is Hamiltonian.

Example If G has 2n vertices, each of degree at least n, then G is Hamiltonian.


UNIVERSITY OF STIRLING MATPMD2
Computing Science & Mathematics 2020

Definition 4.3: Spanning trees


H is a spanning subgraph of G if V (H) = V (G) and E(H) ⊆ E(G). A spanning subgraph which has
no cycles and which is connected is called a spanning tree.

A weighted graph has weights assigned to its edges; the weight of the graph W (G) is the sum of the
edge weights. Every connected weighted graph has a minimal spanning tree, i.e. a spanning tree of
least weight; not necessarily unique. There are many algorithms for obtaining a minimal spanning tree.

Prim’s algorithm

1. Choose any v ∈ V (G); start with V (T ) = v.

2. Given T , add a uv edge of least weight such that u ∈ V (T ), v 6∈ V (T ).

3. Repeat until V (T ) = V (G).

Example 4.5
Demonstrate the use of Prim’s algorithm in finding a minimal spanning tree for the following
weighted graph. State the weight of the minimum spanning tree.
UNIVERSITY OF STIRLING MATPMD2
Computing Science & Mathematics 2020

4.1 Connectivity
Recall that a graph is connected if for every u, v pair of vertices in the graph there exists a uv path. A
connected graph has one component. If a graph is not connected then it is unconnected or
disconnected and consists of more than one component.

Definition 4.1.1 The (vertex) connectivity κ(G) of graph G is the smallest number of vertices whose
removal results in a disconnected or trivial graph. [The trivial graph is K1 .]

Recall that deletion of a vertex results in the deletion of ever edge incident with that vertex. An edge is
a vertex pair and deletion of one vertex from that pair will remove the pair.

Examples 4.1.1

(i) Consider cycle Cn . Removing one vertex will result in a path Pn−1 which is connected.
Removal of two adjacent vertices will result in a path Pn−2 , also connected. Removal of two
non-adjacent vertices will result in a disconnected graph: Pi ∪ Pj , i, j ≥ 1 where i + j = n − 2.
Thus κ(Cn ) = 2.

(ii) κ(G) = 0 is and only if G is already disconnected.


κ(G) = 1 if and only if G is connected and removal of a single vertex disconnects G. Such a
vertex is called a cut vertex.
UNIVERSITY OF STIRLING MATPMD2
Computing Science & Mathematics 2020

(iii) Consider the complete graph Kn . Removal of a vertex results in Kn−1 , also connected. Removal
of subsequent vertices will result in a successively smaller complete graphs. Removal of n − 1
vertices will result in K1 , the trivial graph and so κ(Kn ) = n − 1. Note that any complete graph
cannot be disconnected.

(iv) Let G = Kn − λ, the graph obtained from Kn by deleting an edge. Then


κ(Kn − λ) = n − 2 ∀ n ≥ 2.
To see why we consider an example K5 − λ. Deletion of either vertex in the deleted edge will
result in K4 which cannot be disconnected; we would need to delete a further 3 vertices to
obtain the trivial graph. However if we delete any other vertex we will get K4 − λ which is
connected. Delete another vertex not in the deleted edge and we get K3 − λ, still connected.
Repeat and we get K2 − λ = 2K1 which is disconnected. Thus we have managed to disconnect
K5 − λ by deleting 3 vertices.
Formally: we can disconnect Kn − λ by removing n − 2 vertices. If we remove fewer than n − 2
vertices this leaves t ≥ 3 vertices and the remaining graph is Kt or Kt − λ, both connected.
UNIVERSITY OF STIRLING MATPMD2
Computing Science & Mathematics 2020

Definition 4.1.2 We say a graph G is k-connected if κ(G) ≥ k. A k-connected graph cannot be


disconnected unless at least k vertices are removed. However removal of any k vertices does not
ensure the graph will become disconnected. If a graph is k-connected then there is a subset of the
vertex set V (G) of size k whose deletion will disconnect the graph.

Definition 4.1.3 The edge connectivity λ(G) is the smallest number of edges whose removal
disconnects G.

Note that removal of an edge does not remove a vertex. The edge set of a graph is the subset of all
possible unordered vertex pairs so deletion of an edge will remove a vertex pair from the edge set but
will not affect the vertex set.

Examples 4.1.2

(i) Let G be the cycle Cn . Deleting a single edge results in Pn which is connected. Deleting two
consecutive edges will result in the graph K1 ∪ Pn−1 which is disconnected. Deleting any two
edges will result in the (disjoint) union of two paths. Thus λ(Cn ) = 2.

(ii) λ(G) = 0 if and only if G is disconnected or trivial.


λ(G) = 1 if and only if G is connected and contains an edge whose removal disconnects G,
called a bridge.
UNIVERSITY OF STIRLING MATPMD2
Computing Science & Mathematics 2020

(iii) λ(Kn ) = n − 1. Consider Kn . Deletion of all edges incident with a single vertex will
disconnect that vertex resulting in a disconnected graph. Clearly removing fewer edges would
not disconnect the graph. Since Kn is complete it has all possible edges; the degree of each
vertex is n − 1 so we must remove n − 1 edges to disconnect the graph.

Remark 4.1.1 Always κ(G) ≤ λ(G) ≤ δ(G) where δ(G) = min {deg (v) : v ∈ V (G)}.

Example 4.1.3
Verify that the inequality κ(G) ≤ λ(G) ≤ δ(G) is satisfied for the following graph G.

This graph consists of two K5 − λ joined by three edges e1 , e2 , e3 .


All vertices lie on a 10-cycle and so we need to delete at least 2 vertices to disconnect the graph since
κ(Cn ) = 2. Removal of vertices v1 , v2 will disconnect the graph and so κ(G) = 2. [Deleting fewer
vertices will not disconnect the graph.]
Removal of edges e1 , e2 , e3 will disconnect G and so λ(G) ≤ 3. However removal of fewer than 3
edges will not disconnect G. To see why consider the graph G − ei , (i = 1, 2, 3). In G − ei every
edge lies in some cycle and we would need to remove an additional 2 edges in order to disconnect G.
Thus λ(G) = 3.
Lastly δ(G) = 4, the least degree in G and we can see that

κ(G) ≤ λ(G) ≤ δ(G)

is satisfied.
UNIVERSITY OF STIRLING MATPMD2
Computing Science & Mathematics 2020

4.1.1 For interest only


Definition Let s, t ∈ V (G). The set U of vertices of G is an s − t separating set if s and t lie in
different components of G − U , the graph obtained from G by deleting all vertices in U .

Definition Two s − t paths are disjoint if they have no vertices in common other than s and t.

Remark If U is an s − t separating set, and if D is a collection of disjoint s − t paths we have


Menger’s theorem:
min |U | = max |D|.
Proposition G is k-connected if and only if for every pair s, t of vertices in G there exists k disjoint
s − t paths in G

4.2 Algebraic connectivity

Definition 4.2.1 The degree matrix is a diagonal matrix where the diagonal entries are the degrees of
each vertex.

Definition 4.2.2 The Laplacian matrix for a simple graph G is defined as L = D − A(G) where D is
the degree matrix, and A(G) is the adjacency matrix.

Definition 4.2.3 The algebraic connectivity of a graph G, a(G), is the second smallest eigenvalue of
the Laplacian matrix.
[It can be shown that, for a connected graph, the smallest eigenvalue of L is zero with corresponding
eigenvector j.]

Example 4.2.1 Find the eigenvalues of the Laplacian matrix for the graph with adjacency matrix.
State the algebraic connectivity of G.

0 1 1 0 1 0
1 0 1 0 0 0
1 1 0 0 1 0
A=
0 0 0 0 0 1
1 0 1 0 0 0
0 0 0 1 0 0

Solution
The row sums give the degree sequence: 3, 2, 3, 1, 2, 1 in corresponding order and so

3 −1 −1 0 −1 0
−1 2 −1 0 0 0
−1 −1 3 0 −1 0
L=D−A=
0 0 0 1 0 −1
−1 0 −1 0 2 0
0 0 0 −1 0 1
UNIVERSITY OF STIRLING MATPMD2
Computing Science & Mathematics 2020

with eigenvalues 0,0,2,2,4,4 - according to an online eigenvalue calculator: www.arndt-bruenner.de


Thus a(G) = 0; very low connectivity. See why below:

0 1 1 0 1 0
1 0 1 0 0 0
1 1 0 0 1 0
A=
0 0 0 0 0 1
1 0 1 0 0 0
0 0 0 1 0 0

Intuitively connectivity should increase with the addition of edges, with the complete graph with all
possible edges having the maximum possible algebraic connectivity.

Example 4.2.2
Let G = Kn with Laplacian matrix L = (n − 1)I − A. The eigenvalues are n with multiplicity n − 1
and 0 with multiplicity 1. Thus the algebraic connectivity a(Kn ) is n.
Since the eigenvalues of L are non-negative we conclude that if G is a graph on n vertices,

0 ≤ a(G) ≤ n.

Some measure of algebraic connectivity between 0 and 1 may be more useful which suggests the idea
of normalizing this measure by dividing by n:

a(G)
0≤ ≤ 1.
n
UNIVERSITY OF STIRLING MATPMD2
Computing Science & Mathematics 2020

4.2.1 For interest only


Remark: proof omitted
Let G − Uk be a graph obtained from G by removing k vertices. Then

a(G) ≤ a(G − Uk ) + k

Remark: proof omitted


Let µ1 , µ2 , . . . , µn−1 , µn be an ordered list of the eigenvalues of L. Then a(G) = µn−1 ≤ κ(G).

Example
It can be shown that a(Kr,s ) = min{r, s}. As an example, a(K2,5 ) = 2 ≤ κ(K2,5 ) = 2.
Now K1,4 can be obtained from K2,5 by removing 2 vertices and we have

2 = a(K2,5 ) ≤ 1 + 2 = a(K1,4 ) + k

Further examples

(i) a(G − λ) ≤ a(G).

(ii) a(G) ≤ a(G + λ) ≤ a(G) + 2.

(iii) a(Pn ) = 2 1 − cos πn , and a(Cn ) = 2 1 − cos 2π


 
n
.

Theorem: proof omitted


Suppose that G is a k-regular graph with second smallest eigenvalue λn−1 . Then a(G) = k − λn−1 .

You might also like