Professional Documents
Culture Documents
08 Networks + Short Route + Spanning (20211203)
08 Networks + Short Route + Spanning (20211203)
Networks
2 13
Network is a collection of nodes
5 (vertices) & arcs (edges).
6 5
7 1 Characteristics…
16 6
1) Direction (with or without)
2) Weight
4 • Cost (unit cost of travel)
• Time
Useful in representing various systems, such • Distance
as distribution systems, production
systems, and transportation systems.
5
7-5
Applications
6
The Shortest Route Problem
Definition and Example Problem Data (1 of 2)
Problem: Determine the shortest routes (shortest travel time) from the origin to all
destinations.
5
4 6
2
3
1
The Shortest Route Problem
Definition and Example Problem Data (2 of 2)
Network Representation
The Shortest Route Problem
Solution Approach (1 of 8)
Select origin. Put the origin in permanent set. Determine all nodes directly connected
to the permanent set. Determine the initial shortest route from the origin (node
1) to the closest node. Mark the node with the shortest time from origin. Mark
the branch as well.
18
What is a Spanning Tree ?
Consider the following
Graph G 4 vertices Spanning Tree
4 edges
Connected n vertices
5
2 Edges are having some weight n-1 edges
6 Form a cycle
1 2
A graph can have… 5
3 6
n vertices
7 >=n edges 1
1
4 Connected & form a cycle 3
7
2 4 Sum of arc
Consider a subgraph G’ of G 5 lengths = 18
2 1
5
2
5
7
1
3 4 1
3
Tree Tree 7
<=n vertices <=n vertices 1
4 Sum of arc
<= n-1 edges <= n-1 edges
lengths = 13
Not connected Connected
19
Does not form cycle Does not form cycle
Minimal Spanning Tree Problem
• A tree is a subnetwork of a network that does not form a
cycle.
21
Network for Oil Pipeline Problem
22
Arbitrarily begin at any node and connect it to the closest node (shortest distance).
The two nodes are referred to as connected nodes, and the remaining nodes are
referred to as unconnected nodes.
23
Identify the unconnected node that is closest to one of the connected nodes (break ties
arbitrarily). Add this new node to the set of connected nodes. Repeat this step until all nodes
have been connected.
24
Repeat previous step until all nodes have been connected.
25
The length of pipe that will be needed for this system can be found by summing
the arc lengths:
Arcs:
0-1, 0-7, 2-8, 7-6, 2-5, 6-5, 2-3, 3-4
MST length=
4+8+4+2+1+7+2+9
= 37
Another solution:
Arcs
0-1, 1-2, 2-8, 7-6, 2-5, 6-5, 2-3, 3-4
Backup