Reputation: 197
We know the original graph and the original MST. Now we change k edge weights in the graph. Is there any way we can generate the new MST from the old graph in O((n + k) log n) time?
Upvotes: 1
Views: 183
Reputation: 3134
G
.G
.MST can be solved in O(mlogn)
time where m
is the number of edges and n
is the number of vertices in the graph.
Since G
has O(n + k)
edges, you can find the new MST in O((n+k)logn)
time.
Upvotes: 1