Question

Problem 5. (15 marks) Given a connected, undirected, weighted graph G- (V, E), define the cost of a spanning tree to be the m

0 0
Add a comment Improve this question Transcribed image text
Answer #1

The cost of a spanning tree to be the maximum weight amount the weights associated with the edges of the spanning tree.
To maximize the cost we need to compute the maximum weight spanning tree of Graph.

Sort the edges of Graph into decreasing order by weight.
Let T be the set of edges comprising the maximum weight spanning tree. Set T = ∅.
Add the first edge to T.
Add the next edge to T if and only if it does not form a cycle in T. If there are no remaining edges exit .
If T has N−1 edges (where V is the number of vertices in Graph) stop .

print weight of edge having maximum weight.This will give maximum cost.

Time complexity of algorithm = O(VlogV)(where V is the number of vertices in Graph)

Add a comment
Know the answer?
Add Answer to:
Problem 5. (15 marks) Given a connected, undirected, weighted graph G- (V, E), define the cost...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Problem 3's picture are given below. 5. (a) Let G = (V, E) be a weighted connected undirected simple graph. For n...

    Problem 3's picture are given below. 5. (a) Let G = (V, E) be a weighted connected undirected simple graph. For n 1, let cycles in G. Modify {e1, e2,.. . ,en} be a subset of edges (from E) that includes no Kruskal's algorithm in order to obtain a spanning tree of G that is minimal among all the spanning trees of G that include the edges e1, e2, . . . , Cn. (b) Apply your algorithm in (a)...

  • Let G = (V, E) be a weighted undirected connected graph that contains a cycle. Let...

    Let G = (V, E) be a weighted undirected connected graph that contains a cycle. Let k ∈ E be the edge with maximum weight among all edges in the cycle. Prove that G has a minimum spanning tree NOT including k.

  • 2. Let G = (V, E) be an undirected connected graph with n vertices and with...

    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...

    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...

  • Let G=(V, E) be a connected graph with a weight w(e) associated with each edge e....

    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...

  • You are given an undirected graph G with weighted edges and a minimum spanning tree T of G.

    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.

    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 G = (V, E, w) be a connected weighted undirected graph. Given a vertex s...

    Let G = (V, E, w) be a connected weighted undirected graph. Given a vertex s ∈ V and a shortest path tree Ts with respect to the source s, design a linear time algorithm for checking whether the shortest path tree Ts is correct or not.(C pseudo)

  • Let G = (V. E) be an undirected, connected graph with weight function w : E → R

    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).

  • Let G = (V, E, W) be a connected weighted graph where each edge e has...

    Let G = (V, E, W) be a connected weighted graph where each edge e has an associated non-negative weight w(e). We call a subset of edges F subset of E unseparating if the graph G' = (V, E\F) is connected. This means that if you remove all of the edges F from the original edge set, this new graph is still connected. For a set of edges E' subset of E the weight of the set is just the...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT