SlideShare a Scribd company logo
1 of 32
Graph theory: Introduction
1
Contents
 Basic terminology,
 Multi graphs and weighted graphs
 Paths and circuits
 Shortest path in weighted graph
 Hamiltonian and Euler paths and circuits
 Planer graph
 Travelling salesman problem.
2
Introduction to 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
Introduction to Graphs
In Fig. G has graph 4 vertices namely
v1, v2, v3, v4& 7 edges
Namely e1, e2, e3, e4, e5, e6, e7 Then e1=(v1, v2)
Similarly for other edges.
In short, we can represent G=(V,E) where V=(v1, v2, v3, v4) &
E=(e1, e2, e3, e4, e5, e6,e7 )
4
v1
v2
v3
v4
e1
e2
e4
e5
e3
e6
e7
Graph G
Self Loops & Parallel Edges
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.
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 & e7 has (v3, v4) are called as Parallel
edge.
5
Simple & Multiple Graphs
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)
6
Weighted Graph
Definition: If each edge or each vertex or both are associated with
some +ve no. then the graph is called as Weighted Graph
For Example,
7
V1 V2
V4 V3
1.4
1.5
1.7
6
Finite & Infinite Graph
Definition: A graph is 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 & G2 is Finite 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.
8
Adjacency & Incidence
Definition: Two vertices v1 & v2 vertices of G joins directly by at
least one edge then there vertices called Adjacent Vertices.
For Example, In Graph G, v1 & v2 are adjacent vertices.
Definition: If Vi is end vertex of edge eij=(vi,vj) then edge eij is said
to be Incident on vi. Similarly eij is said to be Incident on vj.
For Example, In Graph G, e1 is incident on v1 & v2.
9
Degree of a Vertex
Definition: The no. of edges incident on a vertex vi with self loop
counted twice is called as degree of vertex vi.
For Example, Consider the Graph G, d(v1)=3 ,d(v2)=2 ,d(v3)=5
,d(v4)= 4
Definition :
A vertex with degree zero is called as Isolated Vertex & A vertex
with degree one is called as Pendant Vertex.
10
v1
v2
v3
v4
e1
e2
e4
e5
e3
e6
e7
Handshaking Lemma
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.  d(vi)=2e is called as Handshaking Lemma.
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.
11
n
i=1
Matrix Representation of Graphs
A graph can also be represented by matrix.
Two ways are used for matrix representation of graph are given as
follows,
1. Adjacent Matrix
2. Incident Matrix
Lets see one by one…
12
1. Adjacent Matrix
The A.M. of Graph G with n vertices & no parallel edges is a
symmetric binary matrix A(G)=[aij] or order n*n where,
aij=1, if there is as edge between vi &vj.
aij=0, if vi & vj are not adjacent.
A self loop at vertex vi corresponds to aij=1.
For Example,
A(G)=
13
1. Adjacent Matrix
The A.M. of multigraph G with n vertices is an n*n
matrix A(G)=[aij] where,
aij=N, if there one or more edge are there
between vi &vj & N is no. of edges between vi &
vj.
aij=0, otherwise.
For Example,
A(G)=
14
2. Incident Matrix
Given a graph G with n vertices , e edges & no self loops. The
incidence matrix x(G)=[Xij] of the other graph G is an n*e matrix
where,
Xij=1, if jth edge ej is incident on ith vertex vi,
Xij=0, otherwise.
Here n vertices are rows & e edges are columns.
X(G)=
15
Directed Graph or Diagraph
Definition: If each edge of the graph G has a direction then graph
called as diagraph.
In a graph with directed edges, the in-degree of a vertex v, denoted
by deg-(v) & out-degree of v, denoted by deg+(v).
See the example in Next page….
16
Directed Graph or Diagraph
Example: What are the in-degrees and out-degrees of the vertices a,
b, c, d in this graph:
17
a
b
c
d
deg-(a) = 1
deg+(a) = 2
deg-(b) = 4
deg+(b) = 2
deg-(d) = 2
deg+(d) = 1
deg-(c) = 0
deg+(c) = 2
Adjacency Matrix of a diagraph
It is defined in similar fashion as it defined for undirected graph.
For Example,
A(D)=
18
Incident matrix of diagraph
Given a graph G with n, e & no self loops is matrix x(G)=[Xij] or
order n*e where n vertices are rows & e edges are columns such
that,Xij=1, if jth edge ej is incident out ith vertex vi
Xij=-1, if jth edge ej is incident into ith vertex vi
Xij=0, if jth edge ej not incident on ith vertex vi.
19
Null Graph
Definition: If the edge set of any graph with n vertices is an empty
set, then the graph is known as null graph.
It is denoted by Nn For Example,
N3 N4
20
Complete Graph
Definition: Let G be simple graph on n vertices. If the degree of
each vertex is (n-1) then the graph is called as complete graph.
Complete graph on n vertices, it is denoted by Kn.
In complete graph Kn, the number of edges are
n(n-1)/2,For example,
21
K1 K2 K3 K4 K5
Regular Graph
Definition: If the degree of each vertex is same say ‘r’ in any graph
G then the graph is said to be a regular graph of degree r.
For example,
22
K3 K4 K5
Bipartite Graph
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
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.
23
Bipartite Graphs
Example I: Is G1 bipartite?
24
v1
v2 v3
No, because there is no way to partition the
vertices into two sets so that there are no edges
with both endpoints in the same set.
Example II: Is G2 bipartite?
v5
v1
v2
v3 v4
v6
v1 v6
v2
v5
v3
v4
Yes, because we
can display G2 like
this:
Isomorphism
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.
It is denoted by G1=G2
25
Isomorphism
For Example,
1 2 a b
4 3 d 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.
26
b
2
d
3
c
4
a
1
Sub Graph
Definition: A sub graph of a graph G = (V, E) is a graph G’ = (V’,
E’) where V’V and E’E.
For Example:
G G1 G2
27
Spanning Graph
Definition: Let G=(V, E) be any graph. Then G’ is said to be the
spanning subgraph of the graph G if its vertex set V’ is equal to
vertex set V of G.
For Example:
G G1 G2
28
Complement of a Graph
Definition: Let G is a simple graph. Then complement of G
denoted by ~G is graph whose vertex set is same as vertex set of G
& in which two vertices are adjacent if & only if they are not
adjacent in G.For Example:
G ~G H ~H
29
Operations on Graphs
Definition: The union of two simple graphs G1 =
(V1, E1) and G2 = (V2, E2) is the simple graph with vertex set V1  V2
and edge set E1  E2.
The union of G1 and G2 is denoted by G1  G2.
30
G1 G2 G1  G2
Operations on Graphs
Definition: The Intersection of two simple graphs G1 =(V1, E1) and
G2 = (V2, E2) is the simple graph with vertex set V1  V2 and edge set
E1  E2.
The Intersection of G1 and G2 is denoted by G1  G2.
31
G1 G2 G1  G2
THANKING YOU KEEP
READING
32

More Related Content

What's hot

Real life application
Real life applicationReal life application
Real life applicationumadeviR3
 
SINGLE SOURCE SHORTEST PATH.ppt
SINGLE SOURCE SHORTEST PATH.pptSINGLE SOURCE SHORTEST PATH.ppt
SINGLE SOURCE SHORTEST PATH.pptshanthishyam
 
Graph isomorphism
Graph isomorphismGraph isomorphism
Graph isomorphismCore Condor
 
Cs6702 graph theory and applications 2 marks questions and answers
Cs6702 graph theory and applications 2 marks questions and answersCs6702 graph theory and applications 2 marks questions and answers
Cs6702 graph theory and applications 2 marks questions and answersappasami
 
Matrix and it's Application
Matrix and it's ApplicationMatrix and it's Application
Matrix and it's ApplicationMahmudle Hassan
 
Graph Theory Introduction
Graph Theory IntroductionGraph Theory Introduction
Graph Theory IntroductionMANISH T I
 
Graph theory and its applications
Graph theory and its applicationsGraph theory and its applications
Graph theory and its applicationsManikanta satyala
 
Data Types and Structures in R
Data Types and Structures in RData Types and Structures in R
Data Types and Structures in RRupak Roy
 
Tree in Graph Theory in Discrete structure
Tree in Graph Theory in Discrete structure  Tree in Graph Theory in Discrete structure
Tree in Graph Theory in Discrete structure Rabin BK
 
Graph in data structure
Graph in data structureGraph in data structure
Graph in data structureAbrish06
 
DESIGN AND ANALYSIS OF ALGORITHMS
DESIGN AND ANALYSIS OF ALGORITHMSDESIGN AND ANALYSIS OF ALGORITHMS
DESIGN AND ANALYSIS OF ALGORITHMSGayathri Gaayu
 
Isomorphism (Graph)
Isomorphism (Graph) Isomorphism (Graph)
Isomorphism (Graph) Pritam Shil
 

What's hot (20)

Real life application
Real life applicationReal life application
Real life application
 
Graph theory presentation
Graph theory presentationGraph theory presentation
Graph theory presentation
 
SINGLE SOURCE SHORTEST PATH.ppt
SINGLE SOURCE SHORTEST PATH.pptSINGLE SOURCE SHORTEST PATH.ppt
SINGLE SOURCE SHORTEST PATH.ppt
 
Graph isomorphism
Graph isomorphismGraph isomorphism
Graph isomorphism
 
Cs6702 graph theory and applications 2 marks questions and answers
Cs6702 graph theory and applications 2 marks questions and answersCs6702 graph theory and applications 2 marks questions and answers
Cs6702 graph theory and applications 2 marks questions and answers
 
Graph coloring
Graph coloringGraph coloring
Graph coloring
 
Matrix and it's Application
Matrix and it's ApplicationMatrix and it's Application
Matrix and it's Application
 
Graph Theory Introduction
Graph Theory IntroductionGraph Theory Introduction
Graph Theory Introduction
 
Basics of graph
Basics of graphBasics of graph
Basics of graph
 
Graph coloring
Graph coloringGraph coloring
Graph coloring
 
Graph theory and its applications
Graph theory and its applicationsGraph theory and its applications
Graph theory and its applications
 
Data Types and Structures in R
Data Types and Structures in RData Types and Structures in R
Data Types and Structures in R
 
Tree in Graph Theory in Discrete structure
Tree in Graph Theory in Discrete structure  Tree in Graph Theory in Discrete structure
Tree in Graph Theory in Discrete structure
 
Graph in data structure
Graph in data structureGraph in data structure
Graph in data structure
 
DESIGN AND ANALYSIS OF ALGORITHMS
DESIGN AND ANALYSIS OF ALGORITHMSDESIGN AND ANALYSIS OF ALGORITHMS
DESIGN AND ANALYSIS OF ALGORITHMS
 
Isomorphism (Graph)
Isomorphism (Graph) Isomorphism (Graph)
Isomorphism (Graph)
 
Graph theory
Graph theoryGraph theory
Graph theory
 
Tree and graph
Tree and graphTree and graph
Tree and graph
 
Graphs - Discrete Math
Graphs - Discrete MathGraphs - Discrete Math
Graphs - Discrete Math
 
Strongly connected components
Strongly connected componentsStrongly connected components
Strongly connected components
 

Similar to Graph Theory Intro: Vertices, Edges, Types (38

Ass. (3)graph d.m
Ass. (3)graph d.mAss. (3)graph d.m
Ass. (3)graph d.mSyed Umair
 
1. Graph and Graph Terminologiesimp.pptx
1. Graph and Graph Terminologiesimp.pptx1. Graph and Graph Terminologiesimp.pptx
1. Graph and Graph Terminologiesimp.pptxswapnilbs2728
 
Graph terminologies & special type graphs
Graph terminologies & special type graphsGraph terminologies & special type graphs
Graph terminologies & special type graphsNabeel Ahsen
 
Ppt of graph theory
Ppt of graph theoryPpt of graph theory
Ppt of graph theoryArvindBorge
 
Data structure - Graph
Data structure - GraphData structure - Graph
Data structure - GraphMadhu Bala
 
Elements of Graph Theory for IS.pptx
Elements of Graph Theory for IS.pptxElements of Graph Theory for IS.pptx
Elements of Graph Theory for IS.pptxmiki304759
 
Lecture 1--Graph Algorithms -- Basics.pptx
Lecture 1--Graph Algorithms -- Basics.pptxLecture 1--Graph Algorithms -- Basics.pptx
Lecture 1--Graph Algorithms -- Basics.pptxChandanGiri21
 
Graph in Discrete mathemaetics.pptx
Graph in Discrete mathemaetics.pptxGraph in Discrete mathemaetics.pptx
Graph in Discrete mathemaetics.pptxujjwalmatoliya
 
Graph ASS DBATU.pptx
Graph ASS DBATU.pptxGraph ASS DBATU.pptx
Graph ASS DBATU.pptxARVIND SARDAR
 
Graph Theory,Graph Terminologies,Planar Graph & Graph Colouring
Graph Theory,Graph Terminologies,Planar Graph & Graph ColouringGraph Theory,Graph Terminologies,Planar Graph & Graph Colouring
Graph Theory,Graph Terminologies,Planar Graph & Graph ColouringSaurabh Kaushik
 
Chapter 5 Graphs (1).ppt
Chapter 5 Graphs (1).pptChapter 5 Graphs (1).ppt
Chapter 5 Graphs (1).pptishan743441
 
Cs6702 2marks rejinpaul
Cs6702 2marks rejinpaulCs6702 2marks rejinpaul
Cs6702 2marks rejinpaulstalinjothi
 

Similar to Graph Theory Intro: Vertices, Edges, Types (38 (20)

Graphs.pdf
Graphs.pdfGraphs.pdf
Graphs.pdf
 
Ass. (3)graph d.m
Ass. (3)graph d.mAss. (3)graph d.m
Ass. (3)graph d.m
 
1. Graph and Graph Terminologiesimp.pptx
1. Graph and Graph Terminologiesimp.pptx1. Graph and Graph Terminologiesimp.pptx
1. Graph and Graph Terminologiesimp.pptx
 
Chapter 1
Chapter   1Chapter   1
Chapter 1
 
Graph terminologies & special type graphs
Graph terminologies & special type graphsGraph terminologies & special type graphs
Graph terminologies & special type graphs
 
graph theory
graph theorygraph theory
graph theory
 
Ppt of graph theory
Ppt of graph theoryPpt of graph theory
Ppt of graph theory
 
Data structure - Graph
Data structure - GraphData structure - Graph
Data structure - Graph
 
Graph theory
Graph theory Graph theory
Graph theory
 
Elements of Graph Theory for IS.pptx
Elements of Graph Theory for IS.pptxElements of Graph Theory for IS.pptx
Elements of Graph Theory for IS.pptx
 
Lecture 1--Graph Algorithms -- Basics.pptx
Lecture 1--Graph Algorithms -- Basics.pptxLecture 1--Graph Algorithms -- Basics.pptx
Lecture 1--Graph Algorithms -- Basics.pptx
 
graph ASS (1).ppt
graph ASS (1).pptgraph ASS (1).ppt
graph ASS (1).ppt
 
Graph in Discrete mathemaetics.pptx
Graph in Discrete mathemaetics.pptxGraph in Discrete mathemaetics.pptx
Graph in Discrete mathemaetics.pptx
 
Graph ASS DBATU.pptx
Graph ASS DBATU.pptxGraph ASS DBATU.pptx
Graph ASS DBATU.pptx
 
graph.ppt
graph.pptgraph.ppt
graph.ppt
 
Graph theory
Graph theoryGraph theory
Graph theory
 
graph.pptx
graph.pptxgraph.pptx
graph.pptx
 
Graph Theory,Graph Terminologies,Planar Graph & Graph Colouring
Graph Theory,Graph Terminologies,Planar Graph & Graph ColouringGraph Theory,Graph Terminologies,Planar Graph & Graph Colouring
Graph Theory,Graph Terminologies,Planar Graph & Graph Colouring
 
Chapter 5 Graphs (1).ppt
Chapter 5 Graphs (1).pptChapter 5 Graphs (1).ppt
Chapter 5 Graphs (1).ppt
 
Cs6702 2marks rejinpaul
Cs6702 2marks rejinpaulCs6702 2marks rejinpaul
Cs6702 2marks rejinpaul
 

Recently uploaded

Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentInMediaRes1
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitolTechU
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaVirag Sontakke
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfMahmoud M. Sallam
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxJiesonDelaCerna
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfUjwalaBharambe
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementmkooblal
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxAvyJaneVismanos
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...jaredbarbolino94
 
MICROBIOLOGY biochemical test detailed.pptx
MICROBIOLOGY biochemical test detailed.pptxMICROBIOLOGY biochemical test detailed.pptx
MICROBIOLOGY biochemical test detailed.pptxabhijeetpadhi001
 

Recently uploaded (20)

Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media Component
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptx
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of India
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptx
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of management
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptx
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...
 
MICROBIOLOGY biochemical test detailed.pptx
MICROBIOLOGY biochemical test detailed.pptxMICROBIOLOGY biochemical test detailed.pptx
MICROBIOLOGY biochemical test detailed.pptx
 

Graph Theory Intro: Vertices, Edges, Types (38

  • 2. Contents  Basic terminology,  Multi graphs and weighted graphs  Paths and circuits  Shortest path in weighted graph  Hamiltonian and Euler paths and circuits  Planer graph  Travelling salesman problem. 2
  • 3. Introduction to 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
  • 4. Introduction to Graphs In Fig. G has graph 4 vertices namely v1, v2, v3, v4& 7 edges Namely e1, e2, e3, e4, e5, e6, e7 Then e1=(v1, v2) Similarly for other edges. In short, we can represent G=(V,E) where V=(v1, v2, v3, v4) & E=(e1, e2, e3, e4, e5, e6,e7 ) 4 v1 v2 v3 v4 e1 e2 e4 e5 e3 e6 e7 Graph G
  • 5. Self Loops & Parallel Edges 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. 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 & e7 has (v3, v4) are called as Parallel edge. 5
  • 6. Simple & Multiple Graphs 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) 6
  • 7. Weighted Graph Definition: If each edge or each vertex or both are associated with some +ve no. then the graph is called as Weighted Graph For Example, 7 V1 V2 V4 V3 1.4 1.5 1.7 6
  • 8. Finite & Infinite Graph Definition: A graph is 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 & G2 is Finite 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. 8
  • 9. Adjacency & Incidence Definition: Two vertices v1 & v2 vertices of G joins directly by at least one edge then there vertices called Adjacent Vertices. For Example, In Graph G, v1 & v2 are adjacent vertices. Definition: If Vi is end vertex of edge eij=(vi,vj) then edge eij is said to be Incident on vi. Similarly eij is said to be Incident on vj. For Example, In Graph G, e1 is incident on v1 & v2. 9
  • 10. Degree of a Vertex Definition: The no. of edges incident on a vertex vi with self loop counted twice is called as degree of vertex vi. For Example, Consider the Graph G, d(v1)=3 ,d(v2)=2 ,d(v3)=5 ,d(v4)= 4 Definition : A vertex with degree zero is called as Isolated Vertex & A vertex with degree one is called as Pendant Vertex. 10 v1 v2 v3 v4 e1 e2 e4 e5 e3 e6 e7
  • 11. Handshaking Lemma 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.  d(vi)=2e is called as Handshaking Lemma. 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. 11 n i=1
  • 12. Matrix Representation of Graphs A graph can also be represented by matrix. Two ways are used for matrix representation of graph are given as follows, 1. Adjacent Matrix 2. Incident Matrix Lets see one by one… 12
  • 13. 1. Adjacent Matrix The A.M. of Graph G with n vertices & no parallel edges is a symmetric binary matrix A(G)=[aij] or order n*n where, aij=1, if there is as edge between vi &vj. aij=0, if vi & vj are not adjacent. A self loop at vertex vi corresponds to aij=1. For Example, A(G)= 13
  • 14. 1. Adjacent Matrix The A.M. of multigraph G with n vertices is an n*n matrix A(G)=[aij] where, aij=N, if there one or more edge are there between vi &vj & N is no. of edges between vi & vj. aij=0, otherwise. For Example, A(G)= 14
  • 15. 2. Incident Matrix Given a graph G with n vertices , e edges & no self loops. The incidence matrix x(G)=[Xij] of the other graph G is an n*e matrix where, Xij=1, if jth edge ej is incident on ith vertex vi, Xij=0, otherwise. Here n vertices are rows & e edges are columns. X(G)= 15
  • 16. Directed Graph or Diagraph Definition: If each edge of the graph G has a direction then graph called as diagraph. In a graph with directed edges, the in-degree of a vertex v, denoted by deg-(v) & out-degree of v, denoted by deg+(v). See the example in Next page…. 16
  • 17. Directed Graph or Diagraph Example: What are the in-degrees and out-degrees of the vertices a, b, c, d in this graph: 17 a b c d deg-(a) = 1 deg+(a) = 2 deg-(b) = 4 deg+(b) = 2 deg-(d) = 2 deg+(d) = 1 deg-(c) = 0 deg+(c) = 2
  • 18. Adjacency Matrix of a diagraph It is defined in similar fashion as it defined for undirected graph. For Example, A(D)= 18
  • 19. Incident matrix of diagraph Given a graph G with n, e & no self loops is matrix x(G)=[Xij] or order n*e where n vertices are rows & e edges are columns such that,Xij=1, if jth edge ej is incident out ith vertex vi Xij=-1, if jth edge ej is incident into ith vertex vi Xij=0, if jth edge ej not incident on ith vertex vi. 19
  • 20. Null Graph Definition: If the edge set of any graph with n vertices is an empty set, then the graph is known as null graph. It is denoted by Nn For Example, N3 N4 20
  • 21. Complete Graph Definition: Let G be simple graph on n vertices. If the degree of each vertex is (n-1) then the graph is called as complete graph. Complete graph on n vertices, it is denoted by Kn. In complete graph Kn, the number of edges are n(n-1)/2,For example, 21 K1 K2 K3 K4 K5
  • 22. Regular Graph Definition: If the degree of each vertex is same say ‘r’ in any graph G then the graph is said to be a regular graph of degree r. For example, 22 K3 K4 K5
  • 23. Bipartite Graph 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 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. 23
  • 24. Bipartite Graphs Example I: Is G1 bipartite? 24 v1 v2 v3 No, because there is no way to partition the vertices into two sets so that there are no edges with both endpoints in the same set. Example II: Is G2 bipartite? v5 v1 v2 v3 v4 v6 v1 v6 v2 v5 v3 v4 Yes, because we can display G2 like this:
  • 25. Isomorphism 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. It is denoted by G1=G2 25
  • 26. Isomorphism For Example, 1 2 a b 4 3 d 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. 26 b 2 d 3 c 4 a 1
  • 27. Sub Graph Definition: A sub graph of a graph G = (V, E) is a graph G’ = (V’, E’) where V’V and E’E. For Example: G G1 G2 27
  • 28. Spanning Graph Definition: Let G=(V, E) be any graph. Then G’ is said to be the spanning subgraph of the graph G if its vertex set V’ is equal to vertex set V of G. For Example: G G1 G2 28
  • 29. Complement of a Graph Definition: Let G is a simple graph. Then complement of G denoted by ~G is graph whose vertex set is same as vertex set of G & in which two vertices are adjacent if & only if they are not adjacent in G.For Example: G ~G H ~H 29
  • 30. Operations on Graphs Definition: The union of two simple graphs G1 = (V1, E1) and G2 = (V2, E2) is the simple graph with vertex set V1  V2 and edge set E1  E2. The union of G1 and G2 is denoted by G1  G2. 30 G1 G2 G1  G2
  • 31. Operations on Graphs Definition: The Intersection of two simple graphs G1 =(V1, E1) and G2 = (V2, E2) is the simple graph with vertex set V1  V2 and edge set E1  E2. The Intersection of G1 and G2 is denoted by G1  G2. 31 G1 G2 G1  G2