Question

In: Advanced Math

5. Suppose we are given both an undirected graph G with weighted edges and a minimum...

5. Suppose we are given both an undirected graph G with weighted edges and
a minimum spanning tree T of G .
(a) Describe an algorithm to update the minimum spanning tree when the
weight of a single edge e is decreased.
(b) Describe an algorithm to update the minimum spanning tree when the
weight of a single edge e is increased.
In both cases, the input to your algorithm is the edge e and its new weight;
your algorithms should modify T so that it is still a minimum spanning tree.
[Hint: Consider the cases e ∈ T and e 6∈ T separately.]

Solutions

Expert Solution


Related Solutions

Suppose you are given an undirected, connected, weighted graph G. You want to find the heaviest...
Suppose you are given an undirected, connected, weighted graph G. You want to find the heaviest weight set of edges that you can remove from G so that G is still connected. Propose an optimal greedy algorithm for this problem and prove that it is optimal. (Hint: use matroid theory!).
Given an undirected graph G = (V,E), consisting of n vertices and m edges, with each...
Given an undirected graph G = (V,E), consisting of n vertices and m edges, with each edge labeled from the set {0,1}. Describe and analyze the worst-case time complexity of an efficient algorithm to find any cycle consisting of edges whose labels alternate 0,1.
Given an undirected graph G=(V, E) with weights and a vertex , we ask for a...
Given an undirected graph G=(V, E) with weights and a vertex , we ask for a minimum weight spanning tree in G where is not a leaf (a leaf node has degree one). Can you solve this problem in polynomial time? Please write the proof.
You are given an undirected graph G = ( V, E ) in which the edge...
You are given an undirected graph G = ( V, E ) in which the edge weights are highly restricted. In particular, each edge has a positive integer weight from 1 to W, where W is a constant (independent of the number of edges or vertices). Show that it is possible to compute the single-source shortest paths in such a graph in O(E+V) time.
Consider an undirected graph G that has n distinct vertices. Assume n≥3. How many distinct edges...
Consider an undirected graph G that has n distinct vertices. Assume n≥3. How many distinct edges will there be in any circuit for G that contains all the vertices in G? What is the maximum degree that any vertex in G can have? What is the maximum number of distinct edges G can have? What is the maximum number of distinct edges that G can have if G is disconnected?
Write a complete Java program which takes vertices and edges of an undirected graph from the...
Write a complete Java program which takes vertices and edges of an undirected graph from the input file input.txt (the graph as adjacency matrix) ,(adjacent vertics of every vertex ),(DFS traversal of the graph),(BFS traversal of the graph),(Graph is connected or not connected)
Let G(V, E,w) be a weighted undirected graph, where V is the set of vertices, E...
Let G(V, E,w) be a weighted undirected graph, where V is the set of vertices, E is the set of edges, and w : E → R + is the weight of the edges (R + is the set of real positive numbers). Suppose T(G) is the set of all minimum spanning trees of G and is non-empty. If we know that the weight function w is a injection, i.e., no two edges in G have the same weight, then:...
Using C++: Create a function to search an undirected weighted graph and find the highest weighted...
Using C++: Create a function to search an undirected weighted graph and find the highest weighted edge between two specific values. This should include a class declaration and the definition for all required members that are needed to support the search. NO NEED to code those members. You can assume any other data structures such as stack, heap, or linked list is defined (so you can use their standard functions without declaring or defining them).
Design a linear-time algorithm which, given an undirected graph G and a particular edge e in...
Design a linear-time algorithm which, given an undirected graph G and a particular edge e in it, determines whether G has a cycle containing e. Your algorithm should also return the length (number of edges) of the shortest cycle containing e, if one exists. Just give the algorithm, no proofs are necessary. Hint: you can use BFS to solve this.
Question 1: Given a graph with length l(e) on edges, find a minimum length paths from...
Question 1: Given a graph with length l(e) on edges, find a minimum length paths from a vertex s to V −s so that among all shortest lengths paths from s to V −s we find the ones with minimum number of edges. Use Dijkstra's algorithm
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT