NETWORK MODELS
By:
Ankur Yadav - 06 Kanika Sachdeva - 16 Poorva Mishra - 26 Shivam Awasthi - 36 Shruti Sanklecha - 46 Vinayak Naik - 56
Introduction
Minimum spanning tree problem Maximum flow problem Shortest route problem All node pairs shortest path Practical Applications
Minimal Spanning Tree
2
3
3 2 5 3
5
5
7
7
2
1
3
2 3 6
Definition: The minimal spanning tree technique determines the path through which network that connects all points while minimizing total distance
Minimal Spanning Tree
Algorithm: o Select any node in the network o Connect this node to the nearest node minimizing the total distance o Select the node out of unconnected nodes which can be connected with minimum distance by adding one edge only o If there is a tie, select arbitrarily o A tie suggests more than one optimal solution o Repeat till all nodes are connected
Minimal Spanning Tree
Example:
300 300 300 500 700
400
200
500
200 300 600 100
200
Minimal Spanning Tree
Example:
Total distance= 200+200+300+ 300+300+100+200 =1500 units
300 200 300
200
200
300
100
Maximal Flow Problem
Maximal Flow Technique Linear Programming
Maximal Flow Technique
The maximal-flow technique allows the
maximum amount of a material that can flow through a network to be determined.
For example:
It has been used to find the maximum
number of automobiles that can flow through a state highway system.
Maximal Flow Technique
Algorithm Select any path
Find the arc on this path with the smallest flow capacity (C)available For each node on this path, decrease the flow capacity in the direction of flow by the amount C.
For each node on this path, increase the flow capacity in the reverse direction by the amount C.
Repeat these steps until an increase in flow is no longer possible.
Road Network
Capacity Adjustment
Add 2
Iteration 1
2 2
1 2
West Point
3
1
Subtract 2
3 20 4
6
East Point East Point
West Point
1
1
New path
New Arrangement
3 0
2
4
6
East Point
New path
West Point
Final Iteration
4 2
0 0 0 2 0 2 0 1
4
4
6
West Point
1 2
East Point
10
4 0 3
3 0
5
Linear Programming
Variable Xij= flow from node i to j Maximize flow = X61
X12<=3 X13<=10 X14<=2 X21<=1 X24<=1 X26<=2 X34<=3 X35<=2 X42<=1 X43<=1 X46<=1 X53<=1 X56<=1 X62<=2 X64<=1 X61=X12+X13+X14 X12+X42+X62=X21+X24+X26 X13+X43+X53=X34+X35 X14+X24+X34+X64=X42+X43+X4 6 X35=X56+X53 X26+X46+X56=X61 Xij=>0 and integer
Shortest Path Algorithm
Shortest
another.
Used
distance from one location to
to minimize total distance from any starting node to a final node
Find
the nearest node to the origin(plant).Put the distance in a box by the node. Find the next nearest node to the origin(plant) and put the distance in a box by the node. Repeat this process till the entire network is scanned. The last distance at the ending node will be the distance of the shortest route.
Steps of the shortest route technique
Plant
200
50
150
40
Warehouse
200
2 4
50
150
40
ALL-NODE-PAIRS SHORTEST PATH
Floyd-Warshall algorithm is useful for finding the shortest path between all pairs of nodes in a network Check if d(i,j)>d(i,k) + d(k,j) ,then the shortest route from i to j is through k Algorithm:
1. 2. 3. Initialize distance and node adjacency matrices. Check distance matrix for shorter paths between nodes,using node 1 as an intermediate [Link] corresponding nodes in adjacency matrix with node 1. Repeat the second step using the other nodes in sequence,as the intermediate node.
ALL-NODE-PAIRS SHORTEST PATH
ALL-NODE-PAIRS SHORTEST PATH
First Iteration
ALL-NODE-PAIRS SHORTEST PATH
Second Iteration
ALL-NODE-PAIRS SHORTEST PATH
Fourth Iteration
ALL-NODE-PAIRS SHORTEST PATH
Eighth Iteration
Practical Applications
Company: Digital equipment corporation Problem: Connect computer systems to LAN using ethernet Ensure effective transport of packets of information Solution: A network model was developed Least cost paths were found using the spanning tree algorithm
Practical Applications
Traffic control system on Hanshin Expressway Objective: Maximize flow of traffic through the network Reduce congestion and bottlenecks caused by accidents Solution: Direct & indirect systems developed to control traffic System was developed using maximal flow technique
Other Applications
Network design in molecular biology Transportation problem Minimize transportation costs Used for deciding warehouse or factory locations Project Management techniques (CPM/PERT) Completion time for a project Determine critical and non critical activities
QUERIES???