title: Algorithm for finding minimal cycles in a graph
body: <p>I'm looking for an algorithm that given a graph it returns all the minimal cycles in it. <br>
  To make clear what I want, I need the algorithm to return exactly the following cycles from this graph: <br>
   (1,3,6,1), (1,6,4,1), (1,4,2,1), (6,4,7,6), (2,4,7,2), (2,7,5,2) <br>
  <img src="https://i.stack.imgur.com/eruTF.png" alt="enter image description here"></p>
  
  <p>I've been searching alot and I still can't figure out even the name of this problem. Is it the cycle basis problem or the fundamental cycles problem or are those two the same?
  I found solutions involving MST or All-Pairs Shortest Paths but I can't understand any of them.
  <br>
  I tried to implement Horton's algorithm which I found here: <a href="http://prolog.hil.unb.ca:8080/bitstream/handle/1882/30807/TR84-026.pdf?sequence=1" rel="noreferrer">Horton's Algorithm</a> but I got stuck at the 4th step in page 5 trying to actually find out the cycles.
  <br>
  Can somebody either  explain to me what exactly needs to be done in step 4 of Horton's algorithm or give me another algorithm to solve my problem?</p>