Identify paths and cycles (#701)

Identify paths and cycles (#701)

Recognise sequences of vertices with distinct edges (paths) and closed paths (cycles).