Trails, Paths, Circuits and Cycles
A walk allows every kind of repetition. Forbidding repeated edges gives one kind of journey, forbidding repeated vertices gives another, and asking whether the journey returns to its start doubles each of them.
A postal worker must walk down every street exactly once. A tourist wants to see five landmarks without passing anything twice. Which of the two is allowed to visit the same corner more than once?
Two questions classify every journey. Does it repeat an edge? Does it repeat a vertex? And a third doubles the answers: does it end where it started?
$$\text{trail} \to \text{circuit}, \qquad \text{path} \to \text{cycle}$$
The names follow one pattern. A trail repeats no edge; close it and it becomes a circuit. A path repeats no vertex; close it and it becomes a cycle. Learn the two open ones and the closed ones follow.
Know
- that a trail is a walk with no repeated edge, and a path is a walk with no repeated vertex
- that a circuit is a closed trail and a cycle is a closed path
- that in a cycle the starting vertex is the only one permitted to appear twice
Understand
- why every path is automatically a trail, but not every trail is a path
- why the two restrictions come from two different questions rather than being degrees of the same one
- why a postal round and a sightseeing tour need different kinds of journey
Can Do
- classify a given walk as a trail, a path, a circuit, a cycle, or none of these
- find a trail, path, circuit or cycle of a given length in a graph
- explain why a particular walk fails to be a path or a trail
A walk permits everything, so the classification comes from what you take away.
Ban repeated edges. The journey may pass through a vertex more than once but may never travel along the same edge twice. That is a trail.
Ban repeated vertices. The journey may never return to a vertex it has already visited. That is a path.
These are genuinely different questions, not two strengths of one. A trail may cross itself at a vertex; a path may not.
Both restrictions have natural meanings. A trail is what a postal worker walks: every street once, and passing the same corner twice is unavoidable and harmless. A path is what a tourist wants: never doubling back on anything.
One implication holds between the two, and it is worth being able to justify rather than remember.
Suppose a walk repeats an edge. That edge has two endpoints, and travelling along it a second time means arriving at both of those endpoints a second time. So a repeated edge forces a repeated vertex.
Turning that around: a walk with no repeated vertex can have no repeated edge. So every path is a trail.
The converse fails, and one example settles it. In a graph shaped like a figure eight, going round the first loop and then the second uses every edge once but visits the middle vertex three times. That is a trail and is not a path.
So path is the stronger condition, and "trail" is the weaker one that more journeys satisfy.
The third question is whether the journey returns to its starting vertex.
A closed trail is a circuit: no edge repeated, and it finishes where it began.
A closed path is a cycle: no vertex repeated, except that the last vertex is the first one again.
That exception in the definition of a cycle needs stating, because strictly a closed journey does repeat a vertex, namely its start. The starting vertex is the one permitted repetition, and every other vertex appears once.
So the triangle $A \to B \to C \to A$ is a cycle, since only $A$ appears twice and it does so as start and finish. The journey $A \to B \to C \to A \to D \to A$ is not a cycle, since $A$ appears three times and the second appearance is not the end.
Given a walk, three checks settle its name.
List the edges used and look for a repeat. A repeat means it is not a trail, and therefore not a path, circuit or cycle either.
List the vertices visited and look for a repeat. Ignore a final return to the start for now.
Compare the first and last vertices to see whether it is closed.
Then read off the answer. No edge repeat and open gives a trail; also no vertex repeat gives a path. No edge repeat and closed gives a circuit; also no other vertex repeat gives a cycle.
Report the most specific name that applies. A cycle is also a circuit and also a trail and also a walk, all correctly, but calling it a walk when it is a cycle throws away everything the question was testing.
The next two lessons need only two of these four, and it is worth knowing which in advance.
An Eulerian trail is a trail that uses every edge of the graph exactly once. It is a trail rather than a path, and that is essential: a journey covering every street will nearly always revisit corners, so demanding no repeated vertex would make it impossible for almost every graph.
An Eulerian circuit is such a trail that also returns to its start.
The Königsberg bridge problem asks for one of these. Getting the word right matters there, because the question is about crossing every bridge once, not about visiting every part of the city once, and those are different requirements with different answers.
There is a corresponding pair of ideas about visiting every vertex once, named after Hamilton rather than Euler. They are beyond this focus area, but knowing they exist prevents the two families being confused.
Watch Me Solve It · 3 examples
-
1The first journey$\text{edges: } AB, BC, CD$No edge repeats and no vertex repeats, and it starts at $A$ and ends at $D$, so it is open. It is a path, and therefore also a trail.
-
2The second journey$\text{edges: } AB, BC, CA, AD$No edge repeats, so it is a trail. But $A$ appears twice, at the start and in the middle, so it is not a path. It ends at $D$, so it is open and not a circuit.
-
3The third journey$\text{edges: } AB, BC, CD, DA$No edge repeats and it returns to $A$, so it is a circuit. Apart from the return to the start, no vertex repeats, so it is a cycle.
-
4Give the most specific namesReport the strongest description that holds, since each of these also satisfies the weaker ones.
-
1Describe the shape of the graphThe edges $PQ$, $QR$, $RP$ form one triangle and $PS$, $ST$, $TP$ form another, and the two triangles share only the vertex $P$. The graph is a figure eight.
-
2Take one triangle then the other$Q \to R \to P \to T \to S \to P \to Q$This goes round the first triangle to $P$, round the second, and back.
-
3Check it is a trail$QR, \ RP, \ PT, \ TS, \ SP, \ PQ$Six edges, all different, and they are all six edges of the graph. So it is a trail, and since it returns to $Q$ it is a circuit.
-
4Check it is not a pathThe vertex $P$ appears twice in the middle of the journey, once on arriving from $R$ and once on arriving from $S$. A path forbids that, so this trail is not a path.
-
5Explain why no path can use all six edgesAny journey covering edges in both triangles must pass through $P$, the only vertex they share. Having entered and left each triangle, it must arrive at $P$ more than once, which a path forbids. So no path reaches all six edges.
-
1Look for a triangle$A \to B \to C \to A$Uses $AB$, $BC$ and $CA$, all of which exist. Three edges, so length $3$, and no vertex except $A$ repeats.
-
2Look for a route around the outside$A \to B \to C \to D \to E \to A$Uses $AB$, $BC$, $CD$, $DE$, $EA$. Five edges, so length $5$, and every vertex appears once apart from the return to $A$.
-
3Confirm both are cyclesEach is closed, repeats no edge, and repeats no vertex other than its start. Both conditions hold, so both are cycles rather than merely circuits.
-
4Note what is not possibleThere is no cycle of length $4$ here, since any four-edge closed route would have to use $AC$ together with three of the outside edges, and no such combination closes up.
Brain Trainer · 5 problems
Five items. Give the most specific correct name in each case.
-
1 What is a walk with no repeated edge called?
The restriction is on edges.A trail -
2 What is a walk with no repeated vertex called?
The restriction is on vertices, which is stronger.A path -
3 What is a closed trail called?
Closing a trail gives the corresponding closed name.A circuit -
4 Is every trail a path?
A trail may cross itself at a vertex.No -
5 Is every path a trail?
Reusing an edge would mean revisiting its endpoints.Yes
Multiple Choice · 5 questions
A trail is a walk in which:
Which statement is true?
In a graph with edges $AB$, $BC$, $CD$, $DA$, $BD$, the journey $A \to B \to D \to C \to B \to A$ is:
In a cycle, the number of vertices that appear more than once is:
A journey that uses every edge of a graph exactly once is called an Eulerian trail rather than an Eulerian path because:
Short Answer · 3 questions
Trail bans edges, path bans vertices
A trail may cross itself at a vertex; a path may not. The path restriction is the stronger one.
Closing gives the other two names
A closed trail is a circuit; a closed path is a cycle. In a cycle the starting vertex is the only permitted repetition.
Every path is a trail
Repeating an edge repeats both of its endpoints, so no repeated vertex forces no repeated edge. The converse fails, as a figure-eight route shows.
Euler needs trails, not paths
Covering every edge usually forces a vertex to be passed more than once, so the vertex restriction has to be dropped for the next two lessons.
Your Badges
0 of 6Mark lesson as complete
Tick when you've finished Learn, Practice and the Stretch. Earns +90 XP and +25 coins.