Graph Walks
Let
Walks
- A walk in
is a sequence of vertices in , such that each consecutive pair of vertices in the walk , form an edge in - The length of a walk is the number of steps, i.e. the number of edges in the walk.
- no restrictions, can have
length - Edge and Vertices both can be repeated.
Path
- A path in
is a walk where no vertices are repeated - edges can be repeated
Trails
- A trail is a walk where no edges are repeated
- vertices can be repeated
Cycles
- A cycle in
is a walk with where the first and last vertex are the same, but no other vertices are the same. - loop
is bipartite n is even, for - if
contains an odd cycle, then is not bipartite
Concatenation
- Two walks can be concatenated by concatenating their respective sequences.
- If walks
their concatenation . - Note that order of concatenation matters, it is not a commutative operation
- might not be a path if there are repeated vertices