@above: Any Undirected Graph trivially has a cycle!
Consider any two adjacent vertex A and B, I can go from A to B and then from B to A (since they are connected by an undirected edge). Hence, any Undirected Graph trivially has a cycle. Any contradictory views? please let me know :) Thank you, Vivek.S On 14 June 2010 06:49, Rohit Saraf <[email protected]> wrote: > In any directed graph just check if dfs has a back edge. For > undirected, check if there is a nontree edge > > -- > -------------------------------------------------- > Rohit Saraf > Second Year Undergraduate, > Dept. of Computer Science and Engineering > IIT Bombay > http://www.cse.iitb.ac.in/~rohitfeb14 > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<algogeeks%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
