notesonly.in

One notebook for every subject — open it anywhere.

Log in

Walks, Paths and Circuits in Graph Theory Explained

A walk in a graph is any journey from vertex to vertex along edges, where you may repeat vertices and edges freely. A path is a walk with no repeated vertices (and therefore no repeated edges). A circuit is a walk that starts and ends at the same vertex; when no vertex is repeated except the start and end, it is called a cycle.

These ideas matter because almost every graph problem is a question about journeys: the shortest route between two stations or a delivery round that returns to base. Walks, paths and circuits give those journeys exact names and rules.

Key Concepts

  • Walk: a sequence of vertices joined by edges, where vertices and edges may repeat. Its length is the number of edges.
  • Trail: a walk with no repeated edges (vertices may still repeat).
  • Path: a walk with no repeated vertices at all.
  • Closed walk: a walk that starts and ends at the same vertex.
  • Circuit: a closed trail — it returns to the start without reusing any edge.
  • Cycle: a closed walk with no repeated vertices except the start and end coinciding.

How It Works

Think of the definitions as filters, each stricter than the last. Take any walk, even one that goes back and forth over the same edge. Remove edge repetitions and you have a trail. Remove vertex repetitions and you have a path — the cleanest way from A to B, since any repeated vertex means a pointless loop that can be cut out. Require the journey to return to its start without reusing edges and you have a circuit; without reusing vertices either, a cycle. Every path is a trail and every cycle is a circuit, but not the reverse.

Worked Example

Consider a graph with vertices 1, 2, 3, 4 and edges: 1–2, 2–3, 3–4, 4–1, 2–4. The sequence 1–2–3–2–4 uses each edge once but visits vertex 2 twice: it is a trail, not a path. The sequence 1–2–4 is a path of length 2. The sequence 1–2–3–4–1 is closed with no repeated vertices except start and end, so it is a cycle — and therefore also a circuit. The sequence 2–3–4–2–1–4–2 reuses edges, so it is only a walk. Cutting the repeated vertex 2 out of 1–2–3–2–4 gives the shorter path 1–2–4: every walk between two vertices contains a path between them.

Common Misconceptions

  • Walk and path are not synonyms. In graph theory a path forbids repeated vertices; a walk that revisits a vertex is a walk, not a path.
  • Circuit and cycle differ. A circuit may pass through a vertex several times without reusing edges; a cycle revisits no vertex except returning to the start.
  • The shortest walk between two vertices is always a path. If a shortest walk repeated a vertex, snipping out the loop would give a shorter walk — a contradiction.

Real-World Applications

  • GPS navigation: the route it computes is a shortest path; it never sends you in circles because shortest walks are paths.
  • Delivery rounds: a van that must return to the depot follows a circuit.
  • DNA sequencing: reconstructing a genome from fragments is modelled as finding paths through overlap graphs.

A walk allows anything, a path forbids repeated vertices, a trail forbids repeated edges, and circuits and cycles are their round-trip versions. With these five precise words, every journey through a network can be named and reasoned about exactly.