In general, a closed walk is an alternating sequence of vertices and edges, as defined in df-clwlks: p(0) e(f(1)) p(1) e(f(2)) ... p(n-1) e(f(n)) p(n), with p(n) = p(0). Often, it is sufficient to refer to a walk by the (cyclic) sequence of its vertices, i.e omitting its edges in its representation: p(0) p(1) ... p(n-1) p(0), see the corresponding remark on cycles (which are special closed walks) in [Diestel] p. 7. As for "walks as words" in general, the concept of a , see df-word, is also used in Definitions df-clwwlk and df-clwwlkn, and the representation of a closed walk as the sequence of its vertices is called "closed walk as word".
In contrast to "walks as words", the terminating vertex p(n) of a closed walk is omitted in the representation of a closed walk as word, see definitions df-clwwlk, df-clwwlkn and df-clwwlknon, because it is always equal to the first vertex of the closed walk. This represenation has the advantage that the vertices can be cyclically shifted without changing the represented closed walk. Furthermore, the length of a closed walk (i.e. the number of its edges) equals the number of symbols/vertices of the word representing the closed walk.
To avoid to handle the degenerate case of representing a (closed) walk of length 0 by the empty word, this case is excluded within the definition (). This is because a walk of length 0 is anchored at an arbitrary vertex by the general definition for closed walks, see 0clwlkv, which neither can be reflected by the empty word nor by a singleton word with vertex v : represents the walk "", which is a (closed) walk of length 1 (if there is an edge/loop from to ), see loopclwwlkn1b.
Therefore, a closed walk corresponds to a closed walk as word only for walks of length at least 1, see clwlkclwwlk2 or clwlkclwwlken. Although the set of all closed walks of a fixed length as words over the set of vertices is defined as function over , the fixed length is usually not 0, because (see clwwlkn0).
Analogous to , the set of walks of a fixed length between two vertices and , the set of closed walks of a fixed length anchored at a fixed vertex is defined by df-clwwlknon. This definition is also based on instead of , with (see clwwlk0on0). clwwlknon1le1 states that there is at most one (closed) walk of length on a vertex, which would consist of a loop (see clwwlknon1loop). And in a -regular graph, there are closed walks of length on each vertex, see clwwlknon2num.