Questions tagged [girth]

the length of the shortest cycle in a simple graph, this tag may specifically pertain to the igraph package from R.

The girth of a simple graph is the length of its shortest cycle.

This tag may specifically pertain to the igraph package from R; see girth()

2 questions
9
votes
1 answer

r igraph find all cycles

I have directed igraph and want to fetch all the cycles. girth function works but only returns the smallest cycle. Is there a way in R to fetch all the cycles in a graph of length greater then 3 (no vertex pointing to itself and loops)
Ankit
  • 6,388
  • 8
  • 54
  • 79
0
votes
1 answer

igraph, Python - directed girth seems to not work

I'm working with randomly generated digraphs. I need to verify that the graphs I have have a girth of at least, say 3. The solution I used is the following: I generate a random adjacency matrix I create an igraph.Graph instance from the matrix I…
Qise
  • 192
  • 6