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

Entropy: Consider a distribution overnpossible outcomes, with probabilities p1,p2,K,pn.

a. Just for this part of the problem, assume that each piis a power of 2 (that is, of the form 1/2k). Suppose a long sequence of msamples is drawn from the distribution and that for all 1in, the ithoutcome occurs exactly times in the sequence. Show that if Huffman encoding is applied to this sequence, the resulting encoding will have length

i-1nmpilog1pi

b. Now consider arbitrary distributions-that is, the probabilities pi are noy restricted to powers of 2. The most commonly used measure of the amount of randomness in the distribution is the entropy.

i-1nmpilog1pi

For what distribution (over outcomes) is the entropy the largest possible? The smallest possible?

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.

Let G=(V,E) be an undirected graph. Prove that if all its edge weights are distinct, then it has a unique minimum spanning tree

Ternary Huffman. Trimedia Disks Inc. has developed “ternary” hard disks. Each cell on a disk can now store values 0,1, or 2(instead of just 0 or 1). To take advantage of this new technology, provide a modified Huffman algorithm for compressing sequences of characters from an alphabet of size n, where the characters occur with known frequencies f1, f2,...., fn. Your algorithm should encode each character with a variable-length codeword over the values 0,1,2, such that no codeword is a prefix of another codeword and so as to obtain the maximum possible compression. Prove that your algorithm is correct

Consider an undirected graph G=(V,E)with nonnegative edge weights role="math" localid="1658915178951" we0. Suppose that you have computed a minimum spanning tree of G, and that you have also computed shortest paths to all nodes from a particular node role="math" localid="1658915296891" sV. Now suppose each edge weight is increased by 1: the new weights are w0e=we+1.

(a) Does the minimum spanning tree change? Give an example where it changes or prove it cannot change.

(b) Do the shortest paths change? Give an example where they change or prove they cannot change.

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