30 Jun
2008
30 Jun
'08
8:21 a.m.
I don't know how to help ( Dmitry Abde Ali Kagalwalla wrote:
Hi,
So, basically I want to find the number of cycles in an undirected graph. Now the vertices of the graph are colored red or green. As soon as I locate a cycle, I want to count the number of red and black vertices in the cycle. I want to find all possible cycles and the number of red and black vertices for each cycle.
I was thinking of using BFS but it is ok if I can find the solution using DFS or some other method.
Thanks,
Abde Ali