graph theory question

Post here if you don't find any other place for your post. But please, stay on-topic: algorithms, programming or something related to this web site and its services.

Moderator: Board moderators

Post Reply
ntrhieu
New poster
Posts: 21
Joined: Mon Oct 22, 2001 2:00 am

graph theory question

Post by ntrhieu »

what is the best algorithms to find all strongly connected component of a graph ? I only know the trivial one in text book with time O(V * (E+v)) or O(V^3).

Thanks
arnsfelt
New poster
Posts: 44
Joined: Wed Oct 17, 2001 2:00 am
Location: Denmark
Contact:

Post by arnsfelt »

That would be Tarjan's algorithm. It consists of just two depth-first searches, giving a running time of O(n+m)
ntrhieu
New poster
Posts: 21
Joined: Mon Oct 22, 2001 2:00 am

Post by ntrhieu »

thanks, it said O(n) to determine strongly connected components. Looks great :)
Hieu Nguyen
Post Reply

Return to “Other words”