UNIT V A
UNIT V A
Engineering College
UNIT – V
GRAPH THEORY
Graphs: Graphs and Graph Models, Graph Terminology and
Special Types of Graphs, Representing Graphs and Graph
Isomorphism, Connectivity, Euler and Hamilton Paths,
Shortest-Path Problems, Planar Graphs, Graph Coloring.
➢ Directed graph(Digraph)
• Definition
• Initial and Terminal vertices
• Directed Loop
• Parallel directed edges
• Multiple directed edges
• Isolated vertex
• Source and Sink
• In-Degree and Out-Degree
• First Theorem of Digraph Theory
Types of Edges:
Directed Loop: A directed edge beginning and ending with the
same vertex is A is called directed loop and is denoted by
(A,A) or AA
Types of Vertices:
Isolated Vertex: A vertex which is neither initial vertex nor
terminal vertex for any directed edge is called isolated vertex
Examples:
Types of Edges:
Loop: An edge with the same end vertices is called loop
Parallel Edges: Two edges having same end vertices are called
parallel edges
Simple Graph: A graph which does not contain loops and multiple
edges is called simple graph
Complete Graph:
A simple graph of order ≥ 2 in which there is an edge between every
pair of vertices is called complete graph or full graph
A complete graph with n ≥ 2 is denoted by Kn
Bipartite Graph:
A simple graph G is such that its vertex set is the union of two mutually
disjoint nonempty sets V1 and V2 which are such that every edge in G
joins a vertex in V1 and a vertex in V2. Then the graph G is called a
Bipartite graph and the graph is denoted by G = (V1 , V2 ;E ). Here V1 and
V2 are called bipartite of a vertex set V
Handshaking Property:
(Fundamental Theorem of Graph Theory)
Statement: The sum of the degrees of all the vertices in a graph is an
even number and this number is equal to twice the number of edges in
the graph.
Examples:
Regular Graph:
➢A graph in which all the vertices are of the same degree k is
called a regular graph of degree k or k-regular graph
➢ 3-regular graphs are called cubic graphs
➢ 3-regular graph which contains 10 vertices and 15 edges is
called Petersen graph
➢ 3-regular graph with 23 vertices is called 3- dimensional
hypercube and is denoted Q3
➢ A loop-free k- regular graph with 2k vertices is called k-dimensional
hypercube and is denoted by Qk
Examples:
Petersen Graph:
3-Dimensional Hypercube:
Graph Isomorphism:
Consider two graphs G = (V,E) and G1 = (V1,E1). If there exists a function
f: V→V1 such that (i) f is one-to-one and onto and (ii) for all vertices A,B
of G ,the edge {A,B} belongs to E if and only if {f(A), f(B)} belongs to E1.
Then f is called an isomorphism between G and G1
OR
Two graphs G and G1 are said to be isomorphic if there is a one-to-one
correspondence between their vertices and edges such that the
adjacency is preserved
When G and G1 are isomorphic, we write G G1
Examples:
Problems on Isomorphism:
(1) Prove that the following graphs are isomorphic
Ans: The given two graphs have (1) Same number of vertices (2) same
number of edges (3) equal number of vertices with given degree
The one-to-one correspondence between edges is given by
{u1,u2} ↔{v1,v4}, {u1,u3} ↔{v1,v3}
{u2,u4} ↔{v4,v2}, {u3,u4} ↔{v3,v2 }
The one-to-one correspondence between vertices is given by
u1 ↔ v1 , u2 ↔ v4 , u3 ↔ v3 , u4 ↔ v2
Therefore the given two graphs are isomorphic to each other
Ans:
The given two graphs have (1) same number of vertices
(2) Unequal number of edges
So the given two graphs are not isomorphic since the given
two graphs are not having same number of edges
Sub Graphs:
For any two graphs G and G1, we say that G1 is a sub graph of G if the
following conditions are satisfied
(1) All the vertices and all the edges of G1 are in G
(2) Each edge of G1 has the same end vertices in G as in G1
Examples:
Spanning Subgraphs:
For any given graph G = (V,E), if there is a subgraph G1 = (V1,E1) of G
such that V1 = V then G1 is called spanning subgraph of G
OR
A Subgraph of G which contains all the vertices of G, then it is called
spanning subgraph of G
Examples:
Induced Subgraphs:
For any given graph G = (V,E), if there is a subgraph G1 = (V1,E1) of G such that
every edge {A,B} of G, where A,B ϵ V1 is an edge of G1 also then G1 is called
subgraph of G induced by V1 and is denoted by <V1>
Examples:
Complement of Subgraph:
For a given graph G and a subgraph G1 of G, the subgraph of G obtained
by deleting all the edges of G1 from G, is called the complement of G1 in
G and is denoted by G-G1 or G1
The above graph contains 10 edges. In these 10 edges 9 edges can be drawn without crossing them
each other but 10th edge can not be drawn without crossing the other edges. So it is not planar
V Chandra Sekhar Reddy, Assoc.Prof., Dept. of CSE
ACE
Engineering College
Graph Coloring:
➢For a given planar or non-planar graph G, if we assign the colours to
the vertices in such a way that no two adjacent vertices have the same
colour. Then we say that the graph G is properly coloured
➢A graph can have more than one proper colouring
➢Two non adjacent vertices in properly coloured graph can have the
same colour
Chromatic Number:
➢The least number of colours required to colour the graph is called
chromatic number
➢A k-chromatic graph is a graph that can be properly coloured with k
colours but not less than k colours
➢If a graph G is k-chromatic then k is called chromatic number of G
➢The chromatic number of a graph G is denoted by
➢The maximum number of colours required to colour the graph G is
equal to number of vertices of G
V Chandra Sekhar Reddy, Assoc.Prof., Dept. of CSE
ACE
Engineering College
Map Colouring:
➢If we assign the colours to the regions of a map in such a way that no
two adjacent regions have the same colour then we say that the map is
properly coloured
➢A proper colouring of regions is called map colouring
Examples:
Euler’s Formula:
Let G be planar graph. Then G consists of finite number of regions
The number of edges that form the boundary of the region is called
degree of the region
Let us consider the following planar graph
Euler’s Formula:
A connected planar graph G with n vertices and m edges has exactly
m – n + 2 regions in all of its diagrams.
Ans: The given two graphs have (1) Same number of vertices (2) same
number of edges (3) equal number of vertices with given degree
The one-to-one correspondence between edges is given by
{u1,u4} ↔{v1,v2}, {u1,u5} ↔{v1,v3}, {u1,u6} ↔{v1,v6}
{u2,u5} ↔{v4,v3}, {u2,u4} ↔{v4,v2}, {u2,u6} ↔{v4,v6}
{u3,u6} ↔{v5,v6}, {u3,u4} ↔{v5,v2}, {u3,u5} ↔{v5,v3}
The one-to-one correspondence between vertices is given by
u1 ↔ v1 , u2 ↔ v4 , u3 ↔ v5
u4 ↔ v2 , u5 ↔ v3 , u6 ↔ v6
Therefore the given two graphs are isomorphic to each other