Independent cycles in undirected graph

1.7k Views Asked by At

What is the algorithm that allows me to determine the independent cycles in an undirected graph. For example, in the figure below: The independent cycles: [2-12-4-5-13-2] [4-5-6-4] [4-10-11-7-6-4] enter image description here Thanxs

2

There are 2 best solutions below

0
On

Start with a spanning tree and consider the graphs you get by adding a single edge of your graph.

0
On

@Robert Israel

Suppose we have the graph below .Using your method, I will get 2 cycles : [8-2-3-8] and [8-2-4-5-3-8].

enter image description here

But I want to get [8-2-3-8] and [2-4-5-3-2].

enter image description here
(source: 0zz0.com)