Updating an MST when an edge weight changes. You have a graph G= (V, E) with edge weights given in the graph (whatever they are). In addition, a minimum spanning tree T= (V, E′) of this graph has also been given to you. Now, say we need to increase the weight of one particular edge e. Does the MST change? If so, show how to compute the new MST in linear time. You should consider two cases: 1). when e∈E′and 2). Opposite of case 1): when e does not∈E′
Firstly, a simple definition of Minimum Spanning Tree(MST):
A MST is a subset of the edges E', which forms a tree connecting all the vertices present in the original graph and with the minimum possible total edge weight of all the possibles tree that can be formed by any subset of E. A graph can have multiple MSTs but all will have same total edge weight.
Now, let us consider the two cases(will discuss the case 1 after case 2):
Case 2:
e does not belong to E'
In this case as e already not present in T, therefore increasing its weight will not change T as if e was not included in T even when its weight was lower then there is no chance that T will include it after its weight is increased.
Case 1:
e belongs to E'
In this case there may be a change in T as after increasing the weight of e, there is a possibility of having some other MST whose total edge weight is lower than new total edge weight of T.
There is two approaches to get new MST,
Approach 1: Create new MST from start using Prim's algorithm which will take O( E logV).
Approach 2: (Linear time algorithm)
Thus, the overall time complexity of Approach 2 to obatain a new MST is O(V+E).
Updating an MST when an edge weight changes. You have a graph G= (V, E) with...
Let G=(V, E) be a connected graph with a weight w(e) associated with each edge e. Suppose G has n vertices and m edges. Let E’ be a given subset of the edges of E such that the edges of E’ do not form a cycle. (E’ is given as part of input.) Design an O(mlogn) time algorithm for finding a minimum spanning tree of G induced by E’. Prove that your algorithm indeed runs in O(mlogn) time. A minimum...
Problem 4 Let G = (V. E) be an undirected, connected graph with weight function w : E → R. Furthermore, suppose that E 2 |V and that all edge weights are distinct. Prove that the MST of G is unique (that is, that there is only one minimum spanning tree of G).
Suppose we have a graph G = (V, E) with weights on the edges of E, and we are interested in computing a Minimum Spanning Tree (MST) of G. Suppose we modify the DFS algorithm so that when at a vertex v, we next visit the unvisited neighbor u such that the weight of (u, v) is minimized. Does this produce a MST of G? prove that it does or provide a counter example.
You are given an undirected graph G with weighted edges and a minimum spanning tree T of G. Design an algorithm to update the minimum spanning tree when the weight of a single edge is increased. The input to your algorithm should be the edge e and its new weight: your algorithm should modify T so that it is still a MST. Analyze the running time of your algorithm and prove its correctness.
You are given an undirected graph G with weighted edges and a minimum spanning tree T of G. Design an algorithm to update the minimum spanning tree when the weight of a single edge is decreased. The input to your algorithm should be the edge e and its new weight; your algorithm should modify T so that it is still a MST. Analyze the running time of your algorithm and prove its correctness.
Let (u, v) be a minimum-weight edge in a connected graph G. Show that (u, v) belongs to some minimum spanning tree of G.
MST For an undirected graph G = (V, E) with weights w(e) > 0 for each edge e ∈ E, you are given a MST T. Unfortunately one of the edges e* = (u, z) which is in the MST T is deleted from the graph G (no other edges change). Give an algorithm to build a MST for the new graph. Your algorithm should start from T. Note: G is connected, and G − e* is also connected. Explain...
2. Let G = (V, E) be an undirected connected graph with n vertices and with an edge-weight function w : E → Z. An edge (u, v) ∈ E is sparkling if it is contained in some minimum spanning tree (MST) of G. The computational problem is to return the set of all sparkling edges in E. Describe an efficient algorithm for this computational problem. You do not need to use pseudocode. What is the asymptotic time complexity of...
IN JAVA Given is a weighted undirected graph G = (V, E) with positive weights and a subset of its edges F E. ⊆ E. An F-containing spanning tree of G is a spanning tree that contains all edges from F (there might be other edges as well). Give an algorithm that finds the cost of the minimum-cost F-containing spanning tree of G and runs in time O(m log n) or O(n2). Input: The first line of the text file...
1) Professor Sabatier conjectures the following converse of Theorem 23.1. Let G=(V,E) be a connected, undirected graph with a real-valued weight function w defined on E. Let A be a subset of E that is included in some minimum spanning tree for G, let (S,V−S) be any cut of G that respects A, and let (u,v) be a safe edge for A crossing (S,V−S). Then, (u,v) is a light edge for the cut. Show that the professor's conjecture is incorrect...