All-Pairs Bottleneck Paths in Vertex Weighted graphs Asaf Shapira Microsoft Research Raphael Yuster University of Haifa Uri Zwick Tel-Aviv University.

Slides:



Advertisements
Similar presentations
1 Introduction to Algorithms 6.046J/18.401J/SMA5503 Lecture 19 Prof. Erik Demaine.
Advertisements

Minimum Weight Cycle Liam Roditty Bar-Ilan University Based on: Approximating the girth, (SODA`11) with Roei Tov (BIU) Minimum Weight Cycles and Triangles:
1 Efficient algorithms on sets of permutations, dominance, and real-weighted APSP Raphael Yuster University of Haifa.
8.3 Representing Relations Connection Matrices Let R be a relation from A = {a 1, a 2,..., a m } to B = {b 1, b 2,..., b n }. Definition: A n m  n connection.
Advanced Algorithm Design and Analysis (Lecture 7) SW5 fall 2004 Simonas Šaltenis E1-215b
CS138A Single Source Shortest Paths Peter Schröder.
Design and Analysis of Algorithms Single-source shortest paths, all-pairs shortest paths Haidong Xue Summer 2012, at GSU.
Lecture 17 Path Algebra Matrix multiplication of adjacency matrices of directed graphs give important information about the graphs. Manipulating these.
Chapter 25: All-Pairs Shortest-Paths
1 Finding the smallest H-subgraph in real weighted graphs and related problems Raphael Yuster University of Haifa Joint work with: Virginia Vassilevska,
 2004 SDU Lecture11- All-pairs shortest paths. Dynamic programming Comparing to divide-and-conquer 1.Both partition the problem into sub-problems 2.Divide-and-conquer.
Introduction To Algorithms CS 445 Discussion Session 8 Instructor: Dr Alon Efrat TA : Pooja Vaswani 04/04/2005.
1 Reduction between Transitive Closure & Boolean Matrix Multiplication Presented by Rotem Mairon.
Shortest Paths Definitions Single Source Algorithms –Bellman Ford –DAG shortest path algorithm –Dijkstra All Pairs Algorithms –Using Single Source Algorithms.
1 Finding cycles using rectangular matrix multiplication and dynamic programming Raphael Yuster Haifa Univ. - Oranim Uri Zwick Tel Aviv University Uri.
Greedy Algorithms Reading Material: Chapter 8 (Except Section 8.5)
Design and Analysis of Algorithms - Chapter 81 Dynamic Programming Dynamic Programming is a general algorithm design technique Dynamic Programming is a.
Lecture 22: Matrix Operations and All-pair Shortest Paths II Shang-Hua Teng.
Graph Algorithms Shortest path problems [Adapted from K.Wayne]
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.
1 Advanced Algorithms All-pairs SPs DP algorithm Floyd-Warshall alg.
Greedy Algorithms Like dynamic programming algorithms, greedy algorithms are usually designed to solve optimization problems Unlike dynamic programming.
All-Pairs Shortest Paths
Hardness Results for Problems
CS 473 All Pairs Shortest Paths1 CS473 – Algorithms I All Pairs Shortest Paths.
1 A fast algorithm for Maximum Subset Matching Noga Alon & Raphael Yuster.
Graph Algorithms Shortest path problems. Graph Algorithms Shortest path problems.
Chapter 9 – Graphs A graph G=(V,E) – vertices and edges
Chapter 2 Graph Algorithms.
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.
Distance sensitivity oracles in weighted directed graphs Raphael Yuster University of Haifa Joint work with Oren Weimann Weizmann inst.
Week 4 Single Source Shortest Paths All Pairs Shortest Path Problem.
Single Source Shortest-Path: The General Case (with negative edges) Bellman-Ford algorithm. Iteratively relax all edges |V|-1 times Running time? O(VE).
1 Closures of Relations: Transitive Closure and Partitions Sections 8.4 and 8.5.
1 The Floyd-Warshall Algorithm Andreas Klappenecker.
All-pairs Shortest Paths. p2. The structure of a shortest path: All subpaths of a shortest path are shortest paths. p : a shortest path from vertex i.
Lecture 7 All-Pairs Shortest Paths. All-Pairs Shortest Paths.
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.
Parallel Programming: All-Pairs Shortest Path CS599 David Monismith Based upon notes from multiple sources.
CSE 2331 / 5331 Topic 12: Shortest Path Basics Dijkstra Algorithm Relaxation Bellman-Ford Alg.
Shortest Path Algorithms. Definitions Variants  Single-source shortest-paths problem: Given a graph, finding a shortest path from a given source.
The all-pairs shortest path problem (APSP) input: a directed graph G = (V, E) with edge weights goal: find a minimum weight (shortest) path between every.
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.
All-Pairs Shortest Paths
1 Weighted Graphs. 2 Outline (single-source) shortest path –Dijkstra (Section 4.4) –Bellman-Ford (Section 4.6) (all-pairs) shortest path –Floyd-Warshall.
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.
Introduction to Algorithms All-Pairs Shortest Paths My T. UF.
Finding a Heaviest Triangle is not Harder than Matrix Multiplication Artur Czumaj & Andrzej Lingas.
CSE 421 Algorithms Richard Anderson Lecture 27 NP-Completeness Proofs.
1 Closures of Relations Based on Aaron Bloomfield Modified by Longin Jan Latecki Rosen, Section 8.4.
Richard Anderson Lecture 26 NP-Completeness
Algorithm Analysis Fall 2017 CS 4306/03
12. Graphs and Trees 2 Summary
Lecture 7 All-Pairs Shortest Paths
Intro to NP Completeness
Randomized Algorithms CS648
Elementary graph algorithms Chapter 22
Algorithms (2IL15) – Lecture 5 SINGLE-SOURCE SHORTEST PATHS
Problem Solving 4.
Analysis of Algorithms
Raphael Yuster Haifa University Uri Zwick Tel Aviv University
Graphs G = (V, E) V are the vertices; E are the edges.
CSE 417: Algorithms and Computational Complexity
Elementary graph algorithms Chapter 22
Answering distance queries in directed graphs using fast matrix multiplication Raphael Yuster Haifa University Uri Zwick Tel Aviv University.
Negative-Weight edges:
Closures of Relations Epp, section 10.1,10.2 CS 202.
Directed Graphs (Part II)
Analysis of Algorithms
Presentation transcript:

All-Pairs Bottleneck Paths in Vertex Weighted graphs Asaf Shapira Microsoft Research Raphael Yuster University of Haifa Uri Zwick Tel-Aviv University

Background All Pairs Shortest Paths: Given a weighted directed graph, find for all pairs u v, the shortest path connecting u to v. [Seidel 95, Alon Galil Margalit 97, Zwick 98] : Subcubic (that is O(n 3-  )) algorithms for directed/undirected graphs, with small integer edge weights.

What is a Bottleneck Bottleneck of a path = heaviest vertex on path (inc. endpoints). Bottleneck between u and v = minimum bottleneck of all paths connecting u and v. b(u,v) = Bottleneck from u to v. u v u v

Previous Results [Polack 60]: O(n 3 ) algorithm for all pairs bottleneck paths in edge weighted directed graphs. [Hu 61]: O(n 2 ) algorithm for all pairs bottleneck paths in edge weighted undirected graphs. [Dijkstra 59 + Fredman-Tarjan 87]: O(m+n log n) algorithm for single source bottleneck paths in edge weighted directed graphs.

Main Results Theorem: Given a vertex weighted directed graph G=(V,E) it is possible to compute b(u,v) for all pairs u,v in time O(n ). d(u,v) = length of shortest path from u to v. db(u,v) = minimum bottleneck over all paths of length d(u,v). Theorem: Given a vertex weighted graph G=(V,E) it is possible to compute db(u,v) for all pairs u,v in time O(n 2.86 ).

[Coppersmith-Winograd 90]:The boolean product of two n by n matrices can be computed using n  algebraic operations (additions, subtractions, multiplications), where  < Bollean Matrix Multiplication Wittnesses for boolean matrix multiplication: a matrix W st: 1.If c ij =1 then W ij = k for some k st a ik =b kj =1. 2.If c ij =0 then W ij = 0. [Alon-Naor 92, Galil Margalit 92]: The witness matrix W can be computed in time O(n  +o(1) ).

Min Witnesses for Bool Mat Multip Wittnesses for boolean matrix multiplication: a matrix W st: 1.If c ij =1 then W ij = k for some k st a ik =b kj =1. 2.If c ij =0 then W ij = 0. Minimum wittnesses for boolean matrix multip: a matrix W st: 1.If c ij =1 then W ij = k for the smallest k st a ik =b kj =1. 2.If c ij =0 then W ij = 0. [Czumaj, Kowaluk, Lingas 06]: The minimum witnesses matrix can be computed in time O(n ).

Additional Results Theorem: Computing All-Pairs Bottleneck paths is (up to constant factors) equivalent to finding minimum witnesses. Definition: An LCA (lowest common ancestor) of vertices u, v in a DAG is a vertex w that a has a path to u and a path to v, such that no other vertex reachable from w has a path to u, and a path to v. Proposition: Computing All Pairs LCAs in a DAG is not harder than computing All-Pairs Bottleneck Paths.

Finding Short Bottlenecks Bottleneck of a path = heaviest vertex on the path. P t (u,v) = 1 if and only if there is a path from u to v, of length at most t, such that v has maximum weight. Q t (u,v) = 1 if and only if there is a path from u to v, of length at most t, such that u has maximum weight. u v How can we compute bottlenecks of paths of length k ? b k (u,v) = Min (Min-Witness(P r · Q k-r )) u,v 0 ≤ r ≤ k Patch together two paths that meet at the bottleneck

Finding Short Bottlenecks Lemma: Bottlenecks of length O(1) are computable in O(n ). We need to compute P t in O(n ) ? A: adjacency matrix of G with 1’s on diagonal. b k (u,v) = Min (Min-Witness(P k · Q k-r )) u,v 0 ≤ r ≤ k P t (u,v) = 1 if and only if there is a path from u to v, of length at most t, such that v has maximum weight. P t = (A · P t-1 )  B B: B ij =1 iff w(u) ≤ w(v).

The General Case Solve recursively the problem on A T(n/2) n B = n/2 heaviest vertices A = n/2 lightest vertices

The General Case Reachability + Solve recursively on B: T(n/2)+O(n  ) 8 9 B = n/2 heaviest vertices A = n/2 lightest vertices

The General Case 1 5 A = n/2 lightest vertices 9 4 Solve short bottlenecks: O(n ) Bottleneck

Running Time Running time is give by T(n) = 2T(n/2) + O(n ) = O(n ) In fact: Algorithms shows that finding bottlenecks is as easy finding minimum witnesses. We also prove the converse. Implies O(n ) algorithm for finding maximum vertex weighted triangle. First proved by [Vassilevska Williams Yuster 06]. Improved by [Czumaj Lingas 06].

Finding Short Bottleneck Paths d(u,v) = length of shortest path from u to v. db(u,v) = minimum bottleneck over all paths of length d(u,v). Theorem: Given a vertex weighted graph G=(V,E) it is possible to compute db(u,v) for all pairs u,v in time O(n 2.86 ). Main Idea: Handle the case of short paths using previous alg. Handle long paths using “bridging sets”: select a small set of vertices B, and solve the single-source problem for all v  B. whp, we hit all the “long” shortest-paths.

Concluding Remarks 3)Resolve complexity of Least Common Ancestors in DAGs: Is LCA in DAGs as hard as min-witnesses for boolean matrix multiplication? Is LCA in DAGs as easy as boolean matrix multiplication? 2)Find an O(n w ) algorithm for min-witnesses of boollean matrix-multiplication. 1) [Vassilevska Williams uster 06]: O(n ) algorithm for bottlenecks paths in edge weighted graphs.

Thank You