0% found this document useful (0 votes)
6 views52 pages

Graph Theory Notes

The document provides an overview of fundamental concepts in graph theory, including definitions of graphs, vertices, edges, and various types of graphs such as complete, directed, and k-regular graphs. It also covers important properties like the handshaking lemma, concepts of paths, circuits, and connectedness, as well as algorithms for finding shortest paths. Additionally, it discusses operations on graphs, Euler and Hamiltonian paths and circuits, and the conditions for a graph to be Eulerian or Hamiltonian.

Uploaded by

ONLYSTUDENTS
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)
6 views52 pages

Graph Theory Notes

The document provides an overview of fundamental concepts in graph theory, including definitions of graphs, vertices, edges, and various types of graphs such as complete, directed, and k-regular graphs. It also covers important properties like the handshaking lemma, concepts of paths, circuits, and connectedness, as well as algorithms for finding shortest paths. Additionally, it discusses operations on graphs, Euler and Hamiltonian paths and circuits, and the conditions for a graph to be Eulerian or Hamiltonian.

Uploaded by

ONLYSTUDENTS
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/ 52

Graph Theory Definitions and Properties Mathematics-I ( T - 4 )

9.1 Introduction to Graphs and Definitions:


Graph:
A graph (or linear graph) G = (V, E) consists of a set of objects
V = {v1 v2, . . .} called vertices, and another set E = {e1, e2,. . .}, whose
elements are called edges.

 Each edge ek is identified with an unordered pair (vi, vj) of vertices. The
vertices vi vj associated with edge ek are called the end vertices of ek.

Self-Loop:
An edge having the same vertex as both its end vertices is called a self-loop.
 Self-loop: .

Parallel Edges:
More than one edge associated with a given pair of vertices is called parallel
edges.
 Parallel edges: .
Incidence:
When a vertex vi is an end vertex of some edge ej, vi and ej are said to be
incident with (on or to) each other.

1|Page
Prepared by Dr. Jaysan H. Shukla
Graph Theory Definitions and Properties Mathematics-I ( T - 4 )

 edges e2, e6, and e7 are incident with vertex v4.

Degree of vertex:
The number of edges incident on a vertex vi is called the degree, d(vi) of
vertex vi.

 self-loops counted twice


 For example, d(v1) = 2, d (v2) = 5 , d(v4) = 0 and d(v3) = 1.

Isolated Vertex:
A vertex having no incident edge is called an isolated vertex. In other words,
isolated vertices are vertices with zero degree. E.g. v4

Pendent Vertex:
A vertex of degree one is called a pendant vertex or an end vertex. E.g. v3

Null Graph:
In the definition of a graph G = (V, E), it is possible for the edge set E to be
empty. Such a graph, without any edges, is called a null graph.

2|Page
Prepared by Dr. Jaysan H. Shukla
Graph Theory Definitions and Properties Mathematics-I ( T - 4 )

Handshaking Lemma:
The sum of the degrees of all vertices in G is twice the number of edges in G.
𝒏

∑ 𝒅(𝒗𝒊 ) = 𝟐|𝑬|
𝒊=𝟏

 The number of vertices of odd degree in a graph is always even.


k-regular Graph:
A graph in which all vertices are of equal degree k is called a k - regular
graph

3-regular graph
Complete Graph:
A simple graph in which there exists an edge between everypair of vertices is
called a complete graph. It is denoted by

Complement of graph:
̅ , with the same vertex set but
The complement of a graph G is the graph G
whose edge set consists of the edges not present in G.
̅ = 𝐾𝑛 − 𝐺
G

G ̅
G

3|Page
Prepared by Dr. Jaysan H. Shukla
Graph Theory Definitions and Properties Mathematics-I ( T - 4 )

9.2 Path and Circuits :


Subgraph:
A graph g is said to be a subgraph of a graph G if all the vertices and all
the edges of g are in G, and each edge of g has the same end vertices in g

as in G. Graph (a) and its subgraph (b)

 Every graph is its own subgraph.


 A subgraph of a subgraph of G is a subgraph of G.
 A single vertex in a graph G is a subgraph of G.
 A single edge in G, together with its end vertices, is also a subgraph of

Complement of subgraph:

If g is a subgraph of G, then G ⊕ g is, by definition, that subgraph of G


which remains after all the edges in g have been removed from G.
Therefore, G ⊕ g iswritten as G − g, whenever g ⊆ G. Because of this
complementary nature, G ⊕g = G − g is often called the complement of g
in G. ( ⊕ is ringsum operation on graphs)

G g Complement of g in G

4|Page
Prepared by Dr. Jaysan H. Shukla
Graph Theory Definitions and Properties Mathematics-I ( T - 4 )

ISOMORPHISM:
Two graphs G and G′ are said to be isomorphic (to each other) if there is a
one-to-onecorrespondence between their vertices and between their edges
such that the incidence relationship is preserved.

Isomorphic Graphs (a) and (b)

(a) (b)
Isomorphic Graphs (a) and (b)

Isomorphic Graphs (a), (b) and (c)

Non isomorphic Graphs (a) and (b)


5|Page
Prepared by Dr. Jaysan H. Shukla
Graph Theory Definitions and Properties Mathematics-I ( T - 4 )

Self-Complementary Graph:
A self-complementary graph is a graph that is isomorphic to its own
complement.

6|Page
Prepared by Dr. Jaysan H. Shukla
Graph Theory Definitions and Properties Mathematics-I ( T - 4 )

Walk:
A walk is defined as a finite alternating sequence of vertices and edges,
beginning and ending with vertices, such that each edge is incident with the
vertices preceding and following it.
 No edge appears (is covered or traversed) more than once in a
walk.
 A vertex, however, may appear more than once
 Vertices with which a walk begins and ends are called its terminal
vertices.
Closed Walk:
A walk with same begin and end vertex is called a closed walk.

Open Walk:
A walk with distinct begin and end vertex is called a open walk.

Circuit:
A closed walk in which no vertex (except the initial and the final vertex)
appears more than once is called a circuit.
 A circuit is a closed, nonintersecting walk
 A circuit is also called a cycle, elementary cycle, circular path, and
polygon.

Path:
An open walk in which no vertex appears more than once is called a path (or
asimple path or an elementary path).
 A path does not intersect itself
 The terminal vertices of a path are of degree one, and the rest of the
vertices (called intermediate vertices) are of degree two

Length of path:
The number of edges in a path is called the length of a path.
7|Page
Prepared by Dr. Jaysan H. Shukla
Graph Theory Definitions and Properties Mathematics-I ( T - 4 )

 An edge which is not a self-loop is a path of length one.


 A self-loop can be included in a walk but not in a path

Open Walk: v1 a v2 b v3 c v3 d v4 e v2 f v5
Closed Walk: v1 a v2 e v4 d v3 c v3 g v1
Path: v1 a v2 b v3 d v4 h v5
Circuit: v1 a v2 e v4 d v3 g v1

Connected Graph :

A graph G is said to be connected if there is at least one path between every


pair of vertices in G. ( otherwise, G is disconnected )
 A null graph ofmore than one vertex is disconnected.

Component:
A disconnected graph consists of two or more connected graphs. Each of
these connected subgraphs is called a component

 If a graph (connected or disconnected) has exactly two vertices of odd


degree,there must be a path joining these two vertices.

8|Page
Prepared by Dr. Jaysan H. Shukla
Graph Theory Definitions and Properties Mathematics-I ( T - 4 )

Directed Graph:
A directed graph (or a digraph for short) G consists of a set of vertices
V ={v1, v2, . . .}, a set of edges E = {e1, e2, . . .}, and a mapping Ψ that
maps every edge onto some ordered pair of vertices (vi, vj).

The number of edges incident out of a vertex vi is called the out-degree


(or out-valence or outward demidegree) of vi and is written d-(vi). The
number of edges incident into vi is called the in-degree (or invalence or
inward demidegree)of v1 and is written as d+(vi). In Fig. 9-1, for example,

d - (v1) = 3, d + (v1) = 1,

d - (v2)= 1, d +(v2) = 2,

d - (v5) = 4, d + (v5) = 0.

( Note: In some ref. books above notations are in reverse manner but we
will consider above notations to standardization )

In any digraph G the sum of all in-degrees is equal to the sum of all out-
degrees, each sum being equal to the number of edges in G;

9|Page
Prepared by Dr. Jaysan H. Shukla
Graph Theory Definitions and Properties Mathematics-I ( T - 4 )

Strongly connected:
A digraph G is said to be strongly connected if there is at least one
directed path from every vertex to every other vertex

Weakly connected
A digraph G is said to be weakly connected if its corresponding
undirected graph ( graph obtained from digraph by removing all
directions from edges ) is connected but G is not strongly connected.

Graph (a) is Strongly Connected but (b) is weakly connected (no path
ending at central vertex ).

10 | P a g e
Prepared by Dr. Jaysan H. Shukla
Graph Theory Definitions and Properties Mathematics-I ( T - 4 )

Algorithm to find shortest path from given vertex in weighted graph:

Dijkstra’s Algorithm
 Find shortest path from source vertex ‘0’ using Dijkstra’s algorithm.

Visited
0 1 2 3 4 5 6 7 8
Vertex
0 ∞ ∞ ∞ ∞ ∞ ∞ ∞ ∞
0 4 ∞ ∞ ∞ ∞ ∞ 8 ∞
1 12 ∞ ∞ ∞ ∞ 8 ∞
7 12 ∞ ∞ ∞ 9 15
6 12 ∞ ∞ 11 15
5 12 25 21 15
2 19 21 14
8 19 21
3 21

4 12 19

14
0 21

8 11
9
11 | P a g e
Prepared by Dr. Jaysan H. Shukla
Graph Theory Definitions and Properties Mathematics-I ( T - 4 )

Shortest path starting Ending at following Length of shortest


from ‘0’ vertex path
0-1 1 4

0-1-2 2 12

0-1-2-3 3 19

0-7-6-5-4 4 21

0-7-6-5 5 11

0-7-6 6 9

0-7 7 8

0-1-2-8 8 14

12 | P a g e
Prepared by Dr. Jaysan H. Shukla
Graph Theory Definitions and Properties Mathematics-I ( T - 4 )

OPERATIONS ON GRAPHS

Union:
The union of two graphs G1 = (V1, E1) and G2 = (V2, E2) is another graph
G3 (written as G3 = G1 ⋃ G2) whose vertex set V3 = V1 ⋃ V2 and the edge
set E3 = E1 ⋃ E2

Intersection:
the intersection G1 ⋂ G2 of graphs G1 and G2 is a graph G4 consisting only
of those vertices and edges that are in both G1 and G2.

Ring sum:
The ring sum of two graphs G1 and G2 (written as G1 ⊕ G2) is a graph
consisting of the vertex set V1 ⋃ V2 and of edges that are either
in G1 or G2, but not in both.

13 | P a g e
Prepared by Dr. Jaysan H. Shukla
Graph Theory Definitions and Properties Mathematics-I ( T - 4 )

Deletion of a vertex :
If vi is a vertex in graph G, then G — vi denotes a subgraph of G obtained
by deleting (i.e., removing) vi from G.
 Deletion of a vertex always implies the deletion of all edges
incident on that vertex.

Deletion of an edge :
If ej is an edge in G, then G — ej is a subgraph of G obtained by deleting
ej from G.
 Deletion of an edge does not imply deletion of its end vertices.

Decomposition:
A graph G is said to have been decomposed into two subgraphs g1 and g2 if

g1 ⋃ g2 = G, and g1 ⋂ g2 = a null graph.

Fusion:
A pair of vertices a, b in a graph are said to be fused (merged or identified)
if the two vertices are replaced by a single new vertex such that everyedge
that was incident on either a or b or on both is incident on the new vertex.
 Fusion of two vertices does not alter the number of edges, but it
reduces thenumber of vertices by one.

Fusion of vertex ‘a’ and ‘b’


14 | P a g e
Prepared by Dr. Jaysan H. Shukla
Graph Theory Definitions and Properties Mathematics-I ( T - 4 )

Euler graph :
If some closed walk in a graph contains all the edges of the graph, then
the walk is called an Euler line and the graph an Euler graph.

 The Euler line (which is a walk) contains all the edges of the graph,
an Euler graph is always connected, except for any isolated vertices
the graph may have. Since isolated vertices do not contribute
anything to the understanding of an Euler graph, it is hereafter
assumed that Euler graphs do not have any isolated vertices and are
therefore connected.
 A given connected graph G is an Euler graph if and only if all
vertices of G are of even degree.

Unicursal graph :

An open walkthat includes (or traces or covers) all edges of a graph


without retracing any edgea unicursal line or an open Euler line. A
(connected) graph that has a unicursal line will be called a unicursal
graph

 By adding an edge between the initial and final vertices of a unicursal


line we shall get an Euler line. Thus, a connected graph is unicursal
if and only if it has exactly two vertices of odd degree.
15 | P a g e
Prepared by Dr. Jaysan H. Shukla
Graph Theory Definitions and Properties Mathematics-I ( T - 4 )

HAMILTONIAN PATHS AND CIRCUITS

Hamiltonian circuit:
A Hamiltonian circuit in a connected graph is defined as a closed walk
that traverses every vertex of G exactly once, except of course the starting
vertex, at which the walk also terminates.
For example, in the below graph of (a) starting at vertex v, if one traverses
along the edges shown in heavy lines— passing through each vertex
exactly once—one gets a Hamiltonian circuit. A Hamiltonian circuit for
the graph in (b) is also shown by heavy lines.

 A circuit in a connected graph G is said to be Hamiltonian if it


includes everyvertex of G. Hence a Hamiltonian circuit in a graph of
n vertices consists of exactly n edges.
 Not every connected graph has a Hamiltonian circuit for e.g.,

Hamiltonian Path:
If we remove any one edge from a Hamiltonian circuit, weare left with
a path. This path is called a Hamiltonian path.
 A Hamiltonian path in a graph G traverses every vertex of G.
16 | P a g e
Prepared by Dr. Jaysan H. Shukla
Graph Theory Definitions and Properties Mathematics-I ( T - 4 )

 A Hamiltonianpath is a subgraph of a Hamiltonian circuit (which


in turn is a subgraph of another graph), every graph that has a
Hamiltonian circuit also has a Hamiltonian path. There are,
however, many graphs with Hamiltonian paths thathave no
Hamiltonian circuits
 Graphs without Hamiltonian Circuit (Hamiltonian Path)

Summary

17 | P a g e
Prepared by Dr. Jaysan H. Shukla
Graph Theory Definitions and Properties Mathematics-I ( T - 4 )

TRAVELING-SALESMAN PROBLEM

A problem closely related to the question of Hamiltonian circuits is the


traveling-salesman problem, stated as follows: A salesman is required to visit
a number of cities during a trip. Given the distances between the cities, in
what order should he travel so as to visit every city precisely once and return
home, with the minimum mileage traveled?

Representing the cities by vertices and the roads between them by edges, we
get a graph. In this graph, with every edge ei there is associated a real number
(the distance in miles, say), w(ei). Such a graph is called a weighted graph;
w(ei) being the weight of edge ei.

In our problem, if each of the cities has a road to every other city, we have a
complete weighted graph. This graph has numerous Hamiltonian circuits, and
we are to pick the one that has the smallest sum of distances (or weights).

The total number of different (not edge disjoint, of course) Hamiltonian


circuits in a complete graph of n vertices can be shown to be (n − l)!/2. This
follows from the fact that starting from any vertex we have n − 1 edges to
choose from the first vertex, n − 2 from the second, n − 3 from the third, and
so on. These being independent choices, we get (n − 1)! possible number of
choices. This number is, however, divided by 2, because each Hamiltonian
circuit has been counted twice.

Algorithms to find Hamiltonian Circuit in Complete Graph:


1. Brute Force Algorithm
2. Nearest-Neighbor Algorithm
3. Repetitive Nearest-Neighbor Algorithm
4. Cheapest-Link Algorithm

Nearest-Neighbor Algorithm:
1. Pick a vertex as the starting point.
2. From the starting point go to the vertex with an edge with the smallest
weight. If there is more than one choice, choose at random.
18 | P a g e
Prepared by Dr. Jaysan H. Shukla
Graph Theory Definitions and Properties Mathematics-I ( T - 4 )

3. Continue building the circuit, one vertex at a time from among the
vertices that have not been visited yet.
4. From the last vertex, return to the starting point.

For example, Suppose a delivery person needs to deliver packages to four


locations and return to the home office A. Find the shortest route if the
weights on the graph represent distances in kilometers

The solution is A-E-B-C-D-A with a total weight of 26 miles. This is not the
optimal solution, but it is close and it was a very efficient method

Cheapest-Link Algorithm: ( Not in syllabus only for ref. )

1. Pick the link with the smallest weight first (if there is a tie, randomly pick
one). Mark the corresponding edge in red.
2. Pick the next cheapest link and mark the corresponding edge in red.
3. Continue picking the cheapest link available. Mark the corresponding
edge in red except when a) it closes a circuit or b) it results in three edges
coming out of a single vertex.
4. When there are no more vertices to link, close the red circuit.

19 | P a g e
Prepared by Dr. Jaysan H. Shukla
Graph Theory Definitions and Properties Mathematics-I ( T - 4 )

Cheapest link is from E to B Next Cheapest link is from B to C

Next Cheapest link is from E to D Next Cheapest link is from A to C


Avoid A to E as it will be 3rd edge from E
Avoid A to B as it will create circuit {A, B, C}

Next Cheapest link is from A to D


Avoid A to E as it will be 3rd edge from A(or E)
Avoid E to C as it will be 3rd edge from C(or E)
Avoid A to B as it will be 3rd edge from A(or B)
Avoid B to D as it will be 3rd edge from D(or B)

The solution is A-C-B-E-D-A ( or A-D-E-B-C-A ) with total weight of 20 mile


20 | P a g e
Prepared by Dr. Jaysan H. Shukla
Graph Theory Definitions and Properties Mathematics-I ( T - 4 )

10.1 Mathematical Foundations of Trees:

Tree: A tree is a connected graph without any circuits.


 It follows immediately from the definition that a tree has to be a
simple graph,that is, having neither a self-loop nor parallel edges
(because they both form circuits).

Properties:
 G is connected and is circuitless
 G is connected and has n − 1 edges
 G is circuitless and has n − 1 edges
 There is exactly one path between every pair of vertices in G
 G is a minimally connected graph.

Distance:
In a connected graph G, the distance d (vi, vj) between two of its vertices
vi andvj is the length of the shortest path (i.e., the number of edges in the
shortest path) between them.

For instance, some of the paths between vertices v1 and v2 in graph are
(a, e), (a, c, f), (b, c, e), (b, f), (b, g, h), and (b, g, i, k). There are two
shortest paths,(a, e) and (b, f), each of length two. Hence d(v1, v2) = 2.

21 | P a g e
Prepared by Dr. Jaysan H. Shukla
Graph Theory Definitions and Properties Mathematics-I ( T - 4 )

Eccentricity of a vertex:
The eccentricity E(v) of a vertex v in a graph G is the distance from v to
the vertex farthest from v in G; that is,

Center of Graph:
A vertex with minimum eccentricity in graph G is called a center of G.

E(a) = 2, E(b) = 1, E(c) = 2, andE(d) = 2.Hence vertex b is the center of that


tree

The eccentricity of each of its six vertices is shown next to the vertex. This
tree has two vertices having the same minimum eccentricity. Hence this tree
has two centers. Some authors refer to such centers as bicenters.
 Every tree has either one or two centers.

Radius and Diameter:


The eccentricity of a center (which is the distance from the center of the
tree to the farthest vertex) in a tree is defined as the radius of the tree.
The diameter of a tree T, on the other hand, is defined as the length of
the longest path in T.
 Radius in a tree is not necessarily half its diameter.

22 | P a g e
Prepared by Dr. Jaysan H. Shukla
Graph Theory Definitions and Properties Mathematics-I ( T - 4 )

Radius is 3 and Diameter is 6 in above Graph.


Internal Vertex:
A non-pendant vertex in a tree is called an internal vertex.
 Number of internal vertices in a binary tree is one less than the
number of pendant vertices

Level of vertex:
In a binary tree a vertex vi is said to be at level li if vi is at a distance of li
from the root. Thus, the root is at level 0

(G)
Height of Tree:
The maximum level, lmax, of any vertex in a binary tree is called the height
of thetree

The path length of a tree:


The path length (or external path length) of a tree, can be defined as the
sum of the path lengths from the root to all pendant vertices.

The path length of G = 1 + 3 + 3 + 4 + 4 + 4 + 4 = 23.


23 | P a g e
Prepared by Dr. Jaysan H. Shukla
Graph Theory Definitions and Properties Mathematics-I ( T - 4 )

(a) (b)
The path length of (a) is 16 and of (b) is 20
Rooted Tree:
A tree in which one vertex (called the root) is distinguished from all the
othersis called a rooted tree.
In a diagram of a rooted tree, the root is generally marked distinctly. We
will show the root enclosed in a small triangle. All rooted trees with four
vertices are shown in Fig.

Binary Tree:

A binary tree is defined as a tree in which there is exactly one vertex of


degree two, and each of the remaining vertices is of degree one or three.

 The vertex of degree two is distinct from all other vertices, this
vertex serves as a root.

 Every binary tree is a rooted tree.

24 | P a g e
Prepared by Dr. Jaysan H. Shukla
Graph Theory Definitions and Properties Mathematics-I ( T - 4 )

10.2 Spanning Trees:


Spanning Tree:

A tree T is said to be a spanning tree of a connected graph G if T is a


subgraph of G and T contains all vertices of G

 An edge in a spanning tree T is called a branch of T.


 An edge of G that is notin a given spanning tree T is called a
chord.
 For example, the graph has six tree branches and eight chords
with respect to the spanning tree { b1, b2, b3, b4, b5, b6} . Any
other spanning tree will yield the same numbers.

It must be kept in mind that branches and chordsare defined only with
respect to a given spanning tree. An edge that is a branch of one spanning
tree T1 (in a graph G) may be a chord with respect to another spanning
tree T2.

Rank and Nullity of graph G :

Rank : r = n – k and,

Nullity : µ = e − n + k.

Where for a graph G.


n is the number of vertices in G.
e the number of edges in G.
k the number of components G.

25 | P a g e
Prepared by Dr. Jaysan H. Shukla
Graph Theory Definitions and Properties Mathematics-I ( T - 4 )

 Note:

Rank of G = number of branches in any spanning tree of G,


Nullity of G = number of chords in G,
Rank + Nullity = number of edges in G.

FUNDAMENTAL CIRCUITS:

Adding any one chord to T will create exactly one circuit. Such a circuit,
formed by adding achord to a spanning tree, is called a fundamental circuit.

Let us look at the tree {b1, b2, b3, b4, b5, b6}.

Adding c1 to it, we get a subgraph {b1, b2, b3, b4, b5, b6, c1}, which has
one circuit (fundamental circuit), {b1, b2, b3, b4, b5, c1}.

Had we added the chord c2 (instead of c1) to thetree, we would have

26 | P a g e
Prepared by Dr. Jaysan H. Shukla
Graph Theory Definitions and Properties Mathematics-I ( T - 4 )

obtained a different fundamental circuit, {b2, b3, b5, c2}.

 Any graph G have Exactly µ (= e − n + k) no. of fundamental circuits.


 A circuit is a fundamental circuit only with respect to a given
spanning tree.
 A given circuit may be fundamental with respect to one spanning tree,
but not with respect to a differentspanning tree of the same graph.
FINDING ALL SPANNING TREES OF A GRAPH

One way to generate spanning trees of a graph is to start with a given


spanning tree, say tree T1 (a b c d ).

Add a chord, say h, to the tree T1. This forms a fundamental circuit
(b c h d).
Removal of any branch, say c, from the fundamental circuit (b c h d ) just
formed will create a new spanning tree T2.

 This generation of one spanning tree from another, through addition


of a chord and deletion of an appropriate branch, is called a
cyclic interchange or elementary tree transformation.

27 | P a g e
Prepared by Dr. Jaysan H. Shukla
Graph Theory Definitions and Properties Mathematics-I ( T - 4 )

Algorithms to find Spanning Tree in weighted Graph:

Prim’s Algorithm

MST: Minimum Spanning Tree ( Spanning Tree with Minimum weight )

Step 1: Consider any vertex as the starting vertex of the MST.


Step 2: Consider a Vertex set V for all visited vertices.
Step 3: Find all edges incident to all vertices in set V.
Step 4: Select the minimum among these edges such that no circuit is
formed.
Step 5: Find incident vertex ( end vertex ) of minimum edge and add this
vertex in set V.
Step 6: Return to step 3 to step 5 till all vertices are included in set V.

Example:

28 | P a g e
Prepared by Dr. Jaysan H. Shukla
Graph Theory Definitions and Properties Mathematics-I ( T - 4 )

Firstly, we select an arbitrary vertex that acts as the starting vertex of the
Minimum Spanning Tree. Here we have selected vertex 0 as the starting
vertex, V={0}

 All the edges connecting 0 and other vertices are, {0, 1} and {0, 7}.
 Among these edges, the edge with minimum weight is {0, 1}.
 So, include the edge {0,1}and vertex 1 in the MST as it doesn’t
create any circuit. V={0,1}

29 | P a g e
Prepared by Dr. Jaysan H. Shukla
Graph Theory Definitions and Properties Mathematics-I ( T - 4 )

 All the edges connecting 0 and 1 with other vertices are, {0, 7},
{1,2} and {1,7}.
 Among these edges, the edge with minimum weight is {0, 7} and
{1,2}. Let us select an edge {0,7}
 So, include the edge {0,7}and vertex 7 in the MST as it doesn’t
create any circuit. V={0,1,7}

 All the edges connecting 0 ,1 and 7 with other vertices are, {1,2},
{7,8} and {7,6}.
 Among these edges, the edge with minimum weight is {7,6}.
 So, include the edge {7,6}and vertex 6 in the MST as it doesn’t
create any circuit. V={0,1,7,6}

30 | P a g e
Prepared by Dr. Jaysan H. Shukla
Graph Theory Definitions and Properties Mathematics-I ( T - 4 )

 All the edges connecting 0,1,7 and 6 with other vertices are, {1,2},
{7,8} ,{6,5} and {6,8}.
 Among these edges, the edge with minimum weight is {6,5}.
 So, include the edge {6,5}and vertex 5 in the MST as it doesn’t
create any circuit. V={0,1,7,6,5}

 All the edges connecting 0,1,7, 6 and 5 with other vertices are,
{1,2}, {7,8} , {6,8},{5,2},{5,3} and {5,4}.
 Among these edges, the edge with minimum weight is {5,2}.
 So, include the edge {5,2}and vertex 2 in the MST as it doesn’t
create any circuit. V={0,1,7,6,5,2}

31 | P a g e
Prepared by Dr. Jaysan H. Shukla
Graph Theory Definitions and Properties Mathematics-I ( T - 4 )

 All the edges connecting 0,1,7,6,5 and 2 with other vertices are,
{7,8} , {6,8},{5,3},{5,4}and{2,8}.
 Among these edges, the edge with minimum weight is {2,8}.
 So, include the edge {2,8}and vertex 2 in the MST as it doesn’t
create any circuit. V={0,1,7,6,5,2,8}

 All the edges connecting 0,1,7,6,5,2 and 8 with other vertices are,
{2,3} , {5,3} and {5,4}
 Among these edges, the edge with minimum weight is {2,3}.
 So, include the edge {2,3}and vertex 2 in the MST as it doesn’t
create any circuit. V={0,1,7,6,5,2,8,3}

32 | P a g e
Prepared by Dr. Jaysan H. Shukla
Graph Theory Definitions and Properties Mathematics-I ( T - 4 )

 All the edges connecting 0,1,7,6,5,2,8 and 3 with other vertices are,
{3,4} and {5,4}
 Among these edges, the edge with minimum weight is {3,4}.
 So, include the edge {3,4}and vertex 4 in the MST as it doesn’t
create any circuit. V={0,1,7,6,5,2,8,3,4}

The final MST is as follows,

The weight of the edges of the MST is (4 + 8 + 1 + 2 + 4 + 2 + 7 + 9) = 37.

33 | P a g e
Prepared by Dr. Jaysan H. Shukla
Graph Theory Definitions and Properties Mathematics-I ( T - 4 )

9.3 CUTSETS AND CUT-VERTICES :


Cut-Set:
In a connected graph G, a cut-set is a set of edges whose removal from G
leaves G disconnected, provided removal of no proper subset of these edges
disconnects G.

 Set of edges {a, c, d, f} is a cut-set.

 There are many other cutsets, such as {a, b, g} , {a, b, e, f} , and


{d, h, f}. Edge {k} alone is also a cut-set.

 The set of edges {a, c, h, d}, on the other hand, is not a cut-set, because
one of its proper subsets, {a, c, h}, is a cut-set.
 A cut-set always “cuts” a graph into two. Therefore, a cut-set can also
be defined as a minimal set of edges in a connected graph whose
removal reduces the rank of the graph by one
 Every cut-set in a connected graph G must contain at least one branch
of every spanning tree of G.
 In a connected graph G, any minimal set of edges containing at least
one branch of every spanning tree of G is a cut-set.
 Every circuit has an even number of edges in common with any cut-set.

34 | P a g e
Prepared by Dr. Jaysan H. Shukla
Graph Theory Definitions and Properties Mathematics-I ( T - 4 )

Fundamental Cut-set:
a cut-set S containing exactly one branch of a spanning tree T is called a
fundamental cut-set with respect to T

 As every chord of a spanning tree defines a unique fundamental


circuit, every branch of a spanning tree defines a unique fundamental
cut-set.

 It must also be kept in mind that the term fundamental cut-set (like the
term fundamentalcircuit) has meaning only with respect to a given
spanning tree.

 Note:
With respect to a given spanning tree T, a chord ci that determines a
fundamental circuit Γ occurs in every fundamental cut-set associated
with the branches in Γ and in no other.

 As an example, consider the spanning tree {b, c, e, h, k}, shown in


heavy lines. The fundamental circuit made by chord f is{f, e, h, k}.

 The three fundamental cut sets determined by the three branches e, h,


and k are

determined by branch e: {d, e, f},


determined by branch h: {f, g, h},
determined by branch k: {f, g, k}.

35 | P a g e
Prepared by Dr. Jaysan H. Shukla
Graph Theory Definitions and Properties Mathematics-I ( T - 4 )

Note:
With respect to a given spanning tree T, a branch bi that determines a
fundamental cut-set S is contained in every fundamental circuit associated
withthe chords in S, and in no others.

consider branch e of spanning tree {b, c, e, h, k}. The fundamental cut-set


determined by e is

{e, d, f}.

The two fundamental circuits determined by chords d and f are

determined by chord d: {d, c, e},


determined by chord f: {f, e, h, k}.

Branch e is contained in both these fundamental circuits, and none of the


remaining three fundamental circuits contains branch e.

36 | P a g e
Prepared by Dr. Jaysan H. Shukla
Graph Theory Definitions and Properties Mathematics-I ( T - 4 )

(a)

(b)

(c)

(d)

37 | P a g e
Prepared by Dr. Jaysan H. Shukla
Graph Theory Definitions and Properties Mathematics-I ( T - 4 )

Cut Vertex:

In a separable graph a vertex whose removal disconnects the graph is called


a cut-vertex, a cut-node, or an articulation point.

For example, in Fig. (c) the vertex v is a cut-vertex, and in Fig. (a) vertex v4
is a cut-vertex.
 A vertex v in a connected graph G is a cut-vertex if and only if there
exist two vertices x and y in G such that every path between x and y
passes through v.

38 | P a g e
Prepared by Dr. Jaysan H. Shukla
Graph Theory Definitions and Properties Mathematics-I ( T - 4 )

9.4 MATRIX REPRESENTATION OF GRAPHS


INCIDENCE MATRIX:

Let G be a graph with n vertices, e edges, and no self-loops. Define an n


by ematrix A = [aij], whose n rows correspond to the n vertices and the e
columns correspond to the e edges, as follows :
The matrix element

aij = 1, if jth edge ej is incident on ith vertex vi,and


= 0, otherwise.

39 | P a g e
Prepared by Dr. Jaysan H. Shukla
Graph Theory Definitions and Properties Mathematics-I ( T - 4 )

 The incidence matrix contains only two elements, 0 and 1. Such a


matrix is called a binary matrix or a (0, 1)-matrix.

 Since every edge is incident on exactly two vertices, each column of


A hasexactly two l′s.
 The number of l′s in each row equals the degree of the
corresponding vertex.
 A row with all 0′s, therefore, represents an isolated vertex.
 Parallel edges in a graph produce identical columns in its incidence
matrix,for example, columns 1 and 2 in fig (a).
 If a graph G is disconnected and consists of two components g1 and
g2, theincidence matrix A(G) of graph G can be written in a block-
diagonal formas

where A(g1) and A(g2) are the incidence matrices of components g1


and g2. This observation results from the fact that no edge in g1 is
incident on vertices of g2, and vice versa. Obviously, this remark is
also true for a disconnected graph with any number of components.

 Permutation of any two rows or columns in an incidence matrix


simply corresponds to relabeling the vertices and edges of the same
graph.

40 | P a g e
Prepared by Dr. Jaysan H. Shukla
Graph Theory Definitions and Properties Mathematics-I ( T - 4 )

CIRCUIT MATRIX:
Let the number of different circuits in a graph G be q and the number of
edges in G be e. Then a circuit matrix B = [bij] of G is a q by e, (0, 1)-matrix
defined asfollows:

bij = 1, if ith circuit includes jth edge, and


= 0, otherwise.

To emphasize the fact that B is a circuit matrix of graph G, the circuit


matrixmay also be written as B(G).
The graph in (a) has four different circuits, {a, b}, {c, e, g}, {d, f, g},and
{c, d, f, e}. Therefore, its circuit matrix is a 4 by 8, (0, l)-matrix as shown:

The following observations can be made about a circuit matrix B(G) of


a graph G:
1. A column of all zeros corresponds to a non circuit edge (i.e., an edge
that does not belong to any circuit).
2. Each row of B(G) is a circuit vector.
3. Unlike the incidence matrix, a circuit matrix is capable of
representing a self-loop—the corresponding row will have a single 1.
4. The number of 1’s in a row is equal to the number of edges in the
corresponding circuit.
5. If graph G is separable (or disconnected) and consists of two blocks
(or components) g1 and g2, the circuit matrix B(G) can be written in a
block- diagonal form as

41 | P a g e
Prepared by Dr. Jaysan H. Shukla
Graph Theory Definitions and Properties Mathematics-I ( T - 4 )

where B(g1) and B(g2) are the circuit matrices of g1 and g2. This
observation results from the fact that circuits in g1 have no edges
belongingto g2, and vice versa.

FUNDAMENTAL CIRCUIT MATRIX :

A submatrix (of a circuit matrix) in which all rows correspond to a set of


fundamental circuits is called a fundamental circuit matrix Bf.

A graph and its fundamental circuit matrix with respect to a spanning tree
(indicated by heavy lines) are shown in fig,

A matrix Bf thus arranged can be written as

where Iµ is an identity matrix of order µ = e − n + 1, and Bt is the


remaining µ by (n − 1) submatrix, corresponding to the branches of the
spanning tree.
42 | P a g e
Prepared by Dr. Jaysan H. Shukla
Graph Theory Definitions and Properties Mathematics-I ( T - 4 )

CUT-SET MATRIX:

Analogous to a circuit matrix, we can define a cut-set matrix C = [cij] in


whichthe rows correspond to the cut-sets and the columns to the edges of
the graph, asfollows:

cij = 1, if ith cut-set contains jth edge, and


= 0, otherwise.

43 | P a g e
Prepared by Dr. Jaysan H. Shukla
Graph Theory Definitions and Properties Mathematics-I ( T - 4 )

PATH MATRIX:
A path matrix is defined for a specificpair of vertices in a graph, say (x, y),
and is written as P(x,y). The rows in P(x, y)correspond to different paths
between vertices x and y, and the columns correspond to the edges in G.
That is, the path matrix for (x, y) vertices is,
P(x, y)= [pij],
where

pij = 1, if jth edge lies in ith path, and


= 0, otherwise.

There are three different paths; {h, e}, {h, g, c}, and {h, f, d, c}. Let us
number them 1, 2, and 3, respectively. Then we get the 3 by 8 path matrix
P(v3, v4):

Some of the observations one can make at once about a path matrix P(x, y)
ofa graph G are:
1. A column of all 0’s corresponds to an edge that does not lie in any
path between x and y.
2. A column of all 1’s corresponds to an edge that lies in every path
between
x and y.
3. There is no row with all 0’s.
4. The ring sum of any two rows in P(x, y) corresponds to a circuit
or anedge-disjoint union of circuits.
44 | P a g e
Prepared by Dr. Jaysan H. Shukla
Graph Theory Definitions and Properties Mathematics-I ( T - 4 )

ADJACENCY MATRIX:

The adjacency matrix of a graph G with n vertices and no parallel edges is


an n by n symmetricbinary matrix X = [xij] defined over the ring of integers
such that
xij = 1, if there is an edge between ith and jth vertices, and
= 0, if there is no edge between them.

45 | P a g e
Prepared by Dr. Jaysan H. Shukla
Graph Theory Definitions and Properties Mathematics-I ( T - 4 )

9.5 COLORING, COVERING, AND PARTITIONING:

Properly Colored Graph:

A graph in which every vertex has been assigned a color according to a


proper coloring ( No neighboring vertices are with same color ) is called a
properly colored graph.

Usually a given graph can be properly colored in many different ways. For
example,

The chromatic number of G:


A graph G that requires κ different colors for its proper coloring, and no
less, is called a κ-chromatic graph ( also denoted by χ(G) or γ(G) ), and the
number κ is called the chromatic number of G. the graph in above fig is 3-
chromatic.

46 | P a g e
Prepared by Dr. Jaysan H. Shukla
Graph Theory Definitions and Properties Mathematics-I ( T - 4 )

Proper Colouring

Above graph is 3-chromatic.

Some observations that follow directly from the definitions just introduced
are:
 A graph consisting of only isolated vertices is 1-chromatic.
 A graph with one or more edges (not a self-loop, of course) is at least
2- chromatic (also called bichromatic).
 A complete graph of n vertices is n-chromatic, as all its vertices are
adjacent. Hence a graph containing a complete graph of r vertices is
at least r-chromatic. For instance, every graph having a triangle is at
least 3-chromatic.
 A graph consisting of simply one circuit with n ≥ 3 vertices is 2-
chromatic if n is even and 3-chromatic if n is odd. (This can be seen
by numbering vertices 1, 2, . . ., n in sequence and assigning one color
to odd vertices and another to even. If n is even, no adjacent vertices
will have the same color.If n is odd, the nth and first vertex will be
adjacent and will have the same color, thus requiring a third color for
proper coloring.)
 Every tree with two or more vertices is 2-chromatic.

47 | P a g e
Prepared by Dr. Jaysan H. Shukla
Graph Theory Definitions and Properties Mathematics-I ( T - 4 )

 A graph with at least one edge is 2-chromatic if and only if it has no


circuits of odd length.

 If dmax is the maximum degree of the vertices in a graph G,


chromatic number of G ≤ 1 + dmax.

48 | P a g e
Prepared by Dr. Jaysan H. Shukla
Graph Theory Definitions and Properties Mathematics-I ( T - 4 )

The chromatic Polynomial:

The value of the chromatic polynomial Pn(λ) of a graph with n vertices


givesthe number of ways of properly coloring the graph, using λ or fewer
colors.

Let ci be the different ways of properly coloring G using exactly i


different colors. Since i colors can be chosen out of λ colors in

there are different ways of properly coloring G using exactly i colors out
of λ colors.
Since i can be any positive integer from 1 to n (it is not possible to use
more than n colors on n vertices), the chromatic polynomial is a sum of
these terms; that is,

Each ci has to be evaluated individually for the given graph. For example,
anygraph with even one edge requires at least two colors for proper
coloring, and therefore
c1 = 0.
A graph with n vertices and using n different colors can be properly colored
in n! ways; that is,
cn = n!.

49 | P a g e
Prepared by Dr. Jaysan H. Shukla
Graph Theory Definitions and Properties Mathematics-I ( T - 4 )

let us find the chromatic polynomial of the graph given in above fig

Since the graph in fig has a triangle, it will require at least three different
colors for proper coloring. Therefore,

c1 = c2 = 0 and c5 = 5!.

Moreover, to evaluate c3, suppose that we have three colors x, y, and z.


Thesethree colors can be assigned properly to vertices v1, v2, and v3 in 3! =
6 differentways. Having done that, we have no more choices left, because
vertex v5 must have the same color as v3, and v4 must have the same color
as v2. Therefore,

c3 = 6.

Similarly, with four colors, v1, v2, and v3 can be properly colored in 4·6
= 24 different ways. The fourth color can be assigned to v4 or v5, thus
providing two choices. The fifth vertex provides no additional choice.
Therefore,

c4 = 24·2 = 48.

Substituting these coefficients in P5(λ), we get, for the graph in fig,

50 | P a g e
Prepared by Dr. Jaysan H. Shukla
Graph Theory Definitions and Properties Mathematics-I ( T - 4 )

P5(λ) = λ (λ − 1)(λ − 2) + 2λ(λ − 1)(λ − 2)(λ − 3) + λ(λ − 1)(λ − 2)(λ − 3)(λ − 4)


P5(λ) = λ(λ − 1)(λ − 2)(λ2 − 5λ + 7).

The presence of factors λ, λ – 1 and λ – 2 indicates that G is at least


3 -chromatic.

Note:

The chromatic number is the smallest value of λ such that Pn(λ) ≠ 0.

51 | P a g e
Prepared by Dr. Jaysan H. Shukla
Graph Theory Definitions and Properties Mathematics-I ( T - 4 )

Decomposition Method:
Let a and b be two nonadjacent vertices in a graph G. Let G′ be a graph
obtained by adding an edge between a and b. Let G″ be a simple graph
obtainedfrom G by fusing the vertices a and b together and replacing sets
of parallel edges with single edges. Then

Pn(λ) of G = Pn(λ) of G′ + Pn − 1(λ) of G″.

52 | P a g e
Prepared by Dr. Jaysan H. Shukla

You might also like