Minimal Spanning Tree PDF
Minimal Spanning Tree PDF
11.1 Introduction
Networks are used to model a wide variety of problems. In Chapter 9, we saw the transporta-
tion, transshipment, and assignment problems modeled as networks. Linear programming was
used for solving them, and other techniques were presented as well. In this chapter, the follow-
ing network problems will be presented: the minimal-spanning tree problem, the maximal-flow
Three network models are problem, and the shortest-route problem. Special techniques for solving these will be presented,
covered in this chapter. and when appropriate, a linear programming formulation will be provided. The minimal-
spanning tree technique determines the path through the network that connects all the points
while minimizing total distance. When the points represent houses in a subdivision, the minimal-
spanning tree technique can be used to determine the best way to connect all of the houses to
electrical power, water systems, and so on, in a way that minimizes the total distance or length
of power lines or water pipes. The maximal-flow technique finds the maximum flow of any
quantity or substance through a network. This technique can determine, for example, the maxi-
mum number of vehicles (cars, trucks, and so forth) that can go through a network of roads from
one location to another. Finally, the shortest-route technique can find the shortest path through a
network. For example, this technique can find the shortest route from one city to another through
a network of roads.
All of the examples used to describe the various network techniques in this chapter are
small and simple compared to real problems. This is done to make it easier for you to under-
stand the techniques. In many cases, these smaller network problems can be solved by inspec-
tion or intuition. For larger problems, however, finding a solution can be very difficult and
requires the use of these powerful network techniques. Larger problems may require hundreds,
or even thousands, of iterations. To computerize these techniques, it is necessary to use the sys-
The circles in the networks are tematic approach we present.
called nodes. The lines You will see several types of networks in this chapter. Although they represent many differ-
connecting them are called arcs. ent things, some terminology is common to all of them. The points on the network are referred
to as nodes. Typically these are presented as circles, although sometimes squares or rectangles
are used for the nodes. The lines connecting the nodes are called arcs.
There are four steps for the Steps for the Minimal-Spanning Tree Technique
minimal-spanning tree problem.
1. Select any node in the network.
2. Connect this node to the nearest node that minimizes the total distance.
3. Considering all of the nodes that are now connected, find and connect the nearest node that
is not connected. If there is a tie for the nearest node, select one arbitrarily. A tie suggests
there may be more than one optimal solution.
4. Repeat the third step until all nodes are connected.
11.2 MINIMAL-SPANNING TREE PROBLEM 431
FIGURE 11.1
Network for Lauderdale 3
Construction 2 5
4
3
5
3 7
7
1
2 2
3
3 8
5 1
2 6
6
4
Gulf
Now, we solve the network in Figure 11.1 for Melvin Lauderdale. We start by arbitrarily
selecting node 1. Since the nearest node is the third node at a distance of 2 (200 feet), we con-
Step 1: We select node 1. nect node 1 to node 3. This is shown in Figure 11.2.
Step 2: We connect node 1 to Considering nodes 1 and 3, we look for the next-nearest node. This is node 4, which is the
node 3. closest to node 3. The distance is 2 (200 feet). Again, we connect these nodes (see Figure 11.3,
part (a)).
Step 3: We connect the next We continue, looking for the nearest unconnected node to nodes 1, 3, and 4. This is node 2
nearest node. or node 6, both at a distance of 3 from node 3. We will pick node 2 and connect it to node 3 (see
Figure 11.3, part (b)).
Step 4: We repeat the process. We continue the process. There is another tie for the next iteration with a minimum distance
of 3 (node 2–node 5 and node 3–node 6). You should note that we do not consider node 1–node
2 with a distance of 3 because both nodes 1 and 2 are already connected. We arbitrarily select
FIGURE 11.2
First Iteration for 3
2 5
Lauderdale Construction
4
3
5
3 7
7
1
2 2
3
3 8
5 1
2 6
6
4
Gulf
432 CHAPTER 11 • NETWORK MODELS
3 3
2 5 2 5
4 4
3 3
5 5
3 7 3 7
1 1 7
2 7 2 2 2
3 3
3 8 3 8
5 1 1
2 6 5 2 6
6 6
4 4
3 3
2 5 2 5
4 4
3 3
5 5
3 7 3 7
7 7
1 1
2 2 2 2
3 3
3 8 3 8
5 1 5 1
2 6 2 6
6 6
4 4
node 5 and connect it to node 2 (see Figure 11.4, part (a)). The next nearest node is node 6, and
we connect it to node 3 (see Figure 11.4, part (b)).
At this stage, we have only two unconnected nodes left. Node 8 is the nearest to node 6,
with a distance of 1 and we connect it (see Figure 11.5, part (a)). Then the remaining node 7 is
connected to node 8 (see Figure 11.5, part (b)).
The final solution can be seen in the seventh and final iteration (see Figure 11.5, part (b)).
Nodes 1, 2, 4, and 6 are all connected to node 3. Node 2 is connected to node 5. Node 6 is con-
nected to node 8, and node 8 is connected to node 7. All of the nodes are now connected. The
total distance is found by adding the distances for the arcs used in the spanning tree. In this ex-
ample, the distance is 2 + 2 + 3 + 3 + 3 + 1 + 2 = 16 (or 1,600 feet). This is summarized
in Table 11.1.
This minimal-spanning tree problem can be solved using QM for Windows. Select Networks
for the Module drop-down menu. Then click File—New and select Minimal Spanning Tree as
the type of network. In the screen that appears, enter the number of arcs and click OK. The input
screen will allow you to enter the starting node, ending node, and cost (distance) for each arc.
These are reproduced in the output screen shown in Program 11.1. Notice that multiple optimal
solutions exist, as stated in the output.
11.3 MAXIMAL-FLOW PROBLEM 433
3 3
2 5 2 5
4 4
3 3
5 5
3 7 3 7
7 7
1 1
2 2 2 2
3 3
3 8 3 8
1 5 1
5 2 6 2 6
6 6
4 4
CLOSEST
CONNECTED UNCONNECTED UNCONNECTED ARC ARC TOTAL
STEP NODES NODES NODE SELECTED LENGTH DISTANCE
1 1 2, 3, 4, 5, 6, 7, 8 3 1–3 2 2
2 1, 3 2, 4, 5, 6, 7, 8 4 3–4 2 4
3 1, 3, 4 2, 5, 6, 7, 8 2 or 6 2–3 3 7
4 1, 2, 3, 4 5, 6, 7, 8 5 or 6 2–5 3 10
5 1, 2, 3, 4, 5 6, 7, 8 6 3–6 3 13
6 1, 2, 3, 4, 5, 6 7, 8 8 6–8 1 14
7 1, 2, 3, 4, 5, 6, 8 7 7 7–8 2 16
Maximal-Flow Technique
Waukesha, a small town in Wisconsin, is in the process of developing a road system for the
downtown area. Bill Blackstone, one of the city planners, would like to determine the maximum
number of cars that can flow through the town from west to east. The road network is shown in
Figure 11.6.