You are here
Home(closed) walk / trek / trail / path
Primary tabs
(closed) walk / trek / trail / path
Graph theory terminology is notoriously variable so the following definitions should be used with caution. In books, most authors define their usage at the beginning.
In a graph, multigraph or even pseudograph $G$,

a walk of length $s$ is formed by a sequence of $s$ edges such that any two successive edges in the sequence share a vertex (aka node). The walk is also considered to include all the vertices (nodes) incident to those edges, making it a subgraph.
In the case of a simple graph (i.e. not a multigraph) it is also possible to define the walk uniquely by the vertices it visits: a walk of length $s$ is then a sequence of vertices $\nu_{0}$, $\nu_{1}$, … $\nu_{s}$ such that an edge $\nu_{i}\nu_{{i+1}}$ exists for all $0\leqslant i\lt s$. Again the walk is considered to contain those edges as well as the vertices.

A trek is a walk that does not backtrack, i.e. no two successive edges are the same.
For simple graphs this also implies $\nu_{i}\neq\nu_{{i+2}}$ for all $0\leqslant i\leqslant s2$.

A trail is a walk where all edges are distinct, and

a path is one where all vertices are distinct.
The walk, etc. is said to run from $\nu_{0}$ to $\nu_{s}$, to run between them, to connect them etc. The term trek was introduced by Cameron [Cam94] who notes the lexicographic mnemonic
$\hbox{\em paths\/}\;\subset\;\hbox{\em trails\/}\;\subset\;\hbox{\em treks\/}% \;\subset\;\hbox{\em walks\/}$ 
The other terms are fairly widespread, cf. [Wil02], but beware: many authors call walks paths, and some then call paths chains. And when edges are called arcs, a trek of length $s$ sometimes goes by the name $s$arc.
Note that for the purpose of defining connectivity any of these types of wanderings can be used; if a walk exists between vertices $\mu$ and $\nu$ then there also exists a path between them. And here we must allow $s=0$ to make “are connected by a path” an equivalence relation on vertices (in order to define connected components as its equivalence classes).

A closed walk aka circuit of length $s\neq 0$ is a walk where $\nu_{0}=\nu_{s}$,

a closed trail likewise;

a closed path aka (elementary) cycle is like a path (except that we only demand that $\nu_{i}$ for $0\leqslant i\lt s$ are distinct) and again closed ($\nu_{s}$ again coincides with $\nu_{0}$).
Beware: cycles are often called circuits [Cam94]; the distinction between circuits and cycles here follows Wilson [Wil02]. These closed wanderings are often called after their length: $s$circuits, $s$cycles.
The case $s=0$ is excluded from these definitions; $1$cycles are loops so imply a pseudograph; $2$cycles are double edges implying multigraphs; so $3$ is the minimum cycle length in a proper graph.
Note also that in trivalent aka cubic graphs a closed trail is automatically a closed path: it is impossible to visit a vertex (in via edge $a$, out via edge $b$ say) and visit it again (in via $c$, out via $d$) without also revisiting an edge, because there are only three edges at each vertex.

An open walk, open trek, open trail is one that isn’t closed.

An open path (sometimes open chain) is just a path as defined above (because a closed path isn’t actually a path). Still, the term is useful when you want to emphasise the contrast with a closed path.
References
 1
 Cam94
Peter J. Cameron,
Combinatorics: topics, techniques, algorithms
Camb. Univ. Pr. 1994, ISBN 0 521 45761 0,
http://www.maths.qmul.ac.uk/ pjc/comb/ (solutions, errata &c.)  Wil02
Robert A. Wilson,
Graphs, Colourings and the Fourcolour Theorem,
Oxford Univ. Pr. 2002, ISBN 0 19 851062 4 (pbk),
http://www.maths.qmul.ac.uk/ raw/graph.html (errata &c.)
Mathematics Subject Classification
05C38 no label found Forums
 Planetary Bugs
 HS/Secondary
 University/Tertiary
 Graduate/Advanced
 Industry/Practice
 Research Topics
 LaTeX help
 Math Comptetitions
 Math History
 Math Humor
 PlanetMath Comments
 PlanetMath System Updates and News
 PlanetMath help
 PlanetMath.ORG
 Strategic Communications Development
 The Math Pub
 Testing messages (ignore)
 Other useful stuff
 Corrections