Traffic Assignment
Traffic Assignment
One source node, connects all nodes with To find shortest path between two nodes
the minimum network length. only.
Prim's algorithm and Kruskal's algorithm Djisktra’s algorithm is one of the popular
are popular methods for finding the method for finding the critical (shortest)
minimum spanning tree. path.
Dijkstra's algorithm, named after Dutch computer scientist Edsger W. Dijkstra, is a graph search algorithm that finds
the shortest path between two nodes in a weighted graph. The algorithm is often used in routing and as a
subroutine in other graph algorithms. Dijkstra's algorithm works well for finding the shortest paths in graphs where
all edge weights are non-negative.
1 - - - 0
2 1 0 3 3
3 1 0 4 4
4 1 0 2 2
5 2 3 4 7
6 3 4 5 9
7 4 2 5 7
5 7 5 12
8
3 4 6 10
8 10 6 16
9 6 9 4 13
7 7 3 10
10 8 10 3 13
11 9 10 3 13
12 7 7 7 14
13 10 13 5 18 CRITICAL PATH : 1-4-7-9-11-15
14 12 14 4 18
(TOTAL UNITS – 19)
11 13 6 19
15 13 18 4 22
14 18 5 23
CRITICAL PATH : 1-4-7-9-11-15 DISCONNECTED NODES: 2,3,5,6,8,10,12,13,14
To reach node 2, we can only reach from 1-2
To reach node 3, we can only reach from 1-3
To reach node 5, we can only reach from 2-5
To reach node 6, we can only reach from 3-6
To reach node 8, we need to cover either 5-8 or 3-8. We will follow the shorter branch which is 5-8
To reach node 10, we can only reach from 8-10
To reach node 12, we can only reach from 7-12
To reach node 13, we can only reach from 10-13
To reach node 14, we can only reach from 12-14