(v,w) disconnected? bridge? articulatiion point? Update MST during insertion and deletion

Similar documents
Preliminaries. Graphs. E : set of edges (arcs) (Undirected) Graph : (i, j) = (j, i) (edges) V = {1, 2, 3, 4, 5}, E = {(1, 3), (3, 2), (2, 4)}

5. Biconnected Components of A Graph

Discrete Wiskunde II. Lecture 5: Shortest Paths & Spanning Trees

CS 580: Algorithm Design and Analysis

Breadth-First Search of Graphs

PATH PROBLEMS IN SKEW-SYMMETRIC GRAPHS ANDREW V. GOLDBERG COMPUTER SCIENCE DEPARTMENT STANFORD UNIVERSITY STANFORD, CA

Notes on Logarithmic Lower Bounds in the Cell Probe Model

Fibonacci Heaps These lecture slides are adapted from CLRS, Chapter 20.

Algorithm Design and Analysis

25. Minimum Spanning Trees

25. Minimum Spanning Trees

Algorithms: Lecture 12. Chalmers University of Technology

Undirected Graphs. V = { 1, 2, 3, 4, 5, 6, 7, 8 } E = { 1-2, 1-3, 2-3, 2-4, 2-5, 3-5, 3-7, 3-8, 4-5, 5-6 } n = 8 m = 11

2-INF-237 Vybrané partie z dátových štruktúr 2-INF-237 Selected Topics in Data Structures

A Subquadratic-Time Algorithm for Decremental Single-Source Shortest Paths

UNIVERSITY OF YORK. MSc Examinations 2004 MATHEMATICS Networks. Time Allowed: 3 hours.

CS 410/584, Algorithm Design & Analysis, Lecture Notes 4

Lecture 1. 1 Overview. 2 Maximum Flow. COMPSCI 532: Design and Analysis of Algorithms August 26, 2015

CS781 Lecture 3 January 27, 2011

Chapter 5 Data Structures Algorithm Theory WS 2017/18 Fabian Kuhn

Algorithm Design and Analysis

FINAL EXAM PRACTICE PROBLEMS CMSC 451 (Spring 2016)

FIBONACCI HEAPS. preliminaries insert extract the minimum decrease key bounding the rank meld and delete. Copyright 2013 Kevin Wayne

SRC Research. d i g i t a l. To Provide or To Bound: Sampling in Fully Dynamic Graph Algorithms. Report 143. Monika R. Henzinger and Mikkel Thorup

6.889 Lecture 4: Single-Source Shortest Paths

arxiv: v2 [cs.ds] 17 Apr 2017

Theory of Network Communication

Algorithms and Theory of Computation. Lecture 11: Network Flow

Mon Tue Wed Thurs Fri

Dijkstra s Single Source Shortest Path Algorithm. Andreas Klappenecker

Optimal Color Range Reporting in One Dimension

Part V. Matchings. Matching. 19 Augmenting Paths for Matchings. 18 Bipartite Matching via Flows

CMPUT 675: Approximation Algorithms Fall 2014

Lower Bounds for Dynamic Connectivity (2004; Pǎtraşcu, Demaine)

Incremental Exact Min-Cut in Poly-logarithmic Amortized Update Time

The Budgeted Minimum Cost Flow Problem with Unit Upgrading Cost

On shredders and vertex connectivity augmentation

Graph-theoretic Problems

Connectivity and Menger s theorems

Contents Lecture 4. Greedy graph algorithms Dijkstra s algorithm Prim s algorithm Kruskal s algorithm Union-find data structure with path compression

CS60007 Algorithm Design and Analysis 2018 Assignment 1

Lecture 4 Thursday Sep 11, 2014

Shortest Path Algorithms

Algorithm Design Strategies V

22 Max-Flow Algorithms

CS 161: Design and Analysis of Algorithms

past balancing schemes require maintenance of balance info at all times, are aggresive use work of searches to pay for work of rebalancing

Maintaining Consistency of Dynamic Cardinality Constraints with Costs

NATIONAL UNIVERSITY OF SINGAPORE CS3230 DESIGN AND ANALYSIS OF ALGORITHMS SEMESTER II: Time Allowed 2 Hours

MA015: Graph Algorithms

ne a priority queue for the nodes of G; ile (! PQ.is empty( )) select u PQ with d(u) minimal and remove it; I Informatik 1 Kurt Mehlhorn

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

CSE 431/531: Analysis of Algorithms. Dynamic Programming. Lecturer: Shi Li. Department of Computer Science and Engineering University at Buffalo

CSE 4502/5717 Big Data Analytics Spring 2018; Homework 1 Solutions

A Simple Implementation Technique for Priority Search Queues

Network Flow Problems Luis Goddyn, Math 408

Dominating Set. Chapter 26

Dominating Set. Chapter Sequential Greedy Algorithm 294 CHAPTER 26. DOMINATING SET

Proof methods and greedy algorithms

8 Priority Queues. 8 Priority Queues. Prim s Minimum Spanning Tree Algorithm. Dijkstra s Shortest Path Algorithm

8 cost load

Exact and Approximate Equilibria for Optimal Group Network Formation

International Journal of Scientific & Engineering Research, Volume 7, Issue 11, November-2016 ISSN Nullity of Expanded Smith graphs

Counting and Constructing Minimal Spanning Trees. Perrin Wright. Department of Mathematics. Florida State University. Tallahassee, FL

4.8 Huffman Codes. These lecture slides are supplied by Mathijs de Weerd

CMPSCI611: The Matroid Theorem Lecture 5

Network Design and Game Theory Spring 2008 Lecture 6

University of New Mexico Department of Computer Science. Final Examination. CS 362 Data Structures and Algorithms Spring, 2007

UNIVERSITY OF CALIFORNIA, RIVERSIDE

Splay Trees. CMSC 420: Lecture 8

Data Structures 1 NTIN066

Algorithm Design and Analysis (NTU CSIE, Fall 2017) Homework #3. Homework #3. Due Time: 2017/12/14 (Thu.) 17:20 Contact TAs:

Chromatic characterization of biclique cover. Denis Cornaz. Jean Fonlupt. Equipe Combinatoire, UFR 921, Universite Pierre et Marie Curie, 4 place

CS675: Convex and Combinatorial Optimization Fall 2014 Combinatorial Problems as Linear Programs. Instructor: Shaddin Dughmi

Lecture 3. 1 Polynomial-time algorithms for the maximum flow problem

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

1 Some loose ends from last time

Greedy Algorithms and Data Compression. Curs 2018

Lecture 21 November 11, 2014

Single Source Shortest Paths

IS 709/809: Computational Methods in IS Research Fall Exam Review

The Complexity of Constructing Evolutionary Trees Using Experiments

Minimum Spanning Trees

CPSC 320 Sample Final Examination December 2013

CMPS 2200 Fall Carola Wenk Slides courtesy of Charles Leiserson with small changes by Carola Wenk. 10/8/12 CMPS 2200 Intro.

Dominating Set. Chapter 7

A Tight Lower Bound for Dynamic Membership in the External Memory Model

Slides credited from Hsueh-I Lu & Hsu-Chun Hsiao

Finding Paths in Grids with Forbidden Transitions

An Õ m 2 n Randomized Algorithm to compute a Minimum Cycle Basis of a Directed Graph

Algorithm Design and Analysis

Maintaining Near-Popular Matchings

Breadth First Search, Dijkstra s Algorithm for Shortest Paths

Search Trees. Chapter 10. CSE 2011 Prof. J. Elder Last Updated: :52 AM

Shortest paths: label setting

The Evolution of Grötzsch s Theorem

Analysis of Algorithms. Outline 1 Introduction Basic Definitions Ordered Trees. Fibonacci Heaps. Andres Mendez-Vazquez. October 29, Notes.

Long Monochromatic Cycles in Edge-Colored Complete Graphs

Integrated Network Design and Scheduling Problems with Parallel Identical Machines: Complexity Results and Dispatching Rules

Computing Connected Components Given a graph G = (V; E) compute the connected components of G. Connected-Components(G) 1 for each vertex v 2 V [G] 2 d

Transcription:

Dynamic graph algorithms with applications Mikkel Thorup AT&T Labs{Research

Dynamic data structures in static problems Standard example: priority queue in greedy algorithm such as Dijkstra's single source shortest path algorithm. Here we consider dynamic graph algorithms maintaining properties and objects in a changing graph. 2

Dynamic graph algorithms Updates w delete (,w) w insert (,w) Connectiity disconnected? connected (,w) w w 2-edge-connectiity bridge? 2-edge-connected (,w) w w Biconnectiity articulatiion point? biconnectied (,w) w Minimum spanning tree (MST) Update MST during insertion and deletion 3

Applications Constructing tree from homeomorphic subtrees c b a b c d a b c d Unique perfect matching We shall also talk about dynamic shortest paths and their applications. 4

Connectiity of G = (V E), jv j = n, during m updates, starting E =. Maintain spanning forest F (for dynamic forest F \eerything" takes O(log n) time) insert(( w)) if and w disconnected in F, F := F [ f( w)g delete(( w)) if ( w) 2 F, seek replacement edge from E reconnecting F n f( w)g? 5

Introduce leels ` : E! f0 ::: blog 2 ncg G i = (V fe 2 E : `(e) ig) (i) F `-maximal spanning forest ) F i = F \ G i spanning forest of G i (ii) Components of G i contain n=2 i ertices. Idea: amortize oer leel increases Insert(( w)): `(( w)) := 0. If and w disconnected in F, F [ f( w)g Delete(e): If e 2 F, F := (F nfeg) [ Replace(e) 6

Replace(e) For i := `(e) downto 0 do no replacement edge on leel > i T T 2 T < - T 2 leel i replacement connect T and T 2 jt j n=2 i+ For all leel i edges f 2 T : `(f) := i+. Consider leel i edges ( w), 2 T, one by one: If w 62 T, return f( w)g. Else `(( w)) := i +. Return Each statement iterated m log 2 n times ^ each statement supported in O(log n) time ) O(m log 2 n) total time. 7

Decremental MST of G = (V E), jv j = n, jej = m. Maintain minimum spanning forest F delete(( w)) if ( w) 2 F, seek lightest replacement from E reconnecting F nf( w)g Introduce leels ` : E! f0 ::: blog 2 ncg G i = (V fe 2 E : `(e) ig) (i) F `-maximal spanning forest ) F i = F \ G i spanning forest of G i (ii) Components of G i contain n=2 i ertices. Initially F minimum spanning forest and 8e 2 E : `(e) = 0 Delete(e): if e 2 F, F := (F nfeg) [ Replace(e) 8

Replace(e) For i := `(e) downto 0 do T T 2 T < - T 2 For all leel i edges f 2 T : `(f) := i+. Consider leel i edges ( w), 2 T, one by one, in order of increasing weight: If w 62 T, return f( w)g. Else `(( w)) := i +. Return! fully-dynamic polylogarimic MST using general reduction of Henzinger and King (ICALP'97). 9

2-edge-connectiity of G = (V E), jv j = n, during m updates, starting with E =. Maintain spanning forest F ( w) 2 E coers path w from to w in F Lem x and y 2-edge connected () x y coered. 0

Introduce leels ` : E n F! f0 ::: blog 2 ncg G i = (V F [ fe 2 E : `(e) ig) con- (i) 2-edge connected components of G i tain n=2 i ertices. For each f 2 F maintain highest leel of coering edge, denoted c(f). If f bridge, c(f) = ;. Connected(x y): 8e 2 x y : c(e) 0. Insert(( w)) If and w disconnected in F, F [ f( w)g. c(( w)) := ;. Else `(( w)) := 0 call Coer`(( w)) Coer(( w)) For all f 2 w with c(f) < `(( w)), c(f) := ( w).

Delete(e) if e 2 F, swap e in F with coering edge f on highest leel (c(f) `(e)) := (`(f) c(e)) e := f Recoer(e) 4 2 5 3 Coer only called O(m log n) times, each at polylogarithmic cost using data structures for dynamic forests. 2

Applications 3

Constructing tree from homeomorphic subtrees c b a b c d a b c d Reduction to decremental connectiity by Henzinger, King, and Warnow (SODA'96) Small trees represented as triples ((a b) c) 2 T with a b c 2 A. Obs If ((a b) c) 2 T, a and b must descend from same child of root. Make child for each component of G = (A f(a b) : ((a b) c) 2 T g) This resoles all triples ((a b) c) with c disconnected from b (and a) in G. Grandchildren found by remoing edge (a b) for each resoled triple ((a b) c). 4

Unique perfect matchings Reduction to decremental 2-edge connectiity by Gabow, Kaplan, and Tarjan (STOC'99) Lem (Kotzig 959) A unique perfect matching has a bridge. Constructing unique perfect matching, if any M := While component C of G has bridge ( w) If components of C n f( w)g both hae odd number of ertices, M := M [ f( w)g. Delete all edges incident to and w from G. Elseif components of C n f( w)g both hae een number of ertices, Delete ( w) from G. Else G has no perfect matching. EXIT. If G empty, return M Else G has no perfect matching. 5

...another application Thm (Petersen 89) Eery bridgeless 3- regular graph has a perfect matching. Biedl, Bose, Demaine, and Lubiw (SODA'99) hae used dynamic 2-edge connectiity to construct such a perfect matching in ~ O(n) time, improing oer the bound the ~ O(n 3=2 ) obtained using the general time bound for matching when m = O(n). 6

Shortest paths: some techniques Ramalingam and Reps suggested lazy Dijkstra for single source shortest paths. Running time proportional to # edges incident to ertices changing distance from source. Works great in practice. Recent break-through by Demetrescu and Italiano on all pairs-shortest path: Each ertex update supported in ~ O(n 2 ) time. Works een better in practice. Current best has update time O(n 2 (log n + log 2 (m=n)) and works for arbitrary weights [Thorup]. 7

Internet trac engineering Demand of for (s t) and (u ) General routing: max load 2/3 s t u Shortest path routing: max load or 3/4 s t u s 5 t 0 0 u 3 8

Optimizing shortest path routing with dynamic shortest paths [Fortz Thorup] Finding weights minimizing max utilization (load/capacity) within factor 3/2 is NP-hard. Cisco default: link weight inerse of capacity. Local search heuristics Iteratiely change a weight that reduces maxutilization. When inner loop tries a weight change, new shortest path routes are found and ealuated. Ramalingam and Reps gae speed-up by factor 5 with 00 nodes and 300 edges. Gained 50% oer Cisco default on AT&T IP backbone. Got within few percent of optimal general routing. 9

Concluding remarks Talked about dynamic graph algorithms and their applications in soling static problems Similar to priority queues in greedy algorithms Challenge: dynamic reachability between xed s and t for sparse graphs! better augmenting paths max-ow algorithms. 20