Title: Network Models Minimum spanning tree
1Network ModelsMinimum spanning tree
- Operational Research
- By
- TMJA Cooray
2Network definitionsEssential terms
- Graph
- Nodes
- Arcs (branches)
- Directed networks
- Path
- Loop
- Cycle
- Directed loop (circuit)
- Connected network
- Tree
- Spanning tree
3What is a network?
- A graph in which every edge (or vertex) is
assigned a weight is called a network. - The weight of an edge might represent the time or
cost ,length or capacity depending on the
situation considered. - Networks and directed networks are use in OR to
solve variety of problems ,not only in the areas
of transportation and communication, but also
problems arising in the planning of production
and construction projects.
4Applications
- There are many operational research situations
which can be solved as network models. - Some such examples are
- The design of an off shore natural gas pipe line
network connecting the well heads in the gulf of
Mexico to an inshore delivery point. - (The objective of the model is to minimize the
cost of constructing the pipeline.)
5- 2. The determination of the shortest route
between two cities in an existing network of
roads. - 3. The determination of the maximum capacity (in
tons per year) of a coal slurry pipe line network
joining the coal mines in one city with the power
plants in another city. - 4. The determination of the minimum cost flow
schedule from oil fields to refineries through a
pipe line network.
6- 5. The determination of the time schedule for the
activities of a construction project. - The solutions of these situations and other
similar situations (communication and
transportation and power) can be accomplished
through a variety of network optimization
algorithms. - For situation 1 -- Minimal spanning tree
- For situation 2 -- Shortest route algorithm.
- For situation 3 --Maximal flow algorithm
- For situation 4 Minimum cost capacitated
network algorithm - For situation 5 Critical path algorithm
7- A common practical problem that arises, in the
design of communication and transportation
networks is that of connecting a number of sites
at minimum cost
8Example
- The vertices in the network N represent eight
offshore oil wells. The edges represent
possible connections that can be made between the
wells. The weight on each edge is proportional to
the cost of constructing that link. Design a
network that will connect the wells at minimum
cost
6
f
b
2 2 4 5 3
a
d
h
4 6
3 3 7 3 6
g
c
4 1
e
9- Minimum Spanning Tree
- Prims algorithm is used to find the minimum
spanning tree. - Three different approaches
- Using set notations for disconnected trees and
vertices until all are connected - Using a sketch of the network for disconnected
trees and vertices until all are connected - 3. Using a table of weights of the network as
shown in the next slide.
10Prims algorithm for finding a minimum weight
spanning tree.
- Given a connected network N, we build a sub graph
T of N as follows - 1.(Initialization step) select arbitrarily any
vertex of N and put this vertex into T. - 2.(Recursive step) Scan the edges joining a
vertex of T to a vertex not in T, select one such
edge with minimum weight. Add this edge and its
other end vertex to T . - (Stop condition) Stop when all the vertices of N
are in T.
11- Prims algorithm (set theory approach)
- Iteration 1 Select any vertex arbitrarily (say
a) and put this into the tree T1. Let T1a,
b,c,d,e,f,g,h,E1? - Scan the edges incident with the vertices of T1
,and select the one with minimum weight .the
minimum weight on the edges incident with a is 2
and theres just one edge with weight 2,the edge
ab. - Add the vertex b and the edge ab to the
tree . - Iteration 2. Let T2a,b, c,d,e,f,g,h
- E2 ab and the length is 2
12- Iteration 3. Similarly ,select d, since bd has
the minimum weight Let T3a,b,d
c,e,f,g,h - E3 ab,bd and the length is 224
- Iteration 4. There is more than one edge which
has same weight. Edges ac, dc and dg each have
minimum weight 3. All ties can be decided
arbitrarily . Suppose we select ac. - Let T4a,b,d,c, e,f,g,h
- E4 ab,bd,ac and the length is 437
- It can be E4 ab,bd,dc and the length is
223 or - E4 ab,bd,dg and the length is 223 (hence
the spanning tree will not be unique.
13- Iteration 5. Let T5a,b,d,c,g, e,f,h
- E5 ab, bd, ac,dg and the length is 7310
- Iteration 6. Let T6a,b,d,c,g,e, f,h
- E6 ab, bd, ac,dg,ge and the length is 10111
- Iteration 7. Let T7a,b,d,c,g,e,f h
- E7 ab, bd, ac,dg,ge,df with length is11415
Iteration 8. Let T8a,b,d,c,g,e,f,h ? - E8 ab, bd, ac,dg,ge,df,fh with length is
15318
14Minimum spanning tree
f
b
2
4 3
2
d
h
a
3
g
3
1
c
(e
15Put a into the tree. Highlight column aand
delete row a
new edge is ab. It gives the min distance from a
a b c d e f g
h
a 2 3 4
b 2 2 6
c 3 3 4
d 4 2 3 7 4
3 6
e 4 7
1
f 6 4
5 3
g 3 1
5 6
h 6
3 6
16 Delete row band highlight column b
. new edge is bd.
a b c d e f g
h
b 2 2 6
c 3 3 4
2
d 4 3 7 4
3 6
e 4 7
1
f 6 4
5 3
g 3 1
5 6
h 6
3 6
17 Min distance from the a,b,d is3. . new edge
is dg.
Delete row d and highlight column d
a b c d e f
g h
c 3 3 4
d 4 2 3 7 4
3 6
e 4 7
1
f 6 4
5 3
g 1
5 6
3
h 6
3 6
18 Min distance from the a,b,d ,g is1. . new
edge is ge.
Delete row g and highlight column g
a b c d e f g
h
c 3 3 4
e 4 7
1
f 6 4
5 3
g 1
5 6
3
h 6
3 6
19 Min distance from the a,b,d ,g,e is3. . new
edge is dc.
Delete row e and highlight column e
a b c d e f g
h
c 3 3 4
e 4 7
1
f 6 4
5 3
3
h 6
3 6
20 Min distance from the a,b,d ,g,e is3. . new
edge is dc.
Delete row e and highlight column e
a b c d e f g
h
c 3 3 4
f 6 4
5 3
3
h 6
3 6
21 Min distance from the a,b,d ,g,e,c,f is4. .
new edge is ac or df.
Delete row f and highlight column f
a b c d e f g
h
f 6 4
5 3
h 6
3 6
22 Min distance from the a,b,d ,g,e,c,f,h
is3. . new edge is ac or fh.
Delete row h and highlight column h
a b c d e f g
h
h 6
3 6
23 Min distance from the a,b,d ,g,e,c,f,h
is3. . new edge is ac or fh.
Delete row h and highlight column h
a b c d e f g
h
24(No Transcript)