A cycle is a path beginning and ending with the same vertex.