0% found this document useful (0 votes)
17 views71 pages

Graph Theory: Module-1

The document provides an introduction to graph theory, covering definitions, types of graphs, and key concepts such as vertices, edges, paths, circuits, and graph applications. It explains various graph properties including bipartite graphs, weighted graphs, and the degree of vertices, along with important theorems like the Handshaking Lemma. Additionally, it discusses connected and disconnected graphs, subgraphs, and isomorphism, providing a foundational understanding of graph structures and their relationships.

Uploaded by

Shlok Gupta
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)
17 views71 pages

Graph Theory: Module-1

The document provides an introduction to graph theory, covering definitions, types of graphs, and key concepts such as vertices, edges, paths, circuits, and graph applications. It explains various graph properties including bipartite graphs, weighted graphs, and the degree of vertices, along with important theorems like the Handshaking Lemma. Additionally, it discusses connected and disconnected graphs, subgraphs, and isomorphism, providing a foundational understanding of graph structures and their relationships.

Uploaded by

Shlok Gupta
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/ 71

1

Graph theory: Module-1


Introduction to Graphs: Introduction, Basic
definition , Application of graphs ,finite,
infinite and bipartite graphs , Incidence and
Degree , Isolated vertex, pendant vertex and
Null graph.

Paths and circuits ,Isomorphism, sub-graphs,


walks, paths and circuits, connected graphs,
disconnected graphs and components.
Chapter 1: Introduction to 2

Graphs
Definition: A graph is collection of points called vertices &
collection of lines called edges each of which joins either a pair of
points or single points to itself.

Mathematically graph G is an ordered pair of (V, E)

Each edge eij is associated with an ordered pair of vertices (Vi,Vj).


3
 A linear graph (or simply a 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, such that 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.
v1
e1
 In Fig. G has graph 4 vertices namely v1, v2, v3, v4 &
e2
v2
6 edges
v4 e3
e5
 Namely e1, e2, e3, e4, e5, e6 Then e1=(v1, v2) e4 v3

 Similarly for other edges.


e6
 In short, we can represent G=(V,E) where V=(v1, v2, v3, v4) & E=(e1, e2, e3, e4, e5, e6 )
4
 A linear graph (or simply a 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, such that 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.
v1
In Fig. G has graph 4 vertices namely v1, v2, v3, v4 & e1
e2
v2
6 edges
v4 e3
e5
Namely e1, e2, e3, e4, e5, e6 Then e1=(v1, v2)
e4 v3
Similarly for other edges.

In short, we can represent G=(V,E) where V=(v1, v2, v3, v4) & e6

E=(e1, e2, e3, e4, e5, e6 )


Self Loops & Parallel Edges
5

Self Loops:

Definition: If the end vertices Vi & Vj of any edge eij are same, then edge eij called
as Self Loop .

For Example, In graph G, the edge e6 =(v3, v3) is self loop.

Parallel Edges

Definition: If there are more than one edge is associated with given pair of
vertices then those edge called as Parallel or Multiple edge.

For Example, In graph G, e4 & e5 has (v1, v3) are called as Parallel edge.
Simple & Multiple Graphs
6

Definition: A graph that has neither self loops or


parallel edge is called as Simple Graph
otherwise it is called as Multiple Graph.
For Example:

G1 (Simple Graph ) G2 (Multiple Graph)


Weighted Graph
7

Definition: If each edge or each vertex or both are associated with


some +ve no. then the graph is called as Weighted Graph

1.4
For Example, V1 V2

6
1.5

V4 V3

1.7
8
9

 A graph is also called a linear complex, a


1-complex, or a one-dimensional complex.

 A vertex is also referred to as a node, a


junction, a point, 0-cell, or an 0-simplex.

 Other terms used for an edge are a


branch, a line, an element, a 1-cell, an arc,
and a 1-simplex
Applications of Graphs 10

 A graph can be used to represent almost any physical


situation involving discrete objects and a relationship among
them.

 Königsberg Bridge Problem:

 Utilities Problem:

 Electrical Network Problems:


Königsberg Bridge Problem:
11
12
13
Finite & Infinite Graph
14

Definition: A graph with finite no. of vertices as well as finite no. of


edges called as Finite Graph otherwise it is Infinite Graph.

For Example, The graph G1 Finite Graph, G2 is infinite graph


15

Labeled Graph:

Definition: A graph G=(V,E) is called as Labeled Graph


if its edges are labeled with some names or data.

For Example, Graph G is labeled graph.


Adjacency Graph 16
 Definition: Two nonparallel edges are said to be
adjacent if they are incident on a common vertex.
 Similarly, two vertices are said to be adjacent if they
are the end vertices of the same edge.
 For Example, In Graph G, e7 & e2 are adjacent.
v4 and v5 are adjacent, but v1 and v4 are not.
Incidence 17
 Definition:

When a vertex vi is end vertex of some edge ej, vi and ej,


are said to be Incident with each other.

For example: edges e2, e6, and e7


are incident with vertex v4.
Bipartite Graph 18

Definition: The graph is called as bipartite graph , if its vertex set V can
be partitioned into two distinct subset say V1 & V2. such that no two
vertices in the same partition can be adjacent. Here the pair(v1,v2) is called
the bipartite of G.

V1 U V2=V & V1  V2 =  & also each edge of G joins a vertex of V1 to


vertex of V2.

A graph can not have self loop.

V=v1 U v2

Every vertex in one set and other in other set .


19
EX 20

Vertices in the set should not be


adjacent to each other
21
22
23
24
Check whether the graph is bipartite graph or not
25
26

Every edge goes from one set to other set.


27
28

Every edge goes from one set to other set


Degree of a Vertex
29

Definition: The no. of edges incident on a vertex vi with self loop


counted twice is called as degree d(vi) of vertex vi.

For Example, Consider the Graph G, d(v1)=3 ,d(v2)=2 ,d(v3)=5


v1
e1
,d(v4)= 4 e2
v2

v4 e3
e5
e4 v3

e7
e6
 The degree of a vertex is sometimes also referred to as its
valency.
30
31
Isolated Vertex, Pendant Vertex
and Null Graph 32
 A vertex with degree zero(no incident edge) is called as
Isolated Vertex. Vertices v4 and v7 are isolated vertices.

 A vertex with degree one is called as Pendant Vertex or an end


vertex. Ex: v3
 Two adjacent edges are said to be in series if their common vertex is of degree
two. The two edges incident on v1 are in series
Null Graph 33
Largest possible number 34

of vertices in this graph


35

Chapter 2- PATHS and CIRCUITS


Isomorphism, sub-graphs, walks, paths
and circuits, connected graphs,
disconnected graphs and components
Handshaking Lemma
36

Theorem: The graph G with e no. of edges & n no. of vertices, since
each edge contributes two degree, the sum of the degrees of all
vertices in G is twice no. of edges in G.

i.e.  i=1d(vi)=2e is called as Handshaking Lemma.


n

Example: How many edges are there in a graph with 10 vertices,


each of degree 6? Solution: The sum of the degrees of the vertices is
6*10 = 60. According to the Handshaking Theorem, it follows that
2e = 60, so there are 30 edges.
Isomorphism
37
 In geometry two figures are thought of as equivalent (and called
congruent) if they have identical behavior in terms of geometric
properties.
 Likewise, two graphs are thought of as equivalent (and called
isomorphic) if they have identical behavior in terms of graph-
theoretic properties.

Definition: Two graphs are thought of as equivalent (called


isomorphic) if they have identical behavior in terms of graph
theoretic properties.

Two graphs G(V, E) & G’(V’,E’) are said to be isomorphic to each


other if there is one-one correspondence between their vertices &
between their edges such that incidence relationship in preserved.
Isomorphism
38
For Example,
1 2 a b 1 a
2 b
3 d
4 3 d c 4 c

It is immediately apparent by definition of isomorphism that two


isomorphic graphs must have,

 the same number of vertices,

 the same number of edges, and


 the same degrees of vertices.
39
40
41
42
43
44
SubGraphs
45

Definition: A sub graph of a graph G = (V, E) is a graph G’ = (V’,


E’) where V’V and E’E.
 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.

For Example:

G G1 G2
46
 Edge-Disjoint Subgraphs: Two (or more) subgraphs g1 and
g2 of a graph G are said to be edge disjoint if g1 and g2 47
do not have any edges in common.
WALKS, PATHS, AND CIRCUITS
48

 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 walk is a sequence of vertices and edges of a


graph i.e. if we traverse a graph then we get a walk.
49

for instance, v1 a v2 b v3 c v3 d
v4 e v2 f v5 is a walk shown with
heavy lines.
50
 Walk can be open or closed.

 Open walk- A walk is said to be an open walk if the


starting and ending vertices are different i.e. the
origin vertex and terminal vertex are different.

 Closed walk- A walk is said to be a closed walk if the


starting and ending vertices are identical i.e. if a walk
starts and ends at the same vertex, then it is said to
be a closed walk.
51
 Trail- –
Trail is an open walk in which no edge is repeated. Vertex can
be repeated.
PATH 52
 An open walk in which no vertex appears more than
once is called a path (or a simple path or an
elementary path.
 It is a trail in which neither vertices nor edges are
repeated i.e. if we traverse a graph such that we do
not repeat a vertex and nor we repeat an edge. As
path is also a trail, thus it is also an open walk.

Here 6->8->3->1->2->4 is a Path


53

vl a v2 b v3 d v4 h v5 is a path,
whereas v1 a v2 b v3 c v3 d v4 e v2 f v5 is not a path.
54
 The number of edges in a path is called
the length of a path.

 It should also be noted that a self-loop


can be included in a walk but not in a
path.

 The terminal vertices of a path are of degree one,


and the rest of the vertices (called intermediate
vertices) are of degree two.
55
List all the different paths between vertices 5 and 6 in Fig. 2-5(a).
Give the length of each of these paths.
Circuit 56
 A closed walk in which no vertex (except the initial
and the final vertex) appears more than once is called
a circuit.
 Vertex can be repeated.
Edge can not be repeated.
 That is, a circuit is a closed, nonintersecting walk.
 every vertex in a circuit is of degree two
57

 A circuit is also called a cycle, elementary cycle, loop, circular


path, and polygon
58
 A walk is also referred to as an edge train or a chain.
 The set of vertices and edges constituting a given
walk in a graph G is clearly a subgraph of G.

 Vertices with which a walk begins and ends are


called its terminal vertices.
 It is possible for a walk to begin and end at the same
vertex. Such a walk is called a closed walk.
 A walk that is not closed (i.e., the terminal vertices
are distinct) is called an open walk
CONNECTED GRAPHS,DISCONNECTED 59
GRAPHS, AND COMPONENTS

 A graph is connected if we can reach any vertex from any other


vertex by traveling along the edges.

 More formally:
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.
For
60
 A connected component or simply component of an
undirected graph is a subgraph in which each pair of nodes is
connected with each other via a path.
 It is easy to see that a disconnected graph consists
of two or more connected graphs. Each of these
connected subgraphs is called a component.
 The graph below consists of two components.
61
62

Draw a connected graph that becomes


disconnected when any edge is removed from it.
THEOREM 2-1
A graph G is disconnected if and only if its vertex set V can be partitioned into
two nonempty, disjoint subsets V1 and V2 such that there exists no edge in63 G
whose one end vertex is in subset V1 and the other in subset V2.

Proof:
Suppose that such a partitioning exists.
Consider two arbitrary vertices a and b of G, such that a ∈ V1 and b ∈ V2.
No path can exist between vertices a and b; otherwise, there would be
at least one edge whose one end vertex would be in V1 and the other in
V2. Hence, if a partition exists, G is not connected.

Conversely, let G be a disconnected graph.


Consider a vertex a in G. Let V1 be the set of all vertices that are joined
by paths to a. Since G is disconnected, V1 does not include all vertices of
G.
The remaining vertices will form a (nonempty) set V2. No vertex in V1 is
joined to any in V2 by an edge.
Hence the partition.
Theorem 2-2: If a graph (connected or 64
disconnected) has exactly two vertices of odd
degree, there must be a path joining these two
vertices.
65
66
67
THEOREM 2-3

A simple graph (i.e., a graph without


parallel edges or self-loops) with n vertices
and k components can have at most (n −
k)(n − k + l)/2 edges.
Proof:
68
69
70
71

You might also like