1 Directed Graphs: Victoria Road Problem. 2 Update: Edge is deleted; Edge is inserted Edge weight is changed F A Directed graph problems.

Slides:



Advertisements
Similar presentations
Algorithms (and Datastructures) Lecture 3 MAS 714 part 2 Hartmut Klauck.
Advertisements

Planning for Fast Connectivity Updates Mihai Pă traşcu Mikkel Thorup …until June 2008 Jobs, anyone?
all-pairs shortest paths in undirected graphs
Chapter 9: Graphs Shortest Paths
Dynamic Graph Algorithms - I
IKI 10100: Data Structures & Algorithms Ruli Manurung (acknowledgments to Denny & Ade Azurat) 1 Fasilkom UI Ruli Manurung (Fasilkom UI)IKI10100: Lecture10.
Fully Dynamic Transitive Closure: Breaking Through the O(n 2 ) Barrier Camil Demetrescu University of Rome “La Sapienza” Giuseppe F. Italiano University.
Graphs Chapter 12. Chapter Objectives  To become familiar with graph terminology and the different types of graphs  To study a Graph ADT and different.
Midwestern State University Department of Computer Science Dr. Ranette Halverson CMPS 2433 CHAPTER 4 - PART 2 GRAPHS 1.
More Graph Algorithms Minimum Spanning Trees, Shortest Path Algorithms.
 Graph Graph  Types of Graphs Types of Graphs  Data Structures to Store Graphs Data Structures to Store Graphs  Graph Definitions Graph Definitions.
Two reductions to decremental BFS Camil Demetrescu University of Rome “La Sapienza”
CS 311 Graph Algorithms. Definitions A Graph G = (V, E) where V is a set of vertices and E is a set of edges, An edge is a pair (u,v) where u,v  V. If.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Fall, 2001 Lectures 3 Tuesday, 9/25/01 Graph Algorithms: Part 1 Shortest.
1 On Dynamic Shortest Paths Problems Liam Roditty Uri Zwick Tel Aviv University ESA 2004.
CS728 Lecture 16 Web indexes II. Last Time Indexes for answering text queries –given term produce all URLs containing –Compact representations for postings.
Graph & BFS Lecture 22 COMP171 Fall Graph & BFS / Slide 2 Graphs * Extremely useful tool in modeling problems * Consist of: n Vertices n Edges D.
Graph Algorithms: Part 1
An almost linear fully dynamic reachability algorithm.
Greedy Algorithms Reading Material: Chapter 8 (Except Section 8.5)
Graphs Chapter 12. Chapter 12: Graphs2 Chapter Objectives To become familiar with graph terminology and the different types of graphs To study a Graph.
Improved dynamic reachability algorithms for directed graphs Liam Roditty and Uri Zwick Tel Aviv University.
Liam Roditty Reachability in Directed Graphs. Connectivity in undirected graphs Given two vertices decide whether they are in the same component. Reachability.
Fall 2007CS 2251 Graphs Chapter 12. Fall 2007CS 2252 Chapter Objectives To become familiar with graph terminology and the different types of graphs To.
Greedy Algorithms Like dynamic programming algorithms, greedy algorithms are usually designed to solve optimization problems Unlike dynamic programming.
CISC220 Fall 2009 James Atlas Nov 13: Graphs, Line Intersections.
1 An almost linear fully dynamic reachability algorithm Liam Roditty and Uri Zwick Tel Aviv University.
Theory of Computing Lecture 7 MAS 714 Hartmut Klauck.
Improved Randomized Algorithms for Path Problems in Graphs PhD Thesis Surender Baswana Department of Computer Science & Engineering, I.I.T. Delhi Research.
Minimal Spanning Trees What is a minimal spanning tree (MST) and how to find one.
Week -7-8 Topic - Graph Algorithms CSE – 5311 Prepared by:- Sushruth Puttaswamy Lekhendro Lisham.
Chapter 9 – Graphs A graph G=(V,E) – vertices and edges
Chapter 2 Graph Algorithms.
CSCE350 Algorithms and Data Structure Lecture 17 Jianjun Hu Department of Computer Science and Engineering University of South Carolina
Distance sensitivity oracles in weighted directed graphs Raphael Yuster University of Haifa Joint work with Oren Weimann Weizmann inst.
Graphs. Definitions A graph is two sets. A graph is two sets. –A set of nodes or vertices V –A set of edges E Edges connect nodes. Edges connect nodes.
Minimum spanning trees (MST) Def: A spanning tree of a graph G is an acyclic subset of edges of G connecting all vertices in G. A sub-forest of G is an.
CSE 2331 / 5331 Topic 12: Shortest Path Basics Dijkstra Algorithm Relaxation Bellman-Ford Alg.
Spanning Trees. A spanning tree for a connected, undirected graph G is a graph S consisting of the nodes of G together with enough edges of G such that:
Data Structures & Algorithms Shortest Paths Richard Newman based on book by R. Sedgewick and slides by S. Sahni.
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.
Graphs Chapter 12. Chapter 12: Graphs2 Chapter Objectives To become familiar with graph terminology and the different types of graphs To study a Graph.
Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.
Graph Theory. undirected graph node: a, b, c, d, e, f edge: (a, b), (a, c), (b, c), (b, e), (c, d), (c, f), (d, e), (d, f), (e, f) subgraph.
CSE 421 Algorithms Richard Anderson Winter 2009 Lecture 5.
Exponential random graphs and dynamic graph algorithms David Eppstein Comp. Sci. Dept., UC Irvine.
Graphs David Kauchak cs302 Spring Admin HW 12 and 13 (and likely 14) You can submit revised solutions to any problem you missed Also submit your.
Shortest Paths.
Improved Randomized Algorithms for Path Problems in Graphs
Spanning Trees.
Minimum Spanning Trees and Shortest Paths
Greedy Algorithms / Dijkstra’s Algorithm Yin Tat Lee
Shortest Paths.
Minimum Spanning Trees
Chapter 11 Graphs.
Improved dynamic reachability algorithms for directed graphs
Autumn 2015 Lecture 10 Minimum Spanning Trees
Chapter 15 Graphs © 2006 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.
Reachability in Directed Graphs
Strongly Connected Components
Lecture 14 Shortest Path (cont’d) Minimum Spanning Tree
Dynamic Graph Algorithms
Graphs G = (V, E) V are the vertices; E are the edges.
EMIS 8374 Search Algorithms Updated 9 February 2004
Shortest Paths.
CSE 417: Algorithms and Computational Complexity
Lecture 13 Shortest Path (cont’d) Minimum Spanning Tree
EMIS 8374 Search Algorithms Updated 12 February 2008
GRAPHS.
More Graphs Lecture 19 CS2110 – Fall 2009.
Presentation transcript:

1 Directed Graphs: Victoria Road Problem

2 Update: Edge is deleted; Edge is inserted Edge weight is changed F A Directed graph problems

3 ; F A Reachability (transitive closure) Query: Is there a directed path from A to F?

4 F A Directed graph problems What is (approx.) distance from A to F? or Update: Change edges incident to a single node.

5 Reachability (transitive closure) Query: Is there a directed path from A to F? All Pairs Shortest Paths Query: What is (approx.) distance from A to F? or Query: What is the shortest path from A to F? Update: Change edges incident to a single node. Strongly Connected Components Query: Are a and b in the same strongly connected component? (Is there a path from a->b and b->a?) 1997—Now : many papers

6 GOALS Reachability (transitive closure) Static cost=O(mn) or fast matrix mult. All Pairs (approx.) Shortest Paths Static cost = Õ(mn ) Strongly Connected Components Static cost = O(m) Decremental/Fully dynamic Query/Update time tradeoffs

7

8 COUNTING: Simple monte carlo method for acyclic graph (K, Sagert 1998) C J I D For each pair I, J, keep count of #Paths ( I --> J) Adding (C,D) adds #Paths(I-->C)*#Paths(D-->J) Subtracting “ subtracts “

9 But exponentially many!, too large a wordsize so.... C J I D For each pair I, J, keep count of #Paths ( I --> J) mod p Adding (C,D) adds #Paths(I-->C)*#Paths(D-->J) Subtracting “ subtracts “

10 Works with high probability

11 IDEA 2: Using Even-Shiloach Breadthfirst Trees D BC A Recall: O(md) time to maintain deletions only tree to depth d Idea: DON’T go all the way to depth n

12

Ideas 2&3: Use short trees to deal with short paths/random nodes to deal with long paths (deletions only) Henzinger, K (FOCS 1995), others 13

14 v1v2vn r1

15

16 From Decremental algorithms to fully dynamic algorithms with large query times Keep deletions-only data structure for old edges. Keep track of recently added edges and rebuild single source/sink decremental E-S trees for these. If there is a query, test if any of the recently added edges is on a new path that needs to be used. Rebuild deletions-only data structure after enough insertions

Decremental single source Reachability for acyclic graphs (Italiano(1988) keep a tree of edges to the nodes The source can reach and for each node u store its pred. If an edge {v,w} is deleted, then test if w has a “hook” to the nodes u can reach. If not, w is not Reachable. Check its children. If an edge is considered and found not to be a hook, It is never a hook for that tree. -> total cost is O(mn)

Decremental Reachability for acyclic graphs (Italiano(1988)

19 Speed up decremental transitive closure by maintaining Strongly Connected Components (Roditty, Zwick 2002) (then use acyclic method) SCC v Randomly chosen v Key Idea: As SCC decomposes, random node v is likely to be in LARGEST comp.

20 Only rebuild In-Out trees for smaller comps. Total cost ~ cost of largest tree=O(mn)

21 Only rebuild In-Out trees for smaller comps. Total cost ~ cost of largest tree=O(mn)

22

Shortest (approx.) paths

State of Art for Query time O(1) Fully dynamic APSP in general graphs to Demetresco Italiano 2003 Decremental directed, unweighted Baswana,et al t Undirected,unweighted Roditty, Zwick (2004) (improved 2013 FOS Henzinger,Krinniger, Nanongkal) Weighted, directed Bernstein 2013 STOC. Neg edge wts(Thorup)_

26 First idea: Maintain paths up to length n 1/2 Use nodes in S to join short paths together, O(n 2.5 log n) (K99) v1 v2vn

Roditty and Zwick (FOCS 2004) Decremental (1+ ε) Approximate Shortest Paths (unweighted, undirected) with Small query time and Õ(mn) total time 27

28

Using Ideas 3&4: 29

To answer a query what is the approx. distance from (u,v)? 30

Why does this work? 31

32 E-S Trees with pos integer weighted edges, weight increases (k 1999) D BC A Similar to Dijkstra’s shortest path alg

Shortcut edges Maintain h.SSSP for random sample of nodes Add shortcut edge (a,b) for all a,b in Sample. weighted by dist (a,b) For each sample node run h.SSSP For every node v add shortcut edge to each sample node & maintain h. SSSP