Connectivity: Paths
Connectivity: Paths
Connectivity: Paths
Paths
A path is a sequence of edges that begins at a vertex of a graph and travels from
vertex to vertex along edges of the graph.
DEFINITION 1
Let n be a nonnegative integer and G an undirected graph. A path of length n from
u to v in G is a sequence of n edges e1,...,en of G for which there exists a sequence
x0 = u, x1,..., xn1, xn = v of vertices such that ei has, for i = 1,...,n, the end points
xi1 and xi . When the graph is simple, we denote this path by its vertex sequence
x0 , x1 , . . . , xn (because listing these vertices uniquely determines the path). The
path is a circuit if it begins and ends at the same vertex, that is, if u = v, and has
length greater than zero. The path or circuit is said to pass through the vertices x1,
x2, . . . , xn1 or traverse the edges e1, e2, . . . , en. A path or circuit is simple if it
does not contain the same edge more than once.
When it is not necessary to distinguish between multiple edges, we will
denote a path e1, e2,...,en, where ei is associated with {xi1, xi} for i = 1,
2,..., n by its vertex sequence x0, x1, . . . , xn.
The notation identifies a path only as far as which vertices it passes through
It does not specify a unique path when there is more than one path that
passes through this sequence of vertices, which will happen if and only if
there are multiple edges between some successive vertices in the list.
A path of length zero consists of a single vertex.
Remark: There is considerable variation of terminology concerning the concepts
defined in Definition 1. For instance, in some books, the term walk is used instead
of path, where a walk is defined to be an alternating sequence of vertices and
edges of a graph, v0, e1, v1, e2,...,vn1, en, vn, where vi1 and vi are the endpoints
of ei for i = 1, 2,..., n. When this terminology is used, closed walk is used instead
of circuit to indicate a walk that begins and ends at the same vertex, and trail is
used to denote a walk that has no repeated edge (replacing the term simple path).
When this terminology is used, the terminology path is often used for a trail with
EXAMPLE
In the simple graph shown in Figure 1, a, d, c, f , e is a simple path of length 4,
because {a, d}, {d, c}, {c, f }, and {f, e} are all edges. However, d, e, c, a is not a
path, because {e, c} is not an edge. Note that b, c, f, e, b is a circuit of length 4
because {b, c}, {c, f}, {f, e}, and {e, b} are edges, and this path begins and ends at
b. The path a, b, e, d, a, b, which is of length 5, is not simple because it contains
the edge {a, b} twice.
EXAMPLE
The graph G1 in Figure is connected, because for every pair of distinct vertices
there is a path between them. However, the graph G2 in Figure is not connected.
For instance, there is no path in G2 between vertices a and d.
THEOREM
There is a simple path between every pair of distinct vertices of a connected
undirected graph.
(The proof is left as an exercise for the students)
EXAMPLE
The graph H is the union of three disjoint connected subgraphs H1, H2, and H3,
shown in Figure. These three subgraphs are the connected components of H.
Questions:
Q1) Does each of these lists of vertices form a path in the following graph? Which paths
are simple? Which are circuits? What are the lengths of those that are paths?
a) a, e ,b, c, b
c) e, b, a, d, b, e
b) a, e, a, d, b, c, a
d) c, b, d, a, e, c
Q2) Does each of these lists of vertices form a path in the following graph? Which paths
are simple? Which are circuits? What are the lengths of those that are paths?
a) a, b, e, c, b
c) a, d, b, e, a
b) a, d, a, d, a
d) a, b, e, c, b, d, a
Q3) Determine whether the given graph is connected. If not, how many connected
components does the graph have? Find each of its connected components.