When Is a Closed Route a Cycle?
A route can return to its starting vertex without tracing a cycle. It might repeat an edge, revisit a vertex along the way, or simply traverse one edge and then immediately traverse it back. The word cycle is reserved for a more specific kind of closed route: apart from its required return to the starting vertex, it does not repeat any vertex.
Throughout, graphs are finite and simple: they have no loops and no multiple edges. A walk is a sequence \(v_0,v_1,\ldots,v_k\) in which each consecutive pair is joined by an edge; its length is \(k\). A walk is closed if \(v_k=v_0\). A trail is a walk that does not repeat an edge. A path is a walk that does not repeat a vertex. A path of length zero, consisting of one vertex, is allowed.
One sometimes describes a cycle as a “closed path,” meaning a path-like sequence that returns to its start. Strictly, a path has no repeated vertices, so the cycle definition explicitly allows the first vertex to appear again at the end. The condition \(k\ge3\) follows naturally for cycles in simple graphs: a loop would be needed for length one, and a length-two closed sequence would traverse the same edge twice. Neither is a cycle here.
Checking the Conditions
To decide whether a sequence is a cycle, check the requirements separately. First, every consecutive pair must be an edge of the graph. Next, the sequence must close. Then check that the length is at least three and that the vertices before the final return are all distinct. A sequence can satisfy some of these checks and still fail to be a cycle.
Worked Example: Classifying Four Vertex Sequences
Let \(G=(V,E)\) be the simple graph with \(V=\{1,2,3,4\}\) and \(E=\{12,23,34,41,13\}\). Classify the sequences \(1,2,3,1\), \(1,2,3,2,1\), and \(1,2,3,4,1\).
For \(1,2,3,1\), the consecutive pairs are \(12\), \(23\), and \(31\); all are edges in \(E\). The sequence begins and ends at \(1\), and its length is \(3\). Before the final return, its vertices are \(1,2,3\), which are distinct. Therefore it is a cycle of length \(3\).
For \(1,2,3,2,1\), the consecutive pairs are \(12,23,32,21\). The sequence is a closed walk of length \(4\), but it repeats the edge \(23\) (traversed in reverse as \(32\)) and also repeats vertices before the final return: vertex \(2\) appears twice. It is neither a trail nor a path, and it is not a cycle.
For \(1,2,3,4,1\), the consecutive pairs are \(12,23,34,41\), all edges of \(G\). The sequence closes, has length \(4\), and its vertices before the return, \(1,2,3,4\), are distinct. It is a cycle of length \(4\).
Check: The first cycle uses three distinct edges, \(12,23,13\); the last uses four distinct edges, \(12,23,34,41\). In the middle sequence, the two edge traversals \(23\) and \(32\) are the same undirected edge, so that sequence cannot be a trail.
How Cycles Relate to Walks and Trails
Every cycle is a closed trail, and every closed trail is a closed walk. The reverse implications do not hold: a closed walk may repeat an edge, and a closed trail may revisit a vertex even though it never repeats an edge.
Proof. Let \(v_0,v_1,\ldots,v_k=v_0\) be a cycle. It is closed by its defining equality \(v_k=v_0\), so it is a closed walk. Its vertices \(v_0,\ldots,v_{k-1}\) are distinct and \(k\ge3\). Hence each of its edges joins a different consecutive pair around the sequence: no edge can occur twice. Thus it is a trail.
To show that the reverse implications fail, consider the explicitly defined simple graph with \(V=\{a,b,c,d,e\}\) and \(E=\{ab,bc,ca,ad,de,ea\}\). The sequence \(a,b,c,a,d,e,a\) is closed: its consecutive edges are \(ab,bc,ca,ad,de,ea\), and it returns to \(a\). These six edges are all distinct, so it is a closed trail. However, \(a\) occurs at positions \(1,4,\) and \(7\), so the sequence is not a cycle.
In the same graph, the sequence \(a,b,c,b,a\) is a closed walk with consecutive edges \(ab,bc,cb,ba\). It repeats the edges \(bc\) and \(ab\), so it is not a trail. This proves both failures of the reverse implications. \(\square\)
The proposition describes a one-way inclusion: cycles are among the closed trails, which are among the closed walks. To decide which category a particular sequence belongs to, inspect its actual vertex and edge repetitions rather than relying only on the fact that it returns to its start.
Worked Example: A Closed Trail That Is Not a Cycle
Use the graph \(G\) with \(V=\{a,b,c,d,e\}\) and \(E=\{ab,bc,ca,ad,de,ea\}\). Classify the sequence \(a,b,c,a,d,e,a\) in detail.
Write down the consecutive edges in order: \(ab\), \(bc\), \(ca\), \(ad\), \(de\), \(ea\). Each belongs to \(E\), and there are six steps, so the sequence has length \(6\). Its first and last vertices are both \(a\), so it is closed. The six listed edges are distinct, so the sequence is a trail.
For a cycle, the vertices before the final return must be distinct. Here those vertices are \(a,b,c,a,d,e\); the vertex \(a\) appears twice in this list. Therefore the sequence is not a cycle. Its two portions \(a,b,c,a\) and \(a,d,e,a\) are each cycles of length \(3\), but the full sequence joins them at their shared vertex and is not itself a cycle.
Check: The graph has exactly the six edges traversed by the sequence, and each appears once. The repeated vertex \(a\), rather than any repeated edge, is what prevents the whole closed trail from being a cycle.
The Edges and Vertices of a Cycle
Although a cycle is specified by a sequence, it also determines a subgraph: take its vertices and just the edges used in the sequence. In this subgraph, each vertex is incident with exactly two of the cycle’s edges—one arriving and one departing. This includes a triangle: its three edges are distinct, and each of its three vertices is incident with two of them.
Proof. Let \(v_0,v_1,\ldots,v_k=v_0\) be a cycle, where \(k\ge3\) and \(v_0,\ldots,v_{k-1}\) are distinct. The cycle edges are \(v_0v_1,v_1v_2,\ldots,v_{k-2}v_{k-1},v_{k-1}v_0\). Each vertex \(v_i\) is incident with the edge preceding it in this list and the edge following it, with the list understood cyclically. These are distinct edges: if \(k=3\), they are two different sides of the triangle; if \(k>3\), their other endpoints are distinct because the vertices \(v_0,\ldots,v_{k-1}\) are distinct. The subgraph contains no other edges by its definition, so each of its vertices has degree exactly \(2\). \(\square\)
This statement concerns the subgraph made from the cycle edges, not necessarily the whole graph. The original graph may contain additional edges between vertices of the cycle or from those vertices to other vertices. Those additional edges are not part of the cycle’s edge list.
Worked Example: Finding Cycles in a Graph with a Chord
Let \(G=(V,E)\) have \(V=\{p,q,r,s\}\) and \(E=\{pq,qr,rs,sp,pr\}\). A chord here means the extra edge \(pr\) joining two nonconsecutive vertices of the four-vertex cycle \(p,q,r,s,p\).
The sequence \(p,q,r,s,p\) uses edges \(pq,qr,rs,sp\). It closes, has length \(4\), and its vertices before the return are \(p,q,r,s\), all distinct. It is a cycle of length \(4\).
The sequence \(p,r,q,p\) uses \(pr,rq,qp\). All three edges belong to \(E\), it closes, and its length is \(3\). Its vertices before the return, \(p,r,q\), are distinct, so this is a second cycle, of length \(3\).
Now consider \(p,q,r,p,s,p\). Its consecutive edges are \(pq,qr,rp,ps,sp\), so it is a closed walk of length \(5\). But it repeats the edge \(ps\), since \(sp\) is the same undirected edge. It also repeats \(p\) before its final return. Thus it is neither a trail nor a cycle.
Check: In the four-cycle subgraph, the vertices \(p,q,r,s\) each have degree \(2\), using only \(pq,qr,rs,sp\). The extra edge \(pr\) is not one of those four edges; it gives the separate triangle \(p,r,q,p\) when combined with \(pq\) and \(qr\).
Common Pitfalls
Counting a back-and-forth traversal as a cycle. In a simple graph, the sequence \(u,v,u\) has length \(2\) and traverses the edge \(uv\) twice. It is a closed walk, but not a trail or cycle. A cycle must have length at least \(3\).
Checking only whether the sequence closes. Returning to the starting vertex is necessary for a cycle, but it is not enough. The sequence \(a,b,c,a,d,e,a\) above closes and uses no edge twice, yet revisits \(a\) before the final return. It is a closed trail, not a cycle.
Confusing the cycle with the whole graph. A graph may contain a cycle and also have extra edges. When checking the degree-\(2\) property, use only the edges of the cycle subgraph. Extra edges in the ambient graph do not alter whether the specified sequence is a cycle.
Check Your Understanding
For each question, justify your answer by checking adjacency, closure, length and repetitions where relevant.
- In the graph with \(V=\{1,2,3,4\}\) and \(E=\{12,23,34,41\}\), classify the sequence \(1,2,3,4,1\).
- In the same graph, is \(1,2,1\) a cycle, a trail, both, or neither? Explain.
- Give an example of a closed trail that is not a cycle, and identify the vertex that prevents it from being a cycle.
- Explain why every cycle is a trail in a simple graph, but a closed trail need not be a cycle.
- For the cycle \(p,q,r,s,p\), list the degree of each vertex in the subgraph consisting only of its cycle edges.