Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Find articulation vertices in undirected graph by BFS

I have a problem at undirected graphs that sounds like this: "Do a breadth-first traversal of the graph and list the articulation points of the graph.". I found only algorithms that use DFS to find articulation vertices. Is there any way to find those vertices with BFS? Thank you.

Update: How about removing each node, and then doing BFS on the remaining graph? if it covers all nodes, then the deleted node was not an articulation point. I know it's inefficient but i think it's ok.

like image 610
okta Avatar asked Dec 06 '25 04:12

okta


1 Answers

Not without doing a bunch of extra work.

The reason is that you can't determine whether a point is an articulation point without looking at its children, children of its children, etc to find which ones connect back to the root vertex in some way. A depth first search does that for you automatically. A breadth first search doesn't.

You could simulate it, but only by doing a breadth-first search and then remembering all of the intermediate state for a depth-first search. Which is a lot of overhead for no real gain.

like image 96
btilly Avatar answered Dec 07 '25 22:12

btilly



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!