I came across this interesting problem of counting number of cycles in a digraph.
For detecting a cycle in graph we can use DFS, but in order to detect number of cycles, DFS wont be of much use, as some edges will be common in some cycles.
I am trying to figure out if spanning tree might be of any help here.
Any thoughts?