开发者

What is a fast algorithm for finding critical nodes?

开发者 https://www.devze.com 2023-01-15 06:14 出处:网络
I\'m looking for a quick method/algorithm for finding which nodes in a graph is critical. For example, in this graph:

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

For example, in this graph:

What is a fast algorithm for finding critical nodes?

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?


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.


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?

0

精彩评论

暂无评论...
验证码 换一张
取 消