Pciu Final Graph - Part - 3
Pciu Final Graph - Part - 3
Chapter 8.4
Connectivity
Paths in Undirected Graphs
• There is a path from vertex v0 to vertex vn if
there is a sequence of edges from v0 to vn
– This path is labeled as v0,v1,v2,…,vn and
has a length of n.
• The path is a circuit if the path begins and
ends with the same vertex.
• A path is simple if it does not contain the
same edge more than once.
Graph Theoretic Foundations
• Paths and Cycles:
• Walk in a graph G is v0, e1, v1, …, vl-1, el, vl
Graph Theoretic Foundations
• Paths and Cycles:
• IF v0, v1, …, vl are distinct (except possible v0,vl) then
the walk is a path.
• Denoted by v0, v1, …, vl or e1, e2, …, el
• Length of path is l
Paths, Cycles, and Trails
• A trail is a walk with no repeated edge.
Graph Theoretic Foundations
• Paths and Cycles:
• A path or walk is closed if v0 = vl
• A closed path containing at least one edge is
called a cycle.
Paths in Undirected Graphs
• A path or circuit is said to pass through the
vertices v0, v1, v2, …, vn or traverse the
edges e1, e2, …, en.
Example
• u1, u4, u2, u3
u1 u2
– Is it simple?
– yes
– Is it simple?
u1 u2 – yes
u5 u3
– What is the length?
u4 –5
– Is it simple?
– yes
u1 u2
a b a b
c e
f d c
g e d f
Yes No
Connectedness (Cont.)
b d e f
a c h g
Example
• What are the connected components of
the following graph?
b d e f
a c h g
a d f g
b c e h
Example
• Find the cut vertices and cut edges in the
following graph.
a d f g
b c e h
Separation
pair
Graph Theoretic Foundations
• Trees and Forests:
• Tree – connected graph without any cycle
• Forest – a graph without any cycle
Connectedness in Directed Graphs
• A directed graph is strongly connected if
there is a directed path between every
pair of vertices.
Chapter 8.5
Euler and Hamilton Paths
Euler Paths and Circuits
• The Seven bridges of Königsberg
C
c
D
A
a d
B
b
Euler Paths and Circuits
• An Euler path is a path using every edge
of the graph G exactly once.
• An Euler circuit is an Euler path that
returns to its start.
C
B
Necessary and Sufficient Conditions
• How about multigraphs?
a b a b a b
e e
d c d c c d e
yes no no
(a, e, c, d, e, b, a)
Example
• Which of the following graphs has an Euler path?
a b a b a b
e e
d c d c c d e
yes no yes
(a, e, c, d, e, b, a ) (a, c, d, e, b, d, a, b)
Euler Circuit in Directed Graphs
NO (a, g, c, b, g, e, d, f, a) NO
Euler Path in Directed Graphs
NO (a, g, c, b, g, e, d, f, a) (c, a, b, c, d, b)
Hamilton Paths and Circuits