Graph theory and routing: Background for Network Design

Slides:



Advertisements
Similar presentations
2012: J Paul GibsonT&MSP: Mathematical FoundationsMAT7003/L2-GraphsAndTrees.1 MAT 7003 : Mathematical Foundations (for Software Engineering) J Paul Gibson,
Advertisements

22C:19 Discrete Math Graphs Fall 2010 Sukumar Ghosh.
22C:19 Discrete Math Graphs Fall 2014 Sukumar Ghosh.
Midwestern State University Department of Computer Science Dr. Ranette Halverson CMPS 2433 – CHAPTER 4 GRAPHS 1.
Copyright © Wayne D. Grover 2000 EE 681 Fall 2000 Lecture 14 Mesh-restorable Network Design (1) Wayne D. Grover, TRLabs / University of Alberta October.
IKI 10100: Data Structures & Algorithms Ruli Manurung (acknowledgments to Denny & Ade Azurat) 1 Fasilkom UI Ruli Manurung (Fasilkom UI)IKI10100: Lecture10.
Graphs Chapter 12. Chapter Objectives  To become familiar with graph terminology and the different types of graphs  To study a Graph ADT and different.
Graphs Chapter 20 Data Structures and Problem Solving with C++: Walls and Mirrors, Carrano and Henry, © 2013.
Management Science 461 Lecture 2b – Shortest Paths September 16, 2008.
C++ Programming: Program Design Including Data Structures, Third Edition Chapter 21: Graphs.
Graphs Chapter 12. Chapter 12: Graphs2 Chapter Objectives To become familiar with graph terminology and the different types of graphs To study a Graph.
Spring 2010CS 2251 Graphs Chapter 10. Spring 2010CS 2252 Chapter Objectives To become familiar with graph terminology and the different types of graphs.
Routing algorithms, all distinct routes, ksp, max-flow, and network flow LPs W. D. Grover TRLabs & University of Alberta © Wayne D. Grover 2002, 2003 E.
Fall 2007CS 2251 Graphs Chapter 12. Fall 2007CS 2252 Chapter Objectives To become familiar with graph terminology and the different types of graphs To.
W. D. Grover TRLabs & University of Alberta © Wayne D. Grover 2002, 2003 Graph theory and routing (initial background) E E Lecture 4.
Graphs Chapter 20 Data Structures and Problem Solving with C++: Walls and Mirrors, Frank Carrano, © 2012.
C o n f i d e n t i a l HOME NEXT Subject Name: Data Structure Using C Unit Title: Graphs.
GRAPH Learning Outcomes Students should be able to:
Theory of Computing Lecture 10 MAS 714 Hartmut Klauck.
Programming for Geographical Information Analysis: Advanced Skills Online mini-lecture: Introduction to Networks Dr Andy Evans.
Graph Theory Topics to be covered:
© 2006 Pearson Addison-Wesley. All rights reserved14 A-1 Chapter 14 Graphs.
Chapter 14 Graphs. © 2004 Pearson Addison-Wesley. All rights reserved Terminology G = {V, E} A graph G consists of two sets –A set V of vertices,
1 ELEC692 Fall 2004 Lecture 1b ELEC692 Lecture 1a Introduction to graph theory and algorithm.
Can you connect the dots as shown without taking your pen off the page or drawing the same line twice.
TCP Traffic and Congestion Control in ATM Networks
1 CS104 : Discrete Structures Chapter V Graph Theory.
Mathematics of Networks (Cont)
Basic Notions on Graphs. The House-and-Utilities Problem.
Agenda Review: –Planar Graphs Lecture Content:  Concepts of Trees  Spanning Trees  Binary Trees Exercise.
1 12/2/2015 MATH 224 – Discrete Mathematics Formally a graph is just a collection of unordered or ordered pairs, where for example, if {a,b} G if a, b.
1 Graphs Theory UNIT IV. 2Contents  Basic terminology,  Multi graphs and weighted graphs  Paths and circuits  Shortest path in weighted graph  Hamiltonian.
Graphs A ‘Graph’ is a diagram that shows how things are connected together. It makes no attempt to draw actual paths or routes and scale is generally inconsequential.
Graph Theory and Applications
Graphs. Graphs Similar to the graphs you’ve known since the 5 th grade: line graphs, bar graphs, etc., but more general. Those mathematical graphs are.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley. Ver Chapter 13: Graphs Data Abstraction & Problem Solving with C++
Graph theory and networks. Basic definitions  A graph consists of points called vertices (or nodes) and lines called edges (or arcs). Each edge joins.
Graphs Chapter 12. Chapter 12: Graphs2 Chapter Objectives To become familiar with graph terminology and the different types of graphs To study a Graph.
© 2006 Pearson Addison-Wesley. All rights reserved 14 A-1 Chapter 14 Graphs.
Graphs Upon completion you will be able to:
Graph Theory Unit: 4.
E E Module 5 © Wayne D. Grover 2002, (for non-negative edge weights only) Key concepts: “labelling”, “scanning” Label = {distance, predecessor}.
Chapter 20: Graphs. Objectives In this chapter, you will: – Learn about graphs – Become familiar with the basic terminology of graph theory – Discover.
Data Structures and Algorithm Analysis Graph Algorithms Lecturer: Jing Liu Homepage:
DECISION 1. How do you do a Bubble Sort? Bubble Sort:  You compare adjacent items in a list;  If they are in order, leave them.  If they are not in.
Grade 11 AP Mathematics Graph Theory Definition: A graph, G, is a set of vertices v(G) = {v 1, v 2, v 3, …, v n } and edges e(G) = {v i v j where 1 ≤ i,
1 GRAPH Learning Outcomes Students should be able to: Explain basic terminology of a graph Identify Euler and Hamiltonian cycle Represent graphs using.
1 Data Structures and Algorithms Graphs. 2 Graphs Basic Definitions Paths and Cycles Connectivity Other Properties Representation Examples of Graph Algorithms:
Introduction to Graph & Network Theory Thinking About Networks: From Metabolism to the Genome to Social Conflict Summer Workshop for Teachers June 27 th.
Chapter Chapter Summary Graphs and Graph Models Graph Terminology and Special Types of Graphs Representing Graphs and Graph Isomorphism Connectivity.
Graphs: Definitions and Basic Properties
Data Structures Graphs - Terminology
Graph Theory CSRU1400, Fall 2007 Ellen Zhang.
Csc 2720 Instructor: Zhuojun Duan
Graph theory Definitions Trees, cycles, directed graphs.
Planar Graphs & Euler’s Formula
I206: Lecture 15: Graphs Marti Hearst Spring 2012.
Topological Sort (topological order)
1.3 Modeling with exponentially many constr.
Graph Algorithm.
Graph.
Graphs Chapter 13.
Graphs Chapter 11 Objectives Upon completion you will be able to:
Chapter 11 Graphs.
Chapter 14 Graphs © 2006 Pearson Addison-Wesley. All rights reserved.
Chapter 15 Graph Theory © 2008 Pearson Addison-Wesley.
Text Book: Introduction to algorithms By C L R S
Chapter 14 Graphs © 2011 Pearson Addison-Wesley. All rights reserved.
Agenda Review Lecture Content: Shortest Path Algorithm
INTRODUCTION A graph G=(V,E) consists of a finite non empty set of vertices V , and a finite set of edges E which connect pairs of vertices .
Presentation transcript:

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 2002-2007

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.

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.

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.)

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

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.

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?

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

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.

Homeomorphism

Planarity

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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:

“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.

“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

“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

“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

“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

“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

“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

“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

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

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”

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”)

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 < ~5 (Dunn, Grover, IEEE JSAC 1994) Where they differ it is always due to an instance of the “trap topology”:

Example of how the max flow algorithm avoids the trap

“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 :

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

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 marked @ 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)