# How to partition a directed graph into cycles?

I would like to partition a directed graph into subgraphs that all contain a simple cycle (if there is a solution for the given graph).

I know there are algorithms to compute the strongly connected components of a directed graph, like Kosaraju's algorithm for example. I'm looking for something similar, but a strongly connected component does not necessarily contain a simple cycle.

Can someone point me to the algorithm I'm looking for?

• So, if you have a 4-node directed graph $G$ such as a triangle (that is a cycle) with one of the vertices connected to a the fourth node, a degree-1 node by an edge, you would want to leave the graph $G$ as is? i.e, you want each sub-graph to mandatorily have a cycle, if such a partition exists. – vvg Oct 23 '20 at 18:02