Efficient path graph (P-graph) implementation to asset in finding all cycles.