Data Structures, Algorithms, & Applications in C++
Chapter 16, Exercise 1
- (a)
-
6,1,2,7,4 is a path in the graph and no vertex
is repeated. So it is a simple path.
- (b)
-
1,2,3,4 is not a path in the graph because
(3,4) is not an edge of the graph.
Therefore, it is not a simple path.
- (c)
-
Even though
7,2,3,2,1,6 is a path in the graph,
it is not a simple path because vertex 2
which is an interior path vertex is repeated.
- (d)
-
4,5,7,2 is not a path in the graph because
(4,5) is not an edge of the graph.
Therefore, it is not a simple path.