Abstract 1 Introduction 2 Preliminaries 3 Reduction from Equality-OMv to Boolean-OMv 4 Reduction from Min-Max-OMv to Dominance-OMv 5 Reduction from Bounded Monotone Min-Plus-OMv to Equality-OMv 6 Remaining reductions References

Non-Boolean OMv: One More Reason to Believe Lower Bounds for Dynamic Problems

Bingbing Hu ORCID University of California San Diego, La Jolla, CA, USA Adam Polak ORCID Bocconi University, Milan, Italy
Abstract

Most of the known tight lower bounds for dynamic problems are based on the Online Boolean Matrix-Vector Multiplication (OMv) Hypothesis, which is not as well studied and understood as some more popular hypotheses in fine-grained complexity. It would be desirable to base hardness of dynamic problems on a more believable hypothesis. We propose analogues of the OMv Hypothesis for variants of matrix multiplication that are known to be harder than Boolean product in the offline setting, namely: equality, dominance, min-witness, min-max, and bounded monotone min-plus products. These hypotheses are a priori weaker assumptions than the standard (Boolean) OMv Hypothesis and yet we show that they are actually equivalent to it. This establishes the first such fine-grained equivalence class for dynamic problems.

Keywords and phrases:
Fine-grained complexity, OMv hypothesis, reductions, equivalence class
Copyright and License:
[Uncaptioned image] © Bingbing Hu and Adam Polak; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation Data structures design and analysis
; Theory of computation Complexity classes
Acknowledgements:
We thank anonymous reviewers for pointing us to the literature on the cell-probe model and for many useful hints on improving the manuscript.
Funding:
Part of this work was done when both authors were at Max Planck Institute for Informatics.
Editors:
Anne Benoit, Haim Kaplan, Sebastian Wild, and Grzegorz Herman

1 Introduction

The job of a dynamic algorithm is to keep its output up to date whenever its input undergoes a local change, e.g., maintaining a shortest st path in a graph while it undergoes vertex deletions. Ideally each such update should take at most a polylogarithmic time, but at the very least it should be faster than it takes to recompute a solution from scratch. Despite great progress in the field, for many dynamic problems that goal is beyond the reach of current algorithmic techniques. Starting from the seminal paper by Pătraşcu [19], we often get to explain this hardness by fine-grained conditional lower bounds.

Most of the known tight lower bounds for dynamic problems are based on the OMv Hypothesis [11]. This hypothesis is not as widely studied and as well understood as some other hypotheses in fine-grained complexity, such as SETH, 3SUM Hypothesis, and APSP Hypothesis (see, e.g., [22]). It would be more desirable to base hardness of dynamic problems on these more popular (and hence also more believable) assumptions. Unfortunately, the existing lower bounds conditional on them are often not tight for dynamic problems. It seems likely that these hypotheses are not strong enough to explain the complexity of many dynamic problems. We may need to search for a different approach to the following glaring question:

Can we have tight lower bounds for dynamic problems
based on a hypothesis that is more believable than OMv?

Recall that the OMv Hypothesis is about Boolean product; it asserts that computing the Boolean product of two n×n matrices requires cubic n3o(1) time if the second matrix is given column by column in an online fashion. In the static (i.e., non-online) setting, Boolean product is arguably the easiest of the many studied variants of matrix multiplication. Indeed, it can be computed in time O(nω), where ω<2.372 [2] is the (integer) matrix multiplication exponent.111Moreover, the fastest known “combinatorial” algorithm for the Boolean product [1] does not give a similar improvement for the integer product.

In the static matrix product world, if the O(nω) running time is on the “fast” end of the spectrum, then the min-plus product (related to distance computations in graphs) marks the other end: the fastest known algorithm shaves only a subpolynomial factor over the naive cubic running time [26], and the APSP Hypothesis from fine-grained complexity essentially says that no n3o(1)-time algorithm is possible [23].

There are also numerous variants of matrix multiplication that seem to have an “intermediate” hardness on this spectrum. Examples include min-max product [21, 9], min-witness product [8], equality product (a.k.a. Hamming product [18]), dominance product [17], threshold product [12], plus-max product [20], 2p+1 product [13], and many others. The fastest known algorithms for these problems have running times that are functions of the matrix multiplication exponent ω, and they converge to O(n2.5) when ω=2. Although it is still an open problem whether this is necessarily the right complexity for all these problems, there are some partial results in the form of tight fine-grained reductions that suggest it might be the case [13, 15, 24].

1.1 Our contributions

The OMv Hypothesis (and the lower bounds it implies) would be a priori more believable if we could replace in its statement the Boolean product with some other product known to be harder in the static world. For instance, we can define in a similar way the Min-Max-OMv problem using the min-max product: Pre-process a matrix Mn×n, and then answer (one by one, in an online fashion) n queries, each of them asking, given a vector vn, to compute the min-max product of M and v, i.e., the vector un such that

u[i]:=mink[n]max{M[i,k],v[k]}.

Then we can state a corresponding hypothesis, let us call it the Min-Max-OMv Hypothesis, asserting that the Min-Max-OMv problem cannot be solved in truly subcubic time O(n3ε), for any ε>0. This of course brings a question:

Can we still give tight reductions from Min-Max-OMv to those dynamic problems
for which there are known reductions from (Boolean-)OMv?

It turns out, yes, we can! Somewhat surprisingly222This is perhaps less surprising to those readers who are familiar with how the subcubic algebraic algorithms for the intermediate problems work; see Section 1.2., we can even give a tight reduction from Min-Max-OMv to Boolean-OMv. This shows that the Min-Max-OMv Hypothesis and the standard (Boolean-)OMv Hypothesis are actually equivalent. Moreover, the min-max product is not a unique example of this phenomenon. We show more equivalent hypotheses based on several matrix products, which are harder than the Boolean product in the static setting (see Section 2 for the formal definitions).

Theorem 1.

The following problems either all have truly subcubic algorithms or none of them do:

  • Boolean-OMv; (kM[i,k]v[k])

  • [Uncaptioned image]​Equality-OMv; (kM[i,k]=v[k])

  • [Uncaptioned image]​Dominance-OMv; (kM[i,k]v[k])

  • Min-Witness-OMv; (min{kM[i,k]v[k]})

  • Min-Max-OMv; (minkmax{M[i,k],v[k]})

  • Bounded Monotone Min-Plus-OMv. (minkM[i,k]+v[k])

For the Bounded Monotone Min-Plus-OMv problem the implied algorithm is randomized.

This conglomeration of equivalent problems can be interpreted as making the OMv Hypothesis more believable, and the conditional lower bounds based on it stronger. We recall two analogous conglomerations: the NP-complete problems and the problems equivalent to the All-Pairs Shortest Paths (APSP) problem under subcubic reductions. One of the reasons behind the great success of the theory of NP-completeness is its structural simplicity: many natural problems are NP-complete, and solving any of them efficiently would solve all of them efficiently, so they are all hard for the same underlying reason. For all the multi-faceted NP-complete problems, researchers from different areas have not managed to find a single efficient algorithm, so it seems very plausible that no such algorithm exists. The fine-grained complexity theory at large does not enjoy a similar simplicity: there are multiple independent hardness assumptions, and the reductions often go only in one way, establishing hardness but not equivalence. A notable exception333Another such exception is a class of vector problems equivalent to the Orthogonal Vectors problem [7]. is the APSP problem, which is conjectured to require cubic time and there are many other problems equivalent to it via subcubic reductions [23]. No truly subcubic algorithms have been found so far for any of these problems, which strengthens the APSP Hypothesis. Our Theorem 1 establishes another such class of problems equivalent under fine-grained subcubic reductions.

Subcubic algorithms in the cell-probe model.

We remark that the above equivalences also hold in the cell-probe model, where the running time is measured solely by the number of memory cell probes, and computation is free of charge. To be more specific, from our proofs it follows that each of the above problems can be solved by solving tO(1) instances of any other of those problems and performing some additional computation that runs in time O(n3/t), in the word RAM model, where t is a parameter to be chosen. Since any algorithm that runs sequentially in time O(n3ε) in the word RAM model can access only a truly subcubic number of memory cells, the subcubic equivalence in the cell-probe model follows. Larsen and Williams [14] showed that the OMv Hypothesis is actually false in the cell-probe model: Every query can be computed with O(n7/4w1/2) probes, where w is the word size. This means that all the other problems listed above have truly subcubic algorithms in the cell-probe model as well.

1.2 Technical overview

We prove Theorem 1 by a series of fine-grained reductions, depicted in Figure 1. The reductions are inspired by known subcubic algebraic algorithms for the corresponding (static) matrix product problems. Such algorithms have running times that are functions of the (integer) matrix multiplication exponent ω. For example, the fastest known (static) min-max product algorithm [9] runs in time O(n(3+ω)/2+o(1)), which is subcubic for any value of ω<3. In other words, this algorithm is an implicit subcubic reduction from the (static) min-max product to the (static, integer) matrix multiplication problem. The same is true about all the other intermediate problems we consider in this paper. Our technical contribution is adapting these implicit reductions so that (1) they work in the online setting, and (2) they require only Boolean (and not integer) product.

Detour into static combinatorial algorithms.

Before we say a few words about each of the reductions in the paper, let us take a detour from online problems so that we can explicitly state the observation that we already hinted at in the previous paragraph.

Observation 2.

The static variants of all the matrix products listed in Theorem 1 are equivalent to each other under subcubic reductions, and the reductions are “combinatorial”. That is, if any of the static problems admits a subcubic “combinatorial” algorithm, then all of them do.

Why is this the case? In one direction, all those non-Boolean products can encode the Boolean product as a special case. In the other direction, all those non-Boolean products admit strongly subcubic algorithms with running times of the form O(nf(ω)) for a function f that happens to satisfy f(x)<3 for every x<3. Therefore, if we could replace in such an algorithm every use of fast algebraic (integer) matrix multiplication with a hypothesized O(n3ε)-time “combinatorial” Boolean matrix multiplication algorithm, we would get a “combinatorial” algorithm for the corresponding non-Boolean product with the running time exponent f(3ε)<3. Such a replacement is possible whenever the non-Boolean algorithm does not use (or can be modified not to use) the full counting power of integer matrix multiplication but only checks which output entries are nonzero. This is explicitly the case for some of the non-Boolean products we consider (e.g., the min-witness product [8]). For some others, e.g., the bounded monotone min-plus product [25, 10], such a modification is nontrivial, but still possible.

While this observation is simple and in hindsight not really surprising, we are not aware of it being folklore in the field of fine-grained complexity, so we state it for completeness.

Figure 1: Fine-grained reductions that together prove Theorem 1. An arrow from problem A to problem B means that a subcubic algorithm for A implies a subcubic algorithm for B.

Subcubic reductions and where to find them.

In Section 3 we show a subcubic reduction from Equality-OMv to Boolean-OMv (Theorem 10), which can be seen as an adaptation to the online setting of the sparse matrix multiplication algorithm of Yuster and Zwick [27]. Specifically, our algorithm for Equality-OMv handles the nε/2 most frequently appearing values with the help of nε/2 Boolean-OMv queries (about indicator vectors of those values). The remaining less frequent values can then be handled with a brute-force approach within the target running time bound.

In Section 4 we show how a subcubic algorithm for Dominance-OMv would yield a subcubic algorithm for Min-Max-OMv (Theorem 11). The proof is inspired by the known (static) min-max product algorithms [21, 9], but it is at the same time simpler, because we do not have to optimize the dependence on ε in the running time of the resulting algorithm. In short, the algorithm splits each row of M into nε/2 buckets based on the values of the entries, and makes nε/2 many Dominance-OMv queries in order to establish for each output entry to which bucket of the corresponding row it belongs; then, the algorithm exhaustively searches through the entire bucket.

In Section 5 we show a reduction from Bounded Monotone Min-Plus-OMv to Equality-OMv. On a high level it follows some of the previous (static) algorithms for the bounded monotone min-plus product [25, 10]. However, it also gives a fresh perspective on the problem, because those previously known algorithms use a generalization of the min-witness and bounded (non-monotone) min-plus products (see [25, Theorem 1.2]), while ours deviates from this approach by using the equality product.

In Section 6 we show the remaining reductions (Observations 15, 16, 17). Each of them is either very simple or follows easily from folklore arguments.

1.3 Related work

Bringmann et al. [4] take a different approach at strengthening the OMv Hypothesis. They propose a hypothesis about the complexity of determining if a (nondeterministic) finite automaton accepts a word, and show that this hypothesis implies the OMv Hypothesis. While their new hypothesis is not as well supported as the three main fine-grained complexity hypotheses, it is remarkable that it is a statement about a static problem implying a tight lower bound for an online problem.

In a very recent work, Liu [16] shows that OMv is equivalent to the online problem of maintaining a (1+ϵ)-approximate vertex cover in a fully dynamic bipartite graph.

To the best of our knowledge, the only other work that considers a variant of OMv for a non-Boolean product is by Chen et al. [6]. They use an assumption that the Min-Plus-OMv requires cubic time in order to separate partially retroactive from fully retroactive data structures. We note that this assumption seems too strong to be equivalent to the OMv Hypothesis. In particular, any “too simple” reduction from Min-Plus-OMv to Boolean-OMv would morally translate to a subcubic algorithm for the (static) Min-Plus Product problem, refuting the APSP Hypothesis.

1.4 Open problems

In this paper we manage to reduce to Boolean-OMv from OMv variants that do not involve counting. We leave it open whether a subcubic algorithm for Boolean-OMv would imply subcubic OMv algorithms for, e.g., the counting variants of the equality and dominance products (i.e., u[i]:=#{kM[i,k]=v[k]}, and u[i]:=#{kM[i,k]v[k]}, respectively), or at least for the standard integer product (u[i]:=kM[i,k]v[k]).

These open problems relate to the general quest for fine-grained counting-to-decision reductions. Chan, Vassilevska Williams, and Xu [5] gave such reductions for the Min-Plus Product, Exact Triangle, and 3SUM problems. Somewhat ironically, their reductions crucially rely on a fast algebraic algorithm for (static) integer matrix multiplication, so it seems unlikely that their techniques could be used to resolve the above open problems, which are about online problems.

2 Preliminaries

2.1 Notation

We use [n]:={1,2,,n}.

2.2 Problems

In this section we formally define all the problems that appear in Theorem 1. Since the definitions are similar to each other, we underline the differences between them.

Definition 3 (Boolean-OMv).

We are first given for preprocessing a Boolean matrix M{0,1}n×n¯, and then we need to answer n queries: In the j-th query, we are given a column vector vj{0,1}n¯, and we have to compute the Boolean product Mvj{0,1}n defined by

(Mvj)[i]:={1,ifk[n]M[i,k]=1vj[k]=1,0,otherwise.¯

We need to answer queries one by one in an online fashion, i.e., we have to output Mvj before we can receive vj+1.

Definition 4 (Equality-OMv).

We are first given for preprocessing an integer matrix Mn×n¯, and then we need to answer n queries: In the j-th query, we are given a column vector vjn¯, and we have to compute the [Uncaptioned image]equality product M

=

vj
{0,1}n
defined by

(M

=

vj
)
[i]
:={1,ifk[n]M[i,k]=vj[k],0,otherwise.
¯

We need to answer queries one by one in an online fashion, i.e., we have to output M

=

vj
before we receive vj+1.

Definition 5 (Dominance-OMv).

We are first given for preprocessing an integer matrix Mn×n¯, and then we need to answer n queries: In the j-th query, we are given a column vector vjn¯, and we have to compute the [Uncaptioned image]dominance product M

<

vj
{0,1}n
defined by

(M

<

vj
)
[i]
:={1,ifk[n]M[i,k]vj[k],0,otherwise.
¯

We need to answer queries one by one in an online fashion, i.e., we have to output M

<

vj
before we receive vj+1.

Definition 6 (Min-Witness-OMv).

We are first given for preprocessing a Boolean matrix M{0,1}n×n¯, and then we need to answer n queries: In the j-th query, we are given a column vector vj{0,1}n¯, and we have to compute the min-witness product M

w

vj
([n]{})n
defined by

(M

w

vj)
[i]:=min({k[n]M[i,k]=1vj[k]=1}{}).
¯

We need to answer queries one by one in an online fashion, i.e., we have to output M

w

vj
before we can receive vj+1.

Definition 7 (Min-Max-OMv).

We are first given for preprocessing an integer matrix Mn×n¯, and then we need to answer n queries: In the j-th query, we are given a column vector vjn¯, and we have to compute the min-max product M

vj
n
defined by

(M

vj)
[i]:=mink[n]max{M[i,k],vj[k]}.
¯

We need to answer queries one by one in an online fashion, i.e., we have to output M

vj
before we receive vj+1.

Definition 8 (Bounded Monotone Min-Plus-OMv).

We are first given for preprocessing an integer matrix M[n]n×n¯, and then we need to answer n queries: In the j-th query, we are given a column vector vj[n]n¯, and we have to compute the min-plus product Mvjn defined by

(Mvj)[i]:=mink[n](M[i,k]+vj[k]).¯

We need to answer queries one by one in an online fashion, i.e., we have to output Mvj before we receive vj+1. We are guaranteed that at least one of the following conditions holds:

  • each row of M is nondecreasing, i.e., M[i,k]M[i,k+1];

  • each column of M is nondecreasing, i.e., M[i,k]M[i+1,k];

  • each vj is nondecreasing, i.e., vj[k]vj[k+1];

  • for every k, vj[k] is a nondecreasing function of j, i.e., vj[k]vj+1[k];

or it holds with “nondecreasing” replaced by “nonincreasing”.

2.3 Hypotheses

Each of the problems defined above admits a naive cubic time algorithm, and for each of them we can conjecture that it is optimal up to subpolynomial factors.

Definition 9 (*-OMv Hypotheses).

For x{Boolean, [Uncaptioned image]​Equality, [Uncaptioned image]​Dominance, Min-Witness, Min-Max, Bounded Monotone Min-Plus}, the x-OMv Hypothesis is the statement that there is no algorithm for the x-OMv problem running in time O(n3ε), for any ε>0.

In other words, Theorem 1 says that all the hypotheses stated in Definition 9 are equivalent.

3 Reduction from Equality-OMv to Boolean-OMv

In this section we give a subcubic reduction that can be seen as an easy adaptation to the online setting of the sparse matrix multiplication algorithm of Yuster and Zwick [27].

Theorem 10.

If Boolean-OMv can be solved in time O(n3ε), for some ε>0, then [Uncaptioned image]​Equality-OMv can be solved in time O(n3(ε/2)).

Proof.

Recall that M denotes the input matrix given for preprocessing in the Equality-OMv problem. Let t:=nε/2 be a parameter. For every k[n] and every [t], let fk() be the -th most frequent value appearing in the k-th column of matrix M (if there are less than distinct values in the column, let fk() be some other arbitrary integer). Note that for any value x not in {fk(1),fk(2),,fk(t)}, x appears in the k-th column of M at most n/t times; we call such values rare. In the preprocessing phase, the algorithm prepares t Boolean matrices M(1),M(2),,M(t){0,1}n×n defined as follows:

M()[i,k]:={1,ifM[i,k]=fk(),0,otherwise.

Then, it instantiates the hypothesized Boolean-OMv algorithm for each of these matrices separately. Finally, for each column of M, the algorithm prepares a dictionary mapping each rare value in that column to a list of indices under which that value appears in the column. This ends the preprocessing phase.

Upon receiving a query vn, the algorithm first initializes the output vector to all zeros. Then, for every =1,,t, it creates the vector v(l) defined by

v()[k]:={1,ifv[k]=fk(),0,otherwise,

and computes the Boolean product M()v(), using the -th instantiation of the hypothesized Boolean-OMv algorithm. Each such product gets then element-wise OR-ed to the output vector. Finally, for every k=1,,n, if v[k] is a rare value in the k-th column of matrix M, the algorithm goes through the list of all indices i such that M[i][k]=v[k] (recall that there are at most n/t of them) and for each of them sets the corresponding i-th entry of the output vector to 1.

It is easy to see that whenever the algorithm sets an output entry to 1, it is because of some pair of entries M[i][k] and v[k] that have the same value. Conversely, if some pair of entries M[i][k] and v[k] have the same value, then either it is a frequent value and some M()v() contributes a 1, or it is a rare value and gets manually matched.

Let us analyze the running of our Equality-OMv algorithm. There are t instantiations of the hypothesized Boolean-OMv algorithm, which require O(tn3ε) time in total. Then, going through all rare values takes at most O(n2/t) time per vj, and thus O(n3/t) time for all n queries. This adds up to total time O(tn3ε+n3/t). By choosing t:=nε/2 we get the claimed running time O(n3(ε/2)).

4 Reduction from Min-Max-OMv to Dominance-OMv

In this we show how a subcubic algorithm for Dominance-OMv would yield a subcubic algorithm for Min-Max-OMv. Our proof is inspired by the static min-max product algorithms [21, 9], but it is at the same time simpler, because we do not optimize the dependence on ε in the running time of the resulting algorithm.

Theorem 11.

If [Uncaptioned image]​Dominance-OMv can be solved in time O(n3ε), for some ε>0, then Min-Max-OMv can be solved in time O(n3(ε/2)).

Proof.

Let t:=nε/2 be a parameter. For every i[n], let Ri be the sorted i-th row of the input matrix M. Consider partitioning each Ri into t buckets of consecutive elements, with at most n/t elements per bucket. For every [t], let M()({})n×n be the matrix defined as follows:

M()[i,k]:={M[i,k],if M[i,k] lands in the -th bucket of Ri,,otherwise.

Note that each row of M() contains Θ(n/t) finite entries.444If there are multiple entries with the same value, they may land in different buckets.

In the preprocessing phase, the algorithm instantiates the hypothesised Dominance-OMv algorithm for each of the matrices M(1),M(2),,M(), and also for the matrix M.555Formally, the Dominance-OMv algorithm may not accept infinite entries in the input, but we can replace each with W+2, where W denotes the largest absolute value of any entry in M, and each entry greater than W in any query vector with W+1.

Upon receiving a query vn, the algorithm proceeds to compute the product M

v
in two steps. First, for every i[n], it computes the minimum M[i,k] such that M[i,k]v[k], and stores the results in a column vector u. Second, for every i[n], it computes the minimum v[k] such that v[k]M[i,k], and stores the results in a column vector w. At the very end the algorithm computes (M

v
)
[i]
=min{u[i],w[i]}
, for every i[n].

In order to compute u, the algorithm first asks for the dominance products M()

<

(v)
, for all [t]. Then, for each i=1,,n, the algorithm finds the smallest such that (M()

<

(v)
)
[i]
=1
, which corresponds to finding the first bucket in Ri containing an element greater666This is because the entries in M() and v are negated. than or equal to the corresponding element in v. Hence, the algorithm can scan the elements in this bucket and pick the smallest one that is larger than or equal to the corresponding element in v; this element is then stored in u[i].

Let us analyze the cost of computing u’s over the span of n queries. The t dominance products require time O(tn3ε) in total. On top of that, for each of the n queries and for each of the n output coordinates, the algorithm scans one bucket of size Θ(n/t), which takes time O(n3/t) in total. All together, the algorithm spends time O(tn3ε+n3/t)=O(n3(ε/2)) on computing u’s.

Next, it is almost symmetric to calculate w. The algorithm sorts the entries of v into an ordered list S, and partitions S into t buckets, with at most n/t elements per bucket. For each bucket [t], the algorithm computes the dominance product M

<

v()
, where v()({})n is the column vector such that

v()[k]={v[k],if v[k] lands in the -th bucket of S,,otherwise.

Then, for each i=1,,n, the algorithm looks for the smallest such that (M

<

v()
)
[i]
=1
, and scans the elements in the -th bucket looking for the smallest v[k] that is greater than or equal to the corresponding M[i,k]. By the same argument as before, computing all w’s takes time O(n3(ε/2)).

5 Reduction from Bounded Monotone Min-Plus-OMv to Equality-OMv

In this section we show a reduction from Bounded Monotone Min-Plus-OMv to Equality-OMv. We follow the high-level approach of some of the previous static algorithms for the bounded monotone min-plus product [25, 10]. However, we deviate from that approach by using the equality product where the known algorithms use a generalization of the min-witness and bounded (non-monotone) min-plus products (see [25, Theorem 1.2]).

Theorem 12.

If [Uncaptioned image]​Equality-OMv can be solved in time O(n3ε), for some ε>0, then Bounded Monotone Min-Plus-OMv can be solved in time O(n3(ε/3)logn) by a randomized algorithm that succeeds with probability777Note that the success probability can be amplified to 11/poly(n) by running in parallel a constant number of copies of the algorithm and taking the majority vote. at least 11/n.

Before we present the algorithm itself let us introduce some notation and prove some preliminary facts. Let Δ:=nε/3 be a parameter. For a fixed query vector vn, let

u:=Mv,M^:=M/Δ,v^:=v/Δ,andu^:=M^v^.

Be mindful that it is not necessarily the case that u^=u/Δ. Finally, for every i[n], let us define the set of candidates for u[i] to be

Ci:={k[n]|M^[i,k]+v^[k]{u^[i],u^[i]+1}}.
Lemma 13.

It suffices to check only kCi in order to compute u[i], i.e.,

mink[n]M[i,k]+v[k]=minkCiM[i,k]+v[k].

Proof.

First, for any pair (i,j)[n]×[n], due to rounding down we have

M[i,j]+v[j]Δ(M^[i,j]+v^[j])[0,2Δ).

Now, suppose that k is a witness for u[i], and l is a witness for u^[i], i.e., M[i,k]+v[k]=u[i], and M^[i,l]+v^[l]=u^[i]. We derive that

Δu^[i]+2Δ =Δ(M^[i,l]+v^[l])+2Δ
>M[i,l]+v[l]
M[i,k]+v[k]
Δ(M^[i,k]+v^[k]).

Therefore, we have M^[i,k]+v^[k]<u^[i]+2. Since the matrix entries all take integer values, we have that if k[n] is a witness for u[i], then it must satisfy that M^[i,k]+v^[k]{u^[i],u^[i]+1}, i.e., kCi.

Now we argue that small sets of candidates can be enumerated efficiently.

Lemma 14.

For a fixed query vector vn, there is an algorithm that runs in time O(n2logn/Δ) and lists all elements of all sets Ci such that |Ci|n/Δ. In the case that vj[k] is a (weakly) monotone function of j (i.e., the 4-th case in Definition 8) this running time is amortized over n query vectors.

Proof.

We consider four cases, based on the direction of the monotonicity:

(1) Each column of 𝑴 is monotone.

In this case also the columns of M^ are monotone, and their entries are bounded by n/Δ. The algorithm uses a self-balancing binary search tree (BST) to maintain, while i iterates from 1 to n, the set of pairs

{(M^[i,k]+v^[k],k)|k[n]}.

Computing u^[i] is the standard tree operation of querying for the minimum. Moreover, the BST can report the number of elements smaller than a certain value in time O(logn), and enumerate them in time proportional to that number. This allows the algorithm to determine the size of Ci quickly, and enumerate it if it is small. As i iterates from 1 to n, the algorithm only needs to update the elements where there is an increase (or decrease) from M^[i,k] to M^[i+1,k]. In each column of M there are at most n/Δ such changes, thanks to the boundedness and monotonicity.888The locations of all such changes can be, e.g., precomputed before processing any query, or computed during each query using binary search in time O(logn) per each location. Therefore the total number of updates over the n iterations is at most n2/Δ, and each update takes time O(logn). The time spent on listing elements of Ci (for all i) is O(nlogn+n2/Δ).

(2) For each 𝒌, 𝒗𝒋[𝒌] is a monotone function of 𝒋.

This case is very similar to the previous one. The algorithm maintains (over the span of n queries) a separate BST for each i, and uses it to compute (M^v^j)[i] for all j’s. When there is an increase (or decrease) from v^j[k] to v^j+1[k], the algorithm has to update an element in all n trees, but this happens at most n/Δ times for each k, so n2/Δ times for all k’s. Hence, the total time spent on such updates over the course of n queries is O(n3logn/Δ), and the amortized time per query is O(n2logn/Δ).

(3) Each row of 𝑴 is monotone.

Due to the monotonicity, we can think of the i-th row of M^, for each i=1,,n, as consisting of n/Δ+1 contiguous blocks Ki(0),Ki(1),,Ki(n/Δ)[n] of identical entries, i.e., kKi(x)M[i,k]=x. Upon receiving a query vector v, the algorithm builds (in linear time) a range minimum query (RMQ) data structure (see, e.g., [3]) in order to compute in constant time the minimum entry of v^ in each of the O(n2/Δ) blocks, i.e., v^[[Ki(x)]]:=min{v^[k]kKi(x)}. Adding each of these minima to their corresponding values from M^ gives a list of candidate values for u^[i]’s, i.e.,

u^[i]=min{0+v^[[Ki(0)]], 1+v^[[Ki(1)]],,n/Δ+v^[[Ki(n/Δ)]]}.

Thus, we already know how to compute u^ is time O(n2/Δ). Now let us explain how to extend this idea to also list elements of all small enough Ci’s. For each value that appears in v^, the algorithm calculates the sorted sequence of indices under which this value appears in v^. This allows computing in time O(logn) how many times a given value appears in a given range of indices in v^; indeed, it boils down to performing two binary searches of the two endpoints of the range in the sequence corresponding to the given value. Furthermore, all these appearances can be enumerated in time proportional to their count. For each block Ki(x) such that x+v^[[Ki(x)]]=u^[i] the algorithm enumerates all appearances of v^[[Ki(x)]] and v^[[Ki(x)]]+1 in the range Ki(x) in v^, and adds them to Ci. If the total size of Ci would exceed n/Δ, the algorithm stops the enumeration and proceeds to the next block. Similarly, for each block such that x+v^[[Ki(x)]]=u^[i]+1 the algorithm enumerates all appearances of v^[[Ki(x)]].

(4) Each 𝒗 is monotone.

This case is symmetric to the previous one. The difference is that now the algorithm splits v^ into O(n/Δ) blocks, and prepares an RMQ data structure for each row of M^.

Now we are ready to present our subcubic algorithm for Bounded Monotone Min-Plus OMv, assuming a subcubic algorithm for Equality-OMv.

Proof of Theorem 12.

In the preprocessing, the algorithm samples uniformly and independently at random a set R[n] of columns of M, of size |R|:=3Δlnn. For each rR, the algorithm prepares an Equality-OMv data structure for matrix M(r) obtained from M by subtracting the r-th column from all the columns, i.e.,

M(r)[i,k]:=M[i,k]M[i,r].

The algorithm handles each query in two independent steps. The goal of the first step is to compute u[i] for those i that have |Ci|n/Δ, and the goal of the second step is to compute u[i] for i with |Ci|>n/Δ.

First step.

For each i[n], the algorithm either finds out that |Ci|>n/Δ, or lists all elements of Ci and then computes u[i]=minkCi(M[i,k]+v[k]). By Lemma 14, this takes time O(n2logn/Δ), for all i’s in total. The correctness of this step follows from Lemma 13.

Second step.

In the second step, the algorithm must compute the remaining u[i]’s, i.e., those for which Ci’s contain too many elements to be handled in the first step. To this end, for every rR and every δ{0,1,,3Δ2} the algorithm computes the equality product M(r)

=

(vv[r]+δ)
. For every i[n], if (M(r)

=

(vv[r]+δ))
[i]
=1, then there must exist k[n] such that

M[i,k]M[i,r]=(v[k]v[r]+δ)

and hence

M[i,k]+v[k]=M[i,r]+v[r]δ.

The algorithm therefore adds M[i,r]+v[r]δ to the list of possible values for u[i], and at the end of the process it sets each u[i] to the minimum over those values.

Analysis of the second step.

We now argue that if RCi (which holds with high probability when |Ci|>n/Δ via a standard hitting set argument, see below), then the algorithm correctly computes u[i] in the second step. Indeed, pick rRCi and let k[n] be a witness for (Mv)[i], i.e., M[i,k]+v[k]=(Mv)[i]. Let δ:=(M[i,r]+v[r])(M[i,k]+v[k]). Clearly, (M(r)

=

(vv[r]+δ))
[i]
=1, so it only remains to show that δ{0,1,,3Δ2}. Obviously, δ0, because k minimizes M[i,k]+v[k]. Now let us upper bound the offset δ. Since rCi, we have M^[i,r]+v^[r]u^[i]+1, and hence

M[i,r]+v[r](ΔM^[i,r]+Δ1)+(Δv^[r]+Δ1)Δu^[i]+3Δ2.

Moreover, M^[i,k]+v^[k]u^[i], and therefore

M[i,k]+v[k]ΔM^[i,k]+Δv^[k]Δu^[i].

We conclude that δ(Δu^[i]+3Δ2)Δu^[i]=3Δ2, as required.

It remains to analyze the success probability of the whole algorithm. For a fixed output index i[n] such that |Ci|>n/Δ, the probability that the algorithm failed to sample an element r from Ci in all |R|=3Δlnn rounds is at most (11/Δ)3Δlnn<(1/e)3lnn=1/n3. By a union bound over all n output indices for each of the n queries, the algorithm succeeds to correctly compute all n2 output entries with probability at least 1n2/n3=11/n.

Running time.

The first step of each query (Lemma 14) takes time O(n2logn/Δ), summing up to O(n3logn/Δ) for all n queries. Regarding the second step, for each query the algorithm computes O(|R|Δ)=O(Δ2logn) equality matrix-vector products, and over the course of n queries this takes time O(n3εΔ2logn). The total running time is therefore O(n3logn/Δ+n3εΔ2logn)=O(n3(ε/3)logn).

6 Remaining reductions

In this section we state the remaining easy reductions that complete the proof of Theorem 1.

6.1 Reduction from Dominance-OMv to Equality-OMv

Observation 15.

If [Uncaptioned image]​Equality-OMv can be solved in time T(n), then [Uncaptioned image]​Dominance-OMv can be solved in time O(T(n)logn).

Proof.

The proof follows a folklore argument, see, e.g., [13]. It uses the fact that, for any two non-negative integers a and b, it holds that a<b if and only if there exists 0 such that

  • the -th least significant bit of a is 0; and

  • the -th least significant bit of b is 1; and

  • a agrees with b on all bits higher than the -th least significant, i.e., a/2+1=b/2+1.

Moreover, without loss of generality, all the input numbers are integers between 0 and n21. Indeed, in the preprocessing, each entry of M can be replaced by its rank in the sorted order of all entries of M; then, during a query, each entry of v can be replaced by the rank of the smallest entry of M greater than or equal to it. Last but not least, M[i,k]v[k] if and only if M[i,k]<v[k]+1, because the input numbers are integers. Hence, the algorithm sets, for =0,1,,log(n2),

M()[i,k] :={M[i,k]2+1,if the -th least significant bit of M[i,k] is 01,otherwise,
v()[k] :={v[k]+12+1,if the -th least significant bit of v[k]+1 is 12,otherwise,

and uses the fact that (M

<

v
)
[i]
=1
if and only if (M()

=

v()
)
[i]
=1
.

6.2 Reduction from Min-Witness-OMv to Min-Max-OMv

Observation 16.

If Min-Max-OMv can be solved in time T(n), then Min-Witness-OMv can be solved in time T(n)+O(n2).

Proof.

The proof follows another folklore argument, see, e.g., [15]. The algorithm sets

M[i,k]:={k,if M[i,k]=1,otherwise,andv[k]:={k,if v[k]=1,otherwise,

and uses the fact M

w

v
=M

v
.

6.3 Reduction from Boolean-OMv to Bounded Monotone Min-Plus-OMv

Observation 17.

If Bounded Monotone Min-Plus-OMv can be solved in time T(n), then Boolean-OMv can be solved in time T(n)+O(n2).

Proof.

The algorithm sets

M[i,k]:=2(i+k)M[i,k],andvj[k]:=2(jk)vj[k],

and uses the fact that (Mvj)[i]=1 if and only if (Mvj)[i]=2(i+j)2. We remark that the above reduction produces Min-Plus-OMv instances that are monotone in all four directions simultaneously, while our Bounded Monotone Min-Plus-OMv algorithm of Theorem 12 works already for instances with monotonicity in one (arbitrarily chosen) direction.

References

  • [1] Amir Abboud, Nick Fischer, Zander Kelley, Shachar Lovett, and Raghu Meka. New graph decompositions and combinatorial boolean matrix multiplication algorithms. In Proceedings of the 56th Annual ACM Symposium on Theory of Computing, STOC 2024, pages 935–943. ACM, 2024. doi:10.1145/3618260.3649696.
  • [2] 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 2025, pages 2005–2039. SIAM, 2025. doi:10.1137/1.9781611978322.63.
  • [3] Michael A. Bender and Martin Farach-Colton. The LCA problem revisited. In LATIN 2000: Theoretical Informatics, 4th Latin American Symposium, volume 1776 of Lecture Notes in Computer Science, pages 88–94. Springer, 2000. doi:10.1007/10719839_9.
  • [4] Karl Bringmann, Allan Grønlund, Marvin Künnemann, and Kasper Green Larsen. The NFA acceptance hypothesis: Non-combinatorial and dynamic lower bounds. In 15th Innovations in Theoretical Computer Science Conference, ITCS 2024, volume 287 of LIPIcs, pages 22:1–22:25. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2024. doi:10.4230/LIPICS.ITCS.2024.22.
  • [5] Timothy M. Chan, Virginia Vassilevska Williams, and Yinzhan Xu. Fredman’s trick meets dominance product: Fine-grained complexity of unweighted APSP, 3SUM counting, and more. In Proceedings of the 55th Annual ACM Symposium on Theory of Computing, STOC 2023, pages 419–432. ACM, 2023. doi:10.1145/3564246.3585237.
  • [6] Lijie Chen, Erik D. Demaine, Yuzhou Gu, Virginia Vassilevska Williams, Yinzhan Xu, and Yuancheng Yu. Nearly optimal separation between partially and fully retroactive data structures. In 16th Scandinavian Symposium and Workshops on Algorithm Theory, SWAT 2018, volume 101 of LIPIcs, pages 33:1–33:12. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2018. doi:10.4230/LIPIcs.SWAT.2018.33.
  • [7] Lijie Chen and Ryan Williams. An equivalence class for orthogonal vectors. In Proceedings of the Thirtieth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2019, pages 21–40. SIAM, 2019. doi:10.1137/1.9781611975482.2.
  • [8] Artur Czumaj, Miroslaw Kowaluk, and Andrzej Lingas. Faster algorithms for finding lowest common ancestors in directed acyclic graphs. Theor. Comput. Sci., 380(1-2):37–46, 2007. doi:10.1016/J.TCS.2007.02.053.
  • [9] Ran Duan and Seth Pettie. Fast algorithms for (max, min)-matrix multiplication and bottleneck shortest paths. In Proceedings of the Twentieth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2009, pages 384–391. SIAM, 2009. doi:10.1137/1.9781611973068.43.
  • [10] Yuzhou Gu, Adam Polak, Virginia Vassilevska Williams, and Yinzhan Xu. Faster monotone min-plus product, range mode, and single source replacement paths. In 48th International Colloquium on Automata, Languages, and Programming, ICALP 2021, volume 198 of LIPIcs, pages 75:1–75:20. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2021. doi:10.4230/LIPICS.ICALP.2021.75.
  • [11] Monika Henzinger, Sebastian Krinninger, Danupon Nanongkai, and Thatchaphol Saranurak. Unifying and strengthening hardness for dynamic problems via the online matrix-vector multiplication conjecture. In Proceedings of the Forty-Seventh Annual ACM on Symposium on Theory of Computing, STOC 2015, pages 21–30. ACM, 2015. doi:10.1145/2746539.2746609.
  • [12] Piotr Indyk, Moshe Lewenstein, Ohad Lipsky, and Ely Porat. Closest pair problems in very high dimensions. In Automata, Languages and Programming: 31st International Colloquium, ICALP 2004, volume 3142 of Lecture Notes in Computer Science, pages 782–792. Springer, 2004. doi:10.1007/978-3-540-27836-8_66.
  • [13] Karim Labib, Przemyslaw Uznanski, and Daniel Wolleb-Graf. Hamming distance completeness. In 30th Annual Symposium on Combinatorial Pattern Matching, CPM 2019, volume 128 of LIPIcs, pages 14:1–14:17. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2019. doi:10.4230/LIPICS.CPM.2019.14.
  • [14] Kasper Green Larsen and R. Ryan Williams. Faster online matrix-vector multiplication. In Proceedings of the Twenty-Eighth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2017, pages 2182–2189. SIAM, 2017. doi:10.1137/1.9781611974782.142.
  • [15] Andrea Lincoln, Adam Polak, and Virginia Vassilevska Williams. Monochromatic triangles, intermediate matrix products, and convolutions. In 11th Innovations in Theoretical Computer Science Conference, ITCS 2020, volume 151 of LIPIcs, pages 53:1–53:18. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2020. doi:10.4230/LIPIcs.ITCS.2020.53.
  • [16] Yang P. Liu. On approximate fully-dynamic matching and online matrix-vector multiplication. In 65th IEEE Annual Symposium on Foundations of Computer Science, FOCS 2024, pages 228–243. IEEE, 2024. doi:10.1109/FOCS61266.2024.00006.
  • [17] Jirí Matousek. Computing dominances in eˆn. Inf. Process. Lett., 38(5):277–278, 1991. doi:10.1016/0020-0190(91)90071-O.
  • [18] Kerui Min, Ming-Yang Kao, and Hong Zhu. The closest pair problem under the Hamming metric. In Computing and Combinatorics, 15th Annual International Conference, COCOON 2009, volume 5609 of Lecture Notes in Computer Science, pages 205–214. Springer, 2009. doi:10.1007/978-3-642-02882-3_21.
  • [19] Mihai Pătraşcu. Towards polynomial lower bounds for dynamic problems. In Proceedings of the 42nd ACM Symposium on Theory of Computing, STOC 2010, pages 603–610. ACM, 2010. doi:10.1145/1806689.1806772.
  • [20] Virginia Vassilevska. Efficient algorithms for path problems in weighted graphs. PhD thesis, Carnegie Mellon University, USA, 2008.
  • [21] Virginia Vassilevska, Ryan Williams, and Raphael Yuster. All pairs bottleneck paths and max-min matrix products in truly subcubic time. Theory Comput., 5(1):173–189, 2009. Announced at STOC 2007. doi:10.4086/TOC.2009.V005A009.
  • [22] Virginia Vassilevska Williams. On some fine-grained questions in algorithms and complexity. In Proceedings of the International Congress of Mathematicians, ICM 2018, pages 3447–3487. World Scientific, 2018. doi:10.1142/9789813272880_0188.
  • [23] Virginia Vassilevska Williams and R. Ryan Williams. Subcubic equivalences between path, matrix, and triangle problems. J. ACM, 65(5):27:1–27:38, 2018. Announced at FOCS 2010. doi:10.1145/3186893.
  • [24] Virginia Vassilevska Williams and Yinzhan Xu. Monochromatic triangles, triangle listing and APSP. In 61st IEEE Annual Symposium on Foundations of Computer Science, FOCS 2020, pages 786–797. IEEE, 2020. doi:10.1109/FOCS46700.2020.00078.
  • [25] 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 2020, pages 12–29. SIAM, 2020. doi:10.1137/1.9781611975994.2.
  • [26] R. Ryan Williams. Faster all-pairs shortest paths via circuit complexity. SIAM J. Comput., 47(5):1965–1985, 2018. Announced at STOC 2014. doi:10.1137/15M1024524.
  • [27] Raphael Yuster and Uri Zwick. Fast sparse matrix multiplication. ACM Trans. Algorithms, 1(1):2–13, 2005. Announced at ESA 2004. doi:10.1145/1077464.1077466.