To practice Minimum Spanning Tree. To utilize Minimum Spanning Tree operation
Problem
You are to create and display an undirected graph G = (V, E) with edge weights d(u, v) of your choice. Your graph must contain a minimum of v vertices and e edges entered by users.
Find the minimum spanning tree T on G.
You expect one of the edges of G to disappear at some time in the future, but you dont know which edge it will be, and when the edge does disappear, youll need to find another minimum spanning tree very quickly. For example, the MST represents a communication network for stock traders, and if a link fails, you have to fix it as fast as possible.
Write an efficient code to preprocess T and G to label each edge, e in T with another edge, r of G so that if e disappears, adding r to the tree creates a new minimum spanning tree in the modified graph.
Reviews
There are no reviews yet.