What is a minimal generating tree?

Asked

Viewed 8,180 times

17

I have an exercise to solve and the teacher told me that I would just use this method to solve. What is a minimal generating tree and how can I use it in practice?

  • 7

    http://www.lcad.icmc.usp.br/~Nonato/ED/Grafos/node81.html

1 answer

21


One generating tree in a graph you already know, even without knowing!

Think of this graph here (which turned ugly, but for something automated until it’s ok :P)

grafo

A generating tree is simply a set of edges of the graph that generates a tree.

Every tree is an acyclic connected graph. But it is easier to imagine the same graph with at least one edge coming in and at most one (ie not necessarily one) edge coming out of each vertex.

For example, a generating tree in the above graph may be this:

st

The two classical algorithms in graphs, the deep-sea search and the search in width, induce generating trees in the graph. So you already knew them!

The heaviness of this tree is the sum of the values associated with its edges, in this case:

5 + 8 + 4 + 7 + 3 = 27

A generating tree is called minimal if, among all the generating trees that exist in the graph, the sum of the weights on its edges is the smallest possible.

In this graph, an MST (from English, minimum Spanning Tree) can be:

mst

The weight of this is:

1 + 3 + 3 + 4 + 8 == 19

Two famous algorithms for finding an MST are the Prim and that of Kruskal.

Just like almost everything legal in graphs, Msts has several applications. You can take a look here (Unfortunately, in English, I did not find a good page in Portuguese).

But as an example of some use, imagine that we have cities that need to be connected by roads (a classic, right?). If we want to build the minimum number of roads that connect all cities and also have the lowest cost. The solution is an MST! Or you can play at doing OBI’s little problem :P.

  • 3

    +1 very good answer :)

  • Why was the E node connected to the C node in the minimum expansion tree (worth 8) and a connection between D and C worth 4 could be made? Thus the total weight would be 15?

Browser other questions tagged

You are not signed in. Login or sign up in order to post.