decide if a graph contains a triangle

Analysis of algorithms, Algorithms, Data structures. Get help with graph algorithms, search algorithms, string algorithms, sorting algorithms, merge algorithms, compression algorithms, optimization and quantum algorithms on My Computer Forum

Moderators: shynthriir, johnny, SidT

decide if a graph contains a triangle

Postby becko » Thu Jun 17, 2010 12:44 am

Devise an algorithm that will decide if a given graph of n vertices and m edges does or does not contain a triangle (K3), in time O(max{n^2, mn}).

I found this problem in ch.1 of Algorithms and Complexity by H S Wilf. Any ideas are appreciated. Or if you know of some place where an algorithm to do this is explained, tell me. Thanks.
becko
 
Posts: 1
Joined: Thu Jun 17, 2010 12:29 am

Return to Algorithms and Data Structures

Who is online

Registered users: Ask Jeeves [Bot]

cron