How to organize MST when one node disappears?

I am doing my research and fixated on the question:

I have a minimal spanning tree (primitive algorithm), now one node in my tree is deleted, I wonder if there is a way in which I can reorganize my tree so that optimality is maintained?

I am looking for a few suggestions here, and I will be grateful for your help.

Thank!

+3
source share
3 answers

. , 2001 , , O (log 4 n), - , - . , , , , :

- , ,

, !

+2

node , . MST, node - . , node , MST . , , - , node . , , , - , - node . 0 ( node) n-1 ( )

+1

MST, : .

If this is not a sheet, now you have two subdirectories. All you have to do is reconnect them to the shortest edge that exists between the two subtrees. The best way to find this edge is probably to use any data structure that you used for the Prim algorithm (or, trivially, in O (n ^ 2), considering all pairs of vertices).

-1
source

All Articles