Escolar Documentos
Profissional Documentos
Cultura Documentos
Network Representation
Dr. Lauren Gardner
Main Texts
(B) Bell, M.G.H., and Iida, Y. Transportation Network Analysis Wiley,
1997
(A) Ahuja, R.K., Magnanti, T.L., and Orlin, J.B., Network Flows: Theory,
Algorithms, and Applications, Prentice Hall, N.J. 1993.
http://web.mit.edu/sheffi/www/urbanTransportation.html
Network Notation, Formulation & Network Representation
(S) Chapter 1, (A) 2.1-2.2
Complexity
(A) 3.3
Terminology Preview
Node Node
Link
A
1 G
3 3 E
C
2 6
F
Less Simple Network
Example Network Representation
Example Network Representation
Topic: Network Representation
Incidence Matrix table of variables stating the presence or
absence of a relationship between network elements.
10
Node-Link Incidence Matrix
Node-Link Incidence Matrix (n x m):
One row per node,
One column per arc.
A column representing arc (i,j) has -1 in the row for node i and +1
in the row for node j
Node-Link Incidence Matrix
(cij ,uij)
i j
(15,40)
(25,30)
2 4
(15,30)
1 (45,10)
(35,50) (45,60)
(35,50)
3 5
(25,20)
(1,2) (1,3) (2,4) (3,2) (4,3) (4,5) (5,3) (5,4)
1
2
3
4
5
Node-Link Incidence Matrix
(cij ,uij)
i j
1.How much space is required in the worst-case?
(15,40)
2.How many non-zeros will exist?
2 4 3.How many steps are required to find all outgoing
(25,30)
(15,30) arcs, that is the set A(i), from node i ?
4.How would we store the data (e.g. link
1 (45,10)
(35,50) (45,60) cost/capacity)?
(35,50)
3 5
(25,20)
(1,2) (1,3) (2,4) (3,2) (4,3) (4,5) (5,3) (5,4)
1 -1 -1 0 0 0 0 0 0
2 1 0 -1 1 0 0 0 0
3 0 1 0 -1 1 0 1 0
4 0 0 1 0 -1 -1 0 1
5 0 0 0 0 0 1 -1 -1
Node-Node Adjacency Matrix
Node-Node Adjacency Matrix (n x n):
Row (i) and col (j) for each node
Matrix entry, eij = 1, if (i,j) A, 0 otherwise.
14
Node-Node Incidence Matrix
(cij ,uij)
i j
(15,40)
(25,30)
2 4
(15,30)
1 (45,10)
(35,50) (45,60)
(35,50)
3 5
(25,20) 1 2 3 4 5
1
2
3
4
5
Node-Node Incidence Matrix
(cij ,uij)
i j
1.How much space is required in the worst case?
(15,40) 2.How many non-zeros will exist?
(25,30)
2 4 3.How many steps are required to find all outgoing
(15,30) arcs, that is the set A(i), from node i ?
1 (45,10)
(35,50) (45,60)
(35,50)
3 5
(25,20) 1 2 3 4 5
1 0 1 1 0 0
2 0 0 0 1 0
3 0 1 0 0 0
4 0 0 1 0 1
5 0 0 1 1 0
Adjacency List
Arc Adjacency List:
Defined as the set of arcs emanating from node i,
A(i) ={(i,j) A: jN}
|A(i)| = out-degree of node i
sum |A(i)| over all i= ?
Store as linked list (collection of cells containing one or more fields each)
Adjacency List
(cij ,uij)
i j
(15,40)
(25,30)
2 4 i j cij uij
(15,30)
1 (45,10)
(35,50) (45,60) 1 2 25 30 3 35 50 0
(35,50)
3 5 2 4 15 40 0
(25,20)
3 2 45 10 0
4 3 15 30 5 45 60 0
5 3 25 20 4 35 50 0
Forward Star Representation
A type of Adjacency List (list of outgoing arcs for node i ) defined by two arrays
(can use linked-lists if preferred)
2. Order arcs emanating from the same node by their terminating node
1. Start list with links emanating from node 1, then those from node 2, etc
2. In this ordered list, add arc information such as cost, capacity, etc.
19
Forward Star
(cij ,uij)
i j
(15,40)
(25,30)
2 4
1 1
(15,30)
2 2
1 (45,10)
(35,50) (45,60)
3 3
(35,50)
3 5 4 4
(25,20)
5 5
6 6
8
Forward Star
(cij ,uij)
i j
(15,40)
(25,30)
2 4
1 1 1 1 2 25 30
(15,30)
2 3 2 1 3 35 50
1 (45,10)
(35,50) (45,60)
3 4 3 2 4 15 40
(35,50)
3 5 4 5 4 3 2 45 10
(25,20)
5 7 5 4 3 15 30
6 6 4 5 45 60
7 5 3 25 20
8 5 4 35 50
Efficient storage for determining set of OUTGOING arcs from any given node.
Reverse Star Representation
A type of Adjacency List (list of outgoing arcs for node i ) defined by two arrays
(can use linked-lists if preferred)
22
Reverse Star
(cij ,uij)
i j
45 10 3 2 1 1 1
(15,40)
(25,30)
2 4 25 30 1 2 2 1 2
(15,30) 35 50 1 3 3 3 3
1 (45,10)
(35,50) (45,60) 15 30 4 3 4 6 4
(35,50) 25 20 5 3 5 8 5
3 5
(25,20) 35 50 5 4 6 9 6
15 40 2 4 7
45 60 4 5 8
Efficient storage for determining set of INCOMING arcs from any given node.
Forward/Backward Star cont.
1. How much space is needed?
24
Forward Star
(cij ,uij)
i j
(15,40)
(25,30)
2 4
1 1 1 1 2 25 30
(15,30)
2 3 2 1 3 35 50
1 (45,10)
(35,50) (45,60)
3 4 3 2 4 15 40
(35,50)
3 5 4 5 4 3 2 45 10
(25,20)
5 7 5 4 3 15 30
6 6 4 5 45 60
7 5 3 25 20
8 5 4 35 50
Efficient storage for determining set of OUTGOING arcs from any given node.
Now, Back to Network modelling
Search
Connectivity
Routing
Path travel times
Shortest Path Algorithms
Thank you!