You are on page 1of 12

CD S Ch 6-1

SUPPLEMENT TO CHAPTER 6
MINIMUM SPANNING-TREE PROBLEMS

Chapter 6 focuses on network optimization problems. These are problems that can be described in
terms of a complete network that has both nodes and links (or arcs) and the objective is to
optimize the operation of the network.
We now turn our attention to a different kind of problem where the objective is to design
the network. The nodes are given, but we must decide which links to give to the network.
Specifically, each potential link has a cost (different for different links) for inserting it into the
network. We are required to provide enough links to provide a path between every pair of nodes.
The objective is to do this in a way that minimizes the total cost of the links.
Such a problem is referred to as a minimum spanning-tree problem, as illustrated by the
following example.

An Example: The Modern Corp. Problem


Management of the Modern Corporation has decided to have a state-of-the-art fiber-optic network
installed to provide high-speed communications (data, voice, and video) between its major
centers.
The nodes in Figure 1 show the geographical layout of the corporation's major centers
(which include corporate headquarters, a supercomputer facility, and a research park, as well as
production and distribution centers). The dashed lines are the potential locations of fiber-optic
cables. (Other cables between pairs of centers also are possible but have been ruled out as
uneconomical.) The number next to each dashed line gives the cost (in millions of dollars) if that
particular cable is chosen as one to be installed.

B
G
2 7
2 5

A C E
5 1
7

1
4 1 3

D F
4

Figure 1 A display of Modern Corp.'s major centers (the nodes), the possible locations for
fiber-optic cables (the dashed lines), and the cost in millions of dollars for those
cables (the numbers).

Any pair of centers does not need to have a cable directly connecting them in order to
take full advantage of the fiber-optic technology for high-speed communications between these
centers. All that is necessary is to have a series of cables that connect the centers.
CD S Ch 6-2

The problem is to determine which cables should be installed to minimize the total cost
of providing high-speed communications between every pair of centers. This is, in fact, a
minimum spanning-tree problem.
The optimal solution for this problem is shown in Figure 2, where the links in this
network correspond to the possible cables in Figure 1 that should be chosen for installation. (Note
that there is indeed a path between every pair of centers.) The resulting cost of this fiber-optic
network is

Total cost = 2 + 2 + 1 + 3 + 1 + 5 = 14 ($14 million).

Any other design of the network that connects every pair of centers would cost at least $1 million
more.

B
G
2 2 5

A C E

1
1 3

D F

Figure 2 The fiber-optic network that provides the optimal solution for Modern's
minimum spanning-tree problem.

What is the reason for the strange name, minimum spanning-tree problem? Here is the
explanation.

In the terminology of network theory, the network in Figure 2 is a tree because it does
not have any paths that begin and end at the same node without backtracking (i.e., no
paths that cycle). It also is a spanning tree because it is a tree that provides a path
between every pair of nodes (so it "spans" all the nodes). Finally, it is a minimum
spanning tree because it minimizes the total cost among all spanning trees.

General Characteristics
Just as for Modern's problem, every minimum spanning-tree problem satisfies the following
assumptions.
CD S Ch 6-3

Assumptions Of A Minimum Spanning-Tree Problem


1. You are given the nodes of a network but not the links. Instead, you are given the
potential links and the positive cost (or a similar measure) for each if it is inserted
into the network.
2. You wish to design the network by inserting enough links to satisfy the requirement
that there be a path between every pair of nodes.
3. The objective is to satisfy this requirement in a way that minimizes the total cost of
doing so.

An optimal solution for this problem always is a spanning tree. Here is an easy way to
recognize a spanning tree.

The number of links in a spanning tree always is one less than the number of nodes.
Furthermore, each node is directly connected by a single link to at least one other node.

See that this description fits the spanning tree in Figure 2, where there are six links and
seven nodes (all directly connected to at least one other node). Remove any one of these links and
assumption 2 above would be violated (no spanning tree). (Check this.) Incur the needless extra
cost of adding another link instead (without removing one) and you again no longer have a
spanning tree. (Check that adding any unused link from Figure 1 into Figure 2 would create a
path that begins and ends at the same node without backtracking, which violates the definition of
a tree.)
Finally, we should point out that, in contrast to transportation, assignment, maximum
flow, and shortest path problems, a minimum spanning tree-problem is not a special type of
minimum cost flow problem. (It is not even a special type of linear programming problem.)
Furthermore, it cannot be solved easily by Solver.
That is the bad news. The good news is that you can solve it very easily by the algorithm
described below without even using a computer.

A Remarkably Simple Algorithm


Starting with no links in the network, each step of the algorithm selects one new link to insert
from the list of potential links. As described below, the algorithm continues in this way until
every node is touched by a link, at which point the selected nodes form a minimum spanning tree.

Algorithm for a Minimum Spanning-Tree Problem


1. Choice of the first link: Select the cheapest potential link.
2. Choice of the next link: Select the cheapest potential link between a node that already
is touched by a link and a node that does not yet have such a link.
3. Repeat step 2 over and over until every node is touched by a link (perhaps more than
one). At that point, an optimal solution (a minimum spanning tree) has been obtained.
[Tie breaking: Ties for the cheapest potential link may be broken arbitrarily without affecting the
optimality of the final solution. However, ties in step 2 signal that there may also be (but need not
be) other optimal solutions that would be obtained by breaking ties in another way.]

Application of the Algorithm to the Modern Corp. Problem


Now let us apply this algorithm to Modern's minimum spanning-tree problem as
displayed in Figure 1.
Among all the potential links (the dashed lines), the one between node C and node D ties
with the one between node E and node F as the cheapest (a cost of 1). Therefore, for step 1, we
CD S Ch 6-4

need to select one of these two potential links to be the first link inserted into the network.
Breaking the tie arbitrarily, let us select the one between node C and node D (the other will be
chosen later), as shown below.

B
G
2 7
2 5

A C E
5 1
7

1
4 1 3

D F
4

Next, we apply step 2 for the first time. The two nodes that are touched by a link are
nodes C and D, so we need to compare the costs of the potential links between either of these
nodes and a node that does not yet have a touching link. These potential links and their costs are

C B : Cost = 2 C F : Cost = 3

C A : Cost = 5 D A : Cost = 4

C E : Cost = 4 D F : Cost = 4

Since the cheapest of these is the one between node C and node B, with a cost of 2, it is selected
to be the next link inserted into the network, as displayed below.
CD S Ch 6-5

B
G
2 7
2 5

A C E
5 1
7

1
4 1 3

D F
4

Now, nodes B, C, and D each are touched by a link (or two links in the case of node C), so the
next execution of step 2 requires comparing the costs of the potential links between one of these
nodes and one of the others.

C A : Cost = 5 D A : Cost = 4

C E : Cost = 4 D F : Cost = 4

C F : Cost = 3 B A : Cost = 2

B E : Cost = 7

The cheapest of these is the potential link between node B and node A, so it becomes the next
link added to the network.
CD S Ch 6-6

B
G
2 7
2 5

A C E
5 1
7

1
4 1 3

D F
4

Nodes A, B, C, and D now all have touching links, so we next compare the costs of the
potential links between one of these nodes and one of the others. (Actually, none of these
potential links involve node A, since it does not have any potential links that go to a node that is
not yet touched by a link.)

C E : Cost = 4 D F : Cost = 4

C F : Cost = 3 B E : Cost = 7

The cheapest is the potential link between node C and node F, so it is added next.

B
G
2 7
2 5

A C E
5 1
7

1
4 1 3

D F
4

All but nodes E and G now are touched by a link. Therefore, the only potential links that
need to be considered next are between either node E or G and one of the other nodes.
CD S Ch 6-7

C E : Cost = 4 F E : Cost = 1

B E : Cost = 7 F G : Cost = 7

The cheapest by far is the potential link between node F and node E, so it finally gets inserted into
the network. (Remember that this potential link was tied to be the initial link in step 1.)

B
G
2 7
2 5

A C E
5 1
7

1
4 1 3

D F
4

Since node G now is the only node untouched by a link, the only potential links to
consider next are those between this node and the others.

F G : Cost = 7 E G : Cost = 5

The cheaper one is the potential link between node E and node G, so we insert it into the network.
CD S Ch 6-8

B
G
2 7
2 5

A C E
5 1
7

1
4 1 3

D F
4

Every node now is touched by a link, so the algorithm is done and this is our optimal
solution. All the links that have been inserted into the network form a minimum spanning tree
with a total cost of 2 + 2 + 1 + 3 + 1 + 5 = 14 ($14 million). All the remaining potential links
(dashed lines) are rejected because the inserted links provide a path between every pair of nodes.
Notice that this optimal solution is the same as the one given in Figure 2. (There is only
one optimal solution for this particular problem.)
What would have happened if the tie had been broken the other way in step 1 by selecting
the potential link between node E and node F to be the initial link inserted into the network
instead of the potential link between node C and node D? Go ahead and check this out by
cranking through the algorithm from this point. You will find that exactly the same links get
selected, but in a different order from before.
This algorithm is referred to as a greedy algorithm because it simply grabs the most
favorable choice (the cheapest potential link) at each step without worrying about the effect of
this choice on subsequent decisions. It is remarkable that such a quick and simple-minded
procedure still is guaranteed to find an optimal solution. Rejoice this time, but beware. Greedy
algorithms normally will not necessarily find optimal solutions for other management science
problems.
CD S Ch 6-9

Some Applications
In this age of the information superhighway, applications similar to the Modern Corp. example
have become increasingly important. However, minimum spanning-tree problems have several
other types of applications as well.
Here is a list of some key types of applications.
1. Design of telecommunication networks (computer networks, leased-line
telephone networks, cable television networks, etc.)
2. Design of a lightly used transportation network to minimize the total cost of
providing the links (rail lines, roads, etc.).
3. Design of a network of high-voltage electrical power transmission lines.
4. Design of a network of wiring on electrical equipment (e.g., a digital computer
system) to minimize the total length of the wire.
5. Design of a network of pipelines to connect a number of locations.

REVIEW QUESTIONS
1. In a minimum spanning tree problem, what part of the network is given and what part
remains to be designed?
2. What kind of network is being designed in the Modern Corp. example?
3. In the terminology of network theory, what is a tree? A spanning tree? A minimum spanning
tree?
4. What is an easy way to recognize a spanning tree?
5. What is the objective of a minimum spanning tree problem?
6. Is a minimum spanning tree problem a special type of minimum cost flow problem?
7. What kind of algorithm will solve a minimum spanning tree problem (but very few other
management science problems)?
8. What are a few types of applications of minimum spanning tree problems?

Glossary
Greedy algorithm: An algorithm that simply grabs the most favorable choice at each step
without worrying about the effect of this choice on subsequent decisions.
Minimum spanning tree: One among all spanning trees that minimizes total cost.
Spanning tree: A tree that provides a path between every pair of nodes.
Tree: A network that does not have any paths that begin and end at the same node without
backtracking.

Problems
6s.1. Reconsider the Modern Corp. problem. When the algorithm for a minimum spanning-tree
problem was applied to this problem, there was a tie at step 1 for choosing the first link. This tie
was broken arbitrarily by selecting the potential link between node C and node D. Now break the
tie the other way by selecting the potential link between node E and node F to be the first link and
then reapply the rest of the algorithm. Show each step. (You again should obtain the minimum
spanning tree shown in Figure 2.)
CD S Ch 6-10

6s.2. Use the greedy algorithm to find a minimum spanning tree for a network with the following
nodes and with the links still to be chosen. The dashed lines between pairs of nodes represent
potential links and the number next to each dashed line represents the cost (in thousands of
dollars) of inserting that link into the network.

6s.3. Use the greedy algorithm to find a minimum spanning tree for a network with the following
nodes and with the links still to be chosen. The dashed lines between pairs of nodes represent
potential nodes and the number next to each dashed line represents the cost (in millions of
dollars) of inserting that link into the network.
CD S Ch 6-11

6s.4 The Wirehouse Lumber Company will soon begin logging eight groves of trees in the same
general area. Therefore, it must develop a system of dirt roads that makes each grove accessible
from every other grove. The distance (in miles) between every pair of groves is as follows:
Distance between Pairs of Groves
Grove 1 2 3 4 5 6 7 8
1 — 1.3 2.1 0.9 0.7 1.8 2.0 1.5
2 1.3 — 0.9 1.8 1.2 2.6 2.3 1.1
3 2.1 0.9 — 2.6 1.7 2.5 1.9 1.0
4 0.9 1.8 2.6 — 0.7 1.6 1.5 0.9
5 0.7 1.2 1.7 0.7 — 0.9 1.1 0.8
6 1.8 2.6 2.5 1.6 0.9 — 0.6 1.0
7 2.0 2.3 1.9 1.5 1.1 0.6 — 0.5
8 1.5 1.1 1.0 0.9 0.8 1.0 0.5 —
Management now wants to determine between which pairs of groves the roads should be
constructed to connect all groves with a minimum total length of road.
a. Describe how this problem fits the network description of a minimum spanning tree
problem.
b. Use the greedy algorithm to solve the problem.
6s.5. The Premiere Bank soon will be hooking up computer terminals at each of its branch offices to
the computer at its main office, using special phone lines with telecommunications devices. The
phone line from a branch office need not be connected directly to the main office. It can be
connected indirectly by being connected to another branch office that is connected (directly or
indirectly) to the main office. The only requirement is that every branch office be connected by
some route to the main office.
The charge for the special phone lines is $100 times the number of miles involved, where the
distance (in miles) between every pair of offices is as follows:
Distance between Pairs of Offices
Main B.1 B.2 B.3 B.4 B.5
Main Office — 190 70 115 270 160
Branch 1 190 — 100 110 215 50
Branch 2 70 100 — 140 120 220
Branch 3 115 110 140 — 175 80
Branch 4 270 215 120 175 — 310
Branch 5 160 50 220 80 310 —

Management wishes to determine which pairs of offices should be directly connected by special
phone lines in order to connect every branch office (directly or indirectly) to the main office at a
minimum total cost.
CD S Ch 6-12

a. Describe how this problem fits the network description of a minimum spanning tree
problem.
b. Use the greedy algorithm to solve the problem. What is the total cost for the special
phone lines?

6s.6. Reconsider Case 6-1. Suppose now that the following scenario arises with this case.
Even before all American troops and supplies had reached Saint Petersburg, Moscow, and
Rostov, infighting among Commander Votachev’s troops about whether to make the next attack
against Saint Petersburg or against Moscow split the revolutionaries. Troops from Moscow easily
overcame the vulnerable revolutionaries. Commander Votachev was imprisoned, and the next
step became rebuilding the seven cities razed by his armies.
The President’s top priority is to help the Russian government to re-establish communications
between the seven Russian cities and Moscow at minimum cost. The price of installing
communication lines between any two Russian cities varies given the cost of shipping wire to the
area, the level of destruction in the area, and the roughness of the terrain. Luckily, a city is able
to communicate with all others if it is connected only indirectly to every other city. Saint
Petersburg and Rostov are already connected to Moscow, so if any of the seven cities is
connected to Saint Petersburg or Rostov, it will also be connected to Moscow. The cost of
replacing communication lines between two given cities for which this is possible is shown
below.

Between Cost to Re-establish Communication Lines


Saint Petersburg and Kazan $210,000
Saint Petersburg and Perm $185,000
Saint Petersburg and Ufa $225,000
Moscow and Ufa $310,000
Moscow and Samara $195,000
Moscow and Orenburg $440,000
Moscow and Saratov $140,000
Rostov and Saratov $200,000
Rostov and Orenburg $120,000
Kazan and Perm $150,000
Kazan and Ufa $105,000
Kazan and Samara $95,000
Perm and Yekaterinburg $85,000
Perm and Ufa $125,000
Yekaterinburg and Ufa $125,000
Ufa and Samara $100,000
Ufa and Orenburg $75,000
Saratov and Samara $100,000
Saratov and Orenburg $95,000

Where should communication lines be installed to minimize the total cost of re-establishing
communications between Moscow and all seven Russian cities?

You might also like