TCOM 501: Networking Theory & Fundamentals. Lecture 11 April 16, 2003 Prof. Yannis A. Korilis
|
|
- Bryce McKenzie
- 6 years ago
- Views:
Transcription
1 TOM 50: Networking Theory & undamentals Lecture pril 6, 2003 Prof. Yannis. Korilis
2 2 Topics Routing in ata Network Graph Representation of a Network Undirected Graphs Spanning Trees and Minimum Weight Spanning Trees irected Graphs Shortest-Path lgorithms: ellman-ord ikstra loyd-warshall istributed synchronous ellman-ord lgorithm
3 3 Introduction to Routing What is routing? The creation of (state) information in the network to enable efficient delivery of packets to their intended destination Two main components Information acquisition: Topology, addresses Information usage: omputing good paths to all destinations Questions Where is? How to reach? How to best reach? How to best distribute all traffic (not only to )? G
4 4 Graph-Theoretic oncepts n Undirected Graph G = (N, ) consists of: a finite nonempty set of nodes N and a collection of arcs, interconnecting pairs of distinct nodes from N. If i and are nodes in N and (i, ) is an arc in, the arc is said to be incident on i and Walk: sequence of nodes (n, n 2,, n k ), where (n, n 2 ), (n 2, n 3 ),, (n k-, n k ) are arcs Path: a walk with no repeated nodes ycle: a walk (n, n 2,, n k ), with n =n k and no other repeated nodes onnected Graph: for all i, N, there exists a path (n, n 2,, n k ), with i=n, =n k G N = {, G,,,,, } = {(, ),(, ),(, ),(, ), (, ),( G, ),( G, )}
5 5 Spanning Tree graph G' = (N ', ' ), with N ' N and ' is called a subgraph of G Tree: a connected graph that contains no cycles Spanning tree of a graph G: a subgraph of G, that is a tree and contains all nodes of G, that is N ' = N G Lemma: Let G be a connected graph G = (N, ) and S a nonempty strict subset of the set of nodes N. Then, there exists at least one arc (i, ) such that i S, and S.
6 6 Spanning Tree lgorithm. Select arbitrary node n N, and initialize: G' = (N ', ' ), 2. If N' = N, STOP: G' = (N ', ' ) is a spanning tree LS: go to step 3 3. Let (i, ) with i N' and N-N' Update: N : = N { }, : = {( i, )} Go to step 2 N = {}, n = Proof of correctness: Use induction to establish that after a new node i is added, G' remains connected and does not contain any cycles therefore, it is a tree. fter N- iterations, the algorithm terminates, and G' contains N nodes and N- arcs.
7 7 onstruction of a Spanning Tree N'= {}; '= N'= {,}; '= {(,)} N'= {,,}; '= {(,),(,)} N'= {,,,}; '= {(,),(,),()} G N'= {,,,,}; '= {(,),(,),(),()} N'= {,,,,,}; '= {(,),(,),(),(),(,)} N'= {,,,,,,G}; '= {(,),(,),(),(),(,),(,G)}
8 8 Spanning Trees Proposition: Let G be a connected graph with N nodes and links. G contains a spanning tree 2. N- 3. G is a tree if and only if =N- Proof: The spanning tree construction algorithm starts with a single node and at each iteration augments the tree by one node and one arc. Therefore, the tree is constructed after N- iterations and has N- links. vidently N-. If =N-, the spanning tree includes all arcs of G, thus G is a tree. If >N-, there is a link (i, ) that does not belong to the tree. onsidering the path connecting nodes i and along the spanning tree, that path and link (i, ) form a cycle, thus G is not a tree.
9 9 Use of Spanning Trees Problem: how to distribute information to all nodes in a graph (network) e.g., address and topology information looding: each node forwards information to all its neighbors. Simple, but multiple copies of the same packet traverse each link and are received by each node Spanning tree: nodes forward information only along links that belong to the spanning tree. More efficient: Information reaches each node only once and traverses links at most once Note that spanning tree is bidirectional G
10 0 Minimum Weight Spanning Tree Weight w i is used to quantify the cost for using link (i, ) xamples: delay, offered load, distance, etc. Weight (cost) of a tree is the sum of the weights of all its links packets traverse all tree links once G W = 2 efinition: Minimum Weight Spanning Tree (MST) is a spanning tree with minimum sum of link weights efinition: subtree of an MST is called a fragment. n arc with one node in a fragment and the other node not in this fragment is called an outgoing arc from the fragment G 3 W = 5
11 Minimum Weight Spanning Trees Lemma: Given a fragment, let e=(i, ) be an outgoing arc with minimum weight, where. Then extended by arc e and node is a fragment. Proof: Let T be the MST that includes fragment. If e T, we are done. ssume e T: then a cycle is formed by e and the arcs of T Since. there is an arc e e which belongs to the cycle and T, and is outgoing from. Let T =(T-{e }) {e}. This is subgraph with N- arcs and no cycles (since ), i.e., a spanning tree. Since w e w e, the weight of T is less than or equal to the weight of T Then T is an MST, and extended by arc e and node is a fragment. 4 e e' G
12 2 Minimum Weight Spanning Tree lgorithms Inductive algorithms based on the previous lemma Prim s lgorithm: Start with an arbitrary node as the initial fragmant nlarge current fragment by successively adding minimum weight outgoing arcs Kruskal s lgorithm: ll vertices are initial fragments Successively combine fragments using minimum weight arcs that do not introduce a cycle
13 3 Prim s lgorithm
14 4 Kruskall s lgorithm
15 5 Shortest Path lgorithms Problem: Given nodes and, find the best route for sending traffic from to est: the one with minimum cost where typically the cost of a path is equal to the sum of the costs of the links in the path Important problem in various networking applications Routing of traffic over network links need to distinguish direction of flow ppropriate network model: irected Graph
16 6 irected Graphs irected Graph or igraph G = (N, ) consists of: a finite nonempty set of nodes N and a collection of directed arcs, i.e., ordered pairs of distinct nodes from N. irected walks, directed paths and directed cycles can be defined to extend the corresponding definitions for undirected graphs Given a digraph G = (N, ), there is an associated undirected graph G' = (N ', ' ), with N '=N and (i, ) ' if (i, ), or (, i) digraph G = (N, ) is called connected if its associated undirected graph G' = (N ', ' ) is connected digraph G = (N, ) is called strongly connected if for every i, N, there exists a directed path (n, n 2,, n k ), with i=n, =n k
17 7 Shortest Path lgorithms Problem ormulation onsider an N vertex graph G = (N, ) with link lengths d i for edge (i,) (d i = if (i,) ) Problem: ind minimum distance paths from all vertices in N to vertex lternatively, find minimum weight paths from vertex to all vertices in N General approach is again iterative ( n+ ) ( n) = min{ + d i ifferences are in how the iterations proceed Three main algorithms i }
18 ellman-ord lgorithm Iterative step is over increasing hop count efine ih as a shortest walk from node i to that contains at most h edges h = 0 by definition for all h ellman-ord lgorithm h+ h efine i = min{ + di}, i Set initial conditions to 0 i = for i a The scalars h i are equal to the shortest walk lengths with less than h hops from node i to node b The algorithm terminates after at most N iterations if there are no negative length cycles without node, and it yields the shortest path lengths to node 8
19 Proof of ellman-ord () Proof is by induction on hop count h or h = we have i = d i for all i, so the result holds for i = ssume that the result holds for all k h. We need to show it still holds for h+ Two cases need to be considered The shortest ( h+) walk from i to has h edges Its length is then i h 2 The shortest ( h+) walk from i to has (h+) edges It consists of the concatenation of an edge (i,) followed by a shortest h hop walk from vertex to vertex This second case is the one we will focus on 9
20 Proof of ellman-ord (2) rom ase and ase 2, we have shortest ( rom induction hypothesis and initial conditions k i k- i for all k h so that h+ h h = min + d min + d = i h i = d i = d i + h ombining the two gives shortest ( = i min which completes the proof of part a { [ ]} h h, min d h + ) walk length = min + { h h+ } h+, = i h + ) i walk length i = min i [ ] [ ] h i i { [ ]} h h,min + d i i 20 i i
21 Proof of ellman-ord (3) ssume that the algorithm terminates after h steps This implies that i k = i h for all i and k h This means that adding more edges cannot decrease the length of any of those walks Hence, there cannot be negative length cycles that do not include node They could be repeated many times to make walk lengths arbitrarily small elete all such cycles This yields paths of less than or equal length So for all i we have a path of h hops or less to vertex and with length i h Since those paths have no cycles they contain at most N- edges,and therefore in = N- i for all i The algorithm terminates after at most N steps, which proves part b 2
22 ellman-ord omplexity Worst-case amount of computation to find shortest path lengths lgorithm iterates up to N times ach iteration is done for N- nodes (all i ) Minimization step requires considering up to N- alternatives omputational complexity is O(N 3 ) More careful accounting yields a computational complexity of O(hM) 22
23 onstructing Shortest Paths - algorithm yields shortest path lengths, but we are also interested in actual paths Start with - equation i = G [ + d ], i, and 0 min = i or all vertices i pick the edge (i,) that minimizes - equation This generates a subgraph with N- edges (a tree) or any vertex i follow the edges from vertex i along this subgraph until vertex is reached Note: In graphs without zero or negative length cycles, - equation defines a system of N- equations with a unique solution 23
24 onstructing Shortest Paths = 3 + = 4 + G G = 3 + = 3 = 2 + G = + = 6 + = G 4 = --G- 24
25 ikstra s lgorithm () ifferent iteration criteria lgorithm proceeds by increasing path length instead of increasing hop count Start with closest vertex to destination, use it to find the next closest vertex, and so on Successful iteration requires non-negative edge weights ikstra s algorithm maintains two sets of vertices L: Labeled vertices (shortest path is known) : andidate vertices (shortest path not yet known) One vertex is moved from to L in each iteration 25
26 ikstra s lgorithm (2) Initialization L = {} and = G - L; (vertex is the destination) = 0 and = d for Iteration steps ind the next closest vertex not in L, i.e., ind the vertex i L such that i = min Update and L: L = L {i} and = - {i} 2 Update lengths of paths of vertices remaining in : = min[ + d lgorithm stops when L = G, i i L ], 26
27 Proof of ikstra s lgorithm () t the beginning of each step, we have a i for all i L and L b or any vertex, is the shortest distance from to for any path using vertices (except possibly ) only in L Proof of condition (a) (a) is satisfied initially We have d i 0 and i = min L so that condition (a) is preserved by the update equation : = min[, + d ], i non-negative edge weights i 27
28 Proof of ikstra s lgorithm (2) It remains to prove condition (b), which we proceed to do by induction (b) is satisfied initially Induction hypothesis (H) ondition (b) holds at the beginning of some step, where i is the vertex added to L at that step rom (H), condition (b) holds for vertex i as well as L from (a) onsider next a vertex L {i} 28
29 Proof of ikstra s lgorithm (3) Let be the length of the shortest path from L {i} to with all its vertices but in L {i} This path consists of an edge (,k), k L {i}, concatenated with the shortest path from k to with vertices in L {i} rom (H), k is the length of this shortest path from k to We have ' = min [ k + d k ] = min min[ k + d k ], i + d k L { i} k L nd from (H) we also have = min[ + d ] ombining the two gives k L Which completes the proof of the induction ' = min[, + d ] = k i k i i 29
30 omputational omplexity of ikstra s lgorithm s with ellman-ord we have up to N iterations, where N = G The maor saving is that in each iteration we consider each node only once ombination of step and step 2 looks first at nodes in L (step ) and then = G-L (step 2) Operations in each step have unit cost t most N iterations and N unit cost operations per iteration Total cost of O(N 2 ) (can be improved) 30
31 loyd-warshall lgorithm () Targeted at computing shortest paths between all pairs of vertices an accommodate positive and negative edge weights but requires no negative length cycles Iteration step is on set of vertices allowed as intermediate vertices in a path Initial condition is as for ellman-ord and ikstra, i.e., single edge paths for all vertices Next iteration allows only vertex as intermediate vertex lgorithm stops when all vertices can be used as intermediate vertices 3
32 loyd-warshall lgorithm (2) Initial conditions 0 i = di, i, and i n Let i be the shortest path length between vertices i and when intermediate vertices on the path are limited to vertices,2,...,n Iteration step is defined as n i + n = min[, + i i( n+ ) ( n+ ) n n ], i heck if distance between vertices i and is improved by using vertex (n+) as an intermediate vertex 32
33 Proof of loyd-warshall gain by induction or n=0 the initial conditions clearly give the shortest paths without intermediate vertices Induction hypothesis (H) n i or a given n, gives the shortest path length from i to with only vertices to n as intermediate vertices Shortest path from i to with only vertices to (n+) as intermediate vertices either contain vertex (n+) or does not If it does, the length of the path is the 2nd term of the iteration step If it does not, the length of the path is the st term of the iteration step 33
34 omplexity of loyd-warshall N iterations steps One for each possible set of intermediate vertices omputations in each iteration step involve a comparison for each pair of vertices There are N(N-) of them Total cost is O(N 3 ) quivalent to running N instances of ikstra s algorithm ach instance of ikstra gives shortest paths from all sources to one destination 34
35 Source ased Shortest Paths Only difference is that we want paths from a source node to all destinations instead of all sources to a destination asic approach remains the same Minor differences in defining initialization conditions and iterative steps We will consider the case of both ellman-ord and ikstra s algorithm 35
36 Source ased ellman-ord Source is vertex Initialization h = 0, h i0 = for i efine h+ = min{ i h + }, i distance from node to node i in at most h+ hops s before, iterate until no more progress d i G = 5, 4 = 6, 4 = 5 3 = 3, = 3 2 = 3, 2 = 3, 2 = 4, 2 G = 7, 2 = 7 3 = 3, 3 = 3, 3 = 4, 3 G = 5, 3 = 7, 3 = 5 4 = 3, 4 = 3, 4 = 4, 3 G 4
37 Initialization Source ased ikstra 3 L = {} and = G - L; (vertex is the source) = 0 and i = d for Iteration steps ind next closest vertex in ind the vertex i L such that i = min L Update and L: L = L {i} and = - {i} 2 Update lengths of paths of vertices remaining in : = min[, i + d i ], G 3 {}; =3, =3 {,}; =3; =3, G =7 {,,}; =3, =3; =4, G =7, =7 {,,,}; =3, =3, =4; G =5, =7, =5 {,,,,}; =3, =3, =4, =5; G =5, =6 {,,,,,G}; =3, =3, =4, =5, G =5; =6 {,,,,,G,}; =3, =3, 37 =4, =5, G =5, =6
38 Tree of Shortest Paths or the additive distance function we have assumed If the path p=i,i 2,...,i h, with i=i and = i h is a shortest path from i to, then for every k, 0 k h-, the subpath s=i,i 2,...,i k is a shortest path from i to i k If this did not hold, one could improve the shortest path between i and by picking the shorter path that exists between i and i k Let be the distance vector from vertex i, then a directed path p from vertex i to vertex is a shortest path iff k = l + d kl for all edges (k,l) p We can construct a shortest path tree from 38 vertex i to all other vertices
39 Shortest Path Tree vs Minimum Spanning Tree The two are NOT the same Minimum Spanning Tree Shortest Path Tree G 3 Total weight: 0 = G 3 Total weight: =
Routing. Effect of Routing in Flow Control. Relevant Graph Terms. Effect of Routing Path on Flow Control. Effect of Routing Path on Flow Control
Routing Third Topic of the course Read chapter of the text Read chapter of the reference Main functions of routing system Selection of routes between the origin/source-destination pairs nsure that the
More informationRouting. Information Networks p.1/35
Routing Routing is done by the network layer protocol to guide packets through the communication subnet to their destinations The time when routing decisions are made depends on whether we are using virtual
More informationLecture 19. Broadcast routing
Lecture 9 Broadcast routing Slide Broadcast Routing Route a packet from a source to all nodes in the network Possible solutions: Flooding: Each node sends packet on all outgoing links Discard packets received
More informationCS 5114: Theory of Algorithms. Graph Algorithms. A Tree Proof. Graph Traversals. Clifford A. Shaffer. Spring 2014
epartment of omputer Science Virginia Tech lacksburg, Virginia opyright c 04 by lifford. Shaffer : Theory of lgorithms Title page : Theory of lgorithms lifford. Shaffer Spring 04 lifford. Shaffer epartment
More informationCAD Algorithms. Shortest Path
lgorithms Shortest Path lgorithms Mohammad Tehranipoor epartment September 00 Shortest Path Problem: ind the best way of getting from s to t where s and t are vertices in a graph. est: Min (sum of the
More informationCommunication Networks I December 4, 2001 Agenda Graph theory notation Trees Shortest path algorithms Distributed, asynchronous algorithms Page 1
Communication Networks I December, Agenda Graph theory notation Trees Shortest path algorithms Distributed, asynchronous algorithms Page Communication Networks I December, Notation G = (V,E) denotes a
More informationSpanning Trees. CSE373: Data Structures & Algorithms Lecture 17: Minimum Spanning Trees. Motivation. Observations. Spanning tree via DFS
Spanning Trees S: ata Structures & lgorithms Lecture : Minimum Spanning Trees simple problem: iven a connected undirected graph =(V,), find a minimal subset of edges such that is still connected graph
More informationCHAPTER 14 GRAPH ALGORITHMS ORD SFO LAX DFW
SO OR HPTR 1 GRPH LGORITHMS LX W KNOWLGMNT: THS SLIS R PT ROM SLIS PROVI WITH T STRUTURS N LGORITHMS IN JV, GOORIH, TMSSI N GOLWSSR (WILY 16) 6 OS MINIMUM SPNNING TRS SO 16 PV OR 1 1 16 61 JK 1 1 11 WI
More informationCS 5114: Theory of Algorithms. Graph Algorithms. A Tree Proof. Graph Traversals. Clifford A. Shaffer. Spring 2014
epartment of omputer Science Virginia Tech lacksburg, Virginia opyright c 04 by lifford. Shaffer : Theory of lgorithms Title page : Theory of lgorithms lifford. Shaffer Spring 04 lifford. Shaffer epartment
More informationDefinition For vertices u, v V (G), the distance from u to v, denoted d(u, v), in G is the length of a shortest u, v-path. 1
Graph fundamentals Bipartite graph characterization Lemma. If a graph contains an odd closed walk, then it contains an odd cycle. Proof strategy: Consider a shortest closed odd walk W. If W is not a cycle,
More informationWhat is Routing? EE 122: Shortest Path Routing. Example. Internet Routing. Ion Stoica TAs: Junda Liu, DK Moon, David Zats
What is Routing? Routing implements the core function of a network: : Shortest Path Routing Ion Stoica Ts: Junda Liu, K Moon, avid Zats http://inst.eecs.berkeley.edu/~ee/fa9 (Materials with thanks to Vern
More informationMinimum Spanning Trees and Shortest Paths
Minimum Spanning Trees and Shortest Paths Kruskal's lgorithm Prim's lgorithm Shortest Paths pril 04, 018 inda eeren / eoffrey Tien 1 Kruskal's algorithm ata types for implementation Kruskalslgorithm()
More informationAnalysis of Algorithms Prof. Karen Daniels
UMass Lowell omputer Science 91.404 nalysis of lgorithms Prof. Karen aniels Spring, 2013 hapter 22: raph lgorithms & rief Introduction to Shortest Paths [Source: ormen et al. textbook except where noted]
More informationMinimum Spanning Trees and Shortest Paths
Minimum Spanning Trees and Shortest Paths Prim's algorithm ijkstra's algorithm November, 017 inda eeren / eoffrey Tien 1 Recall: S spanning tree Starting from vertex 16 9 1 6 10 13 4 3 17 5 11 7 16 13
More informationDesign and Analysis of Algorithms
S 101, Winter 2018 esign and nalysis of lgorithms Lecture 3: onnected omponents lass URL: http://vlsicad.ucsd.edu/courses/cse101-w18/ nd of Lecture 2: s, Topological Order irected cyclic raph.g., Vertices
More informationLecture 13: Weighted Shortest Paths. These slides include material originally prepared by Dr. Ron Cytron and Dr. Steve Cole.
Lecture : Weighted Shortest Paths These slides include material originally prepared by r. Ron ytron and r. Steve ole. nnouncements Lab code and post-lab due tonight Lab released tomorrow ijkstra s algorithm
More informationLesson 22: Basic Graph Concepts
Lesson 22: asic Graph oncepts msc 175 iscrete Mathematics 1. Introduction graph is a mathematical object that is used to model different relations between objects and processes: Linked list Flowchart of
More informationShortest Paths and Minimum Spanning Trees
/9/ hortest Paths and Minimum panning Trees dmin avid Kauchak cs0 pring 0 ijkstra s algorithm What about ijkstra s on? 0-0 /9/ What about ijkstra s on? ijkstra s algorithm only works for positive edge
More informationThe Shortest Path Problem. The Shortest Path Problem. Mathematical Model. Integer Programming Formulation
The Shortest Path Problem jla,jc@imm.dtu.dk Department of Management Engineering Technical University of Denmark The Shortest Path Problem Given a directed network G = (V,E,w) for which the underlying
More informationChapter 9: Elementary Graph Algorithms Basic Graph Concepts
hapter 9: Elementary Graph lgorithms asic Graph oncepts msc 250 Intro to lgorithms graph is a mathematical object that is used to model different situations objects and processes: Linked list Tree (partial
More informationCS 6783 (Applied Algorithms) Lecture 5
CS 6783 (Applied Algorithms) Lecture 5 Antonina Kolokolova January 19, 2012 1 Minimum Spanning Trees An undirected graph G is a pair (V, E); V is a set (of vertices or nodes); E is a set of (undirected)
More information22 Elementary Graph Algorithms. There are two standard ways to represent a
VI Graph Algorithms Elementary Graph Algorithms Minimum Spanning Trees Single-Source Shortest Paths All-Pairs Shortest Paths 22 Elementary Graph Algorithms There are two standard ways to represent a graph
More informationNote. Out of town Thursday afternoon. Willing to meet before 1pm, me if you want to meet then so I know to be in my office
raphs and Trees Note Out of town Thursday afternoon Willing to meet before pm, email me if you want to meet then so I know to be in my office few extra remarks about recursion If you can write it recursively
More informationÉCOLE POLYTECHNIQUE FÉDÉRALE DE LAUSANNE! 1. Link state flooding topology information finding the shortest paths (Dijkstra)
ontents ÉOL POLYTHNIQU ÉÉRL LUSNN! 1. Link state flooding topology information finding the shortest paths (ijkstra)! 2. Hierarchical routing with areas! 3. OSP Link State Routing database modelling neighbor
More information2.3 Optimal paths. E. Amaldi Foundations of Operations Research Politecnico di Milano 1
. Optimal paths E. Amaldi Foundations of Operations Research Politecnico di Milano Optimal (minimum or maximum) paths have a wide range of applications: Google maps, GPS navigators planning and management
More informationECE 242 Data Structures and Algorithms. Graphs II. Lecture 27. Prof.
242 ata Structures and lgorithms http://www.ecs.umass.edu/~polizzi/teaching/242/ Graphs II Lecture 27 Prof. ric Polizzi Summary Previous Lecture omposed of vertices (nodes) and edges vertex or node edges
More informationAlgorithm Design (8) Graph Algorithms 1/2
Graph Algorithm Design (8) Graph Algorithms / Graph:, : A finite set of vertices (or nodes) : A finite set of edges (or arcs or branches) each of which connect two vertices Takashi Chikayama School of
More informationECE 158A: Lecture 5. Fall 2015
8: Lecture Fall 0 Routing ()! Location-ased ddressing Recall from Lecture that routers maintain routing tables to forward packets based on their IP addresses To allow scalability, IP addresses are assigned
More informationDijkstra s algorithm for shortest paths when no edges have negative weight.
Lecture 14 Graph Algorithms II 14.1 Overview In this lecture we begin with one more algorithm for the shortest path problem, Dijkstra s algorithm. We then will see how the basic approach of this algorithm
More informationChapter 9 Graph Algorithms
Chapter 9 Graph Algorithms 2 Introduction graph theory useful in practice represent many real-life problems can be if not careful with data structures 3 Definitions an undirected graph G = (V, E) is a
More informationShortest Paths and Minimum Spanning Trees
// hortest Paths and Minimum panning Trees avid Kauchak cs pring dmin an resubmit homeworks - for up to half credit back l ue by the end of the week Read book // // // // // Is ijkstra s algorithm correct?
More informationSpanning Tree. Lecture19: Graph III. Minimum Spanning Tree (MSP)
Spanning Tree (015) Lecture1: Graph III ohyung Han S, POSTH bhhan@postech.ac.kr efinition and property Subgraph that contains all vertices of the original graph and is a tree Often, a graph has many different
More information2.3 Optimal paths. Optimal (shortest or longest) paths have a wide range of applications:
. Optimal paths Optimal (shortest or longest) paths have a wide range of applications: Google maps, GPS navigators planning and management of transportation, electrical and telecommunication networks project
More informationLecture 5: Graphs. Rajat Mittal. IIT Kanpur
Lecture : Graphs Rajat Mittal IIT Kanpur Combinatorial graphs provide a natural way to model connections between different objects. They are very useful in depicting communication networks, social networks
More informationWeek 9 Student Responsibilities. Mat Example: Minimal Spanning Tree. 3.3 Spanning Trees. Prim s Minimal Spanning Tree.
Week 9 Student Responsibilities Reading: hapter 3.3 3. (Tucker),..5 (Rosen) Mat 3770 Spring 01 Homework Due date Tucker Rosen 3/1 3..3 3/1 DS & S Worksheets 3/6 3.3.,.5 3/8 Heapify worksheet ttendance
More informationCS 43: Computer Networks. 23: Routing Algorithms November 14, 2018
S 3: omputer Networks 3: Routing lgorithms November, 08 Last class NT: Network ddress Translators: NT is mostly bad, but in some cases, it s a necessary evil. IPv6: Simpler, faster, better Tunneling: IPv6
More informationTheorem 2.9: nearest addition algorithm
There are severe limits on our ability to compute near-optimal tours It is NP-complete to decide whether a given undirected =(,)has a Hamiltonian cycle An approximation algorithm for the TSP can be used
More informationLecture 8: The Traveling Salesman Problem
Lecture 8: The Traveling Salesman Problem Let G = (V, E) be an undirected graph. A Hamiltonian cycle of G is a cycle that visits every vertex v V exactly once. Instead of Hamiltonian cycle, we sometimes
More informationCSC 8301 Design & Analysis of Algorithms: Warshall s, Floyd s, and Prim s algorithms
CSC 8301 Design & Analysis of Algorithms: Warshall s, Floyd s, and Prim s algorithms Professor Henry Carter Fall 2016 Recap Space-time tradeoffs allow for faster algorithms at the cost of space complexity
More informationCSE/EE 461 Lecture 7 Bridging LANs. Last Two Times. This Time -- Switching (a.k.a. Bridging)
S/ 461 Lecture 7 ridging LNs Last Two Times Medium ccess ontrol (M) protocols Part of the Link Layer t the heart of Local rea Networks (LNs) ow do multiple parties share a wire or the air? Random access
More informationDiscussion 8: Link State Routing. CSE 123: Computer Networks Marti Motoyama & Chris Kanich
iscussion 8: Link State Routing S : omputer Networks Marti Motoyama & hris Kanich Schedule Project Questions: mail hris, post to moodle, or attend his OH Homework Questions? Link State iscussion S iscussion
More information22 Elementary Graph Algorithms. There are two standard ways to represent a
VI Graph Algorithms Elementary Graph Algorithms Minimum Spanning Trees Single-Source Shortest Paths All-Pairs Shortest Paths 22 Elementary Graph Algorithms There are two standard ways to represent a graph
More informationChapter 9 Graph Algorithms
Introduction graph theory useful in practice represent many real-life problems can be if not careful with data structures Chapter 9 Graph s 2 Definitions Definitions an undirected graph is a finite set
More informationIP Forwarding Computer Networking. Routes from Node A. Graph Model. Lecture 10: Intra-Domain Routing
IP orwarding - omputer Networking Lecture : Intra-omain Routing RIP (Routing Information Protocol) & OSP (Open Shortest Path irst) The Story So ar IP addresses are structure to reflect Internet structure
More information3.1 Basic Definitions and Applications
Graphs hapter hapter Graphs. Basic efinitions and Applications Graph. G = (V, ) n V = nodes. n = edges between pairs of nodes. n aptures pairwise relationship between objects: Undirected graph represents
More informationDigraphs ( 12.4) Directed Graphs. Digraph Application. Digraph Properties. A digraph is a graph whose edges are all directed.
igraphs ( 12.4) irected Graphs OR OS digraph is a graph whose edges are all directed Short for directed graph pplications one- way streets flights task scheduling irected Graphs 1 irected Graphs 2 igraph
More informationChapter 9. Greedy Technique. Copyright 2007 Pearson Addison-Wesley. All rights reserved.
Chapter 9 Greedy Technique Copyright 2007 Pearson Addison-Wesley. All rights reserved. Greedy Technique Constructs a solution to an optimization problem piece by piece through a sequence of choices that
More informationDHANALAKSHMI COLLEGE OF ENGINEERING, CHENNAI. Department of Computer Science and Engineering CS6301 PROGRAMMING DATA STRUCTURES II
DHANALAKSHMI COLLEGE OF ENGINEERING, CHENNAI Department of Computer Science and Engineering CS6301 PROGRAMMING DATA STRUCTURES II Anna University 2 & 16 Mark Questions & Answers Year / Semester: II / III
More informationLecture 22 Tuesday, April 10
CIS 160 - Spring 2018 (instructor Val Tannen) Lecture 22 Tuesday, April 10 GRAPH THEORY Directed Graphs Directed graphs (a.k.a. digraphs) are an important mathematical modeling tool in Computer Science,
More informationFundamental Properties of Graphs
Chapter three In many real-life situations we need to know how robust a graph that represents a certain network is, how edges or vertices can be removed without completely destroying the overall connectivity,
More informationAdjacent: Two distinct vertices u, v are adjacent if there is an edge with ends u, v. In this case we let uv denote such an edge.
1 Graph Basics What is a graph? Graph: a graph G consists of a set of vertices, denoted V (G), a set of edges, denoted E(G), and a relation called incidence so that each edge is incident with either one
More informationCS473-Algorithms I. Lecture 13-A. Graphs. Cevdet Aykanat - Bilkent University Computer Engineering Department
CS473-Algorithms I Lecture 3-A Graphs Graphs A directed graph (or digraph) G is a pair (V, E), where V is a finite set, and E is a binary relation on V The set V: Vertex set of G The set E: Edge set of
More informationShortest path problems
Next... Shortest path problems Single-source shortest paths in weighted graphs Shortest-Path Problems Properties of Shortest Paths, Relaxation Dijkstra s Algorithm Bellman-Ford Algorithm Shortest-Paths
More informationLecture 19 Thursday, March 29. Examples of isomorphic, and non-isomorphic graphs will be given in class.
CIS 160 - Spring 2018 (instructor Val Tannen) Lecture 19 Thursday, March 29 GRAPH THEORY Graph isomorphism Definition 19.1 Two graphs G 1 = (V 1, E 1 ) and G 2 = (V 2, E 2 ) are isomorphic, write G 1 G
More informationThird Generation Routers
IP orwarding 5-5- omputer Networking 5- Lecture : Routing Peter Steenkiste all www.cs.cmu.edu/~prs/5-- The Story So ar IP addresses are structured to reflect Internet structure IP packet headers carry
More informationCOMP 182: Algorithmic Thinking Prim and Dijkstra: Efficiency and Correctness
Prim and Dijkstra: Efficiency and Correctness Luay Nakhleh 1 Prim s Algorithm In class we saw Prim s algorithm for computing a minimum spanning tree (MST) of a weighted, undirected graph g. The pseudo-code
More information1 Minimum Spanning Trees (MST) b 2 3 a. 10 e h. j m
Minimum Spanning Trees (MST) 8 0 e 7 b 3 a 5 d 9 h i g c 8 7 6 3 f j 9 6 k l 5 m A graph H(U,F) is a subgraph of G(V,E) if U V and F E. A subgraph H(U,F) is called spanning if U = V. Let G be a graph with
More informationGRAPHS, GRAPH MODELS, GRAPH TERMINOLOGY, AND SPECIAL TYPES OF GRAPHS
GRAPHS, GRAPH MODELS, GRAPH TERMINOLOGY, AND SPECIAL TYPES OF GRAPHS DR. ANDREW SCHWARTZ, PH.D. 10.1 Graphs and Graph Models (1) A graph G = (V, E) consists of V, a nonempty set of vertices (or nodes)
More informationModule 5 Graph Algorithms
Module 5 Graph lgorithms Dr. Natarajan Meghanathan Professor of Computer Science Jackson State University Jackson, MS 97 E-mail: natarajan.meghanathan@jsums.edu 5. Graph Traversal lgorithms Depth First
More informationIntroduction to Graph Theory
Introduction to Graph Theory Tandy Warnow January 20, 2017 Graphs Tandy Warnow Graphs A graph G = (V, E) is an object that contains a vertex set V and an edge set E. We also write V (G) to denote the vertex
More informationA region is each individual area or separate piece of the plane that is divided up by the network.
Math 135 Networks and graphs Key terms Vertex (Vertices) ach point of a graph dge n edge is a segment that connects two vertices. Region region is each individual area or separate piece of the plane that
More informationAlgorithm Analysis Graph algorithm. Chung-Ang University, Jaesung Lee
Algorithm Analysis Graph algorithm Chung-Ang University, Jaesung Lee Basic definitions Graph = (, ) where is a set of vertices and is a set of edges Directed graph = where consists of ordered pairs
More informationGraphs and Network Flows IE411. Lecture 21. Dr. Ted Ralphs
Graphs and Network Flows IE411 Lecture 21 Dr. Ted Ralphs IE411 Lecture 21 1 Combinatorial Optimization and Network Flows In general, most combinatorial optimization and integer programming problems are
More informationBasics of Graph Theory
Basics of Graph Theory 1 Basic notions A simple graph G = (V, E) consists of V, a nonempty set of vertices, and E, a set of unordered pairs of distinct elements of V called edges. Simple graphs have their
More informationChapter 3 Trees. Theorem A graph T is a tree if, and only if, every two distinct vertices of T are joined by a unique path.
Chapter 3 Trees Section 3. Fundamental Properties of Trees Suppose your city is planning to construct a rapid rail system. They want to construct the most economical system possible that will meet the
More informationWeek 11: Minimum Spanning trees
Week 11: Minimum Spanning trees Agenda: Minimum Spanning Trees Prim s Algorithm Reading: Textbook : 61-7 1 Week 11: Minimum Spanning trees Minimum spanning tree (MST) problem: Input: edge-weighted (simple,
More information4/25/12. The Problem: Distributed Methods for Finding Paths in Networks Spring 2012 Lecture #20. Forwarding. Shortest Path Routing
//1 The Problem: istributed Methods for Finding Paths in Networks L 1.0 Spring 01 Lecture #0 addressing, forwarding, routing liveness, advertisements, integration distance-vector routing link-state routing
More informationCSE101: Design and Analysis of Algorithms. Ragesh Jaiswal, CSE, UCSD
Recap. Growth rates: Arrange the following functions in ascending order of growth rate: n 2 log n n log n 2 log n n/ log n n n Introduction Algorithm: A step-by-step way of solving a problem. Design of
More informationReading. Graph Terminology. Graphs. What are graphs? Varieties. Motivation for Graphs. Reading. CSE 373 Data Structures. Graphs are composed of.
Reading Graph Reading Goodrich and Tamassia, hapter 1 S 7 ata Structures What are graphs? Graphs Yes, this is a graph. Graphs are composed of Nodes (vertices) dges (arcs) node ut we are interested in a
More informationCSE331 Introduction to Algorithms Lecture 15 Minimum Spanning Trees
CSE1 Introduction to Algorithms Lecture 1 Minimum Spanning Trees Antoine Vigneron antoine@unist.ac.kr Ulsan National Institute of Science and Technology July 11, 201 Antoine Vigneron (UNIST) CSE1 Lecture
More informationtree follows. Game Trees
CPSC-320: Intermediate Algorithm Design and Analysis 113 On a graph that is simply a linear list, or a graph consisting of a root node v that is connected to all other nodes, but such that no other edges
More informationDistance-Vector Routing: Distributed B-F (cont.)
istance-vector Routing: istributed - (cont.) xample [ istributed ellman-ord lgorithm ] ssume each node i maintains an entry (R(i,x), L(i,x)), where R(i,x) is the next node along the current shortest path
More informationCHAPTER-2 A GRAPH BASED APPROACH TO FIND CANDIDATE KEYS IN A RELATIONAL DATABASE SCHEME **
HPTR- GRPH S PPROH TO FIN NIT KYS IN RLTIONL TS SHM **. INTROUTION Graphs have many applications in the field of knowledge and data engineering. There are many graph based approaches used in database management
More informationChapter 9 Graph Algorithms
Chapter 9 Graph Algorithms 2 Introduction graph theory useful in practice represent many real-life problems can be slow if not careful with data structures 3 Definitions an undirected graph G = (V, E)
More information11/22/2016. Chapter 9 Graph Algorithms. Introduction. Definitions. Definitions. Definitions. Definitions
Introduction Chapter 9 Graph Algorithms graph theory useful in practice represent many real-life problems can be slow if not careful with data structures 2 Definitions an undirected graph G = (V, E) is
More informationDO NOT RE-DISTRIBUTE THIS SOLUTION FILE
Professor Kindred Math 104, Graph Theory Homework 3 Solutions February 14, 2013 Introduction to Graph Theory, West Section 2.1: 37, 62 Section 2.2: 6, 7, 15 Section 2.3: 7, 10, 14 DO NOT RE-DISTRIBUTE
More informationAdvanced Algorithms Class Notes for Monday, October 23, 2012 Min Ye, Mingfu Shao, and Bernard Moret
Advanced Algorithms Class Notes for Monday, October 23, 2012 Min Ye, Mingfu Shao, and Bernard Moret Greedy Algorithms (continued) The best known application where the greedy algorithm is optimal is surely
More information09 B: Graph Algorithms II
Correctness and Complexity of 09 B: Graph Algorithms II CS1102S: Data Structures and Algorithms Martin Henz March 19, 2010 Generated on Thursday 18 th March, 2010, 00:20 CS1102S: Data Structures and Algorithms
More informationBasic Graph Theory with Applications to Economics
Basic Graph Theory with Applications to Economics Debasis Mishra February, 0 What is a Graph? Let N = {,..., n} be a finite set. Let E be a collection of ordered or unordered pairs of distinct elements
More informationSingle Source Shortest Path
Single Source Shortest Path A directed graph G = (V, E) and a pair of nodes s, d is given. The edges have a real-valued weight W i. This time we are looking for the weight and the shortest path from s
More informationOutline and Reading. Minimum Spanning Tree. Minimum Spanning Tree. Cycle Property. Minimum Spanning Trees ( 12.7)
Outline and Reading Minimum Spanning Tree PV 1 1 1 1 JK 1 15 SO 11 1 LX 15 Minimum Spanning Trees ( 1.) efinitions crucial fact Prim-Jarnik s lgorithm ( 1..) Kruskal s lgorithm ( 1..1) 111 // :1 PM Minimum
More informationTrees Rooted Trees Spanning trees and Shortest Paths. 12. Graphs and Trees 2. Aaron Tan November 2017
12. Graphs and Trees 2 Aaron Tan 6 10 November 2017 1 10.5 Trees 2 Definition Definition Definition: Tree A graph is said to be circuit-free if, and only if, it has no circuits. A graph is called a tree
More informationReview of Graph Theory. Gregory Provan
Review of Graph Theory Gregory Provan Overview Need for graphical models of computation Cloud computing Data centres Telecommunications networks Graph theory Graph Models for Cloud Computing Integration
More informationDFS on Directed Graphs BOS. Outline and Reading ( 6.4) Digraphs. Reachability ( 6.4.1) Directed Acyclic Graphs (DAG s) ( 6.4.4)
S on irected Graphs OS OR JK SO LX W MI irected Graphs S 1.3 1 Outline and Reading ( 6.4) Reachability ( 6.4.1) irected S Strong connectivity irected cyclic Graphs (G s) ( 6.4.4) Topological Sorting irected
More informationDefinition: A graph G = (V, E) is called a tree if G is connected and acyclic. The following theorem captures many important facts about trees.
Tree 1. Trees and their Properties. Spanning trees 3. Minimum Spanning Trees 4. Applications of Minimum Spanning Trees 5. Minimum Spanning Tree Algorithms 1.1 Properties of Trees: Definition: A graph G
More informationIn this lecture, we ll look at applications of duality to three problems:
Lecture 7 Duality Applications (Part II) In this lecture, we ll look at applications of duality to three problems: 1. Finding maximum spanning trees (MST). We know that Kruskal s algorithm finds this,
More informationSection 3.1: Nonseparable Graphs Cut vertex of a connected graph G: A vertex x G such that G x is not connected. Theorem 3.1, p. 57: Every connected
Section 3.1: Nonseparable Graphs Cut vertex of a connected graph G: A vertex x G such that G x is not connected. Theorem 3.1, p. 57: Every connected graph G with at least 2 vertices contains at least 2
More informationAlgorithms and Theory of Computation. Lecture 5: Minimum Spanning Tree
Algorithms and Theory of Computation Lecture 5: Minimum Spanning Tree Xiaohui Bei MAS 714 August 31, 2017 Nanyang Technological University MAS 714 August 31, 2017 1 / 30 Minimum Spanning Trees (MST) A
More informationSteiner Trees and Forests
Massachusetts Institute of Technology Lecturer: Adriana Lopez 18.434: Seminar in Theoretical Computer Science March 7, 2006 Steiner Trees and Forests 1 Steiner Tree Problem Given an undirected graph G
More informationGraph Theory. Part of Texas Counties.
Graph Theory Part of Texas Counties. We would like to visit each of the above counties, crossing each county only once, starting from Harris county. Is this possible? This problem can be modeled as a graph.
More information7.3 Spanning trees Spanning trees [ ] 61
7.3. Spanning trees [161211-1348 ] 61 7.3 Spanning trees We know that trees are connected graphs with the minimal number of edges. Hence trees become very useful in applications where our goal is to connect
More informationTrees. 3. (Minimally Connected) G is connected and deleting any of its edges gives rise to a disconnected graph.
Trees 1 Introduction Trees are very special kind of (undirected) graphs. Formally speaking, a tree is a connected graph that is acyclic. 1 This definition has some drawbacks: given a graph it is not trivial
More informationWhat are graphs? (Take 1)
Lecture 22: Let s Get Graphic Graph lgorithms Today s genda: What is a graph? Some graphs that you already know efinitions and Properties Implementing Graphs Topological Sort overed in hapter 9 of the
More informationGraph Theory. Network Science: Graph theory. Graph theory Terminology and notation. Graph theory Graph visualization
Network Science: Graph Theory Ozalp abaoglu ipartimento di Informatica Scienza e Ingegneria Università di ologna www.cs.unibo.it/babaoglu/ ranch of mathematics for the study of structures called graphs
More informationAlgorithms and Theory of Computation. Lecture 5: Minimum Spanning Tree
Algorithms and Theory of Computation Lecture 5: Minimum Spanning Tree Xiaohui Bei MAS 714 August 31, 2017 Nanyang Technological University MAS 714 August 31, 2017 1 / 30 Minimum Spanning Trees (MST) A
More information11.9 Connectivity Connected Components. mcs 2015/5/18 1:43 page 419 #427
mcs 2015/5/18 1:43 page 419 #427 11.9 Connectivity Definition 11.9.1. Two vertices are connected in a graph when there is a path that begins at one and ends at the other. By convention, every vertex is
More informationInduction Review. Graphs. EECS 310: Discrete Math Lecture 5 Graph Theory, Matching. Common Graphs. a set of edges or collection of two-elt subsets
EECS 310: Discrete Math Lecture 5 Graph Theory, Matching Reading: MIT OpenCourseWare 6.042 Chapter 5.1-5.2 Induction Review Basic Induction: Want to prove P (n). Prove base case P (1). Prove P (n) P (n+1)
More informationThe Problem: Finding Paths Spring 2011 Lecture #19. Forwarding. Shortest Path Routing
The Problem: Finding Paths 1 6.02 Spring 20 Lecture # addressing, forwarding, routing liveness, advertisements, integration distance-vector routing routing loops, counting to infinity 6.02 Spring 20 Lecture,
More informationMinimum-Spanning-Tree problem. Minimum Spanning Trees (Forests) Minimum-Spanning-Tree problem
Minimum Spanning Trees (Forests) Given an undirected graph G=(V,E) with each edge e having a weight w(e) : Find a subgraph T of G of minimum total weight s.t. every pair of vertices connected in G are
More informationSources for this lecture 2. Shortest paths and minimum spanning trees
S-72.2420 / T-79.5203 Shortest paths and minimum spanning trees 1 S-72.2420 / T-79.5203 Shortest paths and minimum spanning trees 3 Sources for this lecture 2. Shortest paths and minimum spanning trees
More information