Presentation is loading. Please wait.

Presentation is loading. Please wait.

Graph theory and routing: Background for Network Design

Similar presentations


Presentation on theme: "Graph theory and routing: Background for Network Design"— Presentation transcript:

1 Graph theory and routing: Background for Network Design
ECE 780 Graph theory and routing: Background for Network Design W. D. Grover TRLabs & University of Alberta © Wayne D. Grover

2 Graph terminology / concepts
A graph consists of a finite set of vertices (“nodes”) and a set of edges (“spans”), such that each edge joins a pair of nodes. Nodes are adjacent if they are joined by an edge. Such an edge is incident on the nodes it connects. A graph is simple if it has no parallel edges or self-loops.

3 Graph terminology / concepts
A graph with parallel edges is called a multigraph. A graph in which a number is associated with every edge is called a weighted graph or “capacitated”. An edge is directed if its vertices are an ordered pair. The number of spans incident on a vertex is called the degree of the node.

4 Graph terminology / concepts
A path is a connected edge sequence in which all edges are distinct. If all vertices are also distinct (except possibly the origin and terminus vertices) the path is called simple. If the vertices in a cycle are distinct it is called a simple cycle or circuit. (Note this implies that all edges in the sequence of the walk are also distinct.)

5 Routing and flows in transport networks
Route - ~ geographical path - ~ signal over a route span - ~ transmission systems link - ~ unit bandwidth unit hop Need to be attentive to these terms for precise communication

6 Hamiltonian and Eulerian Cycles
A cycle that connects all of nodes once, is a Hamiltonian cycle. A cycle that traverses all edges once (but may revisit nodes) is an Eulerian cycle.

7 Hamiltonian Cycles the question: “does graph G contain a Hamiltonian cycle?” is an NP-complete decision problem. Hamiltonians are more likely in highly connected networks. any graph of N nodes where every node has degree > N/2 is Hamiltonian Q. What would be the significance for network design?

8 Eulerian Cycles An Eulerian cycle exists if (and requires that) every node have even degree One point of significance for transport network design is that an Eulerian network can have all its edges covered by rings, while avoiding duplicate overlapping rings on any spans. Degree 4 node overlap Degree 3 node

9 Isomorphism and Homeomorphism
Graphs G and H are isomorphic if a 1:1 correspondence can be constructed between nodes in G and H for which: if there is an edge between two nodes in G then there is also an edge between the corresponding nodes in H. (i.e., topological equivalence ) Graphs G and H are homeomorphic if they can be isomorphic only by adding or deleting degree-2 nodes from edges. relevance to mesh network design and ring-mesh hybrids.

10 Homeomorphism

11 Planarity

12 Planarity - “Euler’s Formula”
A connected planar graph divides the plane into non-overlapping faces, some bounded (i.e., those interior to the graph) and some unbounded (at an outside edge of the graph), the number of faces |F| is related to the number of nodes |V| and edges |E| of any planar graph: |F| = |E| - |V| + 2 |E| = 9 |V| = 5  |F| = 6

13 Trees, spanning trees A graph G A tree on G A spanning tree on G
Q. Significance to data communications ? to survivability ?

14 Two-connected and bi-connected graphs
Two-connected (has a “bridge” node) or “articulation point” This graph that is not connected

15 Data structures for representing graphs
node Incidence matrix Adjacency list: Q. Directed vs. Undirected graphs? Contains a “1” where edge exists “0” otherwise node node node distance (etc.) e.g. “snif” file format List contains entries only for edges that exist

16 Distinct and disjoint routes
“disjoint” = fully disjoint (nodes and spans) “distinct” = just different in at least one detail “span disjoint” = may have common nodes

17 Shortest path algorithm, all distinct routes, ksp, max-flow
W. D. Grover TRLabs & University of Alberta © Wayne D. Grover

18 Dijkstra’s “shortest path” algorithm
(for non-negative edge weights only) Key concepts: “labelling”, “scanning” Label = {distance, predecessor}. Labels are initially “temporary” later “permanent” . “Scanning” is the process of looking out from a given node to all adjacent nodes that are not permanently labelled and is shorter. Example: find shortest A-H route if the edge weights represent distance

19 Dijkstra’s “shortest path” algorithm (2)
Start: [P] a vector of permanently labelled nodes, [D] a vector of distances - [P] <- [A] - All other nodes are unlabelled - [D] <- all infinite - source is already perm. labelled 2, A Step 1: “Scan” from node A: nodes B, C, D get temp labels node B gets perm label: [P] = [A, B] [D] = [-, 2] 6, A 7, A

20 Dijkstra’s “shortest path” algorithm (3)
Step 2: “Scan” from node B: scan goes only to other nodes not yet perm labelled node E gets {9, from B} node F gets {17, from B} node C gets its label updated: {5, from B} node C is lowest global distance so it gets the permanent label this time [P] = [A, B, C] [D] = [-, 2, 5] 2+ 7 = 9, from B 2, A 6, A 17, B 5, B 7, A

21 Dijkstra’s “shortest path” algorithm (4)
Step 3: “Scan” from node C: node G gets {8, from C} node D keeps {7, from A} node D is lowest global distance amongst temp labels so it gets the permanent label this time [P] = [A, B, C, D] [D] = [-, 2, 5, 7] 9, B 2, A 17, B 5, B 8, C 7, A

22 Dijkstra’s “shortest path” algorithm (5)
Step 4: “Scan” from node D: node F gets updated label {16, from D} node G keeps {8, from C} node G is lowest global distance amongst temp labels so it gets the permanent label this time [P] = [A, B, C, D, G] [D] = [-, 2, 5, 7, 8] 9, B 2, A 16, D 5, B 8, C 7, A

23 Dijkstra’s “shortest path” algorithm (6)
Step 5: “Scan” from node G: node H gets label {14, from G} Since H is also target tempting to stop, but not yet. Node E (not just scanned) gets next perm. Label. [P] = [A, B, C, D, G, E] [D] = [-, 2, 5, 7, 8, 9] 9, B 2, A 16, D 5, B 14, G 8, C 7, A

24 Dijkstra’s “shortest path” algorithm (7)
Step 6: “Scan” from node E: node H keeps label {14, from G} node H label permanent now [P] = [A, B, C, D, G, E, H] [D] = [-, 2, 5, 7, 8, 9, 14] hence: A-H shortest route is of distance 14, via: H -> G -> C -> B -> A 2, A 9, B 16, D 5, B If we continue, however, we will get the complete tree of shortest routes from A to all other nodes... 14, G 8, C 7, A

25 Dijkstra’s “shortest path” algorithm (8)
Finally all nodes have permanent labels... the complete tree of shortest routes from A to all other nodes has been found... Step 7: only node F is not permanently labelled: scan from H Node F label {16, from D} is made permanent [P] = [A, B, C, D, G, E, H, F] [D] = [-, 2, 5, 7, 8, 9, 14, 16] 9, B 2, A 16, D 5, B 14, G 8, C 7, A

26 Dijkstra’s “shortest path” algorithm (9)
Recap: start at source (first perm label): scan from latest perm label, update temp labels find lowest temp label make perm loop till: target is perm. label (path only) all nodes perm (whole tree) Things to remember: (1) Only stop when target node is permanently labelled. (2) The next node to scan from may not be one just visited in the last scan. At the end, the [D], [P] vectors (plus labels) encode the shortest path tree:

27 “k-shortest paths (ksp)”
One model of “mesh” restoration re-routing is ksp: In this context it means: the set of all paths on the shortest route, plus all paths feasible on the second-shortest route, not using any links of the first set, plus all paths feasible on the third-shortest route, not using any links of the first or second set, etc. until restoration is satisfied or no more paths are feasible. No route or path is looping. The sum of all paths on routes that cross any one span is consistent with the spare capacity available on that span.

28 “k-shortest paths (ksp)” - example
On the network we just used for Dijkstras algorithm Note (!) : We now interpret the same edge weights as capacities (just for an example) Using hop count as distance, A C G H is one shortest (3 hop) routes It supports min (6, 3, 6) = 3 paths This exhausts (C-G) and reduces capacity on (A C) (G H) to 3

29 “k-shortest paths (ksp)” - example (2)
The updated graph and next route is ... Next 3 hop route is A D F H It supports min (7, 9, 9) = 7 paths It exhausts span (A-D) and reduces capacity on spans (D F) and (F H) to 2 .. 3 3

30 “k-shortest paths (ksp)” - example (3)
The updated graph and next route is ... Next shortest route is A B E H It supports min (2, 7, 7) = 2 paths It exhausts span (A-B) and reduces capacity on spans (B E) and (E H) to 5 .. 2 3 3 2

31 “k-shortest paths (ksp)” - example (4)
The updated graph and next route is ... 5 Next shortest route is A C D G H It supports 3 paths It exhausts spans (A-C) (G-H) and.. Disconnects the graph between A-H 5 2 3 3 2

32 “k-shortest paths (ksp)” - example (5)
The resulting “ksp” path-set is ... route A-C-G-H A-D-F-H A-B-E-H A-C-D-G-H Total: paths 3 7 2 ______ 15

33 “k-shortest paths (ksp)” - example (6)
Note that when the distances are integer (hop counts here), the ksp outcome is not unique and can depend on order of choosing routes route A-D-G-H A-C-G-H A-D-F-H A-C-B-F-H A-C-D-F-H A-B-F-H Total: paths 4 2 3 1 _____ 15 Another valid “ksp” solution

34 “k-shortest paths (ksp)” - example (7)
Note that the last two path-sets differ greatly in detailed construction, but the number of paths is the same - Q. what governs this ? Note that both prior solutions both disconnect the graph by exhausting all capacity on spans (A B) (A C) (A D) .... In fact both ksp solutions are equivalent to the maximum-flow between A-H for this graph. Moreover, the max-flow, is set (to 15) by the min-cut shown

35 Maximum flow algorithm
“Reverse direction arc of same capacity as used, is like reserving an option to reverse this decision later. At termination, network is disconnected in forward flows, across min cut here

36 Min-cut max-flow theorem
A cut of a graph G(V,E) is a partitioning of the nodes of the graph into two disjoint sets A cutset is the set of edges The capacity of a cut is the sum of the weights on the edges of the cutset. The min-cut max-flow theorem is that : or... More intuitively: “regardless of the routing details, the maximum flow between two nodes is set by the minimum capacity of any cut of the between those two nodes” or…“some combination of spans in parallel will always act as the bottleneck”

37 Illustration of the “max-flow = min-cut” concept
6 B C 20 6 6 A F 6 20 8 D E 26 32 20 26 12 the “min-cut” = 12 Hence --> no routing solution can provide more than 12 units of flow between A -F (i.e., this is the “max-flow”)

38 Q. When are ksp and max-flow not equivalent?
A. The vast majority (> 99.9%) of the time they are identical in transport network graphs having 2 < d < ~ (Dunn, Grover, IEEE JSAC 1994) Where they differ it is always due to an instance of the “trap topology”:

39 Example of how the max flow algorithm avoids the trap

40 “All distinct routes” The set (or subsets of) of “all distinct routes” is often required in mesh network capacity design formulations. - very different from set of disjoint or ksp routes: |route-set| = O(2 dH) intuitive illustration :

41 Generating “all distinct routes” by depth-first search
1 2 5 3 4 6 7 8 9 10 11 17 12 13 14 15 16 18 (own parent) route ABEH discov- ered route ABFH depth limit etc. Example of first phase of DFS to find all distinct routes from A - H subject to hop-limit of 3

42 General DFS procedure DFS (current_node):
Go down any unmarked edge (pushes current node) check for desired goal, or depth limit (done_branch=true) If (done_branch: mark edge, go back up (pops current node) if all down edges current node, done_node=true else DFS(current_node) If done_node then If current node = root, then done else unmark all down-going branches pop current node and mark the returning edge DFS (current node)


Download ppt "Graph theory and routing: Background for Network Design"

Similar presentations


Ads by Google