Prof. Shaik Naseera Department of CSE JNTUACEK, Kalikiri: Graph Traversals & Bi-Connected Components
Prof. Shaik Naseera Department of CSE JNTUACEK, Kalikiri: Graph Traversals & Bi-Connected Components
COMPONENTS
• Two edges are cocyclic if they are equal or if there is a simple cycle that
contains both edges. (Two different ways of getting from one edge to the
other)
This defines an equivalence relation on the edges of the graph
• Assume G is connected
internal vertex u
u
• Let v1, v2,…, vk denote the children of
u
Each is the root of a subtree of DFS
This root is an
articulation
point
How to find articulation points?
• Keep track of all back edges from each subtree?
Too expensive
Define Low[u] or L[u]
• Low[u]: minimum of d[u]
and
{d[w] | where (v,w) is a back edge and v is a
(nonproper) descendent of u.}
Computation of L[u]
• L[u]=min { dfn[u], min{ L[w] | w is a child of u},
min{ dfn[w] | <u,w> is a back
edge} }
Note : L[u] tells the lowest numbered vertex reachable from u other
than its parent.
example
DFS spanning tree
L[1:10] computed by postorder traversal order
• L[10]=4
• L[9]=5
• L[6]=8
• L[8]=min{dfn(8),dfn(5),dfn(2)}
= min{10,7,6}=6
• L[7]= min{dfn(2), L[8],dfn(7)}
= min{6,6,9}=6
• L[5]=min{dfn(5),L(6),L(7)}
= min{7,8,6}=6
• L[2]=min{dfn(2),L(5),dfn(1)}
= min{6,6,1}=1
• L[3]=min{dfn(3),L(10),L(9),L(2)}
= min{3,4,5,1}=1
• L[4]=min{dfn(4),L(3)}
= min{2,1}=1
• L[1]=min{dfn(1),L(4)} L[w]>=dfn[u] then u is articulation point
= min{1,1}=1 u is parent w is child in dfs tree
Computation of L[u]
• L[u]=min { dfn[u], min{ L[w] | w is a child of u},
min{ dfn[w] | <u,w> is a back
edge} }