Minimal panning Tree

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 10

OPERATIONS RESEARCH II

NETWORK MODELS: i. The Minimal Spanning Tree Problem

In our last class, we

 Discussed and gave examples of the Transshipment problem


 Discussed the solution technique of the transshipment model
 Solved an example of the transshipment model
 Discussed the characteristics of the assignment problem
 Treated the solution procedure of the assignment problems
 Solved simple assignment problems

In this class, we shall

 Define and characterize a general network


 Discuss the characteristics and solution procedure of the Minimum Spanning Tree
 Treat simple examples of the Minimum Spanning Tree problem

So, at the end of this class, each student will be able to:

 Define the basic structure of a general network


 Fully characterize a Minimum Spanning Tree problem/model
 Explain the procedure for solving the Minimum Spanning problem
 Solve any given Minimum Spanning problem

10.0 The General Network Defined

A good number of operations research situations emanating from engineering problems can be modeled
and solved as network models. These include but are not limited to:

i. Design of an offshore natural gas pipeline network connecting well heads to an inshore
delivery point. The usual objective of the model is to minimize the cost of constructing the
pipeline.
ii. Determination of the shortest route between two locations in an existing network.
iii. Determination of maximum capacity (in tons per year) of slurry pipeline network (e.g. of
coal mines) connecting mines with power plants. For example, slurry pipelines transport
coal by pumping water through the specially designed pipes.
iv. Scheduling of construction projects
v. Determination of the minimum cost flow schedule from oil fields to refineries through a
pipeline network. (Hamdy Taha, 2013)

We have already treated Scheduling of Project activities in our earlier lessons. We shall treat here,

a. The Minimum Spanning Tree Model to solve problems like in (i) above.
b. The shortest Route Model to solve problems like in (ii) above

Page 1 of 10
We shall first define some key General Network terms, especially those we shall come across.

a. A network consists of a set of nodes linked by arcs (or branches). The network can thus be
represented by the notation (N , A ) where N is the number of nodes in the network and A, the number
of arcs. Suppose we have a network consisting of 4 nodes and six arcs as”
411111
N= { 1, 2 , 3 , 4 }
111111
A={{ ( 1 , 2 ) } , (3 ,1 ) , ( 1, 4 ) , ( 2, 3 ) , ( 2 , 4 ) , ( 4 ,3 ) }

311111
211111

A Flow is always associated with a network. Examples of such flow are flow of oil products such as
gasoline in pipe networks and flow of motor vehicles on road networks. The flow in a network is always
limited by the capacity of its arcs, which may be finite or infinite.

Directed or oriented arc is one which allows positive flow in one direction and zero flow in the reverse
direction. A network is called a Directed Network if all its arcs are directed.

In a network, a Path is sequence of distinct arcs which join two nodes through other nodes regardless of
the direction of flow in each arc. An example is the path 1 →2 →3 in the figure above.

A loop or cycle is a path which connects a node back to itself through other nodes. An example is the
path 1 → 4 →3 → 1 in the figure above.

A network is called a Connected Network if every two distinct nodes in the network are linked by at
least one path. The network above is a connected network.

A Tree is a cycle-free connected network of a subset of all the nodes in the network. For example, in the
network above, { { ( 1, 2 ) } , ( 2 ,3 ) } constitutes a tree

411111
111111
111111

311111
311111 211111
211111
A Spanning Tree of the original network
A Tree of the original network Page 2 of 10
A Spanning Tree is a tree (cycle-free connected sub-network) which connects all the nodes of the
network. From the original figure, { { ( 1, 2 ) } , ( 2 ,3 ) , ( 2 , 4 ) } constitutes a Spanning Tree.

Exercise

Draw the network defined by

N= { 1, 2 , 3 , 4 , 5 ,6 }
A=( 1 ,2 ) , ( 1 ,5 ) , ( 2 ,3 ) , ( 2 , 4 ) , ( 3 , 4 ) , ( 3 , 5 ) , ( 4 ,3 ) , ( 4 ,6 ) , ( 5 , 2 ) , (5 ,6 )

i. List five paths in the network


ii. List three cycles or loops in the network
iii. List and draw three trees in the network (if any)
iv. List and draw three spanning trees in the network (if any)

10.2 The Minimal Spanning Tree Algorithm

The minimal spanning tree is a problem of identifying spanning tree with the minimum cost in a network.
Such minimal spanning trees are useful when locating and connecting a series of service points in a
network with minimal total distance such that all nodes in the network are connected.

The Minimal Spanning Tree problem is solved by a simple algorithm.

Let the set of nodes in the network be defined by N= { 1, 2 , .. . , n }

Out these set of nodes, let


C k =the set of nodes connected at any step k of the execution of the algorithm

C k =the set of unconnected nodes at any step k of the execution of the algorithm

The procedure for the execution of the Minimal Spanning Algorithm is as below:

Step 0: Set C 0= ∅∧C 0=N

Step 1: Start with any unconnected node i∈ C 0

Set C 1={ i }.

Thus, update C 1=N− {i }

Set k = k + 1 = 1 + 1 = 2

Page 3 of 10
¿
General Step k: Select a node j ∈ C k−1 (i.e. in the last unconnected set) that yields the shortest arc to a
node in the connected set of nodes C k−1

Link node j permanently to C k−1 i.e. update C k =C k−1+ { j }


¿ ¿

Update C k−1 by removing node j from it. i.e., update C k =C k−1−{ j }


¿ ¿

If C k = ∅ (i.e. empty) which implies,C k =N then STOP

Otherwise, Set k = k + 1 and repeat the General Step k

Example:

The figure below gives the kilometres of feasible links connecting nine offshore natural gas wellheads
with an onshore delivery point. Because oil wellhead 1 is the closest to the shore, it is equipped with
sufficient pumping and storage capacity to pump the output of the remaining eight wellheads to the
delivery point. Determine the minimum pipeline network that links the wellheads to the delivery point.

Delivery Point

5 111111 15
211111
14 911111
4
6 9 20 6
5
511111
10 13
311111
5 811111
20

3
7
15
12 711111
411111
7

611111
Solution

Step 0: N= { 1, 2 , 3 , 4 , 5 ,6 ,7 , 8 , 9 }; C 0= ∅∧C 0=N

Step 1: Select Node 1 ∈C 0= {1 , 2, 3 , 4 ,5 , 6 , 7 , 8 , 9 }. Thus:

C 1= { 1 }.

Thus, update C 1=N− {1 }={ 2 ,3 , 4 ,5 , 6 , 7 , 8 , 9 }

Page 4 of 10
Update Cost, Cost 1=0

Set k = k + 1 = 1 + 1 = 2

Step 2: Select any of nodes 2 , 5 ,9 , 8 , 3. 4 ∈ C1 with minimum connection cost. Node 5 has the least
connection cost of 4 km. So, connect node 5 to Node 1.
111111
Update C 2=C1 + {5 }={ 1 ,5 }
4
Update C 2=C 1−{ 5 }= {2 , 3 , 4 , 6 , 7 , 8 , 9 }
511111
Update Connection Cost, Cost 2=Cost 1 +4=0+4=4 km

Since, C 2 ≠ ∅ , continue

Set k = k + 1 = 2 + 1 = 3

Step 3: Select any of the unconnected nodes that can be connected with any node already connected.
Here, all unconnected nodes are qualified i.e. Nodes 2 , 3 , 4 , 5 ,6 ,7 ,8 , 9. The one with the least cost of
connection is Node 6 with connection cost of 3 km and to be connected to Node 5
111111
Update C 3=C 2+ {6 }= {1 , 5 ,6 }
4
Update C 3=C 2−{ 6 }={ 2 ,3 , 4 ,7 ,8 , 9 }

511111
Update Connection Cost, Cost 3=Cost 2 +3=4 +3=7 km

Since, C 3 ≠ ∅ , continue 3

Set k = k + 1 = 3 + 1 = 4 611111

Step 4: Select any of the unconnected nodes that can be connected with any node already connected.
Here, all unconnected nodes are qualified i.e. Nodes 2 , 3 , 4 , 7 , 8 , 9. The two with the least cost of
connection are Nodes 2 and 7 with connection cost of 5 km. There is a tie. Break ties arbitrarily. So
select either of them. Suppose we select Node 2 to be connected to Node 1 with cost of 5 km,

Update C 4=C 3 + { 2 }= {1 , 5 , 6 ,2 } 5 111111


211111
Update C 4=C 3− {2 }={ 3 , 4 , 7 , 8 , 9 }
4

Update Connection Cost, Cost 4=Cost 3+ 5=7+ 5=12 km 511111


Since, C 4 ≠ ∅ , continue
3
Set k = k + 1 = 4 + 1 = 5
611111

Page 5 of 10
Step 5: Select any of the unconnected nodes that can be connected with any node already connected.
Here, all unconnected nodes are qualified i.e. Nodes 3 , 4 ,7 , 8 , 9. The one with the least cost of
connection is Node 7 with connection cost of 5 km and to be connected to Node 5. 5 111111
211111

4
Update C 5=C 4 + { 7 }={ 1 ,5 , 6 , 2 ,7 }
511111
Update C 5=C 4− {7 }= {3 , 4 , 8 ,9 } 5
3 711111
Update Connection Cost, Cost 5=Cost 4+ 5=12+5=17 km
611111
Since, C 5 ≠ ∅ , continue

Set k = k + 1 = 5 + 1 = 6

Step 6: Select any of the unconnected nodes that can be connected with any node already connected.
Here, all unconnected nodes are qualified i.e. Nodes 3 , 4 ,8 , 9 . The two with the least cost of
connection are Nodes 3 and 9 with connection cost of 6 km. There is a tie. Break ties arbitrarily. So select
either of them. Suppose we select Node 9 to be connected to Node 5 with cost of 6 km.

Update C 6=C 5+ { 9 }= {1 , 5 , 6 ,2 , 7 , 9 } 5 111111


211111
Update C 6=C 5−{ 9 }={ 3 , 4 , 8 }
4
911111
6
Update Connection Cost, Cost 6=Cost 5 +6=17+6=23 km 511111
Since, C 6 ≠ ∅ , continue 5
3
Set k = k + 1 = 6 + 1 = 7 711111
611111

Step 7: Select any of the unconnected nodes that can be connected with any node already connected.
Here, all unconnected nodes are qualified i.e. Nodes 3 , 4 ,8 . Out of these, Node 8 is the best qualified
with a cost of 5 km and to be connected to node 9.
5
Update C 7=C 6+ { 8 }= {1 , 5 , 6 ,2 , 7 , 9 , 8 } 211111 111111

Update C 7=C 6− {8 }={ 3 , 4 } 4


911111
6
Update Connection Cost, Cost 7=Cost 6 +5=23+5=28 km 511111
5
Since, C 7 ≠ ∅ , continue
811111
Set k = k + 1 = 7 + 1 = 8 5
3

711111
Page 6 of 10
611111
Step 8: Select any of the unconnected nodes that can be connected with any node already connected.
Here, all unconnected nodes are qualified i.e. Nodes3 , 4 . Out of these, Node 3 is the best qualified with
a cost of 6 km and to be connected to node 2.

Update C 8=C 7+ { 3 }= {1 , 5 ,6 ,2 , 7 , 9 , 8 ,3 }

Update C 8=C 7− {3 }={ 4 } 5 111111


211111

Update Connection Cost, Cost 8=Cost 7 +6=28+6=34 km 4


6
911111
6
Since, C 8 ≠ ∅ , continue 511111
311111 5
Set k = k + 1 = 8 + 1 = 9
811111
5
3

711111
611111

Step 9: Selectthe only unconnected node –Node 4. From the network the best node to connect it to is
Node 6 with a cost of 7 km.

Update C 9=C 8+ { 4 }= {1 , 5 ,6 , 2 , 7 , 9 , 8 ,3 , 4 }
5 111111
211111
Update C 9=C 8− { 4 }= ∅
4
6
Update Connection Cost, Cost 9=Cost 8 +7=34 +7=41 km 911111
6
511111
Since, C 9=∅ , STOP 311111 5

811111
5
3

411111 7 711111
611111
Example 2:

A Cable Company is in the process of providing cable service to five new housing development areas.
The figure below depicts possible TV linkages among the five areas. The cable kilometres are shown on
each arc. Determine the most economical cable network.

Page 7 of 10
3 kilometres
211111 511111

6 9
1 4

311111
5
10
111111
5
7 8
611111
3
411111

Solution

Step 0: N= { 1, 2 , 3 , 4 , 5 ,6 }; C 0= ∅∧C 0=N

Step 1: Select Node1 ∈C 0= {1 , 2, 3 , 4 ,5 , 6 }. Thus:

Update C 1=C 0+ {1 }. 111


111
Update C 1=N− {1 }={ 2 ,3 , 4 ,5 , 6 }

Update Cost, Cost 1=0

Set k = k + 1 = 1 + 1 = 2

Step 2: Select any of nodes 2 , 3 , 4 , 5 ∈C 1connected to Node 1 with minimum connection cost. Node 2
has the least connection cost of 1 km to Node 1. So, connect node 2 to Node 1.
211111
Update C 2=C1 + {2 }={ 1 ,2 }
1
Update C 2=C 1−{ 2 }= {3 , 4 ,5 , 6 }
111111
Update Connection Cost, Cost 2=Cost 1 +1=0+ 1=1 km

Since, C 2 ≠ ∅ , continue

Set k = k + 1 = 2 + 1 = 3

Step 3: Select any of nodes 3 , 4 ,5 ∈C 1connected to Nodes 1 and 2 with minimum connection cost.
Node 5 has the least connection cost of 3 km to Node 2. So, connect node 5 to Node 2.
3
211111 511111
Update C 3=C 2+ {5 }={ 1 ,2 , 5 }
1
Page 8 of 10
111111
Update C 3=C 2−{ 5 }= {3 , 4 , 6 }

Update Connection Cost, Cost 3=Cost 2 +3=1+ 3=4 km

Since, C 3 ≠ ∅ , continue

Set k = k + 1 = 3 + 1 = 4

Step 4: Select any of nodes 3 , 4 ∈ C1 connected to Nodes 1, 2 and 5 with minimum connection cost.
Node 4 has the least connection cost of 4 km to Node 2. So, connect node 4 to Node 2.

Update C 4=C 3 + { 4 }= {1 , 2 ,5 , 4 } 3
211111 511111
Update C 4=C 3− { 4 }={ 3 , 6 }
1
Update Connection Cost, Cost 4=Cost 3+ 4=4+ 4=8 km 4
111111
Since, C 4 ≠ ∅ , continue

Set k = k + 1 = 4 + 1 = 5 411111

Step 5: Select any of nodes 3 , 6 ∈C 1 connected to Nodes 1, 2, 4 and 5 with minimum connection cost.
Node 6 has the least connection cost of 3 km to Node 4. So, connect node 6 to Node 4.

Update C 5=C 4 + { 6 }={ 1 ,2 , 5 , 4 , 6 } 3


211111 511111
Update C 5=C 4− {6 }= {3 }
1
Update Connection Cost, Cost 5=Cost 5 +3=8+3=11km 4
111111
Since, C 5 ≠ ∅ , continue
3 611111
Set k = k + 1 = 5 + 1 = 6 411111

Step 6:Select the only unconnected node –Node 3. From the network the best nodes to connect it to are
Nodes1 and 4 with a cost of 5 km. each. There is a tie. Break ties arbitrarily. Let us select to connect
Node 3 to Node 4 (there is nothing wrong in choosing it the other way, i.e. connecting Node 3 to Node 1.
The two options lead to same total cost.)

Update C 6=C 5+ { 3 }= {1 , 2 ,5 , 4 ,6 ,3 } 3
211111 511111
Update C 6=C 5−{ 3 } =∅
1
Update Connection Cost, Cost 6=Cost 5 +5=11+5=16 km 4 311111
111111 5
Since, C 6=∅ , STOP
3 611111
411111
Page 9 of 10
Exercise:
In the problem solved above, suppose that the wellheads can be divided into two groups depending on
gas-pressure: a high-pressure group that includes wells 2, 3, 4 and 6, and a low-pressure group that
includes wells 5, 7, 8 and 9. Because of pressure differences, it is not possible to link the well heads from
the two groups. At the same time, both groups must be connected to the delivery point through wellhead
1.
Determine the minimum pipe network that links the wellheads to the delivery point for this situation.

Page 10 of 10

You might also like