Graph Theory Concepts and Applications
Graph Theory Concepts and Applications
ON
The course is aimed at developing the fundamental mathematical skills of students that are
instrumental for effective understanding of advanced engineering subjects. The topics introduced
will serve as the tools for specialized studies in many engineering fields, significantly in field
theory, computer technology and communication engineering.
OBJECTIVES
COURSE OUTLINE
This course discusses fundamental concepts of graph theory and its applications in computer, social,
and natural sciences. The topics include graphs as models; representation of graphs; trees; universal
trees; distances; matchings’ connectivity; flows in networks; colourings; Hamiltonian cycles; and
planarity. All concepts, methods, and applications will be presented through a sequence of exercises
and problems.
Graphs - Basic definitions: graphs; vertex degrees; paths; cycles; isomorphism; Subgraphs -
Operations on Graphs Connectivity - Spanning trees - Rooted trees - Matrix representation of
graphs.
Eulerian graphs and Hamiltonian graphs - Standard theorems - Planar graphs - Euler's formula. Five
colour theorem - Colouring of graphs - Chromatic number (vertex and edge) properties and
examples - Directed graphs.
Computer Representation of graphs - Basic graph algorithms - Minimal spanning tree algorithm -
Kruskal and Prim's algorithm. Shortest path algorithms – Travelling Salesman Problem
MODULE I
This module presents a general introduction to graph theory. It explains the concepts of graph theory
and associated terminologies. It also introduces the basic definitions of graphs and explains
components of graphs such as vertex, edges, degrees, paths, connectivity and cycles. Related
2
terminologies as isomorphism, subgraphs, spanning trees are presented. The module closes with a
presentation on the available operations on graphs and matrix representation of graphs.
Defining a Graph
Informally, a graph is a bunch of dots, some of which are connected by lines. Here is an example
of a graph:
This definition is not precise enough for formalised mathematical discussion. Formally, a graph is
a pair of sets (V,E), where:
• V is a nonempty set whose elements are called vertices (or nodes).
• E is a collection of two-element subsets of V called edges.
The vertices correspond to the dots in the picture, and the edges correspond to the lines. Thus, the
dots-and-lines diagram above is a pictorial representation of the graph (V,E) where:
V = {A,B,C,D,E, F, G,H, I}
E = {{A,B} , {A,C} , {B,D} , {C,D} , {C,E} , {E, F} , {E,G} , {H, I}} .
Conceptually, a graph is formed by vertices and edges connecting the vertices. Formally, a graph
is a pair of sets (V,E), where V is the set of vertices and E is the set of edges, formed by pairs of
vertices. E is a multiset, in other words, its elements can occur more than once so that every element
has a multiplicity. Often, we label the vertices with letters (for example: a, b, c, . . . or v1, v2, . . . )
or numbers 1, 2, . . . Throughout this lecture material, we will label the elements of V in this way.
Figure I.2
For the graph in Fig.I.2 the follow can be identified:
• v4 and v5 are end vertices of e5.
• e4 and e5 are parallel.
• e3 is a loop.
• The graph is not simple.
• e1 and e2 are adjacent.
• v1 and v2 are adjacent.
• The degree of v1 is 1 so it is a pendant vertex.
• e1 is a pendant edge.
• The degree of v5 is 5.
• The degree of v4 is 2.
• The degree of v3 is 0 so it is an isolated vertex.
Further in our discussions, we will label graphs with letters, for example: G = (V, E). The minimum
degree of the vertices in a graph G is denoted δ(G) (= 0 if there is an isolated vertex in G). Similarly,
we write (G) as the maximum degree of vertices in G.
Complete Graph
A simple graph that contains every possible edge between all the vertices is called a complete graph.
A complete graph with n vertices is denoted as Kn. The first four complete graphs are given as
examples:
4
Figure I.3. Complete graphs
Subgraph
The graph G1 = (V1,E1) is a subgraph of G2 = (V2,E2) if
1. V1 V2 and
2. Every edge of G1 is also an edge of G2.
For example, given the graph shown in Figure I.4, then the graphs in Figure I.5 are subgraphs of
the graph in figure I.4.
5
Figure I.6: Graph G
In the graph shown in Figure I.6, the walk v2, e7, v5, e8, v1, e8, v5, e6, v4, e5, v4, e5, v4 is open. On the
other hand, the walk v4, e5, v4, e3, v3, e2, v2, e7, v5, e6, v4 is closed.
Trails in a graph
A walk is a trail if any edge is traversed at most once. Then, the number of times that the vertex
pair u, v can appear as consecutive vertices in a trail is at most the number of parallel edges
connecting u and v. For example in Figure I.6, the walk in the graph v1, e8, v5, e9, v1, e1, v2, e7, v5,
e6, v4, e5, v4, e4, v4 is a trail.
Paths
A trail is a path if any vertex is visited at most once except possibly the initial and terminal vertices
when they are the same. The walk v2, e7, v5, e6, v4, e3, v3 is a path
Circuits
A closed path is a circuit. For simplicity, we will assume in the future that a circuit is not empty,
i.e. its length ≥ 1. We identify the paths and circuits with the subgraphs induced by their edges. The
walk v2, e7, v5, e6, v4, e3, v3, e2, v2 is a circuit. A graph is circuitless if it does not have any circuit
in it. A graph is circuitless exactly when there are no loops and there is at most one path between
any two given vertices.
Connectivity of a graph
A graph is connected if all the vertices are connected to each other. The walk starting at u and
ending at v is called an u–v walk. u and v are connected if there is a u–v walk in the graph (then
there is also a u–v path!). If u and v are connected and v and w are connected, then u and w are also
connected, i.e. if there is a u–v walk and a v–w walk, then there is also a u–w walk. A trivial graph
is connected by convention.
Every isolated vertex forms its own component. A connected graph has only one component,
namely, itself.
Rank of a graph
A graph G with n vertices, m edges and k components has the rank ρ(G) = n − k.
Nullity of a graph
The nullity of the graph G with n vertices, m edges and k components is μ(G) = m − n + k. We see
that ρ(G) ≥ 0 and ρ(G) + μ(G) = m. In addition, μ(G) ≥ 0 because (G) ≤ m.
7
Graph Operations
A number of operations can be carried out with graphs. This includes the complement operation
and binary operations such as union, intersection and ring sum or symmetric difference.
The complement of the complete graph Kn is the empty graph with n vertices. Obviously, G = G.
If the graphs G = (V, E) and G′ = (V, E′) are simple and V ⊆ V, then the difference graph is G − G
= (V, E), where E contains those edges from G that are not in G.
Below are some binary operations between two simple graphs G1 = (V1, E1) and G2 = (V2, E2):
8
Figure I.12: Union operation on graph G1 and G2
• The ring sum G1⊕G2 is the subgraph of G1∪G2 induced by the edge set E1⊕E2 (simple graph).
The set operation ⊕ is the symmetric difference, i.e. E1 ⊕ E2 = (E1 − E2) ∪ (E2 − E1).
Since the ring sum is a subgraph induced by an edge set, there are no isolated vertices.
9
⊕ : The multiplicity of an edge in G1 ⊕ G2 is |m1 − m2|, where m1 is its multiplicity in
G1 and m2 is its multiplicity in G2.
(We assume zero multiplicity for the absence of an edge.) In addition, we can generalize the
difference operation for all kinds of graphs if we take account of the multiplicity. The multiplicity
of the edge e in the difference G − G′ is
Isomorphism of graphs
Two graphs G and H are isomorphic, denoted by G ∼=H, if there exists a bijection a: VG → VH
such that uv ∈ EG ⇐⇒ a(u)a(v) ∈ EH for all u, v ∈ G. Hence G and H are isomorphic if the vertices
of H are renamings of those of G. Two 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 is shown 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 such graphs.
The following graphs are isomorphic. Indeed, the required isomorphism is given by:
v1 → 1, v2 → 3, v3 → 4, v4
→ 2, v5 → 5.
Spanning Trees
A subgraph T of a undirected graph G = (V, E) is a spanning tree of G if it is a tree and contains
every vertex of G. Every connected graph has a spanning tree.
Example:
11
Graph G Tree 1 (w)=74 Tree 2 (w)=71 Tree 3 (w)=72
The minimum spanning tree of a graph may not be unique. However, if the weights of all the edges
are pairwise distinct, it is indeed unique. The minimum spanning tree (MST) problem is stated as:
Given a connected weighted undirected graph G, design an algorithm that outputs a minimum
spanning tree of G.
Directed Graphs
In some problems the relation between the objects is not symmetric. For example, answering
questions like can we make the streets of a small town one-way, and still be able to drive from one
house to another or exit the town requires graphs with directions, where the edges are oriented from
one vertex to another. These types of graphs are called directed graphs or diagraphs.
A digraph (or a directed graph) D = (VD, ED) consists of the vertices VD and (directed) edges
ED ⊆ VD × VD (without loops vv). We still write uv for (u, v), but note that now uv <> vu. For each
pair e = uv define the inverse of e as e−1 = vu (= (v, u)). Note that e ∈ D does not imply e−1 ∈ D.
A digraph is a pair (V,E), where V is the vertex set and E is the set of vertex pairs as in ”usual”
graphs. The difference is that now the elements of E are ordered pairs: the arc from vertex u to
vertex v is written as (u, v) and the other pair (v, u) is the opposite direction arc. We also have to
keep track of the multiplicity of the arc (direction of a loop is irrelevant). For a digraph following
notions and results for terminologies applies:
1. Vertex u is the initial vertex and vertex v is the terminal vertex of the arc (u, v). We also say
that the arc is incident out of u and incident into v.
2. The out-degree of the vertex v is the number of arcs out of it (denoted d+(v)) and the
indegree of v is the number of arcs going into it (denoted d−(v)).
3. In the directed walk (trail, path or circuit), vi0 , ej1, vi1 , ej2, . . . , ejk, vik viℓ is the initial
vertex and viℓ−1 is the terminal vertex of the arc ejℓ . .
4. When we treat the graph (V,E) as a usual undirected graph, it is the underlying undirected
graph of the digraph G = (V,E), denoted Gu.
12
5. Digraph G is connected if Gu is connected. The components of G are the directed subgraphs
of G that correspond to the components of Gu. The vertices of G are connected if they are
connected in Gu. Other notions for undirected graphs can be used for digraphs as well by
dealing with the underlying undirected graph.
6. Vertices u and v are strongly connected if there is a directed u–v path and also a directed
v–u path in G.
7. Digraph G is strongly connected if every pair of vertices is strongly connected. By
convention, the trivial graph is strongly connected.
8. A strongly connected component H of the digraph G is a directed subgraph of G (not a null
graph) such that H is strongly connected, but if we add any vertices or arcs to it, then it is
not strongly connected anymore. Every vertex of the digraph G belongs to one strongly
connected component of G. However, an arc does not necessarily belong to any strongly
connected component of G.
For the digraph G the strongly connected components are ({v1}, ), ({v2, v3, v4}, {e3, e4, e5}), ({v5},
) and ({v6}, ).The condensed graph Gc of the digraph G is obtained by contracting all the arcs in
every strongly connected component.
Directed Trees
A directed graph is quasi-strongly connected if one of the following conditions holds for every pair
of vertices u and v:
(i) u = v or
(ii) there is a directed u–v path in the digraph or
(iii) there is a directed v–u path in the digraph or
(iv) there is a vertex w so that there is a directed w–u path and a directed w–v path.
13
Figure I.22: Directed tree with six leaves
For the digraph G with n > 1 vertices, the following are equivalent:
(i) G is a directed tree.
(ii) G is a tree with a vertex from which there is exactly one directed path to every other vertex
of G.
(iii) G is quasi-strongly connected but G − e is not quasi-strongly connected for any arc e in G.
(iv) G is quasi-strongly connected and every vertex of G has an in-degree of 1 except one vertex
whose in-degree is zero.
(v) There are no circuits in G (i.e. not in Gu) and every vertex of G has an in-degree of 1 except
one vertex whose in-degree is zero.
(vi) G is quasi-strongly connected and there are no circuits in G (i.e. not in Gu).
I.3. Assessment
Q1. Consider a simple connected graph G with n vertices and n edges (n>2). Then which of the
following statements are TRUE?
a. G has at least one cycle
b. G has no cycles
c. The graph obtained by removing any edge from G is not connected.
d. G has at least one cycle and the graph obtained by removing any edge from G is not
connected.
Q2. The number of distinct simple graphs with up to three nodes is…........
a. 9
b. 7
c. 10
d. 15
Q3. Consider the graph G where V(G)={A,B,C,D} and E(G)=[{A,B},{B,C},{C,D}]. The degree
of each vertices A,B,C,D respectively in G are…..
a. 1,2,3,2
b. 1,3,2,2
14
c. 1,1,1,1
d. 1,2,2,3
Q3. Maximum number of edges in a n-node undirected graph without self loops is….......
a. \frac{n(n+2)}{2}
b. n-1
c. n^2
d. \frac{n(n-1)}{2}
Q4. Let G be a graph with 100 vertices numbered 1 to 100. Two vertices i and j are adjacent if |ij|=8
or |i-j|=12. The number of connected components in G is…......
a. 8
b. 12
c. 25
d. 4
Q5. A graph in which all nodes are of equal degree is known as…....
a. complete graph
b. multi graph
c. non regular graph
d. regular graph
I. 4. References
1. BANG-JENSEN, J. & GUTIN, G.: Digraphs: Theory, Algorithms and Applications. Springer–
Verlag (2002)
2. BOLLOBÁS, B.: Modern Graph Theory. Springer–Verlag (2002)
3. DIESTEL, R.: Graph Theory. Springer–Verlag (2005)
4. DOLAN, A. & ALDOUS, J.: Networks and Algorithms. An Introductory Approach. Wiley (1999)
5. GIBBONS, A.: Algorithmic Graph Theory. Cambridge University Press (1987)
15
MODULE II
CLASSES OF GRAPHS
Planar Graphs
A graph is a planar graph if and only if it has a pictorial representation in a plane which is a plane
graph. This pictorial representation of a planar graph G as a plane graph is called a planar
representation of G.
Let G denote the plane graph in Figure II.1. Graph G, in Figure II.1, divides the plane into different
regions R1 and R2, called the faces of G.
A graph is said to be planar if it can be drawn in the plane in such a way that no two edges intersect
each other. Drawing a graph in the plane without edge crossing is called embedding the graph in
the plane (or planar embedding or planar representation).
Given a planar representation of a graph G, a face (also called a region) is a maximal section of the
plane in which any two points can be joint by a curve that does not intersect any part of G. When
we trace around the boundary of a face in G, we encounter a sequence of vertices and edges, finally
returning to our final position. Let v1, e1, v2, e2, . . . , vd, ed, v1 be the sequence obtained by tracing
around a face, then d is the degree of the face. Some edges may be encountered twice because both
sides of them are on the same face. A tree is an extreme example of this: each edge is encountered
twice. The following result is known as Euler’s Formula.
Theorem: If G is a connected planar graph with n vertices, m edges and f faces, then n − m + f = 2.
Proof. We prove by induction on m. If m = 0, then G = K1, a graph with 1 vertex and 1 face. The
formula is true in this case. Assume it is true for all planar graphs with fewer than m edges and
suppose G has m edges.
16
Case 1: G is a tree. Then m = n − 1 and obviously f = 1. Thus n − m + f = 2, and the result holds.
Case 2: G is not a tree. Let C be a cycle in G, and e an edge in C. Consider the graph G−e. Compared
to G this graph has the same number of vertices, one edge fewer, and one face fewer (since
removing e coalesces two faces in G into one in G−e). By the induction hypothesis, in G − e we
have n − (m − 1) + (f − 1) = 2. Therefore, in G we have n − m + f = 2, which completes the proof.
Graph Colouring
Graph colouring is one of the most important concepts in graph theory and is used in many real
time applications in computer science. Various colouring methods are available and can be used on
requirement basis. The proper colouring of a graph is the colouring of the vertices and edges with
minimal number of colours such that no two vertices should have the same colour. The minimum
number of colours is called as the chromatic number and the graph is called properly coloured
graph. An example of a graph colouring problem could be stated as follows: Given a graph G,
assign one of k colours to each node such that adjacent nodes have different colours. In general, a
graph G is k-colourable if each vertex can be assigned one of k colours so that adjacent vertices
get different colours. The minimum value of k for which a colouring exists is the chromatic
number Х(G) of G.
Edge colourings
Colourings of edges and vertices of a graph G are useful, when one is interested in classifying
relations between objects. There are two sides of colourings. In the general case, a graph G with a
colouring a is given, and we study the properties of this pair Ga = (G, a). 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.
In the chromatic theory, G is first given and then we search for a colouring that the edge satisfies
required properties. One of the important properties of colourings is ‘properness’. In a proper
colouring adjacent edges or vertices are coloured differently.
17
Each colour set Ei in a proper k-edge colouring is a matching. Moreover, for each graph G, D(G)
≤ c′(G) ≤ #G.
Vertex colourings
The vertices of a graph G 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.
By the definitions, a graph G is 2-colourable if and only if it is bipartite. Again, the ‘names’ of the
colours are immaterial:
Lemma Let a be a proper k-colouring of G, and let p be any permutation of the colours. Then the
colouring b = pa is a proper k-colouring of G.
Proof. Indeed, if a: VG → [1, k] is proper, and if p: [1, k] → [1, k] is a bijection, then uv G implies
that a(u) 6= a(v), and hence also that pa(u) 6= pa(v). It follows that pa is a proper colouring.
A graph is triangle-free, if it has no subgraphs isomorphic to K3. We show that there are
trianglefree graphs with arbitrarily large chromatic numbers.
The following construction is due to GRÖTZEL: Let G be any triangle-free graph with VG = {v1,
v2, . . . , vn}. Let Gt be a new graph obtained by adding n + 1 new vertices v and u1, u2, . . . , un
such that Gt has all the edges of G plus the edges uiv and uix for all x N(vi) and for all i [1, n].
18
Computer Representation
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. Integer matrices are ideal for computers, since every
respectable programming language has array structures for these, and computers are good in
crunching numbers.
Let VG = {v1, . . . , vn} be ordered. The adjacency matrix of G is the n × n-matrix M with entries
Mij = 1 or Mij = 0 according to whether vivj G or vivj / G. For instance, the graph in figure II.4a
has an adjacency matrix in figure II.4b. Notice that the adjacency matrix is always symmetric (with
respect to its diagonal consisting of zeros).
19
Incidence Matrix of a Directed Graph
The all-vertex incidence matrix of a non-empty and loopless directed graph G is A = (aij), where
II.3. Assessment
G1.
G2:
20
i. What type of graph is this?
ii. Which vertices are reachable from vertex 3?
iii. What is the length of the shortest path from vertex 3 iv. Give a path from
vertex 1 to vertex 3 of length 4 (2mks)
a. Sketch a graph having vertices {1, 2, 3, 4, 5, 6}, edges {a1, a2, a3, a4, a5, a6, a7} where
edges a1 = 1-2, a2 = 2-3, a3 = 3-4, a4 = 4-5, a5=3-5, a6 = 5-6, a7 = 6-6.
b. Determine the adjacency matrix for the graph drawn in 6a above
c. Why is adjacency matrix not efficient in computer data representation?
d. What alternative data structure can be used for graph representation in computer
processing?
e. What is the degree of vertex 5 in the graph drawn in a above?
II.4. References
21
MODULE III
GRAPH ALGORITHM
The dot, called the node represents land in this problem. The line joining the nodes is called edge
and represents a bridge in this problem. Instead of an exhaustive search of every path, Euler found
out a very simple criterion for checking the existence of such paths in a graph and gave the solution:
It is not possible to cross all the bridges exactly once.
22
Figure III.1: The bridges of Könisberg (a) and corresponding graph (b)
Euler Path is a path in the graph that passes each edge only once. The problem of Seven Bridges of
Konigsberg can be also stated: Does Euler Path exist in the graph?
Euler Circut is a path in the graph that passes each edge only once and return back to its original
position. From Definition, Euler Circuit is a subset of Euler Path.
An Euler path is defined as a path that crosses each edge of the graph exactly once. If the path is
closed, we have an Euler circuit.
Checking the existence of an Euler path
The existence of an Euler path in a graph is directly related to the degrees of the graph’s vertices.
Euler formulated the three following theorems of which the first two set a sufficient and necessary
condition for the existence of an Euler circuit or path in a graph respectively.
Theorem 1: An undirected graph has at least one Euler path iff it is connected and has two or zero
vertices of odd degree.
Theorem 2: An undirected graph has an Euler circuit iff it is connected and has zero vertices of
odd degree.
Theorem 3: The sum of the degrees of every vertex of a graph is even and equals to twice the
number of edges
The algorithm for finding an Euler path instead of a circuit is almost identical to the one just
described. Their only difference lies in step 1 where we must choose one of the vertices of odd
degree as the beginning vertex.
Applications
Eulerian graphs are used rather extensively, as they’re necessary to solve important problems in
telecommunication, parallel programming development and coding. Moreover, the corresponding
theory underlies in many classic mathematical problems.
A problem that at first sight seems to be very close to the Eulerian path is the Hamiltonian
Circuit/Cycle problem, defined as follows:
Given a (connected) graph G(V,E) find a circuit that starts at a vertex of a graph, passes through
every vertex exactly once, and returns to the starting vertex. This circuit is called Hamiltonian
Circuit.
24
The problem can be slightly changed so that the ending vertex does not have to be the starting one.
Instead of a Hamiltonian circuit we get a homonymous path. The problem of deciding whether a
graph has a Hamiltonian circuit/path (and finding one) or not is NP-complete in the general case.
For weighted graphs a more important and practically useful challenge is to find a Hamiltonian
path with the minimum sum of weights over the edges we pass. This path is called an optimal
Hamiltonian path. The problem is well known as the Travelling Salesman Problem (TSP).
25
The 1st step can only be solved by exhaustive search. For a computer doing 10,000 circuits/sec, it
would take about 18 seconds to handle 10 vertices, 50 days to handle 15 vertices, 2 years for 16
vertices, 193,000 years for 20 vertices!!!
This has made researchers change their approach to the problem and find approximation algorithms
that may not produce the optimal result but get close to it and (more important) work in acceptable
time limits. Three such algorithms are given here: They all take as input a graph and return a
closeto-the-optimal-Hamilton circuit (if one exists).
Figure III.3a shows a graph on which we apply this algorithm: We choose AC(min weight). Then,
since no restriction will be validated we add AD. Now if we try to add DC we get a cycle ACDA
(Fig. III.3b) so we do not add it. Instead we take the next lower weighted edge DB and add it. If we
add ED node D will have degree 3(Fig III.3c), so we do not use it. Instead we add EC and EB
successively so we get a Hamiltonian cycle ADBECA (Fig III.3d) with total cost 20
26
2. Travel to the vertex that you haven’t been to yet whose path has the smallest weight If there is a
tie, pick randomly.
3. Continue until you travel to all vertices
4. Travel back to your starting vertex
Example and explanation: In figure III.4 we show how this algorithm is applied for the graph of the
figure III.3.a. Randomly we choose E as the initial vertex. We choose the edge with the lower cost
starting from E (Fig III.4.a) which is ED. Same way we add DA and AC and reach III.4.b. Here we
cannot use the edge with the lower cost (CD) since D has already been visited so we travel to B
through CB(Fig III.4.c) and finally reach the circuit EDACBE (Fig III.4.d) with total cost 25 (worse
than the previous)
27
It uses the previous algorithm, which is depended on the choice of the initial node. That’s why we
apply it for every initial node possible and choose the best circuit among the ones produced.
The criterion to decide which is the more efficient is the relative error: Re = (difference from
optimal solution)/(optimal solution)
A similar problem is to find a Hamiltonian path given the initial and final nodes. This would help
the salesman end his journey at his home and not the city he was at the beginning. There exists a
constructive algorithm that gives us the optimal Hamilton path between two nodes a (initial) and p
(terminal). This algorithm tries to find the optimal path between any two vertices visiting any
number (<=|V|-2) of vertices starting from 0 (no intermediates) and adding one node to the (new)
path at the time. e.g. in order to find the minimum path between a and p that has 3 intermediate
nodes we find all the paths from any node k to p with 2 intermediate nodes (¹a, p) and add (a,k) and
choose the minimum.
The algorithm runs in T(2N) time significantly lower than T(N!) which gives us the ability to work
with larger graphs in appropriate time. The reason we have this complexity has to do with the
number of the paths we have to calculate in step 6 before we select the minimum among them.
28
Euler Circuit Hamilton Circuit
Repeated visits to a given node are allowed Visit each node exactly once
Traverse each edge exactly once (by definition Repeated traversals of a given edge are not
of problem). permitted, since that would result in visiting a
node more than once
No node may be omitted(if so, one of the edges No node may be omitted(by definition of the
incident to the node would not be traversed). problem).
No edges may be omitted Any edge may be omitted
III.3. Assessments
Q1. For each of the following four graphs, decide if it has an Eulerian trail an Eulerian circuit, both,
or neither. Give a brief justification in each case
Q4. (i) Define an Eulerian graph, and state Euler’s theorem which characterizes such graphs in
terms of their vertex degree.
III.4. References
1. SWAMY, M.N.S. & THULASIRAMAN, K.: Graphs, Networks, and Algorithms. Wiley (1981)
2. SWAMY, M.N.S. & THULASIRAMAN, K.: Graphs: Theory and Algorithms. Wiley (1992)
3. VÁGÓ, I.: Graph Theory. Application to the Calculation of Electrical Networks. Elsevier (1985)
4. WALTHER, H.: Ten Applications of Graph Theory. Kluwer (1985)
5. WEST, D.B.: Introduction to Graph Theory. Prentice–Hall (1996)
6. N. BIGGS, “Algebraic Graph Theory”, Cambridge University Press, (2nd ed.) 1993.
7. C. GODSIL, G.F. ROYLE, “Algebraic Graph Theory”, Springer, 2001
29