Walks, Trails, Paths, and Cycles in Graph Theory
Definition 1
Let there be a given graph .
- A finite sequence of edges is called a walk and is denoted as follows: Here, is called the initial vertex, is called the final vertex, and is called the length.
- If all edges in a walk are different, it is called a trail.
- If all vertices in a walk are different, it is called a path.
- If the initial and final vertices of a walk are the same, it is called closed.
- A closed path is called a cycle.
These concepts can be similarly defined for directed graphs as well, and can also be defined for infinite graphs as follows:
Let be an infinite graph. In the definitions below, walks can be replaced with trails, paths, cycles. 6. A (finite) walk is exactly the same as a walk in a conventional graph. 7. A one-way infinite walk is defined as follows: 8. A two-way infinite walk is defined as follows:
Explanation
In the definition of a path, the initial and final vertices are exceptions. In other words, if , it can be a path, hence a ‘closed path’ can exist. Meanwhile, in the definitions of a path and a trail, if all vertices are different, then all edges must also be different, so a path is also a trail.
A cycle is, simply put, a ’loop shape’ found in a graph, and it’s a concept widely used throughout graph theory. For example, the following figure shows that there are a total of three cycles in the graph:
Furthermore, the following theorem is known about cycles.
Theorem
If every vertex of a finite graph has a degree of or more, then contains a cycle.
Proof
Since would obviously contain a cycle if it has loops or multiple edges, we assume that is a simple graph.
Fix a random vertex and consider the following path: As the degree of every vertex is or more, according to the assumption, it’s guaranteed that we can continue to select any vertex adjacent to the previous vertex , excluding . However, since is a finite graph, we will inevitably select a vertex that is already part of the path. Thus, the path , whose initial and final vertices are , is confirmed to exist as a cycle in .
■
Wilson. (1970). Introduction to Graph Theory: p27. ↩︎