Starting from:

$25

CSCI203-Lab 9 Solved

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 don’t know which edge it will be, and when the edge does disappear, you’ll 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.

 

More products