Count cycles in undirected graph that does not share a vertex

117 views Asked by At

I am trying to understand an algorithm to count the number of isolated cycles in a graph. By isolated, I mean the cycles that do not share any vertex. Here is an example:

Example Graph

Here, 1-2-4-1 and 3-6-5-3 are the two cycles that do not share any vertex. Hence, the algorithm must return 2. Off course, we can find all possible cycles and then figure out the isolated ones but I was wondering if there could be an alternate method for this special case.

0

There are 0 answers