I'm looking for an algorithm that returns ALL simple cycles of fixed length L in a directed and undirected graph.
In my research, I came across similar questions such as:
https://stackoverflow.com/questions/546655/finding-all-cycles-in-a-directed-graph https://stackoverflow.com/questions/261573/best-algorithm-for-detecting-cycles-in-a-directed-graph
whose answers suggest the use of Johnson's algorithm for directed graphs. However, I cannot find anything clear about finding all cycles in an undirected graph and, most importantly, cycles of FIXED LENGTH L both in directed and undirected graphs.
My question comes from the need of finding the cycles incrementally, so that for large graphs I can stop early without biblical runtimes.