[Paper Review] MapReduce Meets Fine-Grained Complexity: MapReduce Algorithms for APSP, Matrix Multiplication, 3-SUM, and Beyond
This paper presents novel MapReduce algorithms for fundamental problems like All-Pairs Shortest Paths (APSP), matrix multiplication, and 3-SUM, achieving constant-round execution by exploiting fine-grained trade-offs between memory per machine and the number of machines. It introduces a black-box transformation to adapt standard matrix multiplication algorithms to $(\min,+)$-matrix multiplication, enabling efficient solutions for APSP and related problems in $O(\log n)$ rounds with sublinear memory and near-optimal machine counts.
Distributed processing frameworks, such as MapReduce, Hadoop, and Spark are popular systems for processing large amounts of data. The design of efficient algorithms in these frameworks is a challenging problem, as the systems both require parallelism---since datasets are so large that multiple machines are necessary---and limit the degree of parallelism---since the number of machines grows sublinearly in the size of the data. Although MapReduce is over a dozen years old~\cite{dean2008mapreduce}, many fundamental problems, such as Matrix Multiplication, 3-SUM, and All Pairs Shortest Paths, lack efficient MapReduce algorithms. We study these problems in the MapReduce setting. Our main contribution is to exhibit smooth trade-offs between the memory available on each machine, and the total number of machines necessary for each problem. Overall, we take the memory available to each machine as a parameter, and aim to minimize the number of rounds and number of machines. In this paper, we build on the well-known MapReduce theoretical framework initiated by Karloff, Suri, and Vassilvitskii ~\cite{karloff2010model} and give algorithms for many of these problems. The key to efficient algorithms in this setting lies in defining a sublinear number of large (polynomially sized) subproblems, that can then be solved in parallel. We give strategies for MapReduce-friendly partitioning, that result in new algorithms for all of the above problems. Specifically, we give constant round algorithms for the Orthogonal Vector (OV) and 3-SUM problems, and $O(\log n)$-round algorithms for Matrix Multiplication, All Pairs Shortest Paths (APSP), and Fast Fourier Transform (FFT), among others. In all of these we exhibit trade-offs between the number of machines and memory per machine.
Motivation & Objective
- To close the gap in efficient MapReduce algorithms for core problems like APSP, matrix multiplication, and 3-SUM, which lack scalable solutions despite their importance.
- To establish smooth trade-offs between memory per machine and the number of machines required, minimizing both rounds and total machines.
- To extend known sequential algorithms—especially matrix multiplication—to the $(\min,+)$-semiring setting via a black-box transformation for use in APSP and related problems.
- To achieve work-efficiency in the MapReduce model by balancing total memory usage and computational overhead.
Proposed method
- Leverages the theoretical MapReduce model of Karloff et al. with sublinear memory and machine bounds to design scalable algorithms.
- Introduces a novel transformation that maps standard matrix multiplication over a ring to $(\min,+)$-matrix multiplication using base-$ (n+1) $ encoding of entries.
- Employs polynomial-sized subproblems partitioned across machines to enable parallel computation while respecting memory constraints.
- Uses a black-box approach: any efficient MapReduce algorithm for standard matrix multiplication can be converted to a $(\min,+)$-variant with only a $\widetilde{O}(R)$ overhead in memory and two additional rounds.
- Applies the transformation to derive $O(\log n)$-round algorithms for APSP and matrix multiplication over $(\min,+)$ with $O(n^{\omega^*(2-\epsilon)/2})$ machines and $O(Rn^\epsilon)$ memory per machine.
- Employs work-efficiency principles to minimize total processing time across machines, balancing memory and parallelism.
Experimental results
Research questions
- RQ1Can we design constant-round MapReduce algorithms for the 3-SUM and Orthogonal Vector problems under sublinear memory and machine constraints?
- RQ2How can we adapt standard matrix multiplication algorithms to the $(\min,+)$-semiring for use in APSP and related problems?
- RQ3What is the trade-off between memory per machine and the number of machines needed to achieve efficient, low-round execution in MapReduce?
- RQ4Can we maintain work-efficiency while extending algorithms to $(\min,+)$-matrix multiplication with bounded integer ranges?
Key findings
- A constant-round MapReduce algorithm is achieved for the 3-SUM and Orthogonal Vector problems using $O(n^{\omega^*(2-\epsilon)/2})$ machines and $O(n^\epsilon)$ memory per machine.
- An $O(\log n)$-round algorithm is developed for matrix multiplication over $(\min,+)$ with $O(n^{\omega^*(2-\epsilon)/2})$ machines and $O(Rn^\epsilon)$ memory per machine, where $R$ is the input value range.
- The black-box transformation from standard matrix multiplication to $(\min,+)$-multiplication increases memory by a factor of $\widetilde{O}(R)$ and adds only two rounds, enabling efficient APSP computation.
- For unweighted APSP, the algorithm achieves $O(\log n)$ rounds using $O(n^{\omega^*(2-\epsilon)/2})$ machines and $O(n^\epsilon)$ memory per machine.
- The framework supports input values in $[-R,R] \cup \{\infty\}$ with the same asymptotic bounds by treating $\infty$ as $2R+1$.
- The approach enables work-efficient execution by minimizing total processing time across machines while respecting memory and round constraints.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.