Efficient algorithms on sets of permutations, dominance, and real-weighted APSP

Sets of permutations play an important role in the design of some efficient algorithms. In this paper we design two algorithms that manipulate sets of permutations. Both algorithms, each solving a different problem, use fast matrix multiplication techniques to achieve a significant improvement in the running time over the naive solutions. For a set of permutations P ⊂ Sn we say that i k-dominates j if the number of permutations π ∈ P for which π(i) < π(j) is k. The dominance matrix of P is the n x n matrix DP where DP(i, j) = k if and only if i k-dominates j. We give an efficient algorithm for computing DP using fast rectangular matrix multiplication. In particular, when |P| = n our algorithm runs in O(n2.684) time. Computing the dominance matrix of permutations is computationally equivalent to the dominance problem in computational geometry. Thus, our algorithm slightly improves upon a well-known O(n2.688) time algorithm of Matousek for the dominance problem. Permutation dominance is used, together with several other ingredients, to obtain a truly sub-cubic algorithm for the All Pairs Shortest Paths (APSP) problem in real-weighted directed graphs, where the number of distinct weights emanating from each vertex is O(n0.338). A special case of this algorithm implies an O(n2.842) time algorithm for real vertex-weighted APSP, which slightly improves a recent result of Chan [STOC-07]. A set of permutations P ⊂ Sn is fully expanding if the product of any two elements of P yields a distinct permutation. Stated otherwise, |P2| = |P|2 where P2 ⊂ Sn is the set of products of two elements of P. We present a randomized algorithm that computes |P2| and hence decides if P is fully expanding. The algorithm also produces a table that, for any σ1, σ2, σ3, σ4 ∈ P, answers the query σ1σ2 = σ3σ4 in O(1) time. The algorithm uses, among other ingredients, a combination of fast matrix multiplication and polynomial identity testing. In particular, for |P| = n our algorithm runs in O(nω) time where ω < 2.376 is the matrix multiplication exponent. We note that the naive deterministic solution for this problem requires Θ(n3) time.

[1]  Andrei Z. Broder,et al.  A derandomization using min-wise independent permutations , 2003, J. Discrete Algorithms.

[2]  Ryan Williams,et al.  Finding a maximum weight triangle in n3-Δ time, with applications , 2006, STOC '06.

[3]  Don Coppersmith,et al.  Rectangular Matrix Multiplication Revisited , 1997, J. Complex..

[4]  Raphael Yuster,et al.  All-pairs bottleneck paths for general graphs in truly sub-cubic time , 2007, STOC '07.

[5]  Timothy M. Chan More Algorithms for All-Pairs Shortest Paths in Weighted Graphs , 2010, SIAM J. Comput..

[6]  Uri Zwick,et al.  All pairs shortest paths using bridging sets and rectangular matrix multiplication , 2000, JACM.

[7]  Jacob T. Schwartz,et al.  Fast Probabilistic Algorithms for Verification of Polynomial Identities , 1980, J. ACM.

[8]  Timothy M. Chan All-Pairs Shortest Paths with Real Weights in O(n3/log n) Time , 2005, WADS.

[9]  Victor Y. Pan,et al.  Fast Rectangular Matrix Multiplication and Applications , 1998, J. Complex..

[10]  Richard Zippel,et al.  Probabilistic algorithms for sparse polynomials , 1979, EUROSAM.

[11]  Jirí Matousek,et al.  Computing Dominances in E^n , 1991, Inf. Process. Lett..

[12]  Michael L. Fredman,et al.  New Bounds on the Complexity of the Shortest Path Problem , 1976, SIAM J. Comput..

[13]  Noga Alon,et al.  Generating Pseudo-Random Permutations and Maximum Flow Algorithms , 1990, Inf. Process. Lett..

[14]  Don Coppersmith,et al.  Matrix multiplication via arithmetic progressions , 1987, STOC.

[15]  Noga Alon,et al.  Derandomization, witnesses for Boolean matrix multiplication and construction of perfect hash functions , 1994, Algorithmica.

[16]  Zvi Galil,et al.  Witnesses for Boolean Matrix Multiplication and for Transitive Closure , 1993, J. Complex..