1 Efficient algorithms on sets of permutations, dominance, and real-weighted APSP Raphael Yuster University of Haifa.

Slides:



Advertisements
Similar presentations
TWO STEP EQUATIONS 1. SOLVE FOR X 2. DO THE ADDITION STEP FIRST
Advertisements

Chapter 28 Weighted Graphs and Applications
Chapter 6 Matrix Algebra.
Algorithm Analysis Input size Time I1 T1 I2 T2 …
Unit-iv.
Constraint Satisfaction Problems
© Negnevitsky, Pearson Education, Lecture 12 Hybrid intelligent systems: Evolutionary neural networks and fuzzy evolutionary systems Introduction.
Lower Bounds for Local Search by Quantum Arguments Scott Aaronson.
Subspace Embeddings for the L1 norm with Applications Christian Sohler David Woodruff TU Dortmund IBM Almaden.
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, $
1 Introduction to Algorithms 6.046J/18.401J/SMA5503 Lecture 19 Prof. Erik Demaine.
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
0 - 0.
DIVIDING INTEGERS 1. IF THE SIGNS ARE THE SAME THE ANSWER IS POSITIVE 2. IF THE SIGNS ARE DIFFERENT THE ANSWER IS NEGATIVE.
MULTIPLYING MONOMIALS TIMES POLYNOMIALS (DISTRIBUTIVE PROPERTY)
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
Reductions Complexity ©D.Moshkovitz.
Introduction to Algorithms Spanning Trees
1 Outline relationship among topics secrets LP with upper bounds by Simplex method basic feasible solution (BFS) by Simplex method for bounded variables.
Comp 122, Spring 2004 Order Statistics. order - 2 Lin / Devi Comp 122 Order Statistic i th order statistic: i th smallest element of a set of n elements.
Long cycles, short cycles, min-degree subgraphs, and feedback arc sets in Eulerian digraphs Raphael Yuster joint work with Asaf Shapira Eilat 2012.
Sep 16, 2013 Lirong Xia Computational social choice The easy-to-compute axiom.
Chapter 4: Informed Heuristic Search
Factoring Polynomials
1 The tiling algorithm Learning in feedforward layered networks: the tiling algorithm writed by Marc M é zard and Jean-Pierre Nadal.
Randomized Algorithms Randomized Algorithms CS648 1.
9.5 Counting Subsets of a Set: Combinations
Chapter 4 Systems of Linear Equations; Matrices
Comp 122, Spring 2004 Graph Algorithms – 2. graphs Lin / Devi Comp 122, Fall 2004 Identification of Edges Edge type for edge (u, v) can be identified.
CS1022 Computer Programming & Principles
Graphs, representation, isomorphism, connectivity
CS1022 Computer Programming & Principles Lecture 7.1 Graphs (1)
Problems and Their Classes
1 Motion and Manipulation Configuration Space. Outline Motion Planning Configuration Space and Free Space Free Space Structure and Complexity.
Addition 1’s to 20.
25 seconds left…...
Copyright © Cengage Learning. All rights reserved.
Week 1.
1 MADE Why do we need econometrics? If there are two points and we want to know what relation describes that? X Y.
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
Chapter 5 The Mathematics of Diversification
all-pairs shortest paths in undirected graphs
Minimum Weight Cycle Liam Roditty Bar-Ilan University Based on: Approximating the girth, (SODA`11) with Roei Tov (BIU) Minimum Weight Cycles and Triangles:
Minimum Vertex Cover in Rectangle Graphs
NON - zero sum games.
Section 3.4 The Traveling Salesperson Problem Tucker Applied Combinatorics By Aaron Desrochers and Ben Epstein.
1 Appendix B: Solving TSP by Dynamic Programming Course: Algorithm Design and Analysis.
Lecture 17 Path Algebra Matrix multiplication of adjacency matrices of directed graphs give important information about the graphs. Manipulating these.
1 Finding the smallest H-subgraph in real weighted graphs and related problems Raphael Yuster University of Haifa Joint work with: Virginia Vassilevska,
Approximation Algorithms Chapter 5: k-center. Overview n Main issue: Parametric pruning –Technique for approximation algorithms n 2-approx. algorithm.
Divide and Conquer. Recall Complexity Analysis – Comparison of algorithm – Big O Simplification From source code – Recursive.
Nattee Niparnan. Recall  Complexity Analysis  Comparison of Two Algos  Big O  Simplification  From source code  Recursive.
The number of edge-disjoint transitive triples in a tournament.
1 Reduction between Transitive Closure & Boolean Matrix Multiplication Presented by Rotem Mairon.
1 Finding cycles using rectangular matrix multiplication and dynamic programming Raphael Yuster Haifa Univ. - Oranim Uri Zwick Tel Aviv University Uri.
1 A fast algorithm for Maximum Subset Matching Noga Alon & Raphael Yuster.
All-Pairs Bottleneck Paths in Vertex Weighted graphs Asaf Shapira Microsoft Research Raphael Yuster University of Haifa Uri Zwick Tel-Aviv University.
Distance sensitivity oracles in weighted directed graphs Raphael Yuster University of Haifa Joint work with Oren Weimann Weizmann inst.
1 Rainbow Decompositions Raphael Yuster University of Haifa Proc. Amer. Math. Soc. (2008), to appear.
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.
Generating a d-dimensional linear subspace efficiently Raphael Yuster SODA’10.
Randomized Algorithms CS648
Raphael Yuster Haifa University Uri Zwick Tel Aviv University
All pairs shortest path problem
Answering distance queries in directed graphs using fast matrix multiplication Raphael Yuster Haifa University Uri Zwick Tel Aviv University.
Presentation transcript:

1 Efficient algorithms on sets of permutations, dominance, and real-weighted APSP Raphael Yuster University of Haifa

2 Permutations and matrix products This work consists of several algorithms and applications that involve the manipulation of sets of permutations via matrix multiplication techniques. In this talk we shall only focus on one of these algorithms which, together with other ingredients implies a sub-cubic APSP algorithm for arbitrary real weighted graphs, where there are not too many distinct weights emanating from each vertex. But before that:

3 An interesting open problem Let P be a set of p permutations of S n. P 2 = {  i  j |  i  P,  j  P} Task: compute |P 2 | in less than trivial p 2 n time. Example: P = {4231, 3124, 1243} answer: 7 P 2 = {1234, 4123, 3241, 3421, 2314, 4213, 3142} Say, e.g., p=n, then computing it in n 3 time is trivial. With fast matrix multiplication we can show an O(n 2.38 ) randomized algorithm. Can we solve it in O(n 3-  ) deterministically?

4 APSP algorithm All-Pairs Shortest Paths n by n distance matrix Input: An edge-weighted directed graph G=(V,E), where |V|=n (weights are arbitrary reals) Output: An n  n distance matrix. Can be solved in: O(n 3 (loglog n) 3 / log 2 n) time [Chan ‘07].

5 New result APSP algorithm that is truly sub-cubic as long as the set of distinct weights emanating from each vertex is not too large (but still much larger than a constant). For v  V, let W(v) be the set of distinct weights of edges emanating from v and let k(G)=max v |W(v)|. Our algorithm: sub-cubic when k(G) < n Note: this allows for up to n distinct weights.

6 Matrix multiplication exponents M(a,b,c) : “time” to multiply an a × b matrix by a b × c matrix over an arbitrary field. ω(r,s,t) : smallest exponent for which M(n r,n s,n t ) = O(n ω(r,s,t) ). ω(1,1,1) < [Coppersmith-Winograd ‘90]. μ : solution to ω(1+μ,1,1+μ) =3. μ > If k(G) = n ρ and ρ< μ then the algorithm runs in time O(n 3- γ/2+ρ/2 ) where γ solves ω(1+ ρ,1,1+ γ)=3+ρ- γ. If ρ=0 then γ= implying vertex-weighted APSP in O(n ). Slightly improves O(n ) [Chan ‘07].

7 An interesting special case of the APSP problem AB Distance product

8 Distance Products

9 A way to compute a distance product Let A and B be two distance matrices, where:  each row of A has at most k = n ρ distinct values  B is arbitrary Then A  B can be computed in time O(n ω(1+ ρ,1,1+ γ) ) where γ solves ω(1+ ρ,1,1+ γ)=3+ρ- γ. Proof: We reduce the problem to the problem of computing “permutation dominance” which, in turn, can be reduced to Boolean matrix multiplication.

10 For each row u of A, let W(u)={w u,1,…,w u,k } be the distinct values appearing in it. Let A' be the Boolean matrix of order nk × n indexed by the row set [k] × [n] and the column set [n]. We set A'((j,u),v) = 1 iff A(u,v)=w u,j. “Example”: n=4, k=2

 3 =( ) 11 Let  u be a permutation so that  u (i) <  u (j) implies B(i,u)  B(j,u). We can construct  1,...,  n in O(n 2 log n) time by sorting each column of B. Let B' be the Boolean matrix of order n × ns indexed by the row set [n] and the column set [s] × [n]. We set B'(u,(j,v))=1 iff  v (u)  [1+(j-1)(n/s), …, jn/s]. “Example”: n=4, s=2 (we will actually choose s=n γ )

we compute C'=A'B' in O(n ω(1+ ρ,1,1+γ) ) time. We can deduce D = A  B from C'. Fixing u and v, we show how to compute D(u,v) in O(k(s+n/s)) time, and hence D is computed in O(n 2 k(s+n/s)) = O(n 3+ρ-γ ) = O(n ω(1+ ρ,1,1+γ) ) time. 12

For each i=1,…,k, let j i be the smallest index so that C((i,u),(j i,v))=1 (if no such index exists, set j i =0). If j i  0, we know that we have at least one index z so that A'((i,u),z)=1 and B'(z,(j i,v))=1. This means that  v (z)  [1+(j i - 1)(n/s), …, j i n/s]. We wish to locate that z i for which  v (z) is minimal. We use  v to locate z i in O(n/s) time. We know that A(u,z i )+B(z i,v) is the minimum sum whenever the first term has weight w u,i. Taking the minimum of A(u,z i )+B(z i,v) ranging over all plausible i we obtain D(u,v). 13

14  3 =( ) j 1 =2 Belongs to block 2: j 1 =2 Belongs to block 1: j 2 =1  3 (1),  3 (4)  {3,4} z=1 z=4 relevant z 1 =1 7+8=15 j 2 =1  3 (2),  3 (3)  {1,2} z=2 z=3 relevant z 2 =3 1+4=5

15 From distance product to APSP G=(V,E,w) is a weighted digraph with n vertices For v  V, W(v) are the emanating weights. |W(v)|  k. t - a parameter (to be chosen later). c(u,v) min. # of edges on shortest path from u to v. d i (u,v) shortest distance from u to v using at most i edges. Clearly, d(u,v)=d n-1 (u,v). d 1 (u,v)=w(u,v). D i - the matrix recording all the values d i (u,v). Thus, D 1 is our input. Notice : D i = D 1  D i-1.

16 From distance product to APSP Each row of D 1 has at most k = n ρ distinct values. Thus, D i is computed from D 1  D i-1 in O(n 3+ρ-γ ) = O(n ω(1+ ρ,1,1+γ) ) time. Hence D t is computed in O( t n 3+ρ-γ ). We already know that D t (u,v)=D(u,v) for all pairs with c(u,v)  t. We need to worry about pairs for which c(u,v) > t. For this, we shall use the bridging sets technique of [Zwick ‘02].

17 From distance product to APSP A set of vertices B is a t-bridging set if for each u,v with  > c(u,v) > t, there exists a shortest path p ={u=u 0,u 1,…,u s =v} realizing d 1.5t (u,v) where some vertex u i is from B and i  (s-t … t). Easy to show: a random set B of size  (n log n / t) is a t-bridging set. (Zwick has shown how to find such a B deterministically in O(n 2.5 ) time). Having found a t-bridging set B, we compute a matrix which is (better than) D 1.5t as follows: 0 s-tt s u v

18 From distance product to APSP Time: O(n 3 /t) (straightforward product). We now have D(u,v) for all pairs with c(u,v)  1.5t. Repeated squaring O(log n) time we get the final D. Choosing t= n γ/2-ρ/2 we obtain that: The overall running time is O(n 3- γ/2+ρ/2 ) as claimed. Dt(B)Dt(B) DtT(B)DtT(B)  D 1.5t 

19 Thanks