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

Module 4 - Graph Theory (Part -1)

This document provides an overview of graph theory, defining key concepts such as vertices, edges, loops, and types of graphs including directed, undirected, and weighted graphs. It explains basic terminologies and properties, such as the degree of vertices and the concept of isomorphic graphs. Additionally, it discusses subgraphs and spanning subgraphs, highlighting their significance in graph theory.

Uploaded by

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

Module 4 - Graph Theory (Part -1)

This document provides an overview of graph theory, defining key concepts such as vertices, edges, loops, and types of graphs including directed, undirected, and weighted graphs. It explains basic terminologies and properties, such as the degree of vertices and the concept of isomorphic graphs. Additionally, it discusses subgraphs and spanning subgraphs, highlighting their significance in graph theory.

Uploaded by

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

Module 4

Graph Theory
Dr V Bhuvaneswari
Assistant Professor
Department of Mathematics With CA
PSG College of Arts & Science
Introduction
 A graph is a diagram of points and lines connected to the
points.
 Basic Terminologies:
 point,
 line,
 vertex,
 edge,
 degree of vertices,
 properties of graphs, etc.
Basic Terminologies
Vertex
 A vertex is a point where multiple lines meet.
 It is also called a node.
 It is also denoted by an alphabet.
Edge
 An edge is the mathematical term for a line that connects two vertices.
 Many edges can be formed from a single vertex.
 Without a vertex, an edge cannot be formed.
 There must be a starting vertex and an ending vertex for an edge.
Incident
 An edge is said to be incident with the vertices it joins.
(For ex, the edge (A,B) is incident with the vertices A and B)

Initial Vertex Terminal Vertex


Basic Definitions
Definition of a Graph:
A graph is a pair G = (V, E), where
 V = V(G) = set of vertices (Points)
 E = E(G) = set of edges (Lines)
 Example:
 Let V = {a, b, c, d} and E = {{a, b},{a, c},{a, d}}.
 G = {V, E} is a (4, 3) graph.
Loop
 An edge that starts and ends at the same vertex is called a
Loop.
 In the graph below, d is the loop
Parallel edges:
 In a graph, if a pair of vertices is connected by more than
one edge, then those edges are called parallel edges.

 In the above graph, „a‟ and „b‟ are the two vertices which are
connected by two edges „ab‟ and „ab‟ between them. So it is
called as a parallel edge.
Adjacent Edges:
 Two non-parallel „edges‟ are said to be „adjacent‟ if they
incident on a common vertex.
 In the graph below, edges e1 and e2, e2 and e3, e1 and e3, e3
and e4 are adjacent to each other.
Adjacent vertices
 Two „vertices‟ are said to be „adjacent‟ if they are the end
vertices of the same edge.
Identify the adjacent edges
and adjacent vertices for the
graph
Find the adjacent edges and vertices
for the given graph?
 „a‟ and „d‟ are the adjacent vertices, as there is a common
edge „ad‟ between them.
 „c‟ and „b‟ are the adjacent vertices, as there is a common
edge „cb‟ between them.
 „ad‟ and „cd‟ are the adjacent edges, as there is a common
vertex „d‟ between them.
 „ac‟ and „cd‟ are the adjacent edges, as there is a common
vertex „c‟ between them.
Identify the adjacent edges
and adjacent vertices for the
graph
 „a‟ and „b‟ are the adjacent vertices, as there is a common
edge „ab‟ between them.
 „a‟ and „d‟ are the adjacent vertices, as there is a common
edge „ad‟ between them.
 ab‟ and „be‟ are the adjacent edges, as there is a common
vertex „b‟ between them.
 be‟ and „de‟ are the adjacent edges, as there is a common
vertex „e‟ between them.
Degree of Vertex
 Degree of a vertex v, denoted by d(v) or deg(v), is the number
of edges incident on v.
Isolated vertex:
 A vertex having no incident edge is called an „Isolated vertex‟
 A vertex with zero degree is called an „Isolated vertex‟
Pendant vertex:
 A vertex of degree one is called a Pendant vertex or an end
vertex.
In the graph shown,
vertex 5 is an isolated
vertex and vertex 4 is
the pendant vertex.
Results
 The sum of the degrees of the vertices of a graph is twice the
number of edges.
 In a graph, the number of odd degree vertices are even.
Order and size of a Graph:
 The number of vertices in a Graph G is called its „order‟ and
the number of edges is its „Size‟.
 The graph shown in the figure has order five and size six.
Directed Graph
 A directed graph is defined as a type of graph where the
edges have a direction associated with them.
Undirected Graph
 An undirected graph is a type of graph where the edges have
no specified direction assigned to the them.
 Find the degree of each of the vertex in the given graph.
 Find the degree of each of the vertex in the given graph.

deg(a) = 2
deg(b) = 3
deg(c) = 1 („c‟ is a pendent vertex.)
deg(d) = 2
deg(e) = 0 („e‟ is an isolated vertex.)
 Find the degree of each of the vertex in the given graph.
 Find the degree of each of the vertex in the given graph.

 deg(a) = 2, deg(b) = 2, deg(c) = 2


 deg(d) = 2, and deg(e) = 0.
 The vertex „e‟ is an isolated vertex.
 The graph does not have any pendent vertex.
TYPES OF GRAPHS
Null Graph
 A Graph without any edge is called a null graph.
 A null graph is also called empty graph.
 In other words, every vertex in a null graph is an isolated
vertex (degree zero).
Simple Graph
 A graph without loops or parallel edges is called a „simple
graph‟.
 A simple graph which has n vertices, the degree of every
vertex is at most n -1.

First graph is not a simple graph because it has two edges between the
vertices A and B and it also has a loop. Second graph is a simple graph
because it does not contain any loop and parallel edges.
Multi Graph
 A graph having parallel edges is known as a Multigraph.
 In the below graph, there are five edges „ab‟, „ac‟, „cd‟, „cd‟,
and „bd‟. Since „c‟ and „d‟ have two parallel edges between
them, it a Multigraph.
Am I a
Multigraph?
??
Pseudographs:
 A pseudograph is a type of graph that has a self-loop and
multiple edges.
Weighted graph:
 A graph where each edge is assigned a numerical label or
“weight” is called a „Weighted graph‟.
Finite graph & Infinite graph:
 A graph G = (V, E) is called a finite graph if the vertex Set
V, is finite set.
 A graph G = (V, E) is called an infinite graph if the vertex
Set V is an infinite set.
Complete Graph
 The complete graph Kn is the graph with n vertices and
every pair of vertices in Kn is joined by an edge.
Regular graph:
 A Regular graph is a graph in which each vertex has the same
degree.
 K- Regular graph is a graph in which each vertex has the
same degree equal to k.
Bipartite graphs:
 In a simple graph G, if V can be partitioned into two disjoint
sets V1 and V2 such that every edge in the graph connects a
vertex in V1 and a vertex V2 (so that no edge in G connects
either two vertices inV1 or two vertices inV2)
Complete Bipartite graph K m,n
 This is the graph that has its vertex set portioned into two
subsets of „m‟ and „n‟ vertices, respectively.
 There is an edge between two vertices if and only if one
vertex is in the first subset and the other vertex is in the
second subset.
Complement Graph
 Complement Graph is a Graph such that it contains only
those edges which are not present in the original graph.
Degrees for directed graph
 In degree and out degree:
 For a Directed Graph and a vertex, the outdegree refers to
the number of edges directed away from the vertex.
 The Indegree refers to the number of edges directed towards
the vertex.
 In computing the indegree and outdegree of a vertex, we
assume that each loop on a vertex contributes 1 to the
indegree and also 1 to the outdegree of that vertex.
 Indeg (1) = 0 Outdeg (1) = 3
 Indeg (2) = 1 Outdeg (2) = 2
 Indeg (3) = 2 Outdeg (3) = 1
 Indeg (4) = 3 Outdeg (4) = 3
 Indeg (5) = 1 Outdeg (5) = 1
 Indeg (6) = 3 Outdeg (6) = 0
 Indeg (7) = 2 Outdeg (7) = 1
Isomorphic Graphs
 A graph can exist in different forms having the same number
of vertices, edges, and also the same edge connectivity. Such
graphs are called isomorphic graphs.
 Two graphs G1 and G2 are Isomorphic if there exists a one-
one correspondence between their vertices and preserves
adjacency.

 Two graphs G1 and G2 are said to be isomorphic if −


 Their number of components (vertices and edges) are same.
 Their edge connectivity is retained.
Example for isomorphic graph
 No of vertices: 4
 No of edges: 5
 No of edges with deg(2) = 2
 No of edges with deg(3) = 2
Verify the following two graphs for Isomorphism.

 Condition-01:
 Number of vertices in graph G1 = 4
 Number of vertices in graph G2 = 4
 Here, both the graphs G1 and G2 have same number of vertices.
So, Condition-01 satisfies.
 Condition-02:
 Number of edges in graph G1 = 6
 Number of edges in graph G2 = 5
 Here, both the graphs G1 and G2 have different number of edges.
So, Condition-02 violates.
 Since Condition-02 violates, so given graphs cannot be
isomorphic.
Which of the following
graphs are isomorphic?
Subgraphs
 A subgraph of a graph G = (V, E) is a graph H =(V‟, E‟)
where V‟ is a subset of V and E‟ is a subset of E.
 G = G1 U G2 wherein E = E1 U E2 and V = V1 U V2,
 G1 and G2 are simple graphs of G.
 Consequences from the Definition of Subgraphs
 Every Graph is a Subgraph of itself.
 A single vertex in a Graph G is a subgraph of G.
 A single edge in a Graph G together with its end vertices is a
subgraph of G.
Spanning Subgraphs
 If H=(U,F) is a subgraph of G(V,E) and U = V, then H is
called a spanning subgraph of G.
 A spanning subgraph is a subgraph that contains all the
vertices of the original graph.

You might also like