Show how to find the maximum spanning tree of a graph, that is , the spanning tree of largest total weight.

Short Answer

Expert verified

Finding to display or show maximum spanning tree based on graph, the spanning tree of and getting total weight. To know detail answer below mention information with different kind of approach.

Step by step solution

01

 Algorithms to find Maximum Spanning Tree of a Graph

  1. Arrange the G 's edge with strength in decreasing order. Let T denote the collection of edges that make up the greatest weight spanning tree. T should be set to.
  2. Insert the first edge to T.
  3. Whenever or unless the following edge doesn't really create a cycle in T, add it to T. If no further edges are available, quit and report G as disconnected.
  4. Stop and produce T if T contains n1 edges (where n is the number of vertices in G ). If not, go to step 3. Kruskal’s Minimum spanning tree algorithm is the polar opposite of this approach.
02

Minimum Spanning Tree By Standard Algorithms

Multiply all edge values by -1 and use any of the traditional techniques to get the least spanning tree: Prim's, Kruskal's, etc.

a.)fake When the other edge is of smaller weight, the maximum weight edge can be a component of the Minimum spanning tree, but a cycle forms in the MST as a result. It will not be taken into account in that instance, and the maximum weight edge will indeed be inserted towards the Minimum spanning tree. A graph with only one edge is an example of a counter example.

b.) TRUE. An MST has no cycles, so at least one edge of the cycle e 0 is not in an MST T. If e 0 6=e then we could swap e 0 for e in T and get a lighter spanning tree.

c.) TRUE. The minimal weight edge of a cut equals trivially this same minimum weight edge of the that cut.

d.) TRUE. If indeed the lighter edge seems to be unique, therefore the lightest edge of the any cutting whose separate both endpoints is really the lightest edge of any cut.

e.) TRUE. They could substitute e for e' and then get a shorter MST if there had been a lighter edge e' across some cut of G.

f.) FALSE. Whenever a graph contains two cycles, as well as the shortest edge is now in the left cycle, it is excluded from the MST.

g.) FALSE. If somehow the hardest edge of either a cycle has been on the shortest path as from start s to a node t , Dijkstra's algorithm will employ it.

h.) FALSE. Since the quickest route between two edges may form a cycle in Graph, it is not always a member of any MST.

i.) TRUE. This same smallest edge between both the visiting vertices and indeed the unvisited vertices, which is really the lightest edge of this cut, is always added using Prim's method. Negative weights have no effect.

j.) TRUE. Assume that somehow a graph G has an r-path between node s through node t, but that there is no r-path through s to t in an MST T of G. T thus contains a route connecting s to t with a weighted edge e. Consider the vertices partitioned SVsby subtracting e fom t. Because the r-path connects sandt , one of its vertices e 0 must be along this cut. We can replace e0fore to create a spanning tree that is lighter than T.

Applying Prime's technique, the shortest edge connecting both visiting and unvisited vertices, which really is the smallest edge of the this cut, has always been inserted. Because an MST does not have any cycles, at least one edge of the cycle e0is not present in an MST T.

Unlock Step-by-Step Solutions & Ace Your Exams!

  • Full Textbook Solutions

    Get detailed explanations and key concepts

  • Unlimited Al creation

    Al flashcards, explanations, exams and more...

  • Ads-free access

    To over 500 millions flashcards

  • Money-back guarantee

    We refund you if you fail your exam.

Over 30 million students worldwide already upgrade their learning with Vaia!

One App. One Place for Learning.

All the tools & learning materials you need for study success - in one app.

Get started for free

Most popular questions from this chapter

Suppose you are given a weighted graph G=(V,E) with a distinguished vertex s and where all edge weights are positive and distinct. Is it possible for a tree of shortest paths from s and a minimum spanning tree in G to not share any edges? If so, give an example. If not, give a reason.

Show that for any integer n that is a power of 2 , there is an instance of the set cover problem (Section 5.4) with the following properties:

  1. There are n elements in the base set.
  2. The optimal cover uses just two sets.
  3. The greedy algorithm picks at least log n sets.

Thus the approximation ratio we derived in the chapter is tight.

Ternary A server has customers waiting to be served. The service time required by eachcustomer is known in advance: it is ciminutes for customer i. So if, for example, the customers are served in order of increasing i , then the ithcustomer has to wait Pij=1tjminutes. We wish to minimize the total waiting time.

T=Xni=1(time spent waiting by customer ).

Give an efficient algorithm for computing the optimal order in which to process the customers.

The basic intuition behind Huffman’s algorithm, that frequent blocks should have short encodings and infrequent blocks should have long encodings, is also at work in English, where typical words like I, you, is, and, to, from, and so on are short, and rarely used words like velociraptor are longer.

However, words like fire!, help!, and run! are short not because they are frequent, but perhaps because time is precious in situations where they are used.

To make things theoretical, suppose we have a file composed of m different words, with frequencies f1,...,fm. Suppose also that for the ithword, the cost per bit of encoding is ci. Thus, if we find a prefix-free code where the ithword has a codeword of length Ii, then the total cost of the encoding will be localid="1659078764835" fi·ci·li.

Show how to modify Huffman’s algorithm to find the prefix-free encoding of minimum total cost.

Question:Show how to implement the stingy algorithm for Horn formula satisfiability (Section 5.3) in time that is linear in the length of the formula (the number of occurrences of literals in it). (Hint: Use a directed graph, with one node per variable, to represent the implications.)

See all solutions

Recommended explanations on Computer Science Textbooks

View all explanations

What do you think about this solution?

We value your feedback to improve our textbook solutions.

Study anywhere. Anytime. Across all devices.

Sign-up for free