1introductiontographtheory 140220082526 Phpapp02
1introductiontographtheory 140220082526 Phpapp02
Prem Sankar C
M Tech Technology Management
Dept of Futures Studies ,Kerala University
Outline
The origin of graph theory can be traced back to Euler's work on the
Konigsberg bridges problem (1735), which led to the concept of an
Eulerian graph. The study of cycles on polyhedra by the Thomas P.
Kirkman (1806 - 95) and William R. Hamilton (1805-65) led to the
concept of a Hamiltonian graph.
Graph Theory - History
Begun in 1735
Mentioned in Leonhard Euler's
paper on “Seven Bridges of
Konigsberg ” .
Gustav Kirchhoff
Basic Concepts of Graph Theory
Definition: Graph
Vertex & Edge
Vertex /Node
Basic Element
Drawn as a node or a dot.
Vertex set of G is usually denoted by V(G), or V or VG
Edge /Arcs
A set of two elements
Drawn as a line connecting two vertices, called end vertices, or
endpoints.
The edge set of G is usually denoted by E(G), or E or EG
Neighborhood
For any node v, the set of nodes it is connected to via an edge is
called its neighborhood and is represented as N(v)
Graph :Example
n:= 6 , m:=7
Vertices (V) :={1,2,3,4,5,6}
Edge (E) :={1,2},{1,5},{2,3},{2,5},{3,4},{4,5},{4,6}}
N(4) := Neighborhood (4) ={6,5,3}
Edge types:
Undirected;
E.g., distance between two cities, friendships…
Directed; ordered pairs of nodes.
E.g ,…
Directed edges have a source (head, origin) and target (tail,
destination) vertices
No edge
Null graph
No nodes
Obviously no edge
Simple Graph (Undirected)
loop
multiple arc
arc node
Weighted graph
1.2 2
1 2 3 1 2 3
.2
.5 1.5 5 3
.3 1
4 5 6 4 5 6
.5
Bipartite Graph
1 2 3 4 5 6 7 8
1 0 1 1 0 0 0 0 0
2 1 0 1 1 1 0 0 0
3 1 1 0 0 1 0 1 1
4 0 1 0 1 1 0 0 0
5 0 1 1 1 0 1 0 0
6 0 0 0 0 1 0 0 0
7 0 0 1 0 0 0 0 1
8 0 0 1 0 0 0 1 0
2. Incidence Matrix
VxE
[vertex, edges] contains the edge's data
1, 2 1,5 2 ,3 2 ,5 3, 4 4 ,5 4 ,6
1 1 1 0 0 0 0 0
2 1 0 1 1 0 0 0
3 0 0 1 0 1 0 0
4 0 0 0 0 1 1 1
5 0 1 0 1 0 1 0
6 0 0 0 0 0 0 1
3. Adjacency List
Edge List
Edge List 12
12
23
25
33
43
45
53
54
Edge List
1 2 1.2
2 4 0.2
4 5 0.3
4 1 0.5
5 4 0.5
6 3 1.5
Graph Terminologies
Classification of Graph Terms
1 2 3
isolated vertex 4 5 6
Adjacent nodes
An edge where the two end vertices are the same is called a
loop, or a self-loop
Degree (Un Directed Graphs)
The degree of 5 is 3
Degree (Directed Graphs)
outdeg(1)=2
Degree = indeg + outdeg
indeg(1)=0
outdeg(2)=2
indeg(2)=2
outdeg(3)=1
indeg(3)=4
Walk
C3 C4 C5
Shortest Path
Prem Sankar C
M Tech Technology Management
Dept of Futures Studies
Kerala University