David Wilson – Microsoft Research Uri Zwick – Tel Aviv Univ.

Slides:



Advertisements
Similar presentations
all-pairs shortest paths in undirected graphs
Advertisements

Chapter 9: Graphs Shortest Paths
Computational Geometry
Weighted graphs Example Consider the following graph, where nodes represent cities, and edges show if there is a direct flight between each pair of cities.
Greed is good. (Some of the time)
David Wilson – Microsoft Research Uri Zwick – Tel Aviv Univ. A Forward-Backward Single-Source Shortest Paths Algorithm TexPoint fonts used in EMF. Read.
Lecture 12: Revision Lecture Dr John Levine Algorithms and Complexity March 27th 2006.
1 Graphs: Traversal Searching/Traversing a graph = visiting the vertices of a graph by following the edges in a systematic way Example: Given a highway.
CSCI 3160 Design and Analysis of Algorithms Tutorial 2 Chengyu Lin.
1 Greedy 2 Jose Rolim University of Geneva. Algorithmique Greedy 2Jose Rolim2 Examples Greedy  Minimum Spanning Trees  Shortest Paths Dijkstra.
Tirgul 12 Algorithm for Single-Source-Shortest-Paths (s-s-s-p) Problem Application of s-s-s-p for Solving a System of Difference Constraints.
Greedy Algorithms Reading Material: Chapter 8 (Except Section 8.5)
Shortest Path Problems Directed weighted graph. Path length is sum of weights of edges on path. The vertex at which the path begins is the source vertex.
Chapter 9 Graph algorithms Lec 21 Dec 1, Sample Graph Problems Path problems. Connectedness problems. Spanning tree problems.
Graph Algorithms: Shortest Path We are given a weighted, directed graph G = (V, E), with weight function w: E R mapping.
CSE 780 Algorithms Advanced Algorithms SSSP Dijkstra’s algorithm SSSP in DAGs.
Greedy Algorithms Like dynamic programming algorithms, greedy algorithms are usually designed to solve optimization problems Unlike dynamic programming.
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 11 Instructor: Paul Beame.
CS 253: Algorithms Chapter 24 Shortest Paths Credit: Dr. George Bebis.
1 An almost linear fully dynamic reachability algorithm Liam Roditty and Uri Zwick Tel Aviv University.
Minimum Spanning Trees What is a MST (Minimum Spanning Tree) and how to find it with Prim’s algorithm and Kruskal’s algorithm.
Weighted Graphs In a weighted graph, each edge has an associated numerical value, called the weight of the edge Edge weights may represent, distances,
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
Dijkstras Algorithm Named after its discoverer, Dutch computer scientist Edsger Dijkstra, is an algorithm that solves the single-source shortest path problem.
1 Fibonacci heaps, and applications. 2 Yet a better MST algorithm (Fredman and Tarjan) Iteration i: We grow a forest, tree by tree, as follows. Start.
Graph Algorithms. Definitions and Representation An undirected graph G is a pair (V,E), where V is a finite set of points called vertices and E is a finite.
Data Structures Haim Kaplan & Uri Zwick December 2013 Binary Heaps 1.
All-Pairs Shortest Paths & Essential Subgraph 01/25/2005 Jinil Han.
Chapter 24: Single-Source Shortest Paths Given: A single source vertex in a weighted, directed graph. Want to compute a shortest path for each possible.
Shortest Path Graph Theory Basics Anil Kishore.
1 Prim’s algorithm. 2 Minimum Spanning Tree Given a weighted undirected graph G, find a tree T that spans all the vertices of G and minimizes the sum.
Analysis of Algorithms Uri Zwick March 2014 Dynamic All-Pairs Shortest-Paths 1 TexPoint fonts used in EMF. Read the TexPoint manual before you delete this.
Dijkstra animation. Dijksta’s Algorithm (Shortest Path Between 2 Nodes) 2 Phases:initialization;iteration Initialization: 1. Included:(Boolean) 2. Distance:(Weight)
Single-Source Shortest Paths (25/24) HW: 25-2 and 25-3 p. 546/24-2 and 24-3 p.615 Given a graph G=(V,E) and w: E   weight of is w(p) =  w(v[i],v[i+1])
Shortest Paths.
Lecture ? The Algorithms of Kruskal and Prim
Introduction to Algorithms
ליאור שפירא, חיים קפלן וחברים
Improved Randomized Algorithms for Path Problems in Graphs
Shortest Path Problems
Yuval Peres Dmitry Sotnikov Benny Sudakov Uri Zwick (武熠)
Adjacency labeling schemes and induced-universal graphs
Selection in heaps and row-sorted matrices
Minimum-Cost Spanning Tree
Enumerating Distances Using Spanners of Bounded Degree
Randomized Algorithms CS648
Analysis of Algorithms
Secular session of 2nd FILOFOCS April 10, 2013
Shortest Paths.
A simpler implementation and analysis of Chazelle’s
Uri Zwick – Tel Aviv Univ.
Discounted Deterministic Markov Decision Processes
Chapter 13 Graph Algorithms
Uri Zwick Tel Aviv University
Improved dynamic reachability algorithms for directed graphs
Shortest Path Problems
Analysis of Algorithms
Minimum Spanning Tree Algorithms
Minimum Spanning Tree.
Algorithms: Design and Analysis
Shortest Paths.
Brad Karp UCL Computer Science
Graph Algorithms: Shortest Path
Shortest Paths.
Lecture 14 Minimum Spanning Tree (cont’d)
Chapter 9: Graphs Shortest Paths
Prims’ spanning tree algorithm
Minimum-Cost Spanning Tree
Analysis of Algorithms
Presentation transcript:

David Wilson – Microsoft Research Uri Zwick – Tel Aviv Univ. A Forward-Backward Single-Source Shortest Paths Algorithm “Single-Source Shortest Paths in O(n) time” David Wilson – Microsoft Research Uri Zwick – Tel Aviv Univ. DIKU March 14, 2014 TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAAAAA

All-Pairs Shortest Paths in randomly weighted complete directed graphs Expected running times (some with high probability) Spira (1973) n2 log2n Bloniarz (1983) n2 log n log*n Moffat-Takaoka (1987) Mehlhorn-Priebe (1997) n2 log n Demetrescu-Italiano (2004) Peres-Sotnikov- Sudakov-Z (2010) n2 First three results hold in the endpoint independent model

Single-Source Shortest Paths in randomly weighted complete directed graphs with sorted adjacency lists Using only out-going adjacency lists Spira (1973) O(n log2n) Bloniarz (1983) O(n log n log*n) Moffat-Takaoka (1987) Mehlhorn-Priebe (1997) O(n log n) Using both out-going and in-coming adjacency lists Mehlhorn-Priebe (1997) (n log n) Wilson-Z (2013) O(n)

Endpoint independent model [Spira (1973)] For each vertex v use an arbitrary process that generates n1 edge weights Randomly permute the n1 edge weights and assign them to the out-going edges of v

Dijkstra’s algorithm Priority-queue holds vertices When a vertex is “settled”, relax all its out-going edges

Spira’s algorithm [Spira (1973)] Lazy version of Dijkstra’s algorithm Uses sorted out-going adjacency lists Edges are examined one at a time current edge

Spira’s algorithm [Spira (1973)] Priority-queue holds current edges After extracting an edge, examine the next out-going edge Fewer edges examined More extractions from priority queue

Analysis of Spira’s algorithm in the endpoint independent model Suppose that k vertices were found Each edge extracted from PQ has prob. > (nk)/n of leading to a new vertex “Sub-linear” algorithm Can it be further improved?

Verification of Shortest Paths Trees Is this a SPT?

Verification of Shortest Paths Trees Is this a SPT?

Could in-coming adjacency lists help?

Distances in a complete graph with independent EXP(1) edge weights [Davis-Prieditis (1993)] [Janson (1999)]

Distances in a complete graph with independent EXP(1) edge weights [Davis-Prieditis (1993)] [Janson (1999)]

Distances in a complete graph with independent EXP(1) edge weights [Janson (1999)]

Forward-only verification

Out-pertinent edges M – median distance

In-pertinent edges M – median distance

Forward-backward verification Check only pertinent edges! !

Number of pertinent edges Expected number of pertinent edges is (n) Probability that number of pertinent edges is more than (n) is exponentially small

Number of pertinent edges Condition on a SPT and distances

Number of out-pertinent edges Comparison with a Poisson process

Forward-backward SSSP algorithm Goal: Run Spira’s algorithm on the subgraph composed of pertinent edges Run Spira’s algorithm until median distance M is found Out-pertinent edges are easy to identify How do we identify the in-pertinent edges? Backward scans used to identify in-pertinent edges When an in-pertinent edge is found, a request is issued for its forward scan

Adjacency lists out-pertinent in-pertinent Out[u] v in-pertinent Req[u] v in-pertinent In[v] u

Identifying in-pertinent edges

( (u,v) is an in-pertinent edge ) Append (u,v) to Req[u] If u has no current edge, the request is urgent, and (u,v) is immediately inserted into P

Identifying in-pertinent edges

Bucket-based priority queues …

Two-level Bucket-based priority queues If a bucket contains k items when it becomes active, split it into k sub-buckets Store the items in each sub-bucket in a binary heap Probability of more than (n) time is

Open problems More edge weight distributions? (We already have some extensions) n+o(m) for arbitrary graphs with random edge weights? End-point independent model? Could the new forward-backward algorithm be useful in practical applications?