Graph Theory - Imed - Bca
Graph Theory - Imed - Bca
INTRODUCTION
• E-commerce, (AMAZON)
• Logistics (DHL)
• Designing electrical/ computer networks
• Social Networking ( FACEBOOK, TWITTER, LINKEDIN)
What is Graph
A set of points and lines joining these points.
Formally: G=(V,E), V-vertices, E-edges
e6
v1
v4
v3
e1
e2 V2 and v3 are adjacent. e2
e3
e5
is incident with v2.
v2
e4 v5
Walk in Graph Theory-
In graph theory,
A walk is defined as a finite length alternating sequence of vertices
and edges.
The total number of edges covered in a walk is called as Length of
the Walk.
In graph theory, a walk is called as an Open walk if-
Length of the walk is greater than zero
And the vertices at which the walk starts and ends are
different.
In this graph, few examples of walk are- In graph theory, a walk is called as a Closed walk if-
•A , B , C , E , D (Length = 4)
•D , B , A , C , E , D , E , C (Length = 7) Length of the walk is greater than zero
•E , C , B , A , C , E , D (Length = 6) And the vertices at which the walk starts and ends are same.
Path in Graph Theory-
In graph theory, a path is defined as an open walk in which-
Neither vertices (except possibly the starting and ending vertices) are allowed to
repeat.
Nor edges are allowed to repeat.
Neither vertices (except possibly the starting and ending vertices) are allowed to
repeat.
Nor edges are allowed to repeat.
Trail in Graph Theory-
In graph theory, a trail is defined as an open walk in which-
Vertices may repeat.
But edges are not allowed to repeat.