### freaky_ashish's blog

By freaky_ashish, history, 6 weeks ago,

Actually i need some solutions on... 1.How to print the cycles in a graph. 2.How to print different cycles with given no. of edges (the cycle must have that no. of edge).

• 0

 » 6 weeks ago, # | ← Rev. 3 →   0 I don't think 2 can be done easily. Set no. of edges to |V| and you have an NP hard problem. Of course, if your problem has special constraints, it might still be possible to work out a reasonable solution.With the above, we can also say that 1 cannot be done easily.Of course, if you don't care about runtime, you can just use backtracking to achieve your goal.
•  » » 5 weeks ago, # ^ |   0 can you provide solution or link for that ... it will help me to understand
 » 6 weeks ago, # |   0 cycles can also be found using DSU maybe there is a workaround for the same. I am not sure.
•  » » 5 weeks ago, # ^ |   0 Can you please post link or solution ... so that i can understand better
•  » » » 5 weeks ago, # ^ |   0