Identify Paths and Cycles