Documente Academic
Documente Profesional
Documente Cultură
Spanning Trees
A spanning tree of a graph is any tree that includes every vertex in the
graph. Little more formally, a spanning tree of a graph G is a subgraph of G
that is a tree and contains all the vertices of G. An edge of a spanning tree is
called a branch; an edge in the graph that is not in the spanning tree is called
a chord. We construct spanning tree whenever we want to find a simple,
cheap and yet efficient way to connect a set of terminals (computers, cites,
factories, etc.). Spanning trees are important because of following reasons.
• Spanning trees construct a sparse sub graph that tells a lot about the
original graph.
• Spanning trees a very important in designing efficient routing
algorithms.
• Some hard problems (e.g., Steiner tree problem and traveling
salesman problem) can be solved approximately by using spanning
trees.
• Spanning trees have wide applications in many areas, such as network
design, etc.
Note that each time a step of the algorithm is performed, one edge is
examined. If there is only a finite number of edges in the graph, the
algorithm must halt after a finite number of steps. Thus, the time complexity
of this algorithm is clearly O(n), where n is the number of edges in the
graph.
Some important facts about spanning trees are as follows:
Greediness It is easy to see that this algorithm has the property that
each edge is examined at most once. Algorithms, like this one, which
examine each entity at most once and decide its fate once and for all during
that examination are called greedy algorithms. The obvious advantage of
greedy approach is that we do not have to spend time reexamining entities.
Consider the problem of finding a spanning tree with the smallest possible
weight or the largest possible weight, respectively called a minimum
spanning tree and a maximum spanning tree. It is easy to see that if a graph
possesses a spanning tree, it must have a minimum spanning tree and also a
maximum spanning tree. These spanning trees can be constructed by
performing the spanning tree algorithm (e.g., above mentioned algorithm)
with an appropriate ordering of the edges.
Problem Find a subset T of the edges of G such that all the vertices
remain connected when only the edges T are used, and the sum of the
lengths of the edges in T is as small as possible.
Let G` = (V, T) be the partial graph formed by the vertices of G and the
edges in T. [Note: A connected graph with n vertices must have at least n-1
edges AND more that n-1 edges implies at least one cycle]. So n-1 is the
minimum number of edges in the T. Hence if G` is connected and T has
more that n-1 edges, we can remove at least one of these edges without
disconnecting (choose an edge that is part of cycle). This will decrease the
total length of edges in T.