a finite sequence \(v_0, e_1, v_1, e_2, \dotsc, v_{n - 1}, e_n, v_n \) of elements from \(V \cup E \text{,}\) with each \(v_i \in V \) and each \(e_i \in E \text{,}\) such that edge \(e_i \) connects vertices \(v_{i-1} \) and \(v_i \)
Consider again the graph in FigureΒ 15.2.4 from ExampleΒ 15.2.3. How many trails from \(v_3 \) to \(v_4 \) exist? How many of those trails are paths? Are there any paths from \(v_3 \) to \(v_4 \) that are not trails?
We can solve this using a graph! The graph in FigureΒ 15.2.6 was created by mapping out all possible trails starting at \(v_3 \) and ending at \(v_4 \text{,}\) moving across one edge at a time. Each node in this new (directed) graph is labelled with a partial walk that is a continuation of the walk assigned to the node above it. Each leg in the graph stops when the associated walk being followed reaches \(v_4 \) and cannot be continued without repeating another edge. To save space in the node labels, we have used ββ¦β to mean the walk from the previous node.
Counting all the nodes in the graph of FigureΒ 15.2.6 that are labelled with a walk that ends in \(v_4 \text{,}\) we see that there are ten trails from \(v_3 \) to \(v_4 \text{.}\) Also, we can easily see that only three of the trails are paths.
We can use the same technique to map out all paths from \(v_3 \) to \(v_4 \text{,}\) but this time we terminate a leg when we cannot move off a vertex without repeating a vertex that is already visited in that walk. (Note that the walk \(v_3,e_6,v_3 \) is a path, but if we extend this walk in any way it will no longer be a path.)
We will prove the contrapositive: a walk that is not a trail cannot be an open path. So suppose \(W \) is a walk in a graph, and that \(W \) traverses edge \(e \) twice.
Write \(e=\{v,v'\} \text{.}\) Initially, there are two possibilities to consider. If each of the two assumed traversals of \(e \) moves from \(v \) to \(v' \text{,}\) then \(W \) passes through each of \(v,v' \) at least twice, and hence is not a path. If the two assumed traversals of \(e \) move \(v \) to \(v' \) and \(v' \) to \(v \) respectively, then \(W \) passes through \(v \) at least twice. If \(W \) traverses \(v \) twice because it both starts and ends there, then \(W \) is not open. If \(W \) is open and traverses \(v \) twice, then \(W \) is not a path. So in any case, \(W \) is not an open path.