Maths WorkshopMaths problems with full solutions
Exercise 471Combinatorics › Graph theoryHigh schoolAdded 3 Nov 2026

Paths and cycles

#path#cycle#walk

Statement

Define walk, path, and cycle in a graph. Give an example where a walk is not a path.

Hint

A path has no repeated vertex; a walk may.

Show solutionHide solution

Solution

Definitions.
- *Walk*: sequence of vertices v0,v1,…,vkv_0,v_1,\ldots,v_k with {vi,vi+1}∈E\{v_i,v_{i+1}\}\in E.
- *Path*: walk with all vertices distinct.
- *Cycle*: closed walk v0=vkv_0=v_k with v1,…,vk−1v_1,\ldots,v_{k-1} distinct.

Example. In a triangle 11-22-33-11, the sequence 11-22-33-11-22 is a walk but not a path (vertex 11 repeats).

Conclusion. Every path is a walk; the converse fails when vertices repeat.