all-pairs shortest paths in undirected graphs

Slides:



Advertisements
Similar presentations
Chapter 28 Weighted Graphs and Applications
Advertisements

You have been given a mission and a code. Use the code to complete the mission and you will save the world from obliteration…
Unit-iv.
Using Matrices in Real Life
Advanced Piloting Cruise Plot.
Chapter 1 The Study of Body Function Image PowerPoint
1 Copyright © 2013 Elsevier Inc. All rights reserved. Appendix 01.
1 Copyright © 2010, Elsevier Inc. All rights Reserved Fig 2.1 Chapter 2.
By D. Fisher Geometric Transformations. Reflection, Rotation, or Translation 1.
Chapter 1 Image Slides Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Analysis of Algorithms
and 6.855J Cycle Canceling Algorithm. 2 A minimum cost flow problem , $4 20, $1 20, $2 25, $2 25, $5 20, $6 30, $
Introduction to Algorithms 6.046J/18.401J/SMA5503
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Title Subtitle.
My Alphabet Book abcdefghijklm nopqrstuvwxyz.
DIVIDING INTEGERS 1. IF THE SIGNS ARE THE SAME THE ANSWER IS POSITIVE 2. IF THE SIGNS ARE DIFFERENT THE ANSWER IS NEGATIVE.
SUBTRACTING INTEGERS 1. CHANGE THE SUBTRACTION SIGN TO ADDITION
MULT. INTEGERS 1. IF THE SIGNS ARE THE SAME THE ANSWER IS POSITIVE 2. IF THE SIGNS ARE DIFFERENT THE ANSWER IS NEGATIVE.
Addition Facts
Year 6 mental test 5 second questions
ZMQS ZMQS
Graph Algorithms - 3 Algorithm Design and Analysis Victor AdamchikCS Spring 2014 Lecture 13Feb 12, 2014Carnegie Mellon University.
Improved Shortest Path Algorithms for Nearly Acyclic Directed Graphs L. Tian and T. Takaoka University of Canterbury New Zealand 2007.
Randomized Algorithms Randomized Algorithms CS648 1.
ABC Technology Project
1 Undirected Breadth First Search F A BCG DE H 2 F A BCG DE H Queue: A get Undiscovered Fringe Finished Active 0 distance from A visit(A)
VOORBLAD.
15. Oktober Oktober Oktober 2012.
1 Breadth First Search s s Undiscovered Discovered Finished Queue: s Top of queue 2 1 Shortest path from s.
Differential Forms for Target Tracking and Aggregate Queries in Distributed Networks Rik Sarkar Jie Gao Stony Brook University 1.
Squares and Square Root WALK. Solve each problem REVIEW:
© 2012 National Heart Foundation of Australia. Slide 2.
Lets play bingo!!. Calculate: MEAN Calculate: MEDIAN
Chapter 5 Test Review Sections 5-1 through 5-4.
GG Consulting, LLC I-SUITE. Source: TEA SHARS Frequently asked questions 2.
Addition 1’s to 20.
25 seconds left…...
Complexity ©D.Moshkovits 1 Where Can We Draw The Line? On the Hardness of Satisfiability Problems.
2 4 Theorem:Proof: What shall we do for an undirected graph?
Week 1.
10 -1 Chapter 10 Amortized Analysis A sequence of operations: OP 1, OP 2, … OP m OP i : several pops (from the stack) and one push (into the stack)
We will resume in: 25 Minutes.
CS203 Lecture 15.
Other Dynamic Programming Problems
How Cells Obtain Energy from Food
Bart Jansen 1.  Problem definition  Instance: Connected graph G, positive integer k  Question: Is there a spanning tree for G with at least k leaves?
Epp, section 10.? CS 202 Aaron Bloomfield
Approximate Distance Oracles and Spanners with sublinear surplus Mikkel Thorup AT&T Research Uri Zwick Tel Aviv University.
1 Efficient algorithms on sets of permutations, dominance, and real-weighted APSP Raphael Yuster University of Haifa.
Competitive fault tolerant Distance Oracles and Routing Schemes Weizmann Open U Weizmann Bar Ilan Shiri Chechik Michael Langberg David Peleg Liam Roditty.
Dynamic Graph Algorithms - I
Two reductions to decremental BFS Camil Demetrescu University of Rome “La Sapienza”
Noga Alon Institute for Advanced Study and Tel Aviv University
1 Directed Graphs: Victoria Road Problem. 2 Update: Edge is deleted; Edge is inserted Edge weight is changed F A Directed graph problems.
1 On Dynamic Shortest Paths Problems Liam Roditty Uri Zwick Tel Aviv University ESA 2004.
Improved dynamic reachability algorithms for directed graphs Liam Roditty and Uri Zwick Tel Aviv University.
1 Approximate Distance Oracles Mikkel Thorup AT&T Research Uri Zwick Tel Aviv University.
1 An almost linear fully dynamic reachability algorithm Liam Roditty and Uri Zwick Tel Aviv University.
Approximate Distance Oracles Mikkel Thorup and Uri Zwick Presented By Shiri Chechik.
Improved Randomized Algorithms for Path Problems in Graphs
Yuval Peres Dmitry Sotnikov Benny Sudakov Uri Zwick (武熠)
David Wilson – Microsoft Research Uri Zwick – Tel Aviv Univ.
Randomized Algorithms CS648
Approximate Distance Oracles and Spanners with sublinear surplus
Improved dynamic reachability algorithms for directed graphs
Approximate Distance Oracles
Compact routing schemes with improved stretch
Presentation transcript:

all-pairs shortest paths in undirected graphs Dynamic approximate all-pairs shortest paths in undirected graphs Liam Roditty Uri Zwick Tel Aviv University

Dynamic Graph Problems A graph Initialize Insert Delete Query n - number of vertices m - number of edges

Shortest Paths Problems Single-Source Shortest Paths (SSSP) All-Pairs Shortest Paths (APSP) “Distance Oracles”

Approximate Distance Oracles (TZ’01) n by n distance matrix APSP algorithm Compact data structure mn1/k time n1+1/k space O(1) query time stretch 2k-1 Stretch-Space tradeoff is essentially optimal!

Dynamic Shortest Paths Algorithms Problem Total update time Amortized* update time Query time Authors Decremental SSSP O(mn) O(n) O(1) Even-Shiloach ’81 Decremental (1+)-approximate APSP O*(mn) O*(n) O(1) This talk Problem Amortized update time Query time Authors Fully-dynamic APSP O*(n2) O(1) Demetrescu-Italiano ’03 (Thorup ’04) Fully-dynamic (1+)- approximate APSP O*(m1/2n) O(m1/2) This talk

Decremental Approximate Distance Oracles Compact data structure mn1/k time n1+1/k space O(1) query time stretch 2k-1 Static mn time m+n1+1/k space Decremental Decremental (up to distance d) dmn1/k time m+n1+1/k space

Thorup-Zwick ’01 Static approximate distance oracles. Three ingredients Even-Shiloach ’81 A decremental algorithm for maintaining a single-source shortest path tree of depth d with a total running time of O(dm). Random Sampling Let P be a set of vertices of size k. Let S be a random subset of vertices of size (cn ln n)/k. Then with high probability PS  . Thorup-Zwick ’01 Static approximate distance oracles.

Decremental SSSP [Even-Shiloach ’81] Every edge is only examined once per level! Total complexity is O(dm).

Random Sampling n k Select each element independently with probability The probability that a given set of k elements is not hit is

Let pi(v) be the vertex of Si closest to v A sequence of Samples Let Si be a subset obtained by selecting each vertex with probability (c ln n)/(2i) Let pi(v) be the vertex of Si closest to v If v is contained in a connected component with at least 2i vertices, then: δ(v,pi(v)) ≤ 2i 2i pi(v)

Maintaining the closest centers To compute pi(v) for every v: Add a new source vertex si. Connect it to all vertices of Si. Maintain a SSSP tree from si.

Maintaining distances from centers From each center of Si maintain a SSSP tree of depth 2i+2 Complexity:

Answering a distance query pi(u) u v Suppose: Return: ≤ ≤

Answering a distance query pi(u) u v Return: where i is smallest such that v is in the tree of pi(u), i.e., This value of i can be found using binary search. Query time: O(log log n) Stretch: 1+

Reporting long distances in O(1) time pr(u) pr(v) u v Suppose: Let: Return: Maintain a table of all Sr to Sr distances. Size of table is O(n).

Reporting short distances in O(1) time Suppose: Develop a decremental version of the static approximate distance oracles of TZ. dmn1/k time m+n1+1/k space stretch 2k-1 Take d=n1/2 k=2 For distances up to d The 3-approximation can be refined into a (1+)-approximation in O(1) time.

Approximate Distance Oracles [TZ’01] A hierarchy of centers A0V ; Ak  ; Ai sample(Ai-1,n-1/k) ;

A0= A1= A2= Clusters w

Bunches (inverse clusters)

Bunches A0= A1= A2= p2(v) v p1(v)

Approximate Distance Oracles [TZ’01] The data structure For every vertex vV: The centers p1(v), p2(v),…, pk-1(v) A hash table holding B(v) For every wV, we can check, in constant time, whether wB(v), and if so, what is (v,w).

Lemma: E[|B(v)|] ≤ kn1/k Proof: |B(v)Ai| is stochastically dominated by a geometric random variable with parameter p=n-1/k.

Query answering algorithm Algorithm distk(u,v) wu , i0 while wB(v) { i i+1 (u,v) (v,u) w pi(u) } return (w,u)+ (w,v)

Query answering algorithm w3=p3(v)A3 w2=p2(u)A2 w1=p1(v)A1 u v

Analysis wi=pi(u)Ai wi-1=pi-1(v)Ai-1 i (i+1) i (i-1) u v 

Open problems Faster dynamic SSSP algorithm? Exact dynamic APSP algorithm? Weighted graphs? Directed graphs?