how to find Connected Component dynamically

大兔子大兔子 提交于 2019-12-20 11:55:13

问题


Using disjoint-set data structure can easily get connected component of Graph. And, it just supports Incremental Connected Components.

However, in my case, removing edge is very common so that I am looking for an algorithm or new structure can maintain Connected Components fully dynamically(including adding and removing edge)

Thanks


回答1:


Poly-logarithmic deterministic fully-dynamic algorithms for connectivity, minimum spanning tree, 2-edge, and biconnectivity (Holm, de Lichtenberg and Thorup 2001) gives an algorithm that allows an arbitrary sequence of edge insertions, deletions and connectivity queries, with updates (insertions and deletions) taking O(log(n)^2) amortised time, and queries taking O(log(n)/log(log(n))) time, with n being the number of vertices in the graph. These time bounds assume that the graph starts with no edges.

I only skimmed the first 2 of its 38 pages, but don't be (too) scared -- the paper describes a bunch of new algorithms on dynamic graphs (that is, graphs that can be efficiently modified over time) of which connectivity is the simplest.



来源:https://stackoverflow.com/questions/7241151/how-to-find-connected-component-dynamically

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!