YaccConstructor / QuickGraph

Generic Graph Data Structures and Algorithms for .NET
http://yaccconstructor.github.io/QuickGraph/
Microsoft Public License
523 stars 198 forks source link

How can I detect all cycles in a graph? #188

Open petrasvestartas opened 5 years ago

petrasvestartas commented 5 years ago

How can I detect all cycles in a graph?

gsvgit commented 5 years ago

What do you exactly meen? For example, you can find all strongly connected components in directed graph. Each Scc is a composition of cycles. Or you can use dfs for explicit enumeration of all cycles.

petrasvestartas commented 5 years ago

I am search for an algorithm that can compute chordless cycles in undirected graph: https://en.wikipedia.org/wiki/Cycle_(graph_theory)#Chordless_cycles