Minimum Spanning Trees: Algorithms and Applications, Study notes of Digital Systems Design

The minimum spanning tree (mst) problem, a common issue in communication networks and circuit design. The goal is to connect a set of nodes with minimum total length. The concept of mst, its formal definition, and presents two greedy algorithms (kruskal's and prim's) for computing mst. The text also covers facts about free trees and their relevance to mst.

Typology: Study notes

2011/2012

Uploaded on 11/03/2012

ankitay
ankitay 🇮🇳

4.4

(50)

106 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
8.5 Minimum Spanning Trees
A common problem is communications networks and circuit design is that of connecting together a set of
nodes by a network of total minimum length. The length is the sum of lengths of connecting wires.
Consider, for example, laying cable in a city for cable t.v.
The computational problem is called the minimum spanning tree (MST) problem. Formally, we are given a
connected, undirected graph G=(V, E) Each edge (u,v) has numeric weight of cost. We define the cost
of a spanning tree T to be the sum of the costs of edges in the spanning tree
w(T) =
(u,v) 2T
w(u, v)
A minimum spanning tree is a tree of minimum weight.
Figures 8.42, 8.43 and 8.44 show three spanning trees for the same graph. The first is a spanning tree but is
not a MST; the other two are.
Figure 8.42: A spanning tree Figure 8.43: A minimum Figure 8.44: Another mini-
that is not MST spanning tree mum spanning tree
We will present two greedy algorithms (Kruskal’s and Prim’s) for computing MST. Recal l that a greedy
algorithm is one that builds a solution by repeatedly selecting the cheapest among all options at each
stage. Once the choice is made, it is never undone.
Before presenting the two algorithms, let us review facts about free trees. A free tree is a tree with no
vertex designated as the root vertex. A free tree with n vertices has exactly n- 1 edges. There exists a
unique path between any two vertices of a free tree. Adding any edge to a free tree creates a unique cycle.
Breaking any edge on this cycle restores the free tree. This is illustrated in Figure 8.45. When the edges
(b, e) or (b, d) are added to the free tree, the result is a cycle.
Docsity.com
pf2

Partial preview of the text

Download Minimum Spanning Trees: Algorithms and Applications and more Study notes Digital Systems Design in PDF only on Docsity!

8.5 Minimum Spanning Trees

A common problem is communications networks and circuit design is that of connecting together a set of nodes by a network of total minimum length. The length is the sum of lengths of connecting wires. Consider, for example, laying cable in a city for cable t.v.

The computational problem is called the minimum spanning tree (MST) problem. Formally, we are given a connected, undirected graph G= ( V, E) Each edge (u,v) has numeric weight of cost. We define the cost of a spanning tree T to be the sum of the costs of edges in the spanning tree

w(T) = (u,v) 2T

w(u, v) ∈

A minimum spanning tree is a tree of minimum weight.

Figures 8.42, 8.43 and 8.44 show three spanning trees for the same graph. The first is a spanning tree but is not a MST; the other two are.

Figure 8.42: A spanning tree Figure 8.43: A minimum Figure 8.44: Another mini- that is not MST spanning tree mum spanning tree We will present two greedy algorithms (Kruskal’s and Prim’s) for computing MST. Recal l that a greedy algorithm is one that builds a solution by repeatedly selecting the cheapest among all options at each stage. Once the choice is made, it is never undone.

Before presenting the two algorithms, let us review facts about free trees. A free tree is a tree with no vertex designated as the root vertex. A free tree with n vertices has exactly n- 1 edges. There exists a unique path between any two vertices of a free tree. Adding any edge to a free tree creates a unique cycle. Breaking any edge on this cycle restores the free tree. This is illustrated in Figure 8.45. When the edges (b, e) or (b, d) are added to the free tree, the result is a cycle.

Docsity.com

Figure 8.45: Free tree facts

8.5.1 Computing MST: Generic Approach

Let G= ( V, E) be an undirected, connected graph whose edges have numeric weights. The intuition behind greedy MST algorithm is simple: we maintain a subset of edges E of the graph. Call this subset A. Initially, A is empty. We will add edges one at a time until A equals the MST. A subset A ⊆ E is viable if A is a subset of edges of some MST. An edge (u, v) ∈ E- A is safe if A [ {(u, v)} is viable. In other words, the choice (u, v) is a safe choice to add so that A can still be extended to form a MST.

Note that if A is viable, it cannot contain a cycle. A generic greedy algorithm operates by repeatedly adding any safe edge to the current spanning tree.

When is an edge safe? Consider the theoretical issues behind determining whether an edge is safe or not. Let S be a subset of vertices S ⊆ V. A cut (S, V- S) is just a partition of vertices into two disjoint subsets. An edge (u, v) crosses the cut if one endpoint is in S and the other is in V-S.

Given a subset of edges A, a cut respects A if no edge in A crosses the cut. It is not hard to see why respecting cuts are important to this problem. If we have computed a partial MST and we wish to know which edges can be added that do not induce a cycle in the current MST, any edge that crosses a respecting cut is a possible candidate.

Docsity.com