Finding the longest cycle in a directed graph using DFS

前端 未结 4 2056
夕颜
夕颜 2020-12-30 04:46

I need to find the longest cycle in a directed graph using DFS.

I once saw this Wikipedia article describing the way of doing this, and I think it approached the pro

4条回答
  •  春和景丽
    2020-12-30 05:16

    I think that longest elementary cycle (or circuit) is better terminology than longest cycle.

    Anyway, this pdf may be helpful: Finding All the Elementary Circuits of a Directed Graph

    This one year old stackoverflow question has also many links to related problems and algorithms: Finding all cycles in a directed graph

提交回复
热议问题