views:

130

answers:

2

I'm looking for a quick method/algorithm for finding which nodes in a graph is critical.

For example, in this graph: alt text

Node number 2 and 5 are critical.

My current method is to try removing one non-endpoint node from the graph at a time and then check if the entire network can be reached from all other nodes. This method is obvious not very efficient.

What are a better way?

+1  A: 

there are several better ways. research is always helpful

but since this is homework, the point of the exercise is likely to be to figure it out yourself

hint: how could you decorate the graph to tell you what nodes depend on what other nodes, and would this information perhaps be useful to spot the critical nodes?

Steven A. Lowe
+3  A: 

See biconnected components. Calling them articulation points instead of critical nodes seems to yield better search results.

In any case, the algorithm consists of a simple depth first search where you maintain certain information for each node.

IVlad
Thank you very much, articulation points did indeed give better results and I found some very useful links to depth first search.
monoceres