how to find Connected Component dynamically

前端 未结 1 1265
执笔经年
执笔经年 2021-02-05 12:28

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

相关标签:
1条回答
  • 2021-02-05 12:43

    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.

    0 讨论(0)
提交回复
热议问题