Lecture 19. Broadcast routing

Similar documents
Routing. Information Networks p.1/35

Algorithm Analysis Graph algorithm. Chung-Ang University, Jaesung Lee

Graphs and Network Flows ISE 411. Lecture 7. Dr. Ted Ralphs

Minimum Spanning Trees My T. UF

TCOM 501: Networking Theory & Fundamentals. Lecture 11 April 16, 2003 Prof. Yannis A. Korilis

CS 6783 (Applied Algorithms) Lecture 5

GraphTheory Models & Complexity BFS Trees DFS Trees Min Spanning Trees. Tree Constructions. Martin Biely

Chapter 9. Greedy Technique. Copyright 2007 Pearson Addison-Wesley. All rights reserved.

Undirected Graphs. Hwansoo Han

We have already seen the transportation problem and the assignment problem. Let us take the transportation problem, first.

UC Berkeley CS 170: Efficient Algorithms and Intractable Problems Handout 8 Lecturer: David Wagner February 20, Notes 8 for CS 170

Kruskal s MST Algorithm

Artificial Intelligence

Spanning Tree. Lecture19: Graph III. Minimum Spanning Tree (MSP)

Definition: A graph G = (V, E) is called a tree if G is connected and acyclic. The following theorem captures many important facts about trees.

Greedy Algorithms. COMP 215 Lecture 6

We ve done. Introduction to the greedy method Activity selection problem How to prove that a greedy algorithm works Fractional Knapsack Huffman coding

Minimum Spanning Trees

Theory of Computing. Lecture 10 MAS 714 Hartmut Klauck

Communication Networks I December 4, 2001 Agenda Graph theory notation Trees Shortest path algorithms Distributed, asynchronous algorithms Page 1

Tree Construction (BFS, DFS, MST) Chapter 5. Breadth-First Spanning Tree (BFS)

CSE331 Introduction to Algorithms Lecture 15 Minimum Spanning Trees

Week 11: Minimum Spanning trees

Notes 4 : Approximating Maximum Parsimony

Chapter 9 Graph Algorithms

Discrete mathematics

CHAPTER 13 GRAPH ALGORITHMS

Spanning Trees. Lecture 20 CS2110 Spring 2015

Introduction to Algorithms

5 MST and Greedy Algorithms

Minimum-Spanning-Tree problem. Minimum Spanning Trees (Forests) Minimum-Spanning-Tree problem

UNIT Name the different ways of representing a graph? a.adjacencymatrix b. Adjacency list

Introduction to Algorithms

Trees Rooted Trees Spanning trees and Shortest Paths. 12. Graphs and Trees 2. Aaron Tan November 2017

Chapter 9 Graph Algorithms

5 MST and Greedy Algorithms

Lecture 8: The Traveling Salesman Problem

Outline. Computer Science 331. Analysis of Prim's Algorithm

CIS 121 Data Structures and Algorithms Minimum Spanning Trees

Introduction to Mathematical Programming IE406. Lecture 16. Dr. Ted Ralphs

Algorithms and Data Structures: Minimum Spanning Trees (Kruskal) ADS: lecture 16 slide 1

MapReduce Algorithms. Barna Saha. March 28, 2016

Week 12: Minimum Spanning trees and Shortest Paths

Review of Graph Theory. Gregory Provan

2.2 Optimal cost spanning trees

Minimum spanning trees

Let G = (V, E) be a graph. If u, v V, then u is adjacent to v if {u, v} E. We also use the notation u v to denote that u is adjacent to v.

7.3 Spanning trees Spanning trees [ ] 61

Graphs and Network Flows IE411. Lecture 21. Dr. Ted Ralphs

CSC 8301 Design & Analysis of Algorithms: Kruskal s and Dijkstra s Algorithms

DO NOT RE-DISTRIBUTE THIS SOLUTION FILE

Chapter 23. Minimum Spanning Trees

1 Minimum Spanning Trees (MST) b 2 3 a. 10 e h. j m

The minimum spanning tree problem

tree follows. Game Trees

Minimal Spanning Trees

Computer Science & Engineering 423/823 Design and Analysis of Algorithms

Introduction to Optimization

22 Elementary Graph Algorithms. There are two standard ways to represent a

Lecture 3: Totally Unimodularity and Network Flows

Greedy Algorithms. At each step in the algorithm, one of several choices can be made.

Graph Algorithms Using Depth First Search

Algorithm Design and Analysis

Chapter 4. Greedy Algorithms. Slides by Kevin Wayne. Copyright 2005 Pearson-Addison Wesley. All rights reserved.

Greedy Algorithms and Matroids. Andreas Klappenecker

Greedy Algorithms and Matroids. Andreas Klappenecker

Spanning Trees, greedy algorithms. Lecture 20 CS2110 Fall 2018

10/31/18. About A6, Prelim 2. Spanning Trees, greedy algorithms. Facts about trees. Undirected trees

Sources for this lecture 2. Shortest paths and minimum spanning trees

CSE373: Data Structures & Algorithms Lecture 17: Minimum Spanning Trees. Dan Grossman Fall 2013

Introduction to Algorithms

Undirected Graphs. DSA - lecture 6 - T.U.Cluj-Napoca - M. Joldos 1

Jade Yu Cheng ICS 311 Homework 7 Sep 18, 2008

Foundations of Discrete Mathematics

Minimum Spanning Trees

CS60020: Foundations of Algorithm Design and Machine Learning. Sourangshu Bhattacharya

Minimum Spanning Trees

Minimum Spanning Trees

Weighted Graphs and Greedy Algorithms

2.3 Optimal paths. E. Amaldi Foundations of Operations Research Politecnico di Milano 1

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

Spanning Trees. Lecture 22 CS2110 Spring 2017

Spanning Trees 4/19/17. Prelim 2, assignments. Undirected trees

Assignment 4 Solutions of graph problems

Classic Graph Theory Problems

Algorithms and Data Structures: Minimum Spanning Trees I and II - Prim s Algorithm. ADS: lects 14 & 15 slide 1

Problem Set 2 Solutions

Decreasing a key FIB-HEAP-DECREASE-KEY(,, ) 3.. NIL. 2. error new key is greater than current key 6. CASCADING-CUT(, )

UNIT 3. Greedy Method. Design and Analysis of Algorithms GENERAL METHOD

22 Elementary Graph Algorithms. There are two standard ways to represent a

Data Structures and Algorithms

Reference Sheet for CO142.2 Discrete Mathematics II

CS 341: Algorithms. Douglas R. Stinson. David R. Cheriton School of Computer Science University of Waterloo. February 26, 2019

Dijkstra s algorithm for shortest paths when no edges have negative weight.

Chapter 9 Graph Algorithms

2.3 Optimal paths. Optimal (shortest or longest) paths have a wide range of applications:

Minimum Spanning Trees

11/22/2016. Chapter 9 Graph Algorithms. Introduction. Definitions. Definitions. Definitions. Definitions

CS473-Algorithms I. Lecture 13-A. Graphs. Cevdet Aykanat - Bilkent University Computer Engineering Department

Algorithm Design (8) Graph Algorithms 1/2

Transcription:

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 a second time Spanning Tree Routing: Send packet along a tree that includes all of the nodes in the network Slide

Graphs A graph G = (N,A) is a finite nonempty set of nodes and a set of node pairs A called arcs (or links or edges) N = {,,,} A = {(,),(,),(,),(,)} N = {,,} A = {(,)} Slide

Walks and paths A walk is a sequence of nodes (n, n,...,nk) in which each adjacent node pair is an arc. A path is a walk with no repeated nodes. Walk (,,,,) Path (,,,) Slide

Cycles A cycle is a walk (n, n,...,nk) with n = nk, k>, and with no repeated nodes except n = nk Cycle (,,,,) Slide 5

Connected graph A graph is connected if a path exists between each pair of nodes. Connected Unconnected An unconnected graph can be separated into two or more connected components. Slide 6

Acyclic graphs and trees An acyclic graph is a graph with no cycles. A tree is an acyclic connected graph. Acyclic, unconnected Cyclic, connected not tree not tree The number of arcs in a tree is always one less than the number of nodes Proof: start with arbitrary node and each time you add an arc you add a node => N nodes and N- links. If you add an arc without adding a node, the arc must go to a node already in the tree and hence form a cycle Slide 7

Subgraphs G' = (N',A') is a subgraph of G = (N,A) if ) G' is a graph ) N' is a subset of N ) A' is a subset of A One obtains a subgraph by deleting nodes and arcs from a graph Note: arcs adjacent to a deleted node must also be deleted Graph G Subgraph G' of G Slide 8

Spanning trees T = (N',A') is a spanning tree of G = (N,A) if T is a subgraph of G with N' = N and T is a tree 5 5 Graph G Spanning tree of G Slide 9

Spanning trees Spanning trees are useful for disseminating and collecting control information in networks; they are sometimes useful for routing To disseminate data from Node n: Node n broadcasts data on all adjacent tree arcs Other nodes relay data on other adjacent tree arcs To collect data at node n: All leaves of tree (other than n) send data Other nodes (other than n) wait to receive data on all but one adjacent arc, and then send received plus local data on remaining arc Slide 0

General construction of a spanning tree Algorithm to construct a spanning tree for a connected graph G = (N,A): ) Select any node n in N; N' = {n}; A' = { } ) If N' = N, then stop (T=(N',A') is a spanning tree) ) Choose (i,j) A, i N', j N' N' := N' {j}; A' := A' {(i,j)}; go to step Connectedness of G assures that an arc can be chosen in step as long as N N Is spanning tree unique? Slide

Spanning tree algorithm The algorithm never forms a cycle, since each new arc goes to a new node. T = (N',A') is a tree at each step of the algorithm since T is always connected, and each time we add an arc we also add a node Theorem: If G is a connected graph of n nodes, then ) G contains at least n- arcs ) G contains a spanning tree ) if G contains exactly n- arcs, G is a spanning tree Slide

Distributed algorithms to find spanning trees ) A fixed node sends a "start" message on each adjacent arc of the graph ) Each other node marks the first arc on which a start message was received as a spanning tree arc and then sends a "start" message on each other arc This is a distributed implementation of the general spanning tree algorithm It has several problems shared by many such algorithms: a) who chooses the starting node? b) When does the algorithm terminate? c) The resulting tree is somewhat random Slide

Min weight spanning tree Given a graph with weights assigned to each arc, find a spanning tree of minimum total weight (MST) Define a "fragment" to be a subtree of a MST Theorem: Given a fragment F of an MST, Let a(i,j) be a minimum weight outgoing arc from F, where j is not in F. Then, F extended by arc a(i,j) & node j is a fragment. Proof: Let M be the MST that does not include a(i,j). Since a(i,j) is not part of M, then adding a(i,j) to M must cause a cycle. There must be some link in the cycle b a which is outgoing from F. Deleting b and adding a creates a new spanning tree. Since weight of b cannot be less then weight of a, M' must be a MST. If weight of a = weight of b, then both are MST s otherwise M could not have been an MST Slide

MST algorithms Generic MST algorithm steps: Given a collection of subtrees of an MST (called fragments) add a minimum weight outgoing edge to some fragment Prim-Dijkstra: Start with an arbitrary single node as a fragment Add minimum weight outgoing edge Kruskal: Start with each node as a fragment; Add the minimum weight outgoing edge, minimized over all fragments Slide 5

Prim-Dijkstra Algorithm 5 8 7 9 Step Step 8 8 7 Step Step Step 5 Slide 6

Kruskal Algorithm Min weight outgoing edge from fragment MST 8 5 7 9 Fragment Suppose the arcs of weight and are a fragment Consider any spanning tree using those arcs and the arc of weight, say, which is an outgoing arc from the fragment. Suppose that spanning tree does not use the arc of weight. Removing the arc of weight and adding the arc of weight yields another tree of smaller weight. Thus an outgoing arc of min weight from fragment must be in MST. Slide 7