SlideShare a Scribd company logo
Unit-IV GRAPH THEORY
RAI UNIVERSITY, AHMEDABAD
GRAPH THEORY
COURSE-BCA
Subject- Discrete Mathematics
Unit-IV
RAI UNIVERSITY, AHMEDABAD
Unit-IV GRAPH THEORY
RAI UNIVERSITY, AHMEDABAD
Graph theory
Definition:-
Conceptually, a graph is formed by vertices and edges connecting the vertices.
Example:
Formally, a graph is a pair of sets (V, E), where V is the set of vertices and E is the
set of edges, formed by pairs of vertices. E is a multiset, in other words, its
elements can occur more than once so that every element has a multiplicity. Often,
we label the vertices with letters (for example: a, b, c, . . . or v1, v2, . . .) or
numbers 1, 2, . . . Throughout this lecture material, we will label the elements of V
in this way.
Example: (Continuing from the previous example) we label the vertices as
follows:
We have V = {v1, . . . , v5} for the vertices and E = {(v1, v2), (v2, v5), (v5, v5),
(v5, v4), (v5, v4)} for the edges.
Similarly,
Unit-IV GRAPH THEORY
RAI UNIVERSITY, AHMEDABAD
we often label the edges with letters (for example: a, b, c, . . . or e1, e2, . . . ) or
numbers 1, 2, . . . for simplicity
Remark. The two edges (u, v) and (v, u) are the same. In other words, the pair is
not ordered.
Example. (Continuing from the previous example) We label the edges as follows:
So E = {e1, . . . , e5}.
We have the following terminologies:
1. The two vertices u and v are end vertices of the edge (u, v).
2. Edges that have the same end vertices are parallel.
3. An edge of the form (v, v) is a loop.
4. A graph is simple if it has no parallel edges or loops.
5. A graph with no edges (i.e. E is empty) is empty.
6. A graph with no vertices (i.e. V and E are empty) is a null graph.
7. A graph with only one vertex is trivial.
8. Edges are adjacent if they share a common end vertex.
9. Two vertices u and v are adjacent if they are connected by an edge, in other
words, (u, v)
is an edge.
10. The degree of the vertex v, written as d(v), is the number of edges with v as an
end vertex.
By convention, we count a loop twice and parallel edges contribute separately.
11. A pendant vertex is a vertex whose degree is 1.
12. An edge that has a pendant vertex as an end vertex is a pendant edge.
13. An isolated vertex is a vertex whose degree is 0.
Example. (Continuing from the previous example)
• v4 and v5 are end vertices of e5.
• e4 and e5 are parallel.
Unit-IV GRAPH THEORY
RAI UNIVERSITY, AHMEDABAD
• e3 is a loop.
• The graph is not simple.
• e1 and e2 are adjacent
• v1 and v2 are adjacent.
• The degree of v1 is 1 so it is a pendant vertex.
• e1 is a pendant edge.
• The degree of v5 is 5.
• The degree of v4 is 2.
• The degree of v3 is 0 so it is an isolated vertex.
In the future, we will label graphs with letters, for example:
G = (V,E).
The minimum degree of the vertices in a graph G is denoted δ(G) (= 0 if there is an
isolated
vertex in G). Similarly, we write _(G) as the maximum degree of vertices in G..
Example. (Continuing from the previous example) δ(G) = 0 and _(G) = 5.
Remark. In this course, we only consider finite graphs, i.e. V and E are finite sets.
Since every edge has two end vertices, we get
Theorem 1.1. The graphG = (V,E), where V = {v1, . . . , vn} and E = {e1, . . . ,
em}, satisfies
( ) = 2
Corollary. Every graph has an even number of vertices of odd degree.
Proof. If the vertices v1, . . . , vk have odd degrees and the vertices vk+1, . . . , vn
have even degrees, then (Theorem 1.1)
d(v1) + · · · + d(vk) = 2m − d(vk + 1) − · · · − d(vn)
is even. Therefore, k is even.
Example. (Continuing from the previous example) Now the sum of the degrees is 1
+ 2 + 0 +
2 + 5 = 10 = 2 · 5. There are two vertices of odd degree, namely v1 and v5.
A simple graph that contains every possible edge between all the vertices is called
a complete
Unit-IV GRAPH THEORY
RAI UNIVERSITY, AHMEDABAD
graph. A complete graph with n vertices is denoted as Kn. The first four complete
graphs are
given as examples:
The graph G1 = (V1,E1) is a subgraph of G2 = (V2,E2) if
1. V1 ⊆V2 and
2. Every edge of G1 is also an edge of G2.
Example. We have the graph
and some of its subgraphs are
Unit-IV GRAPH THEORY
RAI UNIVERSITY, AHMEDABAD
The subgraph of G = (V,E) induced by the edge set E1 ⊆E is:
= ( , ) = . 〈 〉 ,
where V1 consists of every end vertex of the edges in E1.
Example. (Continuing from above) From the original graph G, the edges e2, e3
and e5 induce
the subgraph
Unit-IV GRAPH THEORY
RAI UNIVERSITY, AHMEDABAD
The subgraph of G = (V,E) induced by the vertex set V1 ⊆V is:
= ( , ) = . 〈 〉 ,
where E1 consists of every edge between the vertices in V1.
Example. (Continuing from the previous example) From the original graph G, the
vertices v1,
v3 and v5 induce the subgraph
A complete subgraph of G is called a clique of G.
1.2 Walks, Trails, Paths, Circuits, Connectivity, Components
Remark. There are many different variations of the following terminologies. We
will adhere to
the definitions given here.
A walk in the graph G = (V,E) is a finite sequence of the form
v ,e , v , e , . . . , e , v ,
which consists of alternating vertices and edges of G. The walk starts at a vertex.
Vertices
Unit-IV GRAPH THEORY
RAI UNIVERSITY, AHMEDABAD
and are end vertices of (t = 1, . . . , k) . is the initial vertex and is
the terminal
vertex. k is the length of the walk. A zero length walk is just a single vertex . It
is allowed to
visit a vertex or go through an edge more than once. A walk is open if ≠ .
Otherwise it
is closed.
Example. In the graph
the walk
, , , , , , , , , , ,
is open. On the other hand, the walk
, , , , , , , , , ,
is closed.
A walk is a trail if any edge is traversed at most once. Then, the number of times
that the
vertex pair u, v can appear as consecutive vertices in a trail is at most the number
of parallel
edges connecting u and v.
Example. (Continuing from the previous example) The walk in the graph
v1, e8, v5, e9, v1, e1, v2, e7, v5, e6, v4, e5, v4, e4, v4
is a trail.
A trail is a path if any vertex is visited at most once except possibly the initial and
terminal
vertices when they are the same. A closed path is a circuit. For simplicity, we will
assume in
Unit-IV GRAPH THEORY
RAI UNIVERSITY, AHMEDABAD
the future that a circuit is not empty, i.e. its length ≥ 1. We identify the paths and
circuits with
the subgraphs induced by their edges.
Example. (Continuing from the previous example) The walk
v2, e7, v5, e6, v4, e3, v3
is a path and the walk
v2, e7, v5, e6, v4, e3, v3, e2, v2
is a circuit.
The walk starting at u and ending at v is called an u–v walk. u and v are connected
if there
is a u–v walk in the graph (then there is also a u–v path!). If u and v are connected
and v and w
are connected, then u and w are also connected, i.e. if there is a u–v walk and a v–
w walk, then
there is also a u–w walk. A graph is connected if all the vertices are connected to
each other.
(A trivial graph is connected by convention.)
Example. The graph is not
connected.
The subgraph G1 (not a null graph) of the graph G is a component of G if
1. G1 is connected and
2. Either G1 is trivial (one single isolated vertex of G) or G1 is not trivial and G1 is
the
subgraph induced by those edges of G that have one end vertex in G1.
Different components of the same graph do not have any common vertices because
of the following
theorem.

More Related Content

What's hot

Ppt of graph theory
Ppt of graph theoryPpt of graph theory
Ppt of graph theory
ArvindBorge
 
Graph theory
Graph theoryGraph theory
Graph theory
Thirunavukarasu Mani
 
Graph terminologies & special type graphs
Graph terminologies & special type graphsGraph terminologies & special type graphs
Graph terminologies & special type graphs
Nabeel Ahsen
 
introduction to graph theory
introduction to graph theoryintroduction to graph theory
introduction to graph theoryChuckie Balbuena
 
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
appasami
 
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
Saurabh Kaushik
 
Graph Theory Introduction
Graph Theory IntroductionGraph Theory Introduction
Graph Theory Introduction
MANISH T I
 
Graph data structure and algorithms
Graph data structure and algorithmsGraph data structure and algorithms
Graph data structure and algorithms
Anandhasilambarasan D
 
Doubly Linked List
Doubly Linked ListDoubly Linked List
Doubly Linked List
Ninad Mankar
 
Adjacency list
Adjacency listAdjacency list
Adjacency listStefi Yu
 
B+ trees and height balance tree
B+ trees and height balance treeB+ trees and height balance tree
B+ trees and height balance tree
Jasleen Kaur (Chandigarh University)
 
Unit 3 graph chapter6
Unit 3  graph chapter6Unit 3  graph chapter6
Unit 3 graph chapter6
DrkhanchanaR
 
Slides Chapter10.1 10.2
Slides Chapter10.1 10.2Slides Chapter10.1 10.2
Slides Chapter10.1 10.2showslidedump
 
Exponential Generating function
Exponential Generating functionExponential Generating function
Exponential Generating function
Kongunadu College of Engineering and Technology
 
Graph
GraphGraph
Planar graph( Algorithm and Application )
Planar graph( Algorithm and Application )Planar graph( Algorithm and Application )
Planar graph( Algorithm and Application )
Abdullah Moin
 
Graph data structure
Graph data structureGraph data structure
Graph data structureTech_MX
 
Graph isomorphism
Graph isomorphismGraph isomorphism
Graph isomorphismCore Condor
 
Introduction to Graph Theory
Introduction to Graph TheoryIntroduction to Graph Theory
Introduction to Graph Theory
Yosuke Mizutani
 

What's hot (20)

Ppt of graph theory
Ppt of graph theoryPpt of graph theory
Ppt of graph theory
 
Graph theory
Graph theoryGraph theory
Graph theory
 
Graph terminologies & special type graphs
Graph terminologies & special type graphsGraph terminologies & special type graphs
Graph terminologies & special type graphs
 
introduction to graph theory
introduction to graph theoryintroduction to graph theory
introduction to graph theory
 
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 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
 
Graph Theory Introduction
Graph Theory IntroductionGraph Theory Introduction
Graph Theory Introduction
 
Graph data structure and algorithms
Graph data structure and algorithmsGraph data structure and algorithms
Graph data structure and algorithms
 
Doubly Linked List
Doubly Linked ListDoubly Linked List
Doubly Linked List
 
Adjacency list
Adjacency listAdjacency list
Adjacency list
 
B+ trees and height balance tree
B+ trees and height balance treeB+ trees and height balance tree
B+ trees and height balance tree
 
Unit 3 graph chapter6
Unit 3  graph chapter6Unit 3  graph chapter6
Unit 3 graph chapter6
 
Slides Chapter10.1 10.2
Slides Chapter10.1 10.2Slides Chapter10.1 10.2
Slides Chapter10.1 10.2
 
Exponential Generating function
Exponential Generating functionExponential Generating function
Exponential Generating function
 
Graph
GraphGraph
Graph
 
Planar graph( Algorithm and Application )
Planar graph( Algorithm and Application )Planar graph( Algorithm and Application )
Planar graph( Algorithm and Application )
 
Graph data structure
Graph data structureGraph data structure
Graph data structure
 
Graph isomorphism
Graph isomorphismGraph isomorphism
Graph isomorphism
 
Introduction to Graph Theory
Introduction to Graph TheoryIntroduction to Graph Theory
Introduction to Graph Theory
 
Graph theory
Graph theoryGraph theory
Graph theory
 

Viewers also liked

BSC_Computer Science_Discrete Mathematics_Unit-I
BSC_Computer Science_Discrete Mathematics_Unit-IBSC_Computer Science_Discrete Mathematics_Unit-I
BSC_Computer Science_Discrete Mathematics_Unit-I
Rai University
 
B.tech ii unit-4 material vector differentiation
B.tech ii unit-4 material vector differentiationB.tech ii unit-4 material vector differentiation
B.tech ii unit-4 material vector differentiation
Rai University
 
Unit 1 Introduction
Unit 1 IntroductionUnit 1 Introduction
Unit 1 Introduction
Rai University
 
Btech_II_ engineering mathematics_unit4
Btech_II_ engineering mathematics_unit4Btech_II_ engineering mathematics_unit4
Btech_II_ engineering mathematics_unit4
Rai University
 
Btech_II_ engineering mathematics_unit5
Btech_II_ engineering mathematics_unit5Btech_II_ engineering mathematics_unit5
Btech_II_ engineering mathematics_unit5
Rai University
 
B.Tech-II_Unit-III
B.Tech-II_Unit-IIIB.Tech-II_Unit-III
B.Tech-II_Unit-IIIKundan Kumar
 
B.tech ii unit-5 material vector integration
B.tech ii unit-5 material vector integrationB.tech ii unit-5 material vector integration
B.tech ii unit-5 material vector integration
Rai University
 
BSC_COMPUTER _SCIENCE_UNIT-5_DISCRETE MATHEMATICS
BSC_COMPUTER _SCIENCE_UNIT-5_DISCRETE MATHEMATICSBSC_COMPUTER _SCIENCE_UNIT-5_DISCRETE MATHEMATICS
BSC_COMPUTER _SCIENCE_UNIT-5_DISCRETE MATHEMATICS
Rai University
 
Btech_II_ engineering mathematics_unit2
Btech_II_ engineering mathematics_unit2Btech_II_ engineering mathematics_unit2
Btech_II_ engineering mathematics_unit2
Rai University
 
BSC_COMPUTER _SCIENCE_UNIT-4_DISCRETE MATHEMATICS
BSC_COMPUTER _SCIENCE_UNIT-4_DISCRETE MATHEMATICSBSC_COMPUTER _SCIENCE_UNIT-4_DISCRETE MATHEMATICS
BSC_COMPUTER _SCIENCE_UNIT-4_DISCRETE MATHEMATICS
Rai University
 
BSC_COMPUTER _SCIENCE_UNIT-3_DISCRETE MATHEMATICS
BSC_COMPUTER _SCIENCE_UNIT-3_DISCRETE MATHEMATICSBSC_COMPUTER _SCIENCE_UNIT-3_DISCRETE MATHEMATICS
BSC_COMPUTER _SCIENCE_UNIT-3_DISCRETE MATHEMATICS
Rai University
 
BSC_COMPUTER _SCIENCE_UNIT-1_DISCRETE MATHEMATICS
BSC_COMPUTER _SCIENCE_UNIT-1_DISCRETE MATHEMATICSBSC_COMPUTER _SCIENCE_UNIT-1_DISCRETE MATHEMATICS
BSC_COMPUTER _SCIENCE_UNIT-1_DISCRETE MATHEMATICS
Rai University
 
BSC_COMPUTER _SCIENCE_UNIT-5_DISCRETE MATHEMATICS
BSC_COMPUTER _SCIENCE_UNIT-5_DISCRETE MATHEMATICSBSC_COMPUTER _SCIENCE_UNIT-5_DISCRETE MATHEMATICS
BSC_COMPUTER _SCIENCE_UNIT-5_DISCRETE MATHEMATICS
Rai University
 
BCA_Semester-II-Discrete Mathematics_unit-ii_Relation and ordering
BCA_Semester-II-Discrete Mathematics_unit-ii_Relation and orderingBCA_Semester-II-Discrete Mathematics_unit-ii_Relation and ordering
BCA_Semester-II-Discrete Mathematics_unit-ii_Relation and ordering
Rai University
 
MCA_UNIT-4_Computer Oriented Numerical Statistical Methods
MCA_UNIT-4_Computer Oriented Numerical Statistical MethodsMCA_UNIT-4_Computer Oriented Numerical Statistical Methods
MCA_UNIT-4_Computer Oriented Numerical Statistical Methods
Rai University
 
BSC_COMPUTER _SCIENCE_UNIT-2_DISCRETE MATHEMATICS
BSC_COMPUTER _SCIENCE_UNIT-2_DISCRETE MATHEMATICSBSC_COMPUTER _SCIENCE_UNIT-2_DISCRETE MATHEMATICS
BSC_COMPUTER _SCIENCE_UNIT-2_DISCRETE MATHEMATICS
Rai University
 

Viewers also liked (20)

BSC_Computer Science_Discrete Mathematics_Unit-I
BSC_Computer Science_Discrete Mathematics_Unit-IBSC_Computer Science_Discrete Mathematics_Unit-I
BSC_Computer Science_Discrete Mathematics_Unit-I
 
B.tech ii unit-4 material vector differentiation
B.tech ii unit-4 material vector differentiationB.tech ii unit-4 material vector differentiation
B.tech ii unit-4 material vector differentiation
 
Unit 1 Introduction
Unit 1 IntroductionUnit 1 Introduction
Unit 1 Introduction
 
Btech_II_ engineering mathematics_unit4
Btech_II_ engineering mathematics_unit4Btech_II_ engineering mathematics_unit4
Btech_II_ engineering mathematics_unit4
 
Btech_II_ engineering mathematics_unit5
Btech_II_ engineering mathematics_unit5Btech_II_ engineering mathematics_unit5
Btech_II_ engineering mathematics_unit5
 
B.Tech-II_Unit-I
B.Tech-II_Unit-IB.Tech-II_Unit-I
B.Tech-II_Unit-I
 
merged_document
merged_documentmerged_document
merged_document
 
B.Tech-II_Unit-III
B.Tech-II_Unit-IIIB.Tech-II_Unit-III
B.Tech-II_Unit-III
 
B.Tech-II_Unit-IV
B.Tech-II_Unit-IVB.Tech-II_Unit-IV
B.Tech-II_Unit-IV
 
B.tech ii unit-5 material vector integration
B.tech ii unit-5 material vector integrationB.tech ii unit-5 material vector integration
B.tech ii unit-5 material vector integration
 
BSC_COMPUTER _SCIENCE_UNIT-5_DISCRETE MATHEMATICS
BSC_COMPUTER _SCIENCE_UNIT-5_DISCRETE MATHEMATICSBSC_COMPUTER _SCIENCE_UNIT-5_DISCRETE MATHEMATICS
BSC_COMPUTER _SCIENCE_UNIT-5_DISCRETE MATHEMATICS
 
B.Tech-II_Unit-V
B.Tech-II_Unit-VB.Tech-II_Unit-V
B.Tech-II_Unit-V
 
Btech_II_ engineering mathematics_unit2
Btech_II_ engineering mathematics_unit2Btech_II_ engineering mathematics_unit2
Btech_II_ engineering mathematics_unit2
 
BSC_COMPUTER _SCIENCE_UNIT-4_DISCRETE MATHEMATICS
BSC_COMPUTER _SCIENCE_UNIT-4_DISCRETE MATHEMATICSBSC_COMPUTER _SCIENCE_UNIT-4_DISCRETE MATHEMATICS
BSC_COMPUTER _SCIENCE_UNIT-4_DISCRETE MATHEMATICS
 
BSC_COMPUTER _SCIENCE_UNIT-3_DISCRETE MATHEMATICS
BSC_COMPUTER _SCIENCE_UNIT-3_DISCRETE MATHEMATICSBSC_COMPUTER _SCIENCE_UNIT-3_DISCRETE MATHEMATICS
BSC_COMPUTER _SCIENCE_UNIT-3_DISCRETE MATHEMATICS
 
BSC_COMPUTER _SCIENCE_UNIT-1_DISCRETE MATHEMATICS
BSC_COMPUTER _SCIENCE_UNIT-1_DISCRETE MATHEMATICSBSC_COMPUTER _SCIENCE_UNIT-1_DISCRETE MATHEMATICS
BSC_COMPUTER _SCIENCE_UNIT-1_DISCRETE MATHEMATICS
 
BSC_COMPUTER _SCIENCE_UNIT-5_DISCRETE MATHEMATICS
BSC_COMPUTER _SCIENCE_UNIT-5_DISCRETE MATHEMATICSBSC_COMPUTER _SCIENCE_UNIT-5_DISCRETE MATHEMATICS
BSC_COMPUTER _SCIENCE_UNIT-5_DISCRETE MATHEMATICS
 
BCA_Semester-II-Discrete Mathematics_unit-ii_Relation and ordering
BCA_Semester-II-Discrete Mathematics_unit-ii_Relation and orderingBCA_Semester-II-Discrete Mathematics_unit-ii_Relation and ordering
BCA_Semester-II-Discrete Mathematics_unit-ii_Relation and ordering
 
MCA_UNIT-4_Computer Oriented Numerical Statistical Methods
MCA_UNIT-4_Computer Oriented Numerical Statistical MethodsMCA_UNIT-4_Computer Oriented Numerical Statistical Methods
MCA_UNIT-4_Computer Oriented Numerical Statistical Methods
 
BSC_COMPUTER _SCIENCE_UNIT-2_DISCRETE MATHEMATICS
BSC_COMPUTER _SCIENCE_UNIT-2_DISCRETE MATHEMATICSBSC_COMPUTER _SCIENCE_UNIT-2_DISCRETE MATHEMATICS
BSC_COMPUTER _SCIENCE_UNIT-2_DISCRETE MATHEMATICS
 

Similar to BCA_Semester-II-Discrete Mathematics_unit-iv Graph theory

graph.ppt
graph.pptgraph.ppt
graph.ppt
SumitSamanta16
 
graph ASS (1).ppt
graph ASS (1).pptgraph ASS (1).ppt
graph ASS (1).ppt
ARVIND SARDAR
 
Graph ASS DBATU.pptx
Graph ASS DBATU.pptxGraph ASS DBATU.pptx
Graph ASS DBATU.pptx
ARVIND SARDAR
 
Chapter 5 Graphs (1).ppt
Chapter 5 Graphs (1).pptChapter 5 Graphs (1).ppt
Chapter 5 Graphs (1).ppt
ishan743441
 
Tn 110 lecture 8
Tn 110 lecture 8Tn 110 lecture 8
Tn 110 lecture 8
ITNet
 
358 33 powerpoint-slides_13-graphs_chapter-13
358 33 powerpoint-slides_13-graphs_chapter-13358 33 powerpoint-slides_13-graphs_chapter-13
358 33 powerpoint-slides_13-graphs_chapter-13
sumitbardhan
 
Graph theory presentation
Graph theory presentationGraph theory presentation
Graph theory presentation
Aliul Kadir Akib
 
graph.ppt
graph.pptgraph.ppt
LEC 1.pptx
LEC 1.pptxLEC 1.pptx
LEC 1.pptx
ssuserc1e786
 
Lecture 1--Graph Algorithms -- Basics.pptx
Lecture 1--Graph Algorithms -- Basics.pptxLecture 1--Graph Algorithms -- Basics.pptx
Lecture 1--Graph Algorithms -- Basics.pptx
ChandanGiri21
 
Graphs.pdf
Graphs.pdfGraphs.pdf
Graphs.pdf
pubggaming58982
 
Data structure graphs
Data structure  graphsData structure  graphs
Data structure graphs
Uma mohan
 
Ass. (3)graph d.m
Ass. (3)graph d.mAss. (3)graph d.m
Ass. (3)graph d.m
Syed Umair
 
Graphs.pptx
Graphs.pptxGraphs.pptx
Graphs.pptx
satvikkushwaha1
 
Unit 2: All
Unit 2: AllUnit 2: All
Unit 2: All
Hector Zenil
 
graphtheory
graphtheorygraphtheory
graphtheory
AmberSinghal1
 
graph.ppt
graph.pptgraph.ppt
graph.ppt
yogeshbairagi126
 
graph.ppt
graph.pptgraph.ppt
graph.ppt
AqeelAbbas94
 

Similar to BCA_Semester-II-Discrete Mathematics_unit-iv Graph theory (20)

graph.ppt
graph.pptgraph.ppt
graph.ppt
 
Magtibay buk bind#2
Magtibay buk bind#2Magtibay buk bind#2
Magtibay buk bind#2
 
graph ASS (1).ppt
graph ASS (1).pptgraph ASS (1).ppt
graph ASS (1).ppt
 
Graph ASS DBATU.pptx
Graph ASS DBATU.pptxGraph ASS DBATU.pptx
Graph ASS DBATU.pptx
 
Chapter 5 Graphs (1).ppt
Chapter 5 Graphs (1).pptChapter 5 Graphs (1).ppt
Chapter 5 Graphs (1).ppt
 
Tn 110 lecture 8
Tn 110 lecture 8Tn 110 lecture 8
Tn 110 lecture 8
 
Graph theory
Graph theoryGraph theory
Graph theory
 
358 33 powerpoint-slides_13-graphs_chapter-13
358 33 powerpoint-slides_13-graphs_chapter-13358 33 powerpoint-slides_13-graphs_chapter-13
358 33 powerpoint-slides_13-graphs_chapter-13
 
Graph theory presentation
Graph theory presentationGraph theory presentation
Graph theory presentation
 
graph.ppt
graph.pptgraph.ppt
graph.ppt
 
LEC 1.pptx
LEC 1.pptxLEC 1.pptx
LEC 1.pptx
 
Lecture 1--Graph Algorithms -- Basics.pptx
Lecture 1--Graph Algorithms -- Basics.pptxLecture 1--Graph Algorithms -- Basics.pptx
Lecture 1--Graph Algorithms -- Basics.pptx
 
Graphs.pdf
Graphs.pdfGraphs.pdf
Graphs.pdf
 
Data structure graphs
Data structure  graphsData structure  graphs
Data structure graphs
 
Ass. (3)graph d.m
Ass. (3)graph d.mAss. (3)graph d.m
Ass. (3)graph d.m
 
Graphs.pptx
Graphs.pptxGraphs.pptx
Graphs.pptx
 
Unit 2: All
Unit 2: AllUnit 2: All
Unit 2: All
 
graphtheory
graphtheorygraphtheory
graphtheory
 
graph.ppt
graph.pptgraph.ppt
graph.ppt
 
graph.ppt
graph.pptgraph.ppt
graph.ppt
 

More from Rai University

Brochure Rai University
Brochure Rai University Brochure Rai University
Brochure Rai University
Rai University
 
Mm unit 4point2
Mm unit 4point2Mm unit 4point2
Mm unit 4point2
Rai University
 
Mm unit 4point1
Mm unit 4point1Mm unit 4point1
Mm unit 4point1
Rai University
 
Mm unit 4point3
Mm unit 4point3Mm unit 4point3
Mm unit 4point3
Rai University
 
Mm unit 3point2
Mm unit 3point2Mm unit 3point2
Mm unit 3point2
Rai University
 
Mm unit 3point1
Mm unit 3point1Mm unit 3point1
Mm unit 3point1
Rai University
 
Mm unit 2point2
Mm unit 2point2Mm unit 2point2
Mm unit 2point2
Rai University
 
Mm unit 2 point 1
Mm unit 2 point 1Mm unit 2 point 1
Mm unit 2 point 1
Rai University
 
Mm unit 1point3
Mm unit 1point3Mm unit 1point3
Mm unit 1point3
Rai University
 
Mm unit 1point2
Mm unit 1point2Mm unit 1point2
Mm unit 1point2
Rai University
 
Mm unit 1point1
Mm unit 1point1Mm unit 1point1
Mm unit 1point1
Rai University
 
Bdft ii, tmt, unit-iii, dyeing & types of dyeing,
Bdft ii, tmt, unit-iii,  dyeing & types of dyeing,Bdft ii, tmt, unit-iii,  dyeing & types of dyeing,
Bdft ii, tmt, unit-iii, dyeing & types of dyeing,
Rai University
 
Bsc agri 2 pae u-4.4 publicrevenue-presentation-130208082149-phpapp02
Bsc agri  2 pae  u-4.4 publicrevenue-presentation-130208082149-phpapp02Bsc agri  2 pae  u-4.4 publicrevenue-presentation-130208082149-phpapp02
Bsc agri 2 pae u-4.4 publicrevenue-presentation-130208082149-phpapp02
Rai University
 
Bsc agri 2 pae u-4.3 public expenditure
Bsc agri  2 pae  u-4.3 public expenditureBsc agri  2 pae  u-4.3 public expenditure
Bsc agri 2 pae u-4.3 public expenditure
Rai University
 
Bsc agri 2 pae u-4.2 public finance
Bsc agri  2 pae  u-4.2 public financeBsc agri  2 pae  u-4.2 public finance
Bsc agri 2 pae u-4.2 public finance
Rai University
 
Bsc agri 2 pae u-4.1 introduction
Bsc agri  2 pae  u-4.1 introductionBsc agri  2 pae  u-4.1 introduction
Bsc agri 2 pae u-4.1 introduction
Rai University
 
Bsc agri 2 pae u-3.3 inflation
Bsc agri  2 pae  u-3.3  inflationBsc agri  2 pae  u-3.3  inflation
Bsc agri 2 pae u-3.3 inflation
Rai University
 
Bsc agri 2 pae u-3.2 introduction to macro economics
Bsc agri  2 pae  u-3.2 introduction to macro economicsBsc agri  2 pae  u-3.2 introduction to macro economics
Bsc agri 2 pae u-3.2 introduction to macro economics
Rai University
 
Bsc agri 2 pae u-3.1 marketstructure
Bsc agri  2 pae  u-3.1 marketstructureBsc agri  2 pae  u-3.1 marketstructure
Bsc agri 2 pae u-3.1 marketstructure
Rai University
 
Bsc agri 2 pae u-3 perfect-competition
Bsc agri  2 pae  u-3 perfect-competitionBsc agri  2 pae  u-3 perfect-competition
Bsc agri 2 pae u-3 perfect-competition
Rai University
 

More from Rai University (20)

Brochure Rai University
Brochure Rai University Brochure Rai University
Brochure Rai University
 
Mm unit 4point2
Mm unit 4point2Mm unit 4point2
Mm unit 4point2
 
Mm unit 4point1
Mm unit 4point1Mm unit 4point1
Mm unit 4point1
 
Mm unit 4point3
Mm unit 4point3Mm unit 4point3
Mm unit 4point3
 
Mm unit 3point2
Mm unit 3point2Mm unit 3point2
Mm unit 3point2
 
Mm unit 3point1
Mm unit 3point1Mm unit 3point1
Mm unit 3point1
 
Mm unit 2point2
Mm unit 2point2Mm unit 2point2
Mm unit 2point2
 
Mm unit 2 point 1
Mm unit 2 point 1Mm unit 2 point 1
Mm unit 2 point 1
 
Mm unit 1point3
Mm unit 1point3Mm unit 1point3
Mm unit 1point3
 
Mm unit 1point2
Mm unit 1point2Mm unit 1point2
Mm unit 1point2
 
Mm unit 1point1
Mm unit 1point1Mm unit 1point1
Mm unit 1point1
 
Bdft ii, tmt, unit-iii, dyeing & types of dyeing,
Bdft ii, tmt, unit-iii,  dyeing & types of dyeing,Bdft ii, tmt, unit-iii,  dyeing & types of dyeing,
Bdft ii, tmt, unit-iii, dyeing & types of dyeing,
 
Bsc agri 2 pae u-4.4 publicrevenue-presentation-130208082149-phpapp02
Bsc agri  2 pae  u-4.4 publicrevenue-presentation-130208082149-phpapp02Bsc agri  2 pae  u-4.4 publicrevenue-presentation-130208082149-phpapp02
Bsc agri 2 pae u-4.4 publicrevenue-presentation-130208082149-phpapp02
 
Bsc agri 2 pae u-4.3 public expenditure
Bsc agri  2 pae  u-4.3 public expenditureBsc agri  2 pae  u-4.3 public expenditure
Bsc agri 2 pae u-4.3 public expenditure
 
Bsc agri 2 pae u-4.2 public finance
Bsc agri  2 pae  u-4.2 public financeBsc agri  2 pae  u-4.2 public finance
Bsc agri 2 pae u-4.2 public finance
 
Bsc agri 2 pae u-4.1 introduction
Bsc agri  2 pae  u-4.1 introductionBsc agri  2 pae  u-4.1 introduction
Bsc agri 2 pae u-4.1 introduction
 
Bsc agri 2 pae u-3.3 inflation
Bsc agri  2 pae  u-3.3  inflationBsc agri  2 pae  u-3.3  inflation
Bsc agri 2 pae u-3.3 inflation
 
Bsc agri 2 pae u-3.2 introduction to macro economics
Bsc agri  2 pae  u-3.2 introduction to macro economicsBsc agri  2 pae  u-3.2 introduction to macro economics
Bsc agri 2 pae u-3.2 introduction to macro economics
 
Bsc agri 2 pae u-3.1 marketstructure
Bsc agri  2 pae  u-3.1 marketstructureBsc agri  2 pae  u-3.1 marketstructure
Bsc agri 2 pae u-3.1 marketstructure
 
Bsc agri 2 pae u-3 perfect-competition
Bsc agri  2 pae  u-3 perfect-competitionBsc agri  2 pae  u-3 perfect-competition
Bsc agri 2 pae u-3 perfect-competition
 

Recently uploaded

Marketing internship report file for MBA
Marketing internship report file for MBAMarketing internship report file for MBA
Marketing internship report file for MBA
gb193092
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Atul Kumar Singh
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
Peter Windle
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
Wasim Ak
 
Advantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO PerspectiveAdvantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO Perspective
Krisztián Száraz
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
EduSkills OECD
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 

Recently uploaded (20)

Marketing internship report file for MBA
Marketing internship report file for MBAMarketing internship report file for MBA
Marketing internship report file for MBA
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
 
Advantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO PerspectiveAdvantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO Perspective
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 

BCA_Semester-II-Discrete Mathematics_unit-iv Graph theory

  • 1. Unit-IV GRAPH THEORY RAI UNIVERSITY, AHMEDABAD GRAPH THEORY COURSE-BCA Subject- Discrete Mathematics Unit-IV RAI UNIVERSITY, AHMEDABAD
  • 2. Unit-IV GRAPH THEORY RAI UNIVERSITY, AHMEDABAD Graph theory Definition:- Conceptually, a graph is formed by vertices and edges connecting the vertices. Example: Formally, a graph is a pair of sets (V, E), where V is the set of vertices and E is the set of edges, formed by pairs of vertices. E is a multiset, in other words, its elements can occur more than once so that every element has a multiplicity. Often, we label the vertices with letters (for example: a, b, c, . . . or v1, v2, . . .) or numbers 1, 2, . . . Throughout this lecture material, we will label the elements of V in this way. Example: (Continuing from the previous example) we label the vertices as follows: We have V = {v1, . . . , v5} for the vertices and E = {(v1, v2), (v2, v5), (v5, v5), (v5, v4), (v5, v4)} for the edges. Similarly,
  • 3. Unit-IV GRAPH THEORY RAI UNIVERSITY, AHMEDABAD we often label the edges with letters (for example: a, b, c, . . . or e1, e2, . . . ) or numbers 1, 2, . . . for simplicity Remark. The two edges (u, v) and (v, u) are the same. In other words, the pair is not ordered. Example. (Continuing from the previous example) We label the edges as follows: So E = {e1, . . . , e5}. We have the following terminologies: 1. The two vertices u and v are end vertices of the edge (u, v). 2. Edges that have the same end vertices are parallel. 3. An edge of the form (v, v) is a loop. 4. A graph is simple if it has no parallel edges or loops. 5. A graph with no edges (i.e. E is empty) is empty. 6. A graph with no vertices (i.e. V and E are empty) is a null graph. 7. A graph with only one vertex is trivial. 8. Edges are adjacent if they share a common end vertex. 9. Two vertices u and v are adjacent if they are connected by an edge, in other words, (u, v) is an edge. 10. The degree of the vertex v, written as d(v), is the number of edges with v as an end vertex. By convention, we count a loop twice and parallel edges contribute separately. 11. A pendant vertex is a vertex whose degree is 1. 12. An edge that has a pendant vertex as an end vertex is a pendant edge. 13. An isolated vertex is a vertex whose degree is 0. Example. (Continuing from the previous example) • v4 and v5 are end vertices of e5. • e4 and e5 are parallel.
  • 4. Unit-IV GRAPH THEORY RAI UNIVERSITY, AHMEDABAD • e3 is a loop. • The graph is not simple. • e1 and e2 are adjacent • v1 and v2 are adjacent. • The degree of v1 is 1 so it is a pendant vertex. • e1 is a pendant edge. • The degree of v5 is 5. • The degree of v4 is 2. • The degree of v3 is 0 so it is an isolated vertex. In the future, we will label graphs with letters, for example: G = (V,E). The minimum degree of the vertices in a graph G is denoted δ(G) (= 0 if there is an isolated vertex in G). Similarly, we write _(G) as the maximum degree of vertices in G.. Example. (Continuing from the previous example) δ(G) = 0 and _(G) = 5. Remark. In this course, we only consider finite graphs, i.e. V and E are finite sets. Since every edge has two end vertices, we get Theorem 1.1. The graphG = (V,E), where V = {v1, . . . , vn} and E = {e1, . . . , em}, satisfies ( ) = 2 Corollary. Every graph has an even number of vertices of odd degree. Proof. If the vertices v1, . . . , vk have odd degrees and the vertices vk+1, . . . , vn have even degrees, then (Theorem 1.1) d(v1) + · · · + d(vk) = 2m − d(vk + 1) − · · · − d(vn) is even. Therefore, k is even. Example. (Continuing from the previous example) Now the sum of the degrees is 1 + 2 + 0 + 2 + 5 = 10 = 2 · 5. There are two vertices of odd degree, namely v1 and v5. A simple graph that contains every possible edge between all the vertices is called a complete
  • 5. Unit-IV GRAPH THEORY RAI UNIVERSITY, AHMEDABAD graph. A complete graph with n vertices is denoted as Kn. The first four complete graphs are given as examples: The graph G1 = (V1,E1) is a subgraph of G2 = (V2,E2) if 1. V1 ⊆V2 and 2. Every edge of G1 is also an edge of G2. Example. We have the graph and some of its subgraphs are
  • 6. Unit-IV GRAPH THEORY RAI UNIVERSITY, AHMEDABAD The subgraph of G = (V,E) induced by the edge set E1 ⊆E is: = ( , ) = . 〈 〉 , where V1 consists of every end vertex of the edges in E1. Example. (Continuing from above) From the original graph G, the edges e2, e3 and e5 induce the subgraph
  • 7. Unit-IV GRAPH THEORY RAI UNIVERSITY, AHMEDABAD The subgraph of G = (V,E) induced by the vertex set V1 ⊆V is: = ( , ) = . 〈 〉 , where E1 consists of every edge between the vertices in V1. Example. (Continuing from the previous example) From the original graph G, the vertices v1, v3 and v5 induce the subgraph A complete subgraph of G is called a clique of G. 1.2 Walks, Trails, Paths, Circuits, Connectivity, Components Remark. There are many different variations of the following terminologies. We will adhere to the definitions given here. A walk in the graph G = (V,E) is a finite sequence of the form v ,e , v , e , . . . , e , v , which consists of alternating vertices and edges of G. The walk starts at a vertex. Vertices
  • 8. Unit-IV GRAPH THEORY RAI UNIVERSITY, AHMEDABAD and are end vertices of (t = 1, . . . , k) . is the initial vertex and is the terminal vertex. k is the length of the walk. A zero length walk is just a single vertex . It is allowed to visit a vertex or go through an edge more than once. A walk is open if ≠ . Otherwise it is closed. Example. In the graph the walk , , , , , , , , , , , is open. On the other hand, the walk , , , , , , , , , , is closed. A walk is a trail if any edge is traversed at most once. Then, the number of times that the vertex pair u, v can appear as consecutive vertices in a trail is at most the number of parallel edges connecting u and v. Example. (Continuing from the previous example) The walk in the graph v1, e8, v5, e9, v1, e1, v2, e7, v5, e6, v4, e5, v4, e4, v4 is a trail. A trail is a path if any vertex is visited at most once except possibly the initial and terminal vertices when they are the same. A closed path is a circuit. For simplicity, we will assume in
  • 9. Unit-IV GRAPH THEORY RAI UNIVERSITY, AHMEDABAD the future that a circuit is not empty, i.e. its length ≥ 1. We identify the paths and circuits with the subgraphs induced by their edges. Example. (Continuing from the previous example) The walk v2, e7, v5, e6, v4, e3, v3 is a path and the walk v2, e7, v5, e6, v4, e3, v3, e2, v2 is a circuit. The walk starting at u and ending at v is called an u–v walk. u and v are connected if there is a u–v walk in the graph (then there is also a u–v path!). If u and v are connected and v and w are connected, then u and w are also connected, i.e. if there is a u–v walk and a v– w walk, then there is also a u–w walk. A graph is connected if all the vertices are connected to each other. (A trivial graph is connected by convention.) Example. The graph is not connected. The subgraph G1 (not a null graph) of the graph G is a component of G if 1. G1 is connected and 2. Either G1 is trivial (one single isolated vertex of G) or G1 is not trivial and G1 is the subgraph induced by those edges of G that have one end vertex in G1. Different components of the same graph do not have any common vertices because of the following theorem.