Network Analysis
Network Analysis
G = (v, e)
v = (1,2,3,4,5)
e = (1,2), (1,3), (2,5), (4,2), (4,3), (4,5)
Graph Theory
Some Definitions
Root: A root is generally the
starting point of a distribution
system. Node 1 is the only root of
the graph below as every other
node is part of a path originating
from node 1. Root of a Road Network
b 13 f
8 3
2
6 2
h
a 5 d
3 6
2 2
1
1 g
5
c e
Shortest Path Problem
Dijkstra’s Algorithm
V a b c d e f g h
a 0a 8a 2a 5a
8
8
Shortest Path Problem
Dijkstra’s Algorithm
V a b c d e f g h
a 0a 8a 2a 5a
8
8
c 8a 2a 4c 7c 8
8
Shortest Path Problem
Dijkstra’s Algorithm
V a b c d e f g h
a 0a 8a 2a 5a 8
8
c 8a 2a 4c 7c
8
8
d 6d 4c 5d 10d 7d
8
Shortest Path Problem
Dijkstra’s Algorithm
V a b c d e f g h
a 0a 8a 2a 5a 8
8
c 8a 2a 4c 7c
8
8
d 6d 4c 5d 10d 7d
8
e 6d 5d 10d 6e
8
Shortest Path Problem
Dijkstra’s Algorithm
V a b c d e f g h
a 0a 8a 2a 5a 8
8
c 8a 2a 4c 7c
8
8
d 6d 4c 5d 10d 7d
8
e 6d 5d 10d 6e
8
b 6d 10d 6e
8
Shortest Path Problem
Dijkstra’s Algorithm
V a b c d e f g h
a 0a 8a 2a 5a 8
8
c 8a 2a 4c 7c
8
8
d 6d 4c 5d 10d 7d
8
e 6d 5d 10d 6e
8
b 6d 10d 6e
g 8g 6e 8
12g
Shortest Path Problem
Dijkstra’s Algorithm
V a b c d e f g h
a 0a 8a 2a 5a 8
8
c 8a 2a 4c 7c
8
8
d 6d 4c 5d 10d 7d
8
e 6d 5d 10d 6e
8
b 6d 10d 6e
g 8g 6e 8
12g
f 8g 11f
Shortest Path Problem
Dijkstra’s Algorithm
V a b c d e f g h
a 0a 8a 2a 5a 8
8
c 8a 2a 4c 7c
8
8
d 6d 4c 5d 10d 7d
8
e 6d 5d 10d 6e
8
b 6d 10d 6e
g 8g 6e 8
12g
f 8g 11f
h 11f
Shortest Path Problem
Dijkstra’s Algorithm
8
c 8a 2a 4c 7c See the minimum of h is
8
8
11 coming from f then see
d 6d 4c 5d 10d 7d
8
at f min from g then see at
e 6d 5d 10d 6e g min from e then see at e
8
b 6d 10d 6e min from d, then d is from
8
c, then c from a.
g 8g 6e 12g
f 8g 11f
h 11f
Shortest Path Problem
Dijkstra’s Algorithm
b 13 f
8 3
2
6 2
h
a 5 d
3 6
2 2
1
1 g
5
c e
10
Shortest Path Problem
Dijkstra’s Algorithm Reached Table
Set the origin node as reached, Node Cumulative Previous
place it on the reached table, and length Node
scan the adjacent nodes a 0 none
b
Any more No h
nodes to scan?
Scanned Table
Yes Node Cumulative Previous
length Node
Scan nodes adjacent to the node b 8 a
just reached and put them on the
scanned table c 2 a
d 5 a
Trace shortest path between
origin and destination
Shortest Path Problem
Dijkstra’s Algorithm
b 13 f
8 3
2
6 2
h
a 5 d
3 6
2 2
1
1 g
5
c e
10
Class Assignment
Dijkstra’s Algorithm
b 5 d
4 6
1 8 f
a 2
2 3
c 10 e