title: Finding all cycles in undirected graphs
body: <p>I need a working algorithm for finding all simple cycles in an undirected graph. I know the cost can be exponential and the problem is NP-complete, but I am going to use it in a small graph (up to 20-30 vertices) and the cycles are small in number.</p>
  
  <p>After a long research (mainly here) I still don't have a working approach. Here is a summary of my search:</p>
  
  <p><a href="https://stackoverflow.com/questions/5068086/finding-all-cycles-in-an-undirected-graph">Finding all cycles in an undirected graph</a></p>
  
  <p><a href="https://stackoverflow.com/questions/526331/cycles-in-an-undirected-graph">Cycles in an Undirected Graph</a> -> detects only whether there is a cycle or not</p>
  
  <p><a href="https://stackoverflow.com/questions/9804127/finding-polygons-within-an-undirected-graph">Finding polygons within an undirected Graph </a> -> very nice description, but no solution</p>
  
  <p><a href="https://stackoverflow.com/questions/546655/finding-all-cycles-in-graph/549402#549402">Finding all cycles in a directed graph</a> -> finds cycles only in directed graphs</p>
  
  <p><a href="https://stackoverflow.com/questions/9626249/detect-cycles-in-undirected-graph-using-boost-graph-library">Detect cycles in undirected graph using boost graph library</a></p>
  
  <p>The only answer I found, which approaches my problem, is this one:</p>
  
  <p><a href="https://stackoverflow.com/questions/2839908/find-all-cycles-in-graph-redux">Find all cycles in graph, redux</a></p>
  
  <p>It seems that finding a basic set of cycles and XOR-ing them could do the trick. Finding a basic set of cycles is easy, but I don't understand how to combine them in order to obtain all cycles in the graph...</p>