算法的说明寻找铰接点或图形的分割点 [英] Explanation of Algorithm for finding articulation points or cut vertices of a graph
问题描述
我已经搜查了网,但没有找到DFS算法的任何解释查找图的所有关节顶点。即使是没有的wiki页面:(
从读书的时候,我得从这里了解基本的事实。 PDF
有一个可变的了,在这实际上是在寻找回来的边缘,寻找最接近和至上节点对根的每个节点。加工边后,它会被发现。
但
我没有得到如何找到这个向下放大器;截至变量在每个节点中的DFS。这是什么变量做什么呢?
请解释算法
感谢
查找吐字顶点是DFS的应用。是的!
在简单地说,
- 在应用DFS在图上。获得DFS树。
- 这是较早的访问是由它和位访问者达到后来这些节点的父的节点。 [当然是:)]
- 如果一个节点的任何一个孩子没有一个路径的任何其父的祖先,这意味着删除此节点将使从图中这个孩子不相交。
- 有一个例外:树的根。如果已经超过一个孩子,那么它就是一个关节点,否则不行。
3点本质上意味着该节点是一个关节点。
现在为孩子此路径的节点的祖先是通过从它或从它的任何的儿童的背缘。
这一切都将在本 PDF 精美的解释P>
I have searched the net and could not find any explanation of dfs algorithm for finding all articulation vertices of a graph. There is no wiki page even :(
From reading around, i got to know basic facts from here. PDF
There is a variable up at each node which is actually looking at back edges and finding closest and upmost node towards root. After processing all edges it would be found.
But
I am not getting how to find this down&Up variable at each node during dfs. What is this variable doing exactly ?
Please explain the algorithm
Thanks
Finding articulation vertices is an application of DFS. Yes !!!
In a nutshell,
- Apply DFS on a graph. Get the DFS tree.
- A node which is visited earlier is "parent" of those nodes which are reached by it and visiter later. [of course :)]
- If any child of a node does not have a path to any of the ancestors of its parent, it means that removing this node would make this child disjoint from the graph.
- There is an exception : ROOT of the tree. If it has got more than one child, then it is an articulation point otherwise not.
Point 3 essentially means that this node is an articulation point.
Now for a child this path to the ancestors of the node would be through a back-edge from it or from any of its children.
All this is explained beautifully in this PDF
这篇关于算法的说明寻找铰接点或图形的分割点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!