title: Cycle of maximum weight in a graph
body: <p>Given a weighted graph (directed or undirected) I need to find the cycle of the graph with the maximum weight.</p>
  
  <p>The weight of a cycle being the sum of the weight of the edges of the graph.</p>
  
  <p>It can be any cycle, not just base cycle for which we can</p>
  
  <ul>
  <li>find all base cycle (see <a href="https://stackoverflow.com/questions/1607124/algorithms-to-identify-all-the-cycle-bases-in-a-undirected-graph">Algorithms to Identify All the Cycle Bases in a UnDirected Graph</a> )</li>
  <li>compute the weight of each base cycle and find the maximum</li>
  </ul>
  
  <p>I could try to enumerate all cycles of the graph and then compute the maximum but the total number of cycles can be really big (if the graph is complete then any sequence of vertices where the first and last one are identical is a cycle).</p>
  
  <p>Do you have any idea to find that maximum weight cycle without enumerating all cycles ?</p>
  
  <p>If you need hypothesis on the graph (positives weights for example) please indicates them.</p>