Paths and cycles

Definition: Walk, path

A walk in a graph is a sequence of vertices such that and are adjacent for every . A walk where the vertices are distinct is called a path.

We notice that we can define a relation on which describes if there exists a path between two vertices. This clearly is an equivalence relation, since if you can get from to and from to , then you can get from to .

Definition: Components, connected graph

Let be a graph and be the equivalence relation where there exists a path from to . Let be the partition of with respect to , and let for every . The graphs are called the components of , and if , is called connected.

Definition: Cycle

A walk is called a cycle if is a path and .