How to detect if breaking an edge will make a graph disjoint?
Posted
by the_graph_guy
on Stack Overflow
See other posts from Stack Overflow
or by the_graph_guy
Published on 2010-06-08T03:59:53Z
Indexed on
2010/06/08
4:12 UTC
Read the original article
Hit count: 178
I have a graph that starts off with a single, root node. Nodes are added one by one to the graph. At node creation time, they have to be linked either to the root node, or to another node, by a single edge. Edges can also be created and deleted (one by one, between any two nodes). Nodes can be deleted one at a time. Node and edge creation, deletion operations can happen in any arbitrary order.
OK, so here's my question: When an edge is deleted, is it possible do determine, in constant time (i.e. with an O(1) algorithm), if doing this will divide the graph into two disjoint subgraphs? If it will, then which side of the edge will the root node belong?
I'm willing to maintain, within reasonable limits, any additional data structure that can facilitate the derivation of this information.
Maybe it is not possible to do it in O(1), if so any pointers to literature will be appreciated.
© Stack Overflow or respective owner