Routing and Network Design: Algorithmic Issues Kamesh Munagala Duke University.

Slides:



Advertisements
Similar presentations
Chapter 9 Greedy Technique. Constructs a solution to an optimization problem piece by piece through a sequence of choices that are: b feasible - b feasible.
Advertisements

Great Theoretical Ideas in Computer Science
COMP 482: Design and Analysis of Algorithms
Great Theoretical Ideas in Computer Science for Some.
IKI 10100: Data Structures & Algorithms Ruli Manurung (acknowledgments to Denny & Ade Azurat) 1 Fasilkom UI Ruli Manurung (Fasilkom UI)IKI10100: Lecture10.
Minimum Spanning Trees Definition Two properties of MST’s Prim and Kruskal’s Algorithm –Proofs of correctness Boruvka’s algorithm Verifying an MST Randomized.
Great Theoretical Ideas in Computer Science.
1 Discrete Structures & Algorithms Graphs and Trees: II EECE 320.
1 Spanning Trees Lecture 20 CS2110 – Spring
Approximation Algorithms: Combinatorial Approaches Lecture 13: March 2.
1 Greedy Algorithms. 2 2 A short list of categories Algorithm types we will consider include: Simple recursive algorithms Backtracking algorithms Divide.
CSE 421 Algorithms Richard Anderson Dijkstra’s algorithm.
Chapter 9: Greedy Algorithms The Design and Analysis of Algorithms.
Chapter 9 Greedy Technique Copyright © 2007 Pearson Addison-Wesley. All rights reserved.
CSE 421 Algorithms Richard Anderson Lecture 10 Minimum Spanning Trees.
Online Data Gathering for Maximizing Network Lifetime in Sensor Networks IEEE transactions on Mobile Computing Weifa Liang, YuZhen Liu.
CSE 550 Computer Network Design Dr. Mohammed H. Sqalli COE, KFUPM Spring 2007 (Term 062)
CPSC 411, Fall 2008: Set 4 1 CPSC 411 Design and Analysis of Algorithms Set 4: Greedy Algorithms Prof. Jennifer Welch Fall 2008.
Minimum Spanning Trees. Subgraph A graph G is a subgraph of graph H if –The vertices of G are a subset of the vertices of H, and –The edges of G are a.
Minimum Spanning Tree Algorithms. What is A Spanning Tree? u v b a c d e f Given a connected, undirected graph G=(V,E), a spanning tree of that graph.
Data Transmission and Base-Station Placement for Optimizing Network Lifetime Esther M. Arkin and Joseph S. B. Mitchell Stony Brook University Swaminathan.
Minimal Spanning Trees What is a minimal spanning tree (MST) and how to find one.
Shortest Path Algorithms. Kruskal’s Algorithm We construct a set of edges A satisfying the following invariant:  A is a subset of some MST We start with.
Lecture 23. Greedy Algorithms
9/10/10 A. Smith; based on slides by E. Demaine, C. Leiserson, S. Raskhodnikova, K. Wayne Adam Smith Algorithm Design and Analysis L ECTURE 8 Greedy Graph.
Theory of Computing Lecture 10 MAS 714 Hartmut Klauck.
Algorithms for Network Optimization Problems This handout: Minimum Spanning Tree Problem Approximation Algorithms Traveling Salesman Problem.
1 Introduction to Approximation Algorithms. 2 NP-completeness Do your best then.
Chapter 9 – Graphs A graph G=(V,E) – vertices and edges
Algorithms: Design and Analysis Summer School 2013 at VIASM: Random Structures and Algorithms Lecture 3: Greedy algorithms Phan Th ị Hà D ươ ng 1.
MST Many of the slides are from Prof. Plaisted’s resources at University of North Carolina at Chapel Hill.
SPANNING TREES Lecture 21 CS2110 – Spring
CS 3343: Analysis of Algorithms Lecture 21: Introduction to Graphs.
1 Introduction to Approximation Algorithms. 2 NP-completeness Do your best then.
2IL05 Data Structures Fall 2007 Lecture 13: Minimum Spanning Trees.
Spring 2015 Lecture 11: Minimum Spanning Trees
COSC 2007 Data Structures II Chapter 14 Graphs III.
UNC Chapel Hill Lin/Foskey/Manocha Minimum Spanning Trees Problem: Connect a set of nodes by a network of minimal total length Some applications: –Communication.
Minimum Spanning Trees CSE 2320 – Algorithms and Data Structures Vassilis Athitsos University of Texas at Arlington 1.
Network and Communications Ju Wang Chapter 5 Routing Algorithm Adopted from Choi’s notes Virginia Commonwealth University.
Prims’ spanning tree algorithm Given: connected graph (V, E) (sets of vertices and edges) V1= {an arbitrary node of V}; E1= {}; //inv: (V1, E1) is a tree,
Lecture 19 Greedy Algorithms Minimum Spanning Tree Problem.
CSE 589 Part VI. Reading Skiena, Sections 5.5 and 6.8 CLR, chapter 37.
Minimal Spanning Tree Problems in What is a minimal spanning tree An MST is a tree (set of edges) that connects all nodes in a graph, using.
Minimum Spanning Trees CS 146 Prof. Sin-Min Lee Regina Wang.
November 13, Algorithms and Data Structures Lecture XII Simonas Šaltenis Aalborg University
1 Greedy Technique Constructs a solution to an optimization problem piece by piece through a sequence of choices that are: b feasible b locally optimal.
SPANNING TREES Lecture 20 CS2110 – Fall Spanning Trees  Definitions  Minimum spanning trees  3 greedy algorithms (incl. Kruskal’s & Prim’s)
Graphs Slide credits:  K. Wayne, Princeton U.  C. E. Leiserson and E. Demaine, MIT  K. Birman, Cornell U.
SPANNING TREES Lecture 21 CS2110 – Fall Nate Foster is out of town. NO 3-4pm office hours today!
CSCI-256 Data Structures & Algorithm Analysis Lecture Note: Some slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved. 11.
Introduction Wireless Ad-Hoc Network  Set of transceivers communicating by radio.
Midwestern State University Minimum Spanning Trees Definition of MST Generic MST algorithm Kruskal's algorithm Prim's algorithm 1.
Greedy Technique.
Great Theoretical Ideas in Computer Science
Greedy Algorithms / Minimum Spanning Tree Yin Tat Lee
CS 3343: Analysis of Algorithms
Autumn 2016 Lecture 11 Minimum Spanning Trees (Part II)
Discrete Mathematics for Computer Science
Autumn 2015 Lecture 11 Minimum Spanning Trees (Part II)
Autumn 2015 Lecture 10 Minimum Spanning Trees
Minimum Spanning Tree Algorithms
Richard Anderson Lecture 10 Minimum Spanning Trees
Autumn 2016 Lecture 10 Minimum Spanning Trees
Winter 2019 Lecture 11 Minimum Spanning Trees (Part II)
Winter 2019 Lecture 10 Minimum Spanning Trees
Lecture 14 Minimum Spanning Tree (cont’d)
Minimum Spanning Trees
More Graphs Lecture 19 CS2110 – Fall 2009.
Autumn 2019 Lecture 11 Minimum Spanning Trees (Part II)
Presentation transcript:

Routing and Network Design: Algorithmic Issues Kamesh Munagala Duke University

Graph Model for the Links Model sensor nodes as vertices in a graph Gateway d(7,8) = “Length” of link “Length” of link models communication cost per bit “Length” should be a function of #bits being sent (Why?)

Specialized Nature “Geometric Random” graph Nodes on a 2D plane Each node has a fixed communication radius Correlation Structures: Spatial Gaussian models Simple AR(1) temporal models Assumptions do not always hold!

Unique Features Distributed algorithms: Reconfigure routes around failures Learning network topology Learning correlation structures Query processing Light-weight implementations: Low compute power and memory Limited communication and battery life Noisy sensing and transmission

Goals in this Lecture General algorithmic ideas capturing: Simplicity and efficiency Some performance guarantees Distributed implementations Low reliance on specific assumptions Caveats: Ideas need to be tailored to context Specialized algorithms might work better

Topics What constitutes good routing? Measures of quality Algorithm design framework Basic problem statements Spanning, shortest path, and Steiner trees Aggregation networks Location and subset selection problems Solution techniques Types of guarantees on solution quality Models of information in a sensor network Tailoring generic algorithms to specific models

Problem 1: Information Aggregation

Routing Tree Problem Statement: Route information from nodes to gateway Choose subset of edges to route data Edges “connect” all nodes to gateway Tree Property Minimize: Long-term average “cost” of routing Answer will depend on: What constitutes “cost” Correlations in data being collected

Toy Example Gateway Each node has 100 bits of information to send to gateway Value on link (edge) is the cost of transmitting one bit How should we route the bits? “Star” network

Depends on Correlations Gateway Suppose information is perfectly correlated Information from all sources together is also 100 bits! Spanning tree is optimal Cost = 100 * ( ) = 900 units Ignore cost of compression

Other Extreme: No Correlation Gateway Suppose information is not correlated at all Information from all sources together is now 400 bits Shortest path tree is optimal Cost = 100 * ( ) = 2400 units

Had we used a Spanning Tree Gateway Suppose information is not correlated at all Information from all sources together is now 400 bits Shortest path tree is optimal Cost = 100 * ( ) = 3000 units > 2400 units!

In summary… Moral of the story: Choosing good routes is important Choice depends on correlation structure Issues to address: How do we specify correlations Simple yet faithful specifications desirable Algorithms for finding (near-)optimal routes Efficient and simple to implement Reliability and “backup” routes

There could be n n-2 many spanning trees in general Exhaustive enumeration is out of question Minimum Spanning Tree Cost of MST =

Spanning Tree Algorithm “Greedy” schemes add edges one at a time in clever fashion No backtracking Kruskal's algorithm: Consider edges in ascending order of cost. Insert an edge unless doing so would create a cycle. Prim's algorithm: Start with gateway and greedily grow a tree from the gateway outward. At each step, add the cheapest edge that has exactly one endpoint in current tree.

Prim’s Algorithm: Execution

“Distributed” Algorithm? Nodes connect in arbitrary order Each node simply connects to “closest” existing neighbor Cost = 25

Guarantee on “Online” Scheme n nodes in graph Cost of “online” tree is within log n factor of cost of MST Irrespective of order in which nodes join the system! Intuition: In “star” network, “online” scheme produces MST! Natural implementation: Greedy starting from gateway Such a guarantee is called an “approximation guarantee”

Shortest Paths: OSPF Key algorithmic idea: Greedy local updates Each node v maintains “tentative” distance d(v) to gateway Initially, all these distances are infinity Each node v does a greedy check: If for some neighbor u, d(v) > d(u) + Length(u,v), then: Route v through u Set d(v) = d(u) + Length(u,v) Run this till it stabilizes

OSPF Execution ∞ ∞ ∞0 ∞

Rate of Convergence n nodes in graph 1.The protocol converges to the shortest path tree 2.The number of rounds till convergence is roughly n

Intermediate Correlations One tree for all correlation values? Both spanning and shortest path trees at once? Do-able if we settle for “nearly” optimal trees In other words, there exists a tree with: Cost at most thrice cost of MST Distances to gateway at most twice S.P. distances

Example: MST n nn n 111 Gateway 11 1 n 2 nodes Cost of MST = n 2 +n Path length = n 2 +n

Example: Shortest Path Tree n nn n 111 Gateway 11 1 n 2 nodes Cost = n 3 Path Length = n 2

Example: Balanced Tree n nn n 111 Gateway 11 1 n nodes Cost = 2n 2 Path Length = 2n

Walk on a Tree Gateway

Balancing Algorithm Gateway Walk along Spanning Tree Add shortcuts to gateway At node v: Suppose previous shortcut at u If SP(u) + Walk(u,v) > 2 SP(v) Add “shortcut” from v Walk too long! Shortcut

Example Revisited n nn n 11 1 Gateway 11 1 n nodes Walk length = 2n

Proof Idea Final Path Lengths < 2 S.P. Lengths Follows from description Final Cost < 3 MST Cost Final Cost = MST + Shortest Paths Added Suppose paths are added at …,u,v… on walk SP(u) + Walk(u,v) > 2 SP(v) Add these up: Total Walk Length > Total Length of added Paths But, Total Walk Length = 2 MST Cost

Problem 2: Sensor Location

“Most Informative” Placement Close by locations are not very “informative”

Abstraction Parameters: Each node v has communication cost to gateway = c v Depends on location Subset S of nodes has “information” f(S) Information is a property of a set of nodes Depends on whether “close by” nodes also in set Problem Statement: Choose set S so that: Sum of costs of nodes in S is at most C Maximize Information = f(S)

Algorithmic Issue Number of subsets of n locations = 2 n Inefficient to enumerate over them Given subset S, how do we compute f(S) Needs a correlation model among locations Communication costs are not additive Also depend on location of nodes!

Information Functions f(S) = Entropy of S Correlations are multidimensional Gaussian:  = Covariance matrix between locations Entropy  log det(  ) Covariance(j,k)  exp(-dist(j,k) 2 / h 2 )

Properties of f(S) A B v Location v is more informative w.r.t A than w.r.t B Property 2: f(A+v) - f(A) ≥ f(B+v) - f(B) Property 1: f(A+v) ≥ f(A)

Greedy Algorithm Start with S =  Repeat till cost of S exceeds C: Choose v such that: ( f(S+v) - f(S) ) / c v is maximized “Information gain per unit cost” Add v to S

Analysis Suppose: All costs c v = 1 O = Best Information set of size at most C At any stage, if adding v is best greedy decision Adding entire O cannot give more information per unit cost! f(S + v) - f(S) ≥ ( f(S + O) - f(S) )/C ≥ ( f(O) - f(S) )/C Let d(S) = f(O) - f(S) = Deficit w.r.t. Optimal Solution Implies: d(S) - d(S+v) ≥ d(S) / C

Analysis d(S+v) ≤ d(S) (1 - 1/C) d(Initial) = f(O) d(Final) = f(O) - f(Final) f(O) - f(Final) = d(Final) ≤ d(Initial) ( 1 - 1/C ) C ≤ f(O) / 2 Implies: f(Final) ≥ f(O) / 2 Greedy set has information at least 1/2 information in optimal set

Two-Level Routing Aggregation Hub

Clustering Optimal placement of cluster-heads Minimize routing cost

K-Means Algorithm Start with k arbitrary leaders Repeat Steps 1 and 2 till convergence: Step 1: Assign each node to closest leader Yields k “clusters” of nodes Step 2: For each cluster, choose “best” leader Minimizes total routing cost within cluster

Analysis Convergence is guaranteed: Each step reduces total distance Step 1: Each node travels smaller distance Step 2: Each cluster’s routing cost reduces Rate of convergence: Fast in practice Quality of solution: “Local” optimum depending on initial k nodes Need not be best possible solution Works very well in practice