Abstract 1 Introduction 2 Technical Overview 3 Preliminaries 4 Deterministic Monotone Min-Plus Product 5 Extension to Column-Monotone Min-Plus Product 6 Deterministic Monotone Min-Plus Convolution References

Deterministic Monotone Min-Plus Product and Convolution

Ce Jin ORCID University of California Berkeley, CA, USA    Jaewoo Park ORCID University of California San Diego, La Jolla, CA, USA    Barna Saha ORCID University of California San Diego, La Jolla, CA, USA    Yinzhan Xu ORCID University of California San Diego, La Jolla, CA, USA
Abstract

The Monotone Min-Plus Product problem is a useful primitive that has seen many algorithmic applications over the past decade. It also generalizes various other structured Min-Plus products studied in the literature, such as Bounded Difference Min-Plus Product and Bounded Integer Min-Plus Product. In this problem, we are given two n×n integer matrices A and B, where each row of B is a monotone non-decreasing sequence of integers from {1,,n}, and the goal is to compute their Min-Plus product, defined as the n×n matrix C with Ci,j=mink{Ai,k+Bk,j}. The fastest known algorithm for this task [Chi, Duan, Xie, and Zhang, STOC’22] runs in n(ω+3)/2+o(1)=𝒪(n2.686) time, significantly improving over the brute-force cubic algorithm. However, its main disadvantage is that it requires randomization, which is then inherited by all downstream applications.

Our main result is a deterministic algorithm for Monotone Min-Plus product with the same running time n(ω+3)/2+o(1)=𝒪(n2.686) as its randomized counterpart, improving upon the previous deterministic bound 𝒪(n2.875) [Gu, Polak, Vassilevska Williams, and Xu, ICALP’21]. Our derandomization also applies to previously studied extensions and variants (e.g., [Dürr, IPL’23]), including rectangular matrices, bounded range [nμ], and column-monotone matrices. As an immediate consequence, we derandomize state-of-the-art algorithms for multiple problems, including Language Edit Distance, RNA Folding, Optimum Stack Generation, unweighted Tree Edit Distance, Batched Range Mode, and Approximate All-Pairs Shortest Paths.

Our techniques also yield a deterministic algorithm for the Monotone Min-Plus Convolution problem that runs in n1.5+o(1) time, nearly matching the best-known randomized time complexity 𝒪~(n1.5) [Chi, Duan, Xie, and Zhang, STOC’22]. This algorithm can be used to derandomize state-of-the-art algorithms for Jumbled Indexing for binary strings and several variants of Knapsack.

Keywords and phrases:
Min-plus product, min-plus convolution, monotone matrices, fine-grained complexity, deterministic algorithms
Category:
Track A: Algorithms, Complexity and Games
Funding:
Ce Jin: Supported by the Miller Research Fellowship at the Miller Institute for Basic Research in Science, UC Berkeley.
Jaewoo Park: Supported by NSF HDR TRIPODS Phase II grant 2217058 (EnCORE Institute).
Barna Saha: Supported by NSF HDR TRIPODS Phase II grant 2217058 (EnCORE Institute).
Yinzhan Xu: Supported by NSF HDR TRIPODS Phase II grant 2217058 (EnCORE Institute).
Copyright and License:
[Uncaptioned image] © Ce Jin, Jaewoo Park, Barna Saha, and Yinzhan Xu; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation Design and analysis of algorithms
Related Version:
Full Version: https://arxiv.org/abs/2605.07150
Editors:
Sayan Bhattacharya, Danupon Nanongkai, Michael Benedikt, and Gabriele Puppis

1 Introduction

One of the most fundamental problems in algorithm design is the All-Pairs Shortest Paths problem (APSP), which asks us to compute pairwise distances in an n-node weighted graph. APSP is known to be asymptotically equivalent to Min-Plus product [27], where we are given two n×n matrices A and B and need to compute an n×n matrix AB such that

(AB)i,j:=min1kn{Ai,k+Bk,j}.

The fastest known algorithm for these problems runs in n3/2Ω(logn) time, due to Williams [29], and further improving this running time remains a major open problem. In fact, a popular hypothesis in fine-grained complexity is that APSP, or equivalently Min-Plus product, does not admit an 𝒪(n3ε)-time algorithm for any ε>0; see [26] for a survey on fine-grained complexity.

Despite the difficulty of designing faster algorithms for Min-Plus product, researchers have identified several structured cases where it admits truly subcubic-time algorithms. For instance, bounded integer Min-Plus product, where both matrices have entries from [M]111For a positive integer m, [m] denotes {1,2,,m}. for some integer M, can be computed in 𝒪^(Mnω) time [2].222In this paper, we use 𝒪^ to hide no(1) factors and 𝒪~ to hide polylogn factors.333ω2.372 [1] denotes the square matrix multiplication exponent; that is, ω is the smallest constant such that the product of two n×n matrices can be computed in 𝒪^(nω) arithmetic operations. More generally, we use ω(a,b,c) to denote the smallest constant such that the product of an na×nb matrix and an nb×nc matrix can be computed in 𝒪^(nω(a,b,c)) arithmetic operations. A generalization of bounded integer Min-Plus product is bounded difference Min-Plus product, where adjacent entries in the input matrices differ by at most M. Bringmann, Grandoni, Saha, and Vassilevska Williams [7] first studied this setting and gave an 𝒪(n2.825)-time randomized algorithm and an 𝒪(n2.861)-time deterministic algorithm for the case M=𝒪(1). They used bounded difference Min-Plus product as a tool to obtain the first subcubic-time algorithms for Language Edit Distance, RNA Folding, and Optimum Stack Generation.

An important setting that further generalizes bounded difference Min-Plus product, and is the focus of this paper, is monotone Min-Plus product; see [19] for a discussion of this generalization. An n×n matrix B is called row-monotone if

  • for every 1i,jn, we have Bi,j[n];

  • for every 1in and 1j<n, we have Bi,jBi,j+1.

Column-monotone matrices are defined analogously. The task of computing the Min-Plus product between an arbitrary integer matrix A and a row-monotone matrix B is called the monotone Min-Plus product problem. The importance of monotone Min-Plus product is reflected in its wide range of applications, including Language Edit Distance [7], RNA Folding [7], Optimum Stack Generation [7], Batched Range Mode [28, 19, 14], unweighted Tree Edit Distance [23, 14, 24], Single-Source Replacement Paths [19, 14], approximate APSP [13, 14, 25], and k-Dyck Edit Distance [17, 14].

The fastest known algorithm for monotone Min-Plus product, due to Chi, Duan, Xie, and Zhang [11], runs in 𝒪^(n(3+ω)/2)=𝒪(n2.686) time. Unfortunately, this running time is achieved by a randomized algorithm, making the fastest algorithms for applications of monotone Min-Plus product randomized as well. More frustratingly, for many of these algorithms, the only source of randomness is the black-box call to monotone Min-Plus product; see Tables 1 and 2 for examples. Thus, prior to our work, obtaining deterministic algorithms for these applications required replacing the randomized monotone Min-Plus product algorithm with a slower deterministic one, such as the 𝒪(n2.875)-time algorithm of [19], or the 𝒪(n2.861)-time bounded difference Min-Plus product algorithm of [7].

Table 1: Applications where the monotone Min-Plus product oracle is the only source of randomization in the fastest known randomized algorithms. Previous best deterministic running times are also listed. The 𝒪^-notation is omitted.
Problem Randomized Runtime Deterministic Runtime
Language Edit Distance n(3+ω)/2n2.686 [7, 11] n2.861 [7]
RNA Folding n(3+ω)/2n2.686 [7, 11] n2.861 [7]
Optimum Stack Generation n(3+ω)/2n2.686 [7, 11] n2.861 [7]
Batched Range Mode n(3+2ω)/(3+ω)n1.442 [14] n(18+2ω)/(13+ω)n1.480 [18]
Unweighted Tree Edit Distance n(3+ω)/2n2.686 [24] n2.964 [23]
k-Dyck Edit Distance n+k4.545 [17, 14] n+k4.854 [17]
Table 2: Fastest known algorithms for +2k-approximate APSP on unweighted undirected graphs. The algorithms of [25] use the monotone Min-Plus product oracle as their only randomized component. The 𝒪^-notation is omitted.
Additive error +2k Runtime for +2k-approximate APSP
+2 n2.22548 (randomized) [21]
+4 n2.14613 (deterministic) [21]
+6 n2.10260 (deterministic) [21]
+8 n2.07727 (randomized) [25]
+10 n2.06194 (randomized) [25]
(randomized) [25]
 Remark.

We briefly explain how some of the randomized running times in Tables 1 and 2 are obtained. The randomized running times for Language Edit Distance, RNA Folding, and Optimum Stack Generation in Table 1 are obtained by replacing the bounded difference Min-Plus product algorithm of [7] with the monotone Min-Plus product algorithm of [11]. For every positive integer k, the algorithm of [25] for +2k-approximate APSP in Table 2 runs in 𝒪^(n2+x/(k+1)) time, where x is the solution to 1+2x=ω(1k1k+1x,1x,1k2k+1x), and uses the monotone Min-Plus product oracle as its only source of randomness. For additive error +2k with 2k8, this is the fastest known algorithm. The work of [21] improves the running times of the +4- and +6-approximation algorithms of [25] using deterministic algorithms, and further improves the running time for +2-approximation using a randomized algorithm whose randomness does not come from the monotone Min-Plus product oracle.

A problem closely related to Min-Plus product is Min-Plus convolution. In the Min-Plus convolution problem, the input consists of two length-n arrays A=(A1,A2,,An) and B=(B1,B2,,Bn), and the output is an array AB indexed by k=2,,2n, where

(AB)k=min1ik1{Ai+Bki},

with out-of-bounds entries set to . The fastest known algorithm for Min-Plus convolution runs in n2/2Θ(logn) time, which can be obtained by combining Williams’ APSP algorithm [29] with the reduction in [3]. A popular hypothesis in fine-grained complexity is the Min-Plus convolution hypothesis, which postulates that Min-Plus convolution cannot be solved in 𝒪(n2ε) time for any ε>0; see [12, 22]. It is known that the Min-Plus convolution hypothesis implies the Min-Plus product hypothesis [3].

Similar to Min-Plus product, Min-Plus convolution admits significantly faster algorithms when the input is structured. A length-n array A is called monotone if

  • for every 1in, we have Ai[n];

  • for every 1i<n, we have AiAi+1.

When both input arrays are monotone, Chan and Lewenstein [9] gave an 𝒪(n1.859)-time randomized algorithm and an 𝒪(n1.864)-time deterministic algorithm. Chi, Duan, Xie, and Zhang [11] improved the randomized running time to 𝒪~(n1.5). Bringmann, Dürr, and Polak [6] generalized this result to a randomized 𝒪~(n1+μ/2)-time algorithm for arrays with entries in [nμ] and with only one of the input arrays being monotone.

Monotone Min-Plus convolution also has a wide range of applications, including Jumbled Indexing [9], Knapsack problems with bounded weights and profits [5, 6], and weak approximation schemes for Knapsack problems [5, 10].444These Knapsack results use Max-Plus convolution instead of Min-Plus convolution, but the two are equivalent up to a sign change. Due to the gap between the best-known randomized and deterministic algorithms for monotone Min-Plus convolution, the best-known running times for all these applications are achieved by randomized algorithms. For some applications, the monotone Min-Plus convolution subroutine is the only remaining source of randomness; see Table 3.

Table 3: Applications of monotone Min-Plus convolution for which, after applying known derandomizations where needed, the only remaining source of randomization is the monotone Min-Plus convolution oracle. The table also lists the previously best-known deterministic running times. For Knapsack problems, wmax and pmax bound item weights and profits, respectively; W is the capacity and OPT is the optimal profit. The 𝒪~-notation is omitted.
Problem Randomized Runtime Deterministic Runtime
Jumbled Indexing for Binary Strings n1.5 [9, 11] n1.864 [9]
Unbounded Knapsack n+wmaxpmax [6] n+(pmax+wmax)1.864 [5]
0-1 Knapsack n+WOPT [6] n+WOPT0.937 [5, 8]
Weakly-Approximate Unbounded Knapsack n+1/ε1.5 [5] n+1/ε1.864 [5]
 Remark.

We explain how some of the running times in Table 3 are obtained. The randomized running time for Jumbled Indexing for Binary Strings follows by replacing the monotone Min-Plus convolution algorithm in [9] with the faster randomized algorithm of [11]. For Unbounded Knapsack, the randomized 𝒪~(n+(wmax+pmax)1.5)-time algorithm of Bringmann and Cassis [5], combined with the rectangular and [nμ]-bounded generalization of [6], yields the refined bounds 𝒪~(n+wmaxpmax) and 𝒪~(n+pmaxwmax).

For 0-1 Knapsack, the randomized 𝒪~(n+WOPT) bound follows from [6, Theorem 12]. We state this bound, rather than their stronger 𝒪~(n+Wpmax) bound, because it is the one to which our derandomization applies. The deterministic 0-1 Knapsack bound shown in the table is not explicitly stated in the literature. The 0-1 Knapsack algorithm of [5] has another source of randomness, namely the random partitioning technique originating from [4, 12]. This additional source of randomness was recently derandomized by [8]; see [8, Appendix A] for a deterministic reduction from 0-1 Knapsack to Min-Plus convolution in [12]. The same derandomization also applies to the random partitioning step used in [5]. More specifically, if monotone Min-Plus convolution with [nμ]-bounded inputs can be solved deterministically in 𝒪~(n1+αμ) time, then the results of [8, 5] imply a deterministic 0-1 Knapsack algorithm running in 𝒪~(n+WOPTα) time. The previously known deterministic algorithm for [nμ]-bounded monotone Min-Plus convolution can be obtained using the deterministic 𝒪(n1.864)-time algorithm for the [n]-bounded case [9] as a black box, together with blocking and balancing (details omitted). This yields a deterministic 𝒪~(n1+2μ/(41.864))=𝒪~(n1+0.937μ)-time algorithm for [nμ]-bounded monotone Min-Plus convolution, and therefore yields the deterministic 𝒪~(n+WOPT0.937) bound shown in the table.

1.1 Our Results

We close the gap between the deterministic and randomized running times for monotone Min-Plus product and monotone Min-Plus convolution. Our work is inspired by the randomized algorithm of Chi, Duan, Xie, and Zhang [11]. However, our presentation is more streamlined due to several reductions. Moreover, our algorithm for monotone Min-Plus product applies to rectangular matrices and to the case where the entries of B lie in an arbitrary range [nμ], rather than only in [n]. This matches the extensions studied in the randomized setting by [14, 17, 25], which generalized the framework of [11].

Theorem 1.

There is a deterministic algorithm that, given an na×nb integer matrix A and an nb×nc row-monotone matrix B with entries in [nμ], computes their Min-Plus product in time 𝒪^(na+c+nb+c+n(a+b+μ+ω(a,b,c))/2).

Note that the terms na+c and nb+c above are necessary due to input and output sizes. As in [11], our algorithm also extends to the case where B is column-monotone. Owing to our more streamlined algorithm, this extension is more modular than in prior approaches.

Theorem 2.

There is a deterministic algorithm that, given an na×nb integer matrix A and an nb×nc column-monotone matrix B with entries in [nμ], computes their Min-Plus product in time 𝒪^(na+b+nb+c+n(a+c+μ+ω(a,b,c))/2).

Very recently, Fischer [15] showed, unless the APSP hypothesis fails, there is no 𝒪(n2.5ε)-time algorithm for column-monotone Min-Plus product for any ε>0 when a=b=c=μ=1. Thus, if ω=2, our algorithm is near-optimal in this case under the APSP hypothesis.

As in [11], our techniques also extend to monotone Min-Plus convolution. Our algorithm for monotone Min-Plus convolution applies when the array entries lie in [nμ]. Its running time essentially matches the best-known randomized running time [11, 6].

Theorem 3.

There is a deterministic algorithm that, given two length-n monotone arrays A and B, both with entries in [nμ], computes their Min-Plus convolution in time 𝒪^(n1+μ/2).

Using the reduction of [6, Theorem 8] from the case where both arrays are monotone to the case where only one array is monotone, our algorithm also applies when only one of the two arrays is monotone.

Our algorithms directly derandomize the best randomized algorithms for many problems.

Corollary 4.

All problems in Tables 1 and 3, as well as +2k-approximate APSP for 2k8 in Table 2, can be solved by deterministic algorithms with the listed randomized running times, up to an no(1) factor.

In fact, we can derandomize the +2-approximate APSP algorithm of [21] shown in Table 2. This algorithm does not use monotone Min-Plus product, so its derandomization is not an immediate consequence of our algorithms; nevertheless, it can be derandomized using standard techniques. A proof can be found in the full version.

2 Technical Overview

In this technical overview, we focus on row-monotone Min-Plus product in the parameter regime originally considered by [11], where both input matrices have dimension n×n and entries from [n]. The extensions to rectangular matrices, larger entry ranges, column-monotone matrices, and monotone Min-Plus convolution are handled in the main body.

Our algorithm is a derandomization of the algorithm of [11]. The only source of randomization in their algorithm is to pick a random prime Q from some appropriate range. Hence, it may appear straightforward to derandomize their algorithm because there is now a standard recipe for derandomizing the choice of a prime (see, e.g., [9, 16]): Instead of choosing a prime from a relatively large range, one can take Q to be the product of several smaller primes from a smaller range, which are found one by one. For each such prime, one can afford to deterministically enumerate all primes in the smaller range and choose one that works. However, this approach faces several difficulties when applied to the algorithm of [11].

  1. A.

    The intuition for why [11] needs a random prime Q is the following. There is an implicit set S of roughly n3 nonzero integers, and we want only a small number of integers in S to be divisible by Q; call this quantity fQ. When Q is a random prime from [M], the expected value of fQ can be upper bounded by roughly n3/M. If we aim to use the standard approach to derandomize the choice of Q, we would keep finding primes pi from a smaller range [R], and maintain Q=i=1tpi, where t is the current number of primes we have determined. For each additional prime, we expect fQ to drop by a factor of roughly R. In theory, one can show that such a prime exists, and even a random prime likely works. However, in order for a deterministic algorithm to pick pt, it would naively need to compute the value of fQ for each choice of pt. Unfortunately, there does not seem to be an efficient algorithm for this task, which marks the first difficulty in applying this derandomization approach.

  2. B.

    In addition to the previous role, the prime Q in [11] also serves another role: it is used to separate an integer x into a high-order part (x/Q) and a low-order part (xmodQ). If we use the standard approach to derandomize the choice of Q by multiplying small primes one by one, the high-order parts and low-order parts of the integers keep changing, making it difficult to derandomize the algorithm.

Standard Reductions

To address Item B, we separate the two roles played by Q. As it turns out, it suffices to pick an arbitrary integer from an appropriate range to separate the integers into high-order parts and low-order parts. Let M=Θ(n(3ω)/2) be such an integer. By standard reductions, it suffices to solve the following problem.

Problem 1.

Let A,B,C be n×n integer matrices with nonnegative entries bounded by 𝒪(n), where both B and C are row-monotone. In addition, all entries x of the matrices satisfy xmodMM/10. For every i,j[n], determine whether there exists k[n] such that Ai,k+Bk,j=Ci,j.

At a high level, the reduction has two steps. First, by recursively halving the entries of A and B, the product of the halved instance gives an approximation to each entry of AB: if C is the product of the halved instance, then each true value (AB)i,j must be one of 2Ci,j, 2Ci,j+1, or 2Ci,j+2. Thus, a verifier for candidate values can recover the full product by testing these three candidates. Second, using a standard residue-shifting reduction similar to [11], we transform the verification instance into constantly many promised instances in which the relevant residues of A, B, and C lie in a small interval modulo M.

These standard reductions were also present in the algorithm of [11], appearing as a recursive step. By explicitly applying the standard reductions first, we move the recursive step outside the main algorithm, making the algorithm more streamlined. In addition, this helps unify the algorithms for the row-monotone and column-monotone cases. As it turns out, the column-monotone case can also be reduced to a version of Problem 1, where for every i,k, we need to determine the existence of such a j; see Section 5 for details.

Main algorithm

Define Ai,khigh=Ai,k/M, and define Bhigh and Chigh analogously. The algorithm first finds a modulus Q satisfying MQMno(1); we defer the additional properties required of Q, as well as the description of how to find it, until later in the overview. Then the algorithm computes the following quantities:

  • si,j, the number of k[n] such that Ai,k+Bk,jCi,j(modQ);

  • si,j, the number of k[n] such that Ai,k+Bk,jCi,j(modQ) and Ai,khigh+Bk,jhighCi,jhigh.

It is not difficult to see that Ai,k+Bk,j=Ci,j if and only if Ai,k+Bk,jCi,j(modQ) and Ai,khigh+Bk,jhigh=Ci,jhigh. Hence, for each pair (i,j), there exists a witness k if and only if si,j>si,j. Therefore, it suffices to compute si,j and si,j for every pair (i,j).

Using an approach similar to [2], one can compute all values si,j in 𝒪^(Qnω)=𝒪^(n(3+ω)/2) time. To discuss how to compute si,j, we define segments, similarly to [11], and a special type of segment called active segments. Let max:=log(M/20).

Definition 5.

For 0max, a level- segment is a tuple (i,k,[j0,j1]) such that, for every j0jj1, we have Bk,j0/2=Bk,j/2 and Ci,j0/2=Ci,j/2, and [j0,j1] cannot be further extended.

Definition 6.

For 0max, a level- segment (i,k,[j0,j1]) is called active with respect to Q if Ai,khigh+Bk,j0highCi,j0high0 and Ai,k+Bk,j0Ci,j0modQ[42,42]. Let S(Q) be the set of active level- segments.

Since B and C are row-monotone, the number of level- segments is 𝒪(n3/2).

We will find a modulus Q so that, for every 0max, |S(Q)|𝒪^(n3/Q). For now, assume that we have such a modulus Q. We show how to compute si,j under this assumption.

To see why active segments help compute si,j, consider a triple (i,j,k) such that Ai,k+Bk,jCi,j(modQ) and Ai,khigh+Bk,jhighCi,jhigh; that is, k contributes one to si,j. Let (i,k,[j0,j1]) be the unique level-0 segment where j[j0,j1]. It is not difficult to see that this segment is active. Hence, we proceed by computing S0(Q):

  • First, we find Smax(Q) by enumerating all level-max segments and checking whether each segment is active. The number of level-max segments is 𝒪(n3/2max)=𝒪(n(3+ω)/2). Hence, this part takes 𝒪~(n(3+ω)/2) time.

  • Suppose we have computed the set S+1(Q) of active level-(+1) segments. For every segment LS+1(Q), we enumerate all level- segments contained in L and check whether they are active. Here, a segment (i,k,[j0,j1]) is contained in another segment (i,k,[j0,j1]) if i=i, k=k, and [j0,j1][j0,j1]. It can be shown that every segment in S(Q) is contained in some segment in S+1(Q), so this procedure correctly computes S(Q). Moreover, each level-(+1) segment contains only a constant number of level- segments. By the assumption |S(Q)|𝒪^(n3/Q) for every , this step takes 𝒪^(n3/Q)=𝒪^(n(3+ω)/2) time.

Recall that the segments in S0(Q) contain all triples (i,j,k) that can contribute to si,j. For every level-0 segment (i,k,[j0,j1])S0(Q), the values Bk,j are constant over j[j0,j1], and the values Ci,j are also constant over this interval. Hence, either all triples (i,k,j) with j[j0,j1] contribute to si,j, or none of them do. We can therefore use a simple data structure to compute all values si,j from S0(Q) in 𝒪~(|S0(Q)|)=𝒪^(n(3+ω)/2) time.

Finding a Good Modulus

It remains to find a modulus Q[M,Mno(1)] such that |S(Q)|𝒪^(n3/Q) for every 0max. To do so, consider the following multiset of numbers for every level :

𝒳:={Ai,k+Bk,j0Ci,j0s:(i,k,[j0,j1]) is a level- segment,s[42,42]}({0}),

and let X,Q denote the number of elements in 𝒳 that are divisible by Q. Clearly, |𝒳|𝒪(n3/2)𝒪(2)=𝒪(n3). When QM (and hence Q>42), X,Q is exactly the number of level- segments (i,k,[j0,j1]) such that Ai,k+Bk,j0Ci,j0modQ[42,42] and Ai,k+Bk,j0Ci,j0[42,42]. Using the assumptions in Problem 1, it is not difficult to show that one can equivalently replace the second condition with Ai,khigh+Bk,j0highCi,j0high. Hence, X,Q is exactly |S(Q)|.

To summarize, we have several multisets 𝒳, each containing 𝒪(n3) nonzero integers, and we need to find a modulus Q such that, for every , the number of elements of 𝒳 divisible by Q is at most 𝒪^(n3/Q). This is exactly the setting where the standard recipe of constructing Q as a product of smaller primes applies. More precisely, we construct Q as the product of primes p1,p2,,pt from [R/2,R], for some relatively small R=no(1). Let P be the set of primes in [R/2,R]. At each step, we find an additional prime piP by enumerating all primes in P and choosing a suitable one. We stop once the product of the chosen primes exceeds M. By a standard probability analysis, there exist primes p1,p2,,ptP such that if Qt=i=1tpi, then X,Qt is bounded by roughly n3/Rt for every . Since RtQt, this gives X,Qtn3/Qt for every , as desired. Hence, it remains to find these suitable primes deterministically.

In this overview, we illustrate our approach by showing how to find the first prime pP such that X,p=𝒪~(n3/R) for every . The same idea extends easily to finding the remaining primes. Since R=no(1), we can afford to enumerate all primes in P and choose one that works. However, even when p is fixed, it is unclear how to compute X,p efficiently: the straightforward approach requires enumerating all level- segments, which takes 𝒪(n3/2) time. When is small, this bound can be as high as 𝒪(n3). This reflects the first difficulty mentioned in Item A, although the setting here is already somewhat different.

Instead of computing X,p, we take a more indirect approach. Let

𝒴:={Ai,k+Bk,j0Ci,j0s:(i,k,[j0,j1]) is a level- segment,s[42,42]}.

This multiset has the same definition as 𝒳, except that we do not remove the zero elements. Let Y,p denote the number of elements in 𝒴 that are divisible by p. As it turns out, one can compute Y,p efficiently in 𝒪^(2nω)=𝒪^(Mnω) time, following the high-level idea of [2]. Next, observe that Y,pX,p is exactly the number of pairs ((i,k,[j0,j1]),s) such that Ai,k+Bk,j0Ci,j0s=0, where (i,k,[j0,j1]) is a level- segment and s[42,42]. In particular, Y,pX,p does not depend on p; denote this quantity by Z.

In our algorithm, we compute Y:=minpPY,p for every , and then choose a prime p0P minimizing max{Y,p0Y}. This prime p0 can be found deterministically in Mnω+o(1) time, since this procedure only uses the computable values Y,p, rather than the values X,p. Note that YZ is exactly X:=minpPX,p. Hence, p0 minimizes

max0max{Y,pY}=max0max{X,pX}.

By a standard probabilistic argument, X𝒪~(n3/R) for every . Thus, p0 minimizes max0max{X,p} up to a 𝒪~(n3/R) additive error. Again by a standard probabilistic argument,

minpPmax0max{X,p}𝒪~(n3/R).

Therefore, X,p0𝒪~(n3/R) for every , as desired.

3 Preliminaries

Notations

For integers a and M1, we write amodM for the unique integer b{0,1,,M1} such that ab(modM). For a positive integer x, we write [x]:={1,2,,x}. For integers xy, we write [x,y]:={x,x+1,,y}.

Min-Plus Product

Let A be an na×nb integer matrix and let B be an nb×nc integer matrix. The Min-Plus product of A and B is the na×nc matrix AB defined by

(AB)i,j:=min1knb{Ai,k+Bk,j}for (i,j)[na]×[nc].

Min-Plus Convolution

Let A and B be arrays of length n indexed from 1. The Min-Plus convolution of A and B is an array AB indexed by 2,,2n, defined by

(AB)k:=min1ik11i,kin{Ai+Bki},for k[2,2n].

Monotonicity

An n×m matrix A is row-monotone if for every i[n] and j[m1], Ai,jAi,j+1.555Unlike in the introduction, where boundedness is included for readability, monotonicity here only refers to the ordering condition; boundedness is stated separately. It is column-monotone if for every i[n1] and j[m], Ai,jAi+1,j. An array A of length n is monotone if for every i[n1], AiAi+1.

Rectangular Matrix Multiplication

For a,b,c0, let ω(a,b,c) denote an exponent such that the product of an na×nb matrix and an nb×nc matrix can be computed in 𝒪^(nω(a,b,c)) arithmetic operations. The best known upper bound is ω(1,1,1)<2.372 [1]. It is known that ω(a,b,c)=ω(a,c,b) [20].

Polynomial Multiplication

Let P,Q[x,y] be bivariate polynomials whose degree in x is at most dx and whose degree in y is at most dy. We can compute P+Q and PQ in 𝒪(dxdy) time, and compute PQ in 𝒪~(dxdy) time using FFT. Let P(x)([x])na×nb and Q(x)([x])nb×nc be polynomial matrices whose entries have degree at most D. Then the matrix product P(x)Q(x) can be computed in 𝒪^(Dnω(a,b,c)) time.

Prime Number Theorem

Let π(x) denote the number of primes at most x. The prime number theorem states that π(x)=x/logx±o(x/logx). As a corollary, for any sufficiently large integer R, the number of primes in the interval [R/2,R] is π(R)π(R/21)=Θ(R/logR).

4 Deterministic Monotone Min-Plus Product

In this section, we present a deterministic algorithm for row-monotone Min-Plus product, whose definition we recall below.

Problem 2.

Let A be an na×nb integer matrix. Let B be an nb×nc row-monotone integer matrix with entries in [nμ]. Given (A,B) as input, compute AB.

4.1 Reduction to a Verification Problem

We start with a standard reduction that transforms the problem into a simpler form. Consider the following verification problem.

Problem 3.

Let A be an na×nb integer matrix with nonnegative entries bounded by 𝒪(nμ). Let B be an nb×nc row-monotone integer matrix with nonnegative entries bounded by 𝒪(nμ). Let C be an na×nc row-monotone integer matrix with nonnegative entries bounded by 𝒪(nμ). Given (A,B,C) as input, for every (i,j)[na]×[nc], decide whether there exists k[nb] such that Ai,k+Bk,j=Ci,j.

Lemma 7.

If there is a deterministic algorithm for Problem 3 that runs in T(na,nb,nc;nμ) time, then there is a deterministic algorithm for Problem 2 that runs in 𝒪~(T(na,nb,nc;nμ)) time.

Proof.

First, by a simple observation of [11], we may assume that all entries of A are nonnegative integers bounded by 𝒪(nμ): for each i, subtract δi from every entry in the i-th row of A, where δi is the minimum value in that row. Then any entry of A greater than 2nμ can be set to 2nμ+1, since it can never participate in an optimal solution. After computing the Min-Plus product of the modified matrix A and B, we simply add δi back to the i-th row of the result.

Let Ai,j:=Ai,j/2 and Bi,j:=Bi,j/2. Flooring preserves row-monotonicity, so the rows of B are also row-monotone. We compute C:=AB recursively. The base case occurs when both A and B are zero matrices, in which case we can compute AB trivially. Now define three na×nc candidate matrices C(0),C(1),C(2) by Ci,j(s):=2Ci,j+s for s{0,1,2}. Since the rows of B are monotone, one can prove that the rows of C are also monotone. Therefore, the rows of each C(s) are monotone as well, and we can run the algorithm for Problem 3 on the instance (A,B,C(s)) for each s{0,1,2}.

Since (x1)/2x/2x/2 and C=AB, we have

Ci,j=mink{Ai,k2+Bk,j2}mink{Ai,k+Bk,j2}=(AB)i,j2,

and

Ci,j=mink{Ai,k2+Bk,j2}mink{Ai,k+Bk,j22}=(AB)i,j22.

Together, these inequalities imply (AB)i,j2Ci,j{0,1,2}. Thus, for each fixed pair (i,j), there exists at least one s{0,1,2} such that Ci,j(s)=(AB)i,j, and we can recover (AB)i,j by taking the minimum value among Ci,j(s) for which the verifier accepts (i,j) on (A,B,C(s)). Moreover, if the verifier accepts (i,j) on (A,B,C(s)) with witness k, then Ci,j(s)=Ai,k+Bk,j(AB)i,j. Therefore, taking the minimum accepted value among the Ci,j(s) returns exactly (AB)i,j.

For the running time, we make 𝒪(1) calls to the T(na,nb,nc;nμ)-time verifier per recursion level. The recursion depth is 𝒪(log(nμ))=𝒪(logn). The additional costs of forming A, B, and the matrices C(s) are dominated by T(na,nb,nc;nμ). Hence, the total running time is 𝒪~(T(na,nb,nc;nμ)).

Using an approach similar to that of [11, Lemma 3.5], we further reduce Problem 3 to the following problem and focus on solving it efficiently. Since the reduction is standard, we defer the proof to the full version.

Problem 4.

Let (A,B,C) be an instance of Problem 3, and let M be a positive integer that is a multiple of 100 and satisfies M=𝒪(nμ). Additionally, assume that for every i[na], k[nb], and j[nc], we have Ai,kmodM,Bk,jmodM,Ci,jmodMM/10. Given (A,B,C) as input, for every (i,j)[na]×[nc], decide whether there exists k[nb] such that Ai,k+Bk,j=Ci,j.

Lemma 8.

If there is a T(na,nb,nc;nμ,M)-time algorithm for Problem 4 for every such M, then there is an 𝒪~(T(na,nb,nc;nμ,M))-time algorithm for Problem 3.

4.2 Algorithm for Problem 4

Suppose we are given an instance (A,B,C) of Problem 4 with M=Θ(nd) for some constant 0dμ. Define

Ai,khigh=Ai,kM,Bk,jhigh=Bk,jM,Ci,jhigh=Ci,jM.

We also define

Ai,klow=Ai,kmodM,Bk,jlow=Bk,jmodM,Ci,jlow=Ci,jmodM.

The high-level outline of our algorithm is as follows:

  1. 1.

    Find a “good” modulus Q with MQMno(1). The definition of “good” is deferred to Definition 16.

  2. 2.

    For every (i,j)[na]×[nc], compute si,j, the number of k[nb] such that Ai,k+Bk,jCi,j(modQ).

  3. 3.

    For every (i,j)[na]×[nc], compute si,j, the number of k[nb] such that Ai,k+Bk,jCi,j(modQ) and Ai,khigh+Bk,jhighCi,jhigh.

  4. 4.

    For each (i,j)[na]×[nc], output Yes if and only if si,j>si,j.

We first prove two simple facts that bound |Ai,k+Bk,jCi,j|, depending on whether Ai,khigh+Bk,jhigh=Ci,jhigh, and then prove the correctness of the algorithm assuming that our subroutines are correct.

Fact 9.

For every (i,k,j)[na]×[nb]×[nc], if Ai,khigh+Bk,jhighCi,jhigh, then |Ai,k+Bk,jCi,j|7M/10.

Proof.

We decompose Ai,k+Bk,jCi,j=M(Ai,khigh+Bk,jhighCi,jhigh)+(Ai,klow+Bk,jlowCi,jlow). If Ai,khigh+Bk,jhighCi,jhigh0, then |Ai,khigh+Bk,jhighCi,jhigh|1. By the promise of Problem 4, |Ai,klow+Bk,jlowCi,jlow||Ai,klow|+|Bk,jlow|+|Ci,jlow|3M/10. Therefore, using |a+b||a||b|, we have

|Ai,k+Bk,jCi,j| M|Ai,khigh+Bk,jhighCi,jhigh||Ai,klow+Bk,jlowCi,jlow|
M3M/10=7M/10.

Fact 10.

For every (i,k,j)[na]×[nb]×[nc], if Ai,khigh+Bk,jhigh=Ci,jhigh, then |Ai,k+Bk,jCi,j|3M/10.

Proof.

Since Ai,khigh+Bk,jhighCi,jhigh=0, we have |Ai,k+Bk,jCi,j|=|Ai,klow+Bk,jlowCi,jlow|3M/10 by the same argument as in Fact 9.

Recall that si,j is the number of k[nb] such that Ai,k+Bk,jCi,j(modQ), and si,j is the number of k[nb] such that Ai,k+Bk,jCi,j(modQ) and Ai,khigh+Bk,jhighCi,jhigh. We now prove the correctness of our algorithm.

Lemma 11 (Correctness).

For every (i,j)[na]×[nc], there exists k[nb] such that Ai,k+Bk,j=Ci,j if and only if si,j>si,j.

Proof.

Fix (i,j) and suppose there exists k[nb] such that Ai,k+Bk,j=Ci,j. Then Ai,k+Bk,jCi,j(modQ), so this k contributes one to si,j. Moreover, under the promise of Problem 4, we have Ai,klow+Bk,jlow2M/10, so adding the low parts creates no carry across a multiple of M. Hence, Ci,jhigh=Ci,j/M=(Ai,k+Bk,j)/M=Ai,khigh+Bk,jhigh. Therefore, this k does not contribute to si,j, and so si,j>si,j.

Conversely, suppose si,j>si,j. Then there exists k[nb] such that Ai,k+Bk,jCi,j(modQ) and Ai,khigh+Bk,jhigh=Ci,jhigh. By Fact 10, we have |Ai,k+Bk,jCi,j|3M/10<Q. Since Ai,k+Bk,jCi,j is a multiple of Q and has magnitude strictly less than Q, it must be zero. Therefore, Ai,k+Bk,j=Ci,j.

In the following sections, we describe how to compute si,j and si,j efficiently, and how to construct a suitable modulus Q. To this end, we introduce several objects used by the subroutines and their analysis. Let max be such that M/202max<M/10.

Definition 12 (Segments).

For 0max, a level- segment is a triple (i,k,[j0,j1]) such that, for every j[j0,j1], Bk,j0/2=Bk,j/2 and Ci,j0/2=Ci,j/2, and [j0,j1] cannot be extended further.

Fact 13.

For 0max, the total number of level- segments is 𝒪(na+b+μ/2).

Definition 14 (Active segment).

For 0max, a level- segment (i,k,[j0,j1]) is called active with respect to Q if Ai,khigh+Bk,j0highCi,j0high and there exists s[42,42] such that Ai,k+Bk,j0Ci,j0s(modQ).

Definition 15 (Set of active segments).

For 0max, let S(Q) be the set of all level- segments that are active with respect to Q.

Definition 16 (Good modulus).

We say that an integer Q is a good modulus if MQMno(1) and |S(Q)|𝒪^(na+b+μ/Q) for all 0max.

4.3 Computing 𝒔𝒊,𝒋 and 𝒔𝒊,𝒋

Recall that si,j is the number of indices k[nb] such that Ai,k+Bk,jCi,j(modQ). We compute si,j for all (i,j)[na]×[nc] using polynomial matrix multiplication. The technique is standard, so we defer the proof to the full version.

Lemma 17 (Computing si,j).

We can compute si,j for every (i,j)[na]×[nc] in time 𝒪^(Qnω(a,b,c)).

Recall that si,j is the number of indices k such that Ai,k+Bk,jCi,j(modQ) and Ai,khigh+Bk,jhighCi,jhigh. Suppose that Q is a good modulus as defined in Definition 16; we show how to find such a modulus in the next section. For simplicity, let S denote the set of all active level- segments, suppressing the dependence on Q. We first prove a property used by our subroutine, and then prove two lemmas describing the procedure for computing si,j.

Lemma 18.

For all 0<max and (i,k,[j0,j1])S, the unique level-(+1) segment (i,k,[j0,j1]) with [j0,j1][j0,j1] is active, i.e., (i,k,[j0,j1])S+1.

Proof.

Fix j[j0,j1]. By definition of a level-(+1) segment, we have Bk,j0/2+1=Bk,j/2+1. Hence, |Bk,jBk,j0|<2+1<M/10. Moreover, |Bk,jlowBk,j0low|M/10 by the promise of Problem 4. Hence, if Bk,jhighBk,j0high, then

|Bk,jBk,j0|=|(Bk,jhighBk,j0high)M+(Bk,jlowBk,j0low)|M|Bk,jlowBk,j0low|9M/10,

which contradicts the previous bound. Therefore, Bk,jhigh is constant for j[j0,j1], and by a similar argument, Ci,jhigh is constant for j[j0,j1]. Now, since (i,k,[j0,j1])S, we have Ai,khigh+Bk,j0highCi,j0high0. Because j0[j0,j1], we conclude that Ai,khigh+Bk,j0highCi,j0high0, satisfying the high-part condition of being active.

For the congruence condition, note that [j0,j1][j0,j1] and (i,k,[j0,j1]) is a level-(+1) segment. Hence, |Bk,j0Bk,j0|<2+1 and |Ci,j0Ci,j0|<2+1, which implies |(Ai,k+Bk,j0Ci,j0)(Ai,k+Bk,j0Ci,j0)|<22+1. Since (i,k,[j0,j1])S, we have Ai,k+Bk,j0Ci,j0s(modQ) for some s[42,42]. Take

s=s+(Ai,k+Bk,j0Ci,j0)(Ai,k+Bk,j0Ci,j0).

Then |s|<42+22+1=42+1 and (Ai,k+Bk,j0Ci,j0)ss+(Ai,k+Bk,j0Ci,j0)s(modQ). Thus, the level-(+1) segment (i,k,[j0,j1]) is active.

Lemma 19 (Computing S0).

We can compute S0 in 𝒪^(na+b+μ/Q) time.

Proof.

We first compute all level-max segments as follows. For each (i,k)[na]×[nb], we use binary search on j to group maximal consecutive indices on which Bk,j/2max and Ci,j/2max are both constant. We then enumerate all those level-max segments and filter the active ones to obtain Smax. Next, for =max1,,0, we construct S from S+1 as follows. Every segment in S+1 refines into 𝒪(1) level- subsegments, since decreasing by 1 can split a maximal constant block into at most two blocks for B and at most two blocks for C. We use binary search to compute these subsegments. For each resulting subsegment, we test whether it is active at level and, if so, insert it into S.

For correctness, note that every active level- segment is a subsegment of an active level-(+1) segment by Lemma 18; the correctness therefore follows by induction.

By Fact 13, computing all level-max segments via binary search and constructing Smax takes 𝒪~(na+b+μ/2max)=𝒪~(na+b+μ/M)=𝒪^(na+b+μ/Q) time. For the refinement, we note that Q is a good modulus, so for each , we have |S|=𝒪^(na+b+μ/Q), and each active segment generates only 𝒪(1) subsegments. There are 𝒪(logM)=𝒪~(1) levels, so the total time spent in this refinement step is 𝒪^(na+b+μ/Q).

Lemma 20 (Computing si,j).

We can compute si,j for all (i,j)[na]×[nc] in time 𝒪^(na+b+μ/Q+na+c).

Proof.

We first compute the set S0 using Lemma 19. To compute all si,j, we aggregate the contributions of active level-0 segments in S0 as follows. For each fixed i[na], we maintain a difference array Di of length nc+1, indexed by 1,,nc+1, and initialized to zero. For each active level-0 segment (i,k,[j0,j1])S0, we test whether Ai,k+Bk,j0Ci,j0(modQ). If the test succeeds, we increment Di[j0] by one and decrement Di[j1+1] by one. After processing all active level-0 segments, we compute prefix sums and set si,j=1tjDi[t] for all j=1,,nc.

For correctness, fix any triple (i,k,j) counted in si,j. Then we have Ai,k+Bk,jCi,j(modQ) and Ai,khigh+Bk,jhighCi,jhigh. Let (i,k,[j0,j1]) be the unique level-0 segment such that j[j0,j1]. Since (i,k,[j0,j1]) is a level-0 segment, the values Bk,j and Ci,j are constant over all j[j0,j1]. Since j[j0,j1], we have Ai,khigh+Bk,j0high=Ai,khigh+Bk,jhighCi,jhigh=Ci,j0high and Ai,k+Bk,j0Ai,k+Bk,jCi,jCi,j0(modQ). Hence, (i,k,[j0,j1]) is an active level-0 segment in S0, and the algorithm performs the range update for (i,k,[j0,j1]). This update increases the reconstructed value si,j by one for this k exactly when j[j0,j1].

Conversely, whenever the algorithm performs a range update for (i,k,[j0,j1])S0, we have Ai,k+Bk,j0Ci,j0(modQ). Since (i,k,[j0,j1]) is a level-0 segment, the values Bk,j and Ci,j are constant over all j[j0,j1]. Therefore, Ai,k+Bk,jCi,j(modQ) for every j[j0,j1]. Moreover, the segment is active, so Ai,khigh+Bk,jhighCi,jhigh for every j[j0,j1], and the update contributes exactly the intended triples to si,j.

For the running time, scanning all segments in S0 and performing the constant-time test and update takes 𝒪(|S0|)=𝒪^(na+b+μ/Q). The total time to compute prefix sums is 𝒪(na+c), since for each fixed i we scan j=1,,nc once. Together with the time to compute S0, which is 𝒪^(na+b+μ/Q) by Lemma 19, this yields the claimed running time.

4.4 Finding a Good Modulus 𝑸

We now construct a good modulus Q, namely an integer Q with MQMno(1) such that the number of active level- segments is 𝒪^(na+b+μ/Q) for every 0max.

Let 4Rno(1) be a parameter to be fixed later, and let 𝒫 be the set of primes in [R/2,R]. We take Q to be a product of primes p1,p2,,pT with pt𝒫 for all 1tT. We choose these primes inductively: at step t1, we select a prime pt𝒫 and multiply it into the current modulus Qt1, obtaining

Qt:=i=1tpi,where Q0:=1.

For the analysis, define X,t as the number of pairs ((i,k,[j0,j1]),s), where (i,k,[j0,j1]) is a level- segment and s[42,42], such that

Ai,k+Bk,j0Ci,j0s(modQt)andAi,k+Bk,j0Ci,j0s.

Our inductive invariant for Qt is that

X,t=na+b+μ𝒪(log2nR)tfor all 0max. (1)

Later, we choose R so that X,T=𝒪^(na+b+μ/QT). Then, by the following lemma, QT is a good modulus.

Lemma 21.

For every 0max, we have |S(QT)|X,T.

Proof.

Let (i,k,[j0,j1])S(QT). By definition of an active segment, there exists an integer s[42, 42] such that Ai,k+Bk,j0Ci,j0s(modQT) and Ai,khigh+Bk,j0highCi,j0high. We claim that Ai,k+Bk,j0Ci,j0s. Indeed, since Ai,khigh+Bk,j0highCi,j0high, Fact 9 implies |Ai,k+Bk,j0Ci,j0|7M/10. On the other hand, |s|4242max<4M/10<7M/10, so Ai,k+Bk,j0Ci,j0s. Therefore, every active segment in S(QT) yields a pair ((i,k,[j0,j1]),s) counted by X,T, and hence |S(QT)|X,T.

We now explain how to choose pt so that the invariant Equation 1 continues to hold. For the base case t=0, we have Q0:=1. Since X,0 counts level- segment–shift pairs, we trivially have X,0na+b+μ by Fact 13, and thus Q0 satisfies the invariant. Now assume Equation 1 holds for t1 and that Qt1 is fixed. For any prime p𝒫, let X,t(p) denote the value of X,t when Qt is set to Qt1p. Our goal is to find a prime pt𝒫 such that Equation 1 holds with respect to X,t(pt).

First, such a prime exists; applying the following lemma inductively yields the entire sequence p1,,pT. The proof is standard, so we defer it to the full version.

Lemma 22.

There exists p𝒫 such that, for every 0max,

X,t(p)=X,t1𝒪(log2nR). (2)

Moreover, for every 0max, if p is chosen uniformly at random from 𝒫, then 𝔼p𝒫[X,t(p)]=X,t1𝒪(logn/R).

We now discuss how to deterministically select these primes. For this, it is convenient to track the following additional quantities.

  1. 1.

    Let Y,t denote the number of pairs ((i,k,[j0,j1]),s), where (i,k,[j0,j1]) is a level- segment and s[42,42], satisfying

    Ai,k+Bk,j0Ci,j0s(modQt).
  2. 2.

    Let Z denote the number of pairs ((i,k,[j0,j1]),s), where (i,k,[j0,j1]) is a level- segment and s[42,42], satisfying

    Ai,k+Bk,j0Ci,j0=s.

As with X,t(p), let Y,t(p) denote the value of Y,t when the modulus is Qt1p.

As discussed in Section 2, we can afford to compute Y,t(p) for all p𝒫 and 0max. Computing Y,t(p) is essentially the same as computing si,j: we reduce modular counting to rectangular matrix multiplication over a polynomial ring. The only difference is that we count segments rather than all column indices. More formally, we have the following lemma.

Lemma 23 (Computing Y,t(p)).

We can compute Y,t(p) for all primes p𝒫 and all levels 0max in time 𝒪^(R2Qt1nω(a,b,c)).

Proof.

Fix a prime p𝒫 and a level . We present an algorithm to compute Y,t(p) for the modulus Q=Qt1p in 𝒪^(Qnω(a,b,c)) time. Since there are max=𝒪(logM)=𝒪(logn) levels, |𝒫|=Θ(R/logR)=𝒪~(R), and Q=Qt1pQt1R, the total running time to compute Y,t(p) for all p𝒫 and all levels is 𝒪^(|𝒫|max(RQt1)nω(a,b,c))=𝒪^(R2Qt1nω(a,b,c)).

Recall that Y,t(p) counts pairs ((i,k,[j0,j1]),s) where (i,k,[j0,j1]) is a level- segment, s[42, 42], and Ai,k+Bk,j0Ci,j0s(modQ). A level- segment (i,k,[j0,j1]) is a maximal interval on which both Bk,j/2 and Ci,j/2 are constant. Therefore, [j0,j1] starts at column j if and only if either j=1, or at least one of Bk,j/2 and Ci,j/2 changes at j. Hence, it suffices to check each segment exactly once via its start column j0. More concretely, define an nb×nc boundary indicator matrix IB by

Ik,1B:=1,Ik,jB:=𝟏[Bk,j1/2Bk,j/2](j2),

and an na×nc boundary indicator matrix IC by

Ii,1C:=1,Ii,jC:=𝟏[Ci,j1/2Ci,j/2](j2).

Then it suffices to count, for each (i,j)[na]×[nc], the indices k[nb] with Ik,jB=1 or Ii,jC=1, grouped by the residue class of Ai,k+Bk,jCi,j(modQ), and then weight each residue class by the number of admissible shifts s[42, 42] in that class.

To do this, we use the polynomial matrix multiplication technique. Work over the ring :=𝔽[x]/(xQ1), where 𝔽 is a field of sufficiently large characteristic. Construct an na×nb matrix A and two nb×nc matrices B and Bbdry by

Ai,k(x):=xAi,kmodQ,Bk,j(x):=xBk,jmodQ,Bk,jbdry(x):=Ik,jBxBk,jmodQ.

Compute the matrix products Dall:=AB and Dbdry:=ABbdry over using fast rectangular matrix multiplication, and finally construct an na×nc matrix D defined by

Di,j(x):={Di,jall(x),if Ii,jC=1,Di,jbdry(x),if Ii,jC=0.

For each r{0,,Q1} and (i,j), let Ui,j(r) be the coefficient of xr in Di,j(x). Then Ui,j(r) is the number of indices k such that Ai,k+Bk,jr(modQ) and either Ik,jB=1 or Ii,jC=1. Next, define

W(r):=|{s[42, 42]:sr(modQ)}|.

Note that the pair ((i,k,[j0,j1]),s) is counted in Y,t(p) exactly when Ai,k+Bk,j0Ci,j0s(modQ). Equivalently, if rAi,k+Bk,j0(modQ), then srCi,j0(modQ). Thus, grouping by r, the contribution of a fixed (i,j) to Y,t(p) is

r=0Q1Ui,j(r)W((rCi,j)modQ).

Therefore, summing over i[na] and j[nc], we recover Y,t(p).

For the running time, arithmetic in reduces exponents modulo Q, so the cost of the rectangular matrix product is 𝒪^(Qnω(a,b,c)), and we compute 𝒪(1) such products. Extracting Ui,j(r) for all (i,j) and r costs 𝒪(Qna+c), computing W(r) for all r costs 𝒪(Q), and evaluating the triple sum costs 𝒪(Qna+c). Hence, for fixed p and we can compute Y,t(p) in 𝒪^(Qnω(a,b,c)) time.

Lemma 24.

We can find a prime pt𝒫 satisfying Equation 1; that is, X,t(pt)=na+b+μ𝒪(log2n/R)t for all 0max. Moreover, pt can be found in time 𝒪^(R2Qt1nω(a,b,c)).

Proof.

We run the algorithm in Lemma 23 to compute Y,t(p) for all primes p𝒫 and all levels 0max. For each , define Y,t:=minp𝒫Y,t(p), and choose pt𝒫 that minimizes

Φ(p):=max0max{Y,t(p)Y,t}.

For correctness, we first note that Y,tZ. Since X,t(p)=Y,t(p)Z for all p𝒫 and X,t(p)0, we have Y,t(p)Z for every p𝒫, and thus Y,tZ.

Now, let p𝒫 be a prime satisfying Equation 2, which exists by Lemma 22. Then, for every ,

Y,t(p)Y,tY,t(p)Z=X,t(p)=X,t1𝒪(log2nR)=na+b+μ𝒪(log2nR)t,

where the last equality follows from the inductive hypothesis Equation 1. Therefore, Φ(p)=na+b+μ𝒪(log2n/R)t, and by the choice of pt minimizing Φ, we obtain

Y,t(pt)Y,tΦ(pt)Φ(p)na+b+μ𝒪(log2nR)tfor all 0max.

Next, define X,t:=minp𝒫X,t(p). By minimality, Lemma 22, and the inductive hypothesis Equation 1,

X,t𝔼p𝒫[X,t(p)]=X,t1𝒪(log2nR)=na+b+μ𝒪(log2nR)t.

Also, since X,t(p)=Y,t(p)Z for all p𝒫 and Z is independent of p, we have

Y,tZ=minp𝒫{Y,t(p)Z}=minp𝒫X,t(p)=X,t.

Combining the above bounds, for every 0max we get

X,t(pt)=Y,t(pt)Z=(Y,tZ)+(Y,t(pt)Y,t)X,t+Φ(pt)=na+b+μ𝒪(log2nR)t.

For the running time, computing Y,t(p) for all p𝒫 and all 0max via Lemma 23 dominates, giving 𝒪^(R2Qt1nω(a,b,c)) time. The remaining steps, namely taking minima and selecting pt, take at most 𝒪(|𝒫|max)=𝒪~(Rlogn) additional time, which is lower order.

It remains to set the parameters so that the above procedure yields a good modulus.

Fact 25.

Let R=2Θ(logn/loglogn) and T=𝒪(logn/logR). Then (logn)2T=no(1).

Lemma 26 (Computing a good modulus).

We can compute a good modulus Q in time 𝒪^(Mnω(a,b,c)).

Proof.

By applying Lemma 24 inductively for T steps, we obtain primes p1,,pT𝒫 and a modulus QT:=t=1Tpt such that Equation 1 holds. Since pt[R/2,R] for all 1tT, we have (R/2)TQTRT. In particular, to ensure QTM it suffices to take T=Θ(logM/logR)=𝒪(logn/logR). Moreover, if we take T to be the first index such that QTM, then QT1<M and hence QT=QT1pT<MR, so QT overshoots M by at most a factor of R. We set

R=2Θ(logn/loglogn).

Then R=no(1), and therefore MQTMR=Mno(1). Finally, by Fact 25, we have (log2n)T=no(1), and so (log2n/R)T=no(1)/QT. Hence QT satisfies MQTMno(1), and

X,T=na+b+μ𝒪(log2nR)T=na+b+μ+o(1)QTfor all 0max.

Therefore, QT is a good modulus.

For the running time, we apply Lemma 24 for T steps. At step t, the cost of computing pt is 𝒪^(R2Qt1nω(a,b,c)). Since Qt1QT1<M, the total time is

𝒪^(t=1TR2Qt1nω(a,b,c))=𝒪^(TR2Mnω(a,b,c))=𝒪^(Mnω(a,b,c)),

where the last bound uses TR2=no(1) for our choice of R.

4.5 Combining the Results

Theorem 27.

There is a deterministic 𝒪^(Mnω(a,b,c)+na+b+μ/M)-time algorithm for Problem 4.

Proof.

We first compute a good modulus Q via Lemma 26 in time 𝒪^(Mnω(a,b,c)). Next, we compute si,j for all (i,j)[na]×[nc] via Lemma 17 in time 𝒪^(Qnω(a,b,c))=𝒪^(Mnω(a,b,c)). Finally, we compute si,j for all (i,j)[na]×[nc] via Lemma 20 in time 𝒪^(na+b+μ/Q+na+c)=𝒪^(na+b+μ/M+na+c). For each (i,j)[na]×[nc], we output Yes if and only if si,j>si,j; correctness follows from Lemma 11. The total running time is 𝒪^(Mnω(a,b,c)+na+b+μ/M).

Proof of Theorem 1.

Our claimed running time is 𝒪^(na+c+nb+c+n(a+b+μ+ω(a,b,c))/2). Let d:=(a+b+μω(a,b,c))/2. Since μ0, we have dμ: indeed, d>μ would imply μ+ω(a,b,c)<a+b, contradicting the trivial lower bound ω(a,b,c)a+b. Furthermore, we may assume that d0: if d<0, then a+b+μ<ω(a,b,c). In this case, Lemma 17 of [19] gives an algorithm running in time 𝒪^(na+c+nb+c+na+b+μ), which is dominated by our claimed bound. Hence, we may assume 0dμ.

Now, by Lemmas 7 and 8, it suffices to solve Problem 4. By Theorem 27, there is a deterministic algorithm for Problem 4 that runs in time 𝒪^(Mnω(a,b,c)+na+b+μ/M). We take d as the exponent for M; that is, take M=Θ(n(a+b+μω(a,b,c))/2). Then the two terms balance, yielding

𝒪^(Mnω(a,b,c)+na+b+μ/M)=𝒪^(n(a+b+μ+ω(a,b,c))/2),

which is dominated by our claimed bound.

5 Extension to Column-Monotone Min-Plus Product

In this section, we present a deterministic algorithm for column-monotone Min-Plus product, whose definition we recall below.

Problem 5.

Let A be an na×nb integer matrix. Let B be an nb×nc column-monotone integer matrix with entries in [nμ]. Given (A,B) as input, compute AB.

We start by reducing column-monotone Min-Plus product to the following problem, which is a “rotated” version of Problem 3 (the differences have been highlighted).

Problem 3.

Let A be an na×nb integer matrix with nonnegative entries bounded by 𝒪(nμ). Let B be an nb×nc row-monotone integer matrix with nonnegative entries bounded by 𝒪(nμ). Let C be an na×nc row-monotone integer matrix with nonnegative entries bounded by 𝒪(nμ). Given (A,B,C) as input, for every (𝐢,𝐤)[𝐧𝐚]×[𝐧𝐛], decide whether there exists 𝐣[𝐧𝐜] such that Ai,k+Bk,j=Ci,j.

Theorem 28.

There is a deterministic algorithm for ˜3 that runs in 𝒪^(na+c+nb+c+n(a+b+μ+ω(a,b,c))/2) time.

We defer the proof of Theorem 28 to the full version, as it largely repeats arguments from Section 4. Instead, we prove Theorem 2 assuming Theorem 28.

Proof of Theorem 2 assuming Theorem 28.

Let (A,B) be an instance of Problem 5. Similar to the proof of Lemma 7, we may assume that all entries of A are nonnegative integers bounded by 𝒪(nμ). By an observation in [11], we may also assume that each row of A is monotonically non-increasing: if there exist i,k1,k2 such that k1<k2 and Ai,k1<Ai,k2, then Ai,k1+Bk1,j<Ai,k2+Bk2,j for every j by the monotonicity of B. Hence, replacing Ai,k2 by Ai,k1 does not change AB.

Now we follow the same recursive halving approach as in the proof of Lemma 7. Let Ai,j:=Ai,j/2 and Bi,j:=Bi,j/2. Flooring preserves monotonicity, so the columns of B are monotone and the rows of A are monotonically non-increasing. We compute C:=AB recursively, with the trivial base case when both matrices are zero. Define three na×nc candidate matrices by Ci,j(s):=2Ci,j+s for s{0,1,2}.

As in the proof of Lemma 7, it suffices to check, for each s{0,1,2} and (i,j)[na]×[nc], whether there exists k[nb] such that Ai,k+Bk,j=Ci,j(s). Let W=𝒪(nμ) be the maximum entry of A, B, and C(s). This condition is equivalent to (WCi,j(s))+Bk,j=WAi,k. Thus, it can be solved by ˜3 on the input (Wna×ncC(s),BT,Wna×nbA), where Wm×p denotes the m×p all-W matrix. All entries are bounded by 𝒪(nμ), and both BT and Wna×nbA are row-monotone, so the input satisfies the requirements of ˜3. The dimensions are rotated as follows: the three matrices have dimensions na×nc, nc×nb, and na×nb. Hence, by Theorem 28 and the symmetry ω(a,c,b)=ω(a,b,c), each verifier call takes time 𝒪^(na+b+nb+c+n(a+c+μ+ω(a,b,c))/2). Since there are only constantly many verifier calls per recursion level and the recursion depth is 𝒪(logn), the asymptotic running time remains the same.

6 Deterministic Monotone Min-Plus Convolution

In this section, we present a deterministic algorithm for monotone Min-Plus convolution, whose definition we recall below.

Problem 6.

Let A and B be two monotone arrays of length n with entries in [nμ]. Given (A,B) as input, compute AB.

We defer most details in this section to the full version, since they largely repeat the core arguments from Section 4.

As in Section 4, we first reduce Problem 6 to a corresponding verification problem and then to a promised version in which all entries have small residues modulo a parameter M.

Problem 7.

Let A and B be two monotone arrays of length n with nonnegative entries bounded by 𝒪(nμ). Let C be an array of length 2n1 indexed from 2 to 2n with nonnegative entries bounded by 𝒪(nμ). Let M be a positive integer that is a multiple of 100 and at most 𝒪(nμ). Additionally, assume that for every i[n], we have AimodM,BimodMM/10, and for every k[2,2n], we have CkmodMM/10. Given (A,B,C) as input, for every k[2,2n], decide whether there exists i[n] such that ki[n] and Ai+Bki=Ck.

Lemma 29.

If there is a T(n;nμ,M)-time deterministic algorithm for Problem 7 for any choice of M, then there is an 𝒪~(T(n;nμ,M))-time deterministic algorithm for Problem 6.

6.1 Algorithm for Problem 7

Suppose we are given an instance (A,B,C) of Problem 7 with M=Θ(nd) for some constant 0dμ. Define Aihigh=Ai/M, Bjhigh=Bj/M, and Ckhigh=Ck/M. We also define Ailow=AimodM, Bjlow=BjmodM, and Cklow=CkmodM. The high-level outline of our algorithm is as follows:

  1. 1.

    Find a “good” modulus Q with MQMno(1). The definition of “good” is deferred to Definition 35.

  2. 2.

    For every k[2,2n], compute sk, the number of indices i[n] such that ki[n] and Ai+BkiCk(modQ).

  3. 3.

    For every k[2,2n], compute sk, the number of indices i[n] such that ki[n] and Ai+BkiCk(modQ) and Aihigh+BkihighCkhigh.

  4. 4.

    For each k[2,2n], output Yes if and only if sk>sk.

Lemma 30 (Correctness).

For every k[2,2n], there exists i[n] such that ki[n] and Ai+Bki=Ck if and only if sk>sk.

Let max be such that M/202max<M/10. We define segments, active segments, and the notion of a good modulus analogously to Section 4.

Definition 31 (Segments).

For 0max, a level- segment is a pair ([i0,i1],k) such that [i0,i1][max{1,kn},min{n,k1}], for every i[i0,i1], Ai0/2=Ai/2, and Bki0/2=Bki/2, and [i0,i1] cannot be extended further.

Fact 32.

For 0max, the number of level- segments is 𝒪(n1+μ/2).

Definition 33 (Active segment).

For 0max, a level- segment ([i0,i1],k) is called active with respect to Q if Ai0high+Bki0highCkhigh0 and there exists s[42, 42] such that Ai0+Bki0Cks(modQ).

Definition 34 (Set of active segments).

For 0max, let S(Q) be the set of all active level- segments with respect to Q.

Definition 35 (Good modulus).

We say that an integer Q is a good modulus if MQMno(1) and, for every 0max, |S(Q)|𝒪^(n1+μ/Q).

Let 4Rno(1) be a parameter to be fixed later, and let 𝒫 be the set of primes in [R/2,R]. We take Q to be a product of primes p1,p2,,pT, where pt𝒫 for all 1tT. Let Qt be the modulus at step t. The natural invariant corresponding to Equation 1 is

X,t=n1+μ𝒪(log2nR)tfor all 0max. (3)

Here, X,t counts pairs (([i0,i1],k),s), where ([i0,i1],k) is a level- segment, s[42,42], Ai0+Bki0Cks(modQt), and Ai0+Bki0Cks. One can show that |S(QT)|X,T. Let Y,t count pairs (([i0,i1],k),s), where ([i0,i1],k) is a level- segment and s[42, 42], such that Ai0+Bki0Cks(modQt). For any prime p𝒫, let X,t(p) (resp., Y,t(p)) denote the value of X,t (resp., Y,t) when the modulus is Qt:=Qt1p. Fix t. As in Section 4.4, we compute Y,t(p) for all primes p𝒫 and all levels 0max, and use them to find a suitable prime pt𝒫 that satisfies Equation 3. Such a prime exists by a probabilistic argument, as in Lemma 22; we defer the details to the full version.

Lemma 36 (Computing Y,t(p)).

We can compute Y,t(p) for all primes p𝒫 and all levels 0max in 𝒪~(R2Qt1n) time.

Lemma 37.

We can find a prime pt𝒫 satisfying Equation 3; that is, X,t(pt)=n1+μ𝒪(log2n/R)t for all 0max in 𝒪~(R2Qt1n) time.

By computing T=Θ(logM/logR) suitable primes with R=2Θ(logn/loglogn), we obtain the following lemma.

Lemma 38 (Computing a good modulus).

We can compute a good modulus Q in 𝒪^(Mn) time.

Let Q be the good modulus obtained by this procedure. We use polynomial multiplication to compute sk. The computation of sk is analogous to that in Lemma 20.

Lemma 39 (Computing sk).

We can compute sk for every k[2,2n] in time 𝒪~(Qn).

Lemma 40.

For all 0max1, and ([i0,i1],k)S(Q), the unique level-(+1) segment ([i0,i1],k) such that [i0,i1][i0,i1] is active, i.e., ([i0,i1],k)S+1(Q).

Lemma 41 (Computing sk).

We can compute sk for all k[2,2n] in 𝒪^(n1+μ/Q) time.

Proof sketch.

First, compute S0(Q) similarly to Lemma 19. Its correctness follows inductively using Lemma 40. Then compute the values sk using S0(Q) as follows: for each segment ([i0,i1],k)S0(Q), we test whether Ai0+Bki0Ck(modQ). If the test succeeds, we increment sk by i1i0+1. For correctness, fix any i[n] such that ki[n], Ai+BkiCk(modQ), and Aihigh+BkihighCkhigh. Let ([i0,i1],k) be the unique level-0 segment containing (i,k). Since ([i0,i1],k) is a level-0 segment, the values Ai and Bki are constant for all i[i0,i1]. Because i[i0,i1], we have Ai0high+Bki0high=Aihigh+BkihighCkhigh and Ai0+Bki0Ai+BkiCk(modQ). Hence, ([i0,i1],k) is an active level-0 segment and thus belongs to S0(Q). Moreover, the above identities hold for every i[i0,i1]. For a fixed k, the level-0 segments form disjoint maximal intervals, so exactly i1i0+1 indices i[n] in this segment satisfy these conditions. Therefore, the algorithm correctly increments sk by exactly i1i0+1.

The time for computing S0(Q) is 𝒪^(n1+μ/Q) by an argument analogous to that in Lemma 20. We scan all segments in S0(Q) and perform a constant-time test and update for each segment, so this final step takes 𝒪^(|S0(Q)|)=𝒪^(n1+μ/Q) time.

Combining these results, we obtain the following theorem, as well as Theorem 3.

Theorem 42.

There is a deterministic algorithm that solves Problem 7 in time 𝒪^(Mn+n1+μ/M).

Proof of Theorem 3.

By the reduction in Lemma 29, it suffices to solve Problem 7 efficiently. By Theorem 42, there is a deterministic algorithm that solves Problem 7 in time 𝒪^(Mn+n1+μ/M). Take M=Θ(nμ/2). Then the two terms balance, yielding the claimed time bound 𝒪^(n1+μ/2).

References

  • [1] Josh Alman, Ran Duan, Virginia Vassilevska Williams, Yinzhan Xu, Zixuan Xu, and Renfei Zhou. More asymmetry yields faster matrix multiplication. In Proceedings of the 2025 Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 2005–2039, 2025. doi:10.1137/1.9781611978322.63.
  • [2] Noga Alon, Zvi Galil, and Oded Margalit. On the exponent of the all pairs shortest path problem. J. Comput. Syst. Sci., 54(2):255–262, 1997. doi:10.1006/JCSS.1997.1388.
  • [3] David Bremner, Timothy M. Chan, Erik D. Demaine, Jeff Erickson, Ferran Hurtado, John Iacono, Stefan Langerman, Mihai Pătraşcu, and Perouz Taslakian. Necklaces, convolutions, and X+Y. Algorithmica, 69(2):294–314, 2014. doi:10.1007/S00453-012-9734-3.
  • [4] Karl Bringmann. A near-linear pseudopolynomial time algorithm for subset sum. In Proceedings of the 28th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 1073–1084, 2017. doi:10.1137/1.9781611974782.69.
  • [5] Karl Bringmann and Alejandro Cassis. Faster Knapsack algorithms via bounded monotone min-plus-convolution. In Proceedings of the 49th International Colloquium on Automata, Languages, and Programming (ICALP), pages 31:1–31:21, 2022. doi:10.4230/LIPIcs.ICALP.2022.31.
  • [6] Karl Bringmann, Anita Dürr, and Adam Polak. Even faster Knapsack via rectangular monotone min-plus convolution and balancing. In Proceedings of the 32nd Annual European Symposium on Algorithms (ESA), pages 33:1–33:15, 2024. Full version at https://arxiv.org/abs/2404.05681. doi:10.4230/LIPIcs.ESA.2024.33.
  • [7] Karl Bringmann, Fabrizio Grandoni, Barna Saha, and Virginia Vassilevska Williams. Truly subcubic algorithms for language edit distance and RNA folding via fast bounded-difference min-plus product. SIAM J. Comput., 48(2):481–512, 2019. doi:10.1137/17M112720X.
  • [8] Timothy M. Chan. Derandomizing pseudopolynomial algorithms for subset sum. In Proceedings of the 2026 Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 3600–3610, 2026. doi:10.1137/1.9781611978971.131.
  • [9] Timothy M. Chan and Moshe Lewenstein. Clustered integer 3sum via additive combinatorics. In Proceedings of the 47th Annual ACM on Symposium on Theory of Computing (STOC), pages 31–40, 2015. doi:10.1145/2746539.2746568.
  • [10] Lin Chen, Jiayi Lian, Yuchen Mao, and Guochuan Zhang. Weakly approximating Knapsack in subquadratic time. In Proceedings of the 52nd International Colloquium on Automata, Languages, and Programming (ICALP), pages 51:1–51:18, 2025. doi:10.4230/LIPIcs.ICALP.2025.51.
  • [11] Shucheng Chi, Ran Duan, Tianle Xie, and Tianyi Zhang. Faster min-plus product for monotone instances. In Proceedings of the 54th Annual ACM SIGACT Symposium on Theory of Computing (STOC), pages 1529–1542, 2022. doi:10.1145/3519935.3520057.
  • [12] Marek Cygan, Marcin Mucha, Karol Węgrzycki, and Michał Włodarczyk. On problems equivalent to (min, +)-convolution. In Proceedings of the 44th International Colloquium on Automata, Languages, and Programming (ICALP), pages 22:1–22:15, 2017. doi:10.4230/LIPIcs.ICALP.2017.22.
  • [13] Mingyang Deng, Yael Kirkpatrick, Victor Rong, Virginia Vassilevska Williams, and Ziqian Zhong. New additive approximations for shortest paths and cycles. In Proceedings of the 49th International Colloquium on Automata, Languages, and Programming (ICALP), pages 50:1–50:10, 2022. doi:10.4230/LIPIcs.ICALP.2022.50.
  • [14] Anita Dürr. Improved bounds for rectangular monotone min-plus product and applications. Inf. Process. Lett., 181:106358, 2023. doi:10.1016/J.IPL.2023.106358.
  • [15] Nick Fischer. Universe reduction for apsp: Equivalence of three fine-grained hypotheses. In Proceedings of the 58th Annual ACM SIGACT Symposium on Theory of Computing (STOC), page to appear, 2026.
  • [16] Nick Fischer, Piotr Kaliciak, and Adam Polak. Deterministic 3SUM-hardness. In Proceedings of the 15th Innovations in Theoretical Computer Science Conference (ITCS), pages 49:1–49:24, 2024. doi:10.4230/LIPIcs.ITCS.2024.49.
  • [17] Dvir Fried, Shay Golan, Tomasz Kociumaka, Tsvi Kopelowitz, Ely Porat, and Tatiana Starikovskaya. An improved algorithm for the k-dyck edit distance problem. ACM Trans. Algorithms, 20(3):26, 2024. doi:10.1145/3627539.
  • [18] Younan Gao and Meng He. Faster path queries in colored trees via sparse matrix multiplication and min-plus product. In Proceedings of the 30th Annual European Symposium on Algorithms (ESA), pages 59:1–59:15, 2022. doi:10.4230/LIPIcs.ESA.2022.59.
  • [19] Yuzhou Gu, Adam Polak, Virginia Vassilevska Williams, and Yinzhan Xu. Faster monotone min-plus product, range mode, and single source replacement paths. In Proceedings of the 48th International Colloquium on Automata, Languages, and Programming (ICALP), volume 198, pages 75:1–75:20, 2021. doi:10.4230/LIPIcs.ICALP.2021.75.
  • [20] Xiaohan Huang and Victor Y. Pan. Fast rectangular matrix multiplication and applications. J. Complex., 14(2):257–299, 1998. doi:10.1006/JCOM.1998.0476.
  • [21] Ce Jin, Yael Kirkpatrick, Michał Stawarz, and Virginia Vassilevska Williams. Improved additive approximation algorithms for apsp. In Proceedings of the 2026 Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 3639–3651, 2026. doi:10.1137/1.9781611978971.133.
  • [22] Marvin Künnemann, Ramamohan Paturi, and Stefan Schneider. On the fine-grained complexity of one-dimensional dynamic programming. In 44th International Colloquium on Automata, Languages, and Programming, ICALP 2017, Warsaw, Poland, July 10-14, 2017, pages 21:1–21:15. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2017. doi:10.4230/LIPIcs.ICALP.2017.21.
  • [23] Xiao Mao. Breaking the cubic barrier for (unweighted) tree edit distance. In Proceedings of the 62nd IEEE Annual Symposium on Foundations of Computer Science (FOCS), pages 792–803, 2021. doi:10.1109/FOCS52979.2021.00082.
  • [24] Jakob Nogler, Adam Polak, Barna Saha, Virginia Vassilevska Williams, Yinzhan Xu, and Christopher Ye. Faster weighted and unweighted tree edit distance and APSP equivalence. In Proceedings of the 57th Annual ACM Symposium on Theory of Computing (STOC), pages 2167–2178, 2025. doi:10.1145/3717823.3718116.
  • [25] Barna Saha and Christopher Ye. Faster approximate all pairs shortest paths. In Proceedings of the 2024 ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 4758–4827, 2024. doi:10.1137/1.9781611977912.170.
  • [26] Virginia Vassilevska Williams. On some fine-grained questions in algorithms and complexity. In Proceedings of the international congress of mathematicians: Rio de janeiro 2018, pages 3447–3487. World Scientific, 2018.
  • [27] Virginia Vassilevska Williams and R. Ryan Williams. Subcubic equivalences between path, matrix, and triangle problems. J. ACM, 65(5):27:1–27:38, 2018. doi:10.1145/3186893.
  • [28] Virginia Vassilevska Williams and Yinzhan Xu. Truly subcubic min-plus product for less structured matrices, with applications. In Proceedings of the 2020 ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 12–29, 2020. doi:10.1137/1.9781611975994.2.
  • [29] R. Ryan Williams. Faster all-pairs shortest paths via circuit complexity. SIAM J. Comput., 47(5):1965–1985, 2018. doi:10.1137/15M1024524.