# Conditional Lower Bounds for Variants of Dynamic LIS

In this note, we consider the complexity of maintaining the longest increasing subsequence (LIS) of an array under (i) inserting an element, and (ii) deleting an element of an array. We show that no algorithm can support queries and updates in time 𝒪(n^1/2-ϵ) and 𝒪(n^1/3-ϵ) for the dynamic LIS problem, for any constant ϵ>0, when the elements are weighted or the algorithm supports 1D-queries (on subarrays), respectively, assuming the All-Pairs Shortest Paths (APSP) conjecture or the Online Boolean Matrix-Vector Multiplication (OMv) conjecture. The main idea in our construction comes from the work of Abboud and Dahlgaard [FOCS 2016], who proved conditional lower bounds for dynamic planar graph algorithm. However, this needs to be appropriately adjusted and translated to obtain an instance of the dynamic LIS problem.

Comments

There are no comments yet.

## Authors

• 41 publications
• 4 publications
• ### Upper and lower bounds for dynamic data structures on strings

We consider a range of simply stated dynamic data structure problems on ...
02/19/2018 ∙ by Raphael Clifford, et al. ∙ 0

read it

• ### Dynamic Matrix Inverse: Improved Algorithms and Matching Conditional Lower Bounds

The dynamic matrix inverse problem is to maintain the inverse of a matri...
05/13/2019 ∙ by Jan van den Brand, et al. ∙ 0

read it

• ### Fully Dynamic Four-Vertex Subgraph Counting

This paper presents a comprehensive study of algorithms for maintaining ...
06/29/2021 ∙ by Kathrin Hanauer, et al. ∙ 0

read it

• ### On Updating and Querying Submatrices

In this paper, we study the d-dimensional update-query problem. We provi...
10/25/2020 ∙ by Jason Yang, et al. ∙ 0

read it

• ### New Techniques and Fine-Grained Hardness for Dynamic Near-Additive Spanners

Maintaining and updating shortest paths information in a graph is a fund...
10/20/2020 ∙ by Thiago Bergamaschi, et al. ∙ 0

read it

• ### Optimal Algorithm for Profiling Dynamic Arrays with Finite Values

How can one quickly answer the most and top popular objects at any time,...
12/13/2018 ∙ by Dingcheng Yang, et al. ∙ 0

read it

• ### Coarse-Grained Complexity for Dynamic Algorithms

To date, the only way to argue polynomial lower bounds for dynamic algor...
01/02/2020 ∙ by Sayan Bhattacharya, et al. ∙ 0

read it

##### This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

## 1 Introduction

### Lis

Computing the length of a longest increasing subsequence (LIS) is one of the basic algorithmic problems. Given a sequence with a linear order on the elements, an increasing subsequence is a sequence of indices such that . We seek the largest for which such a sequence exists. The classic solution [4] works in time .

Very recently, starting with the paper of Mitzenmacher and Seddighin [9], the problem of dynamic LIS was explored. In a dynamic version of LIS, we need to maintain the length of LIS of an array under (i) inserting an element, and (ii) deleting an element of an array. In [5], an algorithm working in polylogarithmic time and providing -approximation was presented, and in [7] Kociumaka and Seddighin designed a randomised exact algorithm with the update and query time . As for now, no lower bounds are known for the dynamic LIS, besides trivial in the comparison model.

### LIS variants.

In the variant of LIS with 1D-queries, the algorithm needs to answer queries about the length of LIS in a subarray , given any . For static LIS, it is known how to build a structure of size capable of providing exact answers to such queries in time using the so-called unit-Monge matrices [10, Chapter 8]. Interestingly, both existing algorithms for dynamic approximate (global) LIS [5, 7] in fact support such 1D-queries within the same time complexity, although that is not the case for the dynamic exact LIS [7].

In the weighted variant of LIS, elements have assigned nonnegative weights and we seek an increasing subsequence with the maximum sum of weights of elements. Note that in a dynamic weighted LIS changing the weight of an element can be simply done by first deleting and then inserting a new element. For the static LIS, the weighted case is also solvable in time with a simple algorithm.

Any algorithm for weighted LIS can easily handle 1D-queries. Let be the maximum weight of any element of the array of elements. Then to answer 1D-query, we can insert immediately to the left of an element with weight and being minimum in the linear order of elements, and insert immediately to the right of an element with weight and being maximum in the linear order of elements. The global maximum weight of an increasing subsequence in this modified array is then the weight of an increasing subsequence in the original array on elements between and only, increased by .

### Our results.

In this note, we apply the construction of Abboud and Dahlgaard [1], originally designed for distances in planar graphs, to provide conditional polynomial lower bounds for dynamic LIS with 1D-queries (so also for dynamic weighted LIS). The main idea is to simulate their grid gadgets by an appropriately designed set of points in the plane, and arrange the points in an array in the natural left-to-right order. Then, we are able to extract the original distance by querying for the LIS in a subarray.

The recent algorithms for dynamic ()-approximation of (global) LIS [9, 5, 7] support 1D-queries without any modifications. On the other hand, the recent sublinear algorithm for dynamic exact LIS [7] does not. We hope that our polynomial lower bound for this natural generalisation helps to understand why there is such a large gap between the polylogarithmic complexity time for dynamic ()-approximate LIS [5] and time complexity for dynamic exact LIS [7].

## 2 Preliminaries

In this work, we consider sets of 2D points. A point is dominated by , denoted , if and . For any set of points , its ordered subset of points is a chain if . When points have weights, the weight of a chain is the sum of weights of its points. is an antichain if for all , .

When we wish to compute the longest chain in a set of points, we simply arrange its points in an array, sorted by the -coordinates, and then compute LIS with respect to the -coordinates. Maintaining such an array for a dynamic set of points is easily realised in logarithmic time with any BST supporting operation, which returns a pointer to an item of rank in the set of items in BST. Then we can find the value of the current element at index , delete the current element at index , or insert a new element strictly before or after the current element at index , all with logarithmic overhead.

### Two popular conjectures.

For the weighted case, we assume the following conjecture on the well-known APSP problem:

###### Conjecture 1.

There exists no algorithm solving the all-pairs shortest paths (APSP) problem in general weighted graphs in time , for any constant .

We reduce from the (max,)-matrix-product problem, denoted by , which is known to be equivalent to APSP [3]. In this problem we are given matrices , having integer weights in and want to compute matrix , with . As those matrices are weighted, for the unweighted case we need a weaker conjecture on Boolean variables. In the online Boolean matrix-vector multiplication (OMv) problem we are given matrix , and let be Boolean vectors arriving online. We need to preprocess and then for every output before seeing . It was conjectured in [6] (see also [8, 2]) that:

###### Conjecture 2.

There exists no algorithm solving the OMv problem in time , for any constant .

## 3 The embedding of a Matrix

Assume for now that matrices , are Boolean. Columns and rows are numbered from to . For each , we define embedding of and the -th column of , , as the union of six sets of points, namely . In total, contains points. It consists of the left and right side, and three sets of special points. It is best to inspect Figure 1 before reading further.

On the left side, we imagine there is a grid. There are two sets of points and , both having one point in each cell of this grid. For each column or row, points of form one chain, while points from form one antichain. Additionally, in each cell the point from is above and to the left of the point from . As for the weights, in column points from have weights , and in cell the point from has the weight , so depending on the value from transposed matrix . Formally, for each , contains the point with the weight , and contains the point with the weight . The first special set of points is also defined using the left grid. All points from are below points from and , additionally -th point is to the left of all points from -th column of the grid and to the right of points from -th column. All these points have the weight and form an antichain. Formally, for each , contains a point with the weight .

On the right side, we also have grid and the set of points , which is basically rotated by degrees. In each cell of the grid, there is one point from , and points in columns or rows form chains, but weights in column are . Formally, for each , contains a point with the weight . The second special set of points is defined using the right grid. All points from are above points from and additionally, -th point is to the right of all points from -th column of the grid and to the left of points from -th column. All these points have the weight of and form an antichain. Formally, for each , contains a point with the weight .

The last special set of points is . Those points form one antichain and are placed between the left and right grids. -th point is above all the points from the -th row from the left grid and below all the points from the -th row of the right grid. The weight of -th point is just . Formally, for each , contains a point with the weight .

Note that for , embeddings and differ only on weights of points from and .

### Properties of the longest chains.

Given we need to inspect the maximum weight of a chain starting with and ending with , for any . Observe that there is such a maximum chain containing a point from , thus we can focus on chains from to and from to , for any .

The main idea here is that the maximum weight chain should use at most one point from . Those points can be seen as ’turns’, meaning that if point in column from is taken, then the chain cannot contain any point from column above . It is not beneficial to take such a turn too quickly, since by changing a column early one can gain at most 2 (from two non-zero entries in a matrix), at the same time losing at least 3 from diminishing weights in columns.

Let be the maximum weight of a chain starting with a point and ending with a point , in set . Then we have:

###### Lemma 3.

Consider any , with .

1. If , .

2. If , .

3. If , .

4. If , , where we assume .

###### Proof.

The proof, for any and , is by induction on decreasing and then decreasing . For the claim is easy to verify — the maximum chain from to contains only two points, and from to it is a chain containing, except endpoints, points from in a column , and . The case of is also straightforward to verify, as then we have just a chain in a single row of the grid.

Now assume . For a maximum chain starting with , the next point in the chain must be , thus by induction the maximum weight is

 (3(n−j)+Aj,i)+(3n−3j−3)(i′−i)+1.5(n−j−1)(n−j)+Aj+1,i′+Bi′,k= (3n−3j−3)(i′−i)+1.5(n−j)(n−j+1)+Aj,i+Aj+1,i′+Bi′,k,

which gives us equality 4.

Now assume . For a maximum chain starting at , the next point in the chain must be , or . Thus, by induction its weight is

 3(n−j)+max{1.5(n−j)(n−j+1)+Bi′,k, 1.5(n−j)(n−j+1)+Aj,i′+Bi′,k, (3n−3j−3)+1.5(n−j−1)(n−j)+Aj+1,i′+Bi′,k}= 3(n−j)+1.5(n−j)(n−j+1)+Bi′,k+max{0,Aj,i′,Aj+1,i′−3}= (3n−3j)(i′−i)+1.5(n−j)(n−j+1)+Aj,i′+Bi′,k.

Now assume . For a maximum chain starting at , the next point in the chain must be , or . Thus, by induction its weight is

 3(n−j)+max{(3n−3j)(i′−i−1)+1.5(n−j)(n−j+1)+Aj,i′+Bi′,k, (3n−3j−3)(i′−i−1)+1.5(n−j)(n−j+1)+Aj,i+1+Aj+1,i′+Bi′,k, (3n−3j−3)(i′−i)+1.5(n−j−1)(n−j)+Aj+1,i′+Bi′,k}= 3(n−j)+(3n−3j)(i′−i−1)+1.5(n−j)(n−j+1)+Bi′,k +max{Aj,i′,3i−3i′+3+Aj,i+1+Aj+1,i′,3i−3i′+Aj+1,i′}= (3n−3j)(i′−i)+1.5(n−j)(n−j+1)+Aj,i′+Bi′,k,

as and matrices are Boolean. Thus, we get the remaining equality 2. ∎

From Lemma 3 we immediately have:

###### Corollary 4.

For any , .

The next lemma for weights in the simpler right grid is straightforward to prove:

###### Lemma 5.

For any , .

Observe that in there is a maximum chain from to containing a point from , as there is a point from between any two points from the left and right grid forming a chain. Thus, from Corollary 4 and Lemma 5, we have:

###### Lemma 6.

For any , .

Therefore, we achieved that for the maximum chain from to going through , the only dependence on are values from matrices. Moreover, observe that in any the maximum weight chain on points with -coordinates between and is , that is, such a chain starts with and ends with . This is true because any chain can contain at most one point from and at most one point from , and when we consider chains on points with -coordinates between and , we can always either replace some point with by or just add as the first element of a chain, and similarly for . This will allow us to compute (max,)-product of matrices using LIS supporting 1D-queries.

### Weighted matrices.

The previous embedding for Boolean matrices extends naturally to the case of and having integer weights in for some . We only need to multiply the previous weights of points in sets and by , and change weights of point in set to . All logic on the maximum chains still applies, and in the weighted case the following can be proven:

For any , .

## 4 Lower Bounds

### Dynamic weighted LIS.

Using embeddings defined in the previous section, it is straightforward to obtain a lower bound for weighted LIS:

###### Theorem 8.

There is no algorithm for dynamic weighted LIS with the amortised update and query time for any constant , unless Conjecture 1 is false. This holds even if only weight updates are allowed.

###### Proof.

We reduce from (max,)-product using defined embeddings. We are given matrices , having integer weights in and want to compute , with . Performing updates, we insert all the points from embedding of and . Then we make queries, for each asking about the maximum weight of a chain on points with -coordinates between and . From Lemma 7, this is . As only the last part of this formula is not fixed, we can extract from the answer the value of . Thus, after queries we have the first column of computed. Then we update weights of points in to get , which transforms into . This process is repeated until we get the whole . The cost is initial updates, then in total another updates and queries. As the size of the LIS instance at any time is points, claimed conditional bound is proven. ∎

### Dynamic unweighted LIS supporting 1D-queries.

For the unweighted case, we cannot use APSP conjecture anymore and need to switch to the weaker OMv Conjecture 2. Here we define as an embedding of matrix and vector .

###### Theorem 9.

There is no algorithm for dynamic (unweighted) LIS supporting 1D-queries with amortised update and query time for any constant , unless Conjecture 2 is false.

###### Proof.

In this paragraph, we use to denote the size of the matrix and a vector. Observe that the sum of weights in any embedding of Boolean matrix of size and vector of size is , as the largest weight is . Therefore, by replacing each weighted point with weight by a chain of unweighted points, embedding becomes an instance of unweighted LIS on points. Importantly, transforming into still takes only updates, since only points in needs to be deleted or inserted. Observe that we cannot hope to beat the trivial algorithm for OMv running in cubic time if we create an embedding of the whole input matrix, thus we will divide this matrix into smaller square pieces.

Suppose there is an algorithm for dynamic (unweighted) LIS supporting 1D-queries with amortised update and query time , for some constant , when run on an instance with up to points. Let . Divide into submatrices of size , and each vector into subvectors of size . Then , where and , as Boolean multiplication here translates to the (max,)-product.

Define as an embedding of and , for and . Total cost of updates to create all is , as there are embeddings, each with points. To recover , we compute all by making queries, each in an instance with points, which in total takes time . Then by taking maximums we can compute . Transforming all of the into , for , takes in total time . Then the process is repeated, allowing us to compute all one by one in an online fashion. Total time is , which is a contradiction under Conjecture 2, thus assumed algorithm for dynamic LIS could not exist. ∎

Finally, we note that in both presented lower bounds we can achieve simple trade-offs between bounds on query and update time, as described in [1].

## References

• [1] A. Abboud and S. Dahlgaard (2016) Popular conjectures as a barrier for dynamic planar graph algorithms. In FOCS, pp. 477–486. Cited by: §1, §4.
• [2] D. Chakraborty, L. Kamma, and K. G. Larsen (2018) Tight cell probe bounds for succinct boolean matrix-vector multiplication. In STOC, pp. 1297–1306. Cited by: §2.
• [3] M. J. Fischer and A. R. Meyer (1971) Boolean matrix multiplication and transitive closure. In SWAT (FOCS), pp. 129–131. Cited by: §2.
• [4] M. L. Fredman (1975) On computing the length of longest increasing subsequences. Discret. Math. 11 (1), pp. 29–35. Cited by: §1.
• [5] P. Gawrychowski and W. Janczewski (2021) Fully dynamic approximation of lis in polylogarithmic time. In STOC, Cited by: §1, §1, §1.
• [6] M. Henzinger, S. Krinninger, D. Nanongkai, and T. Saranurak (2015) Unifying and strengthening hardness for dynamic problems via the online matrix-vector multiplication conjecture. In STOC, pp. 21–30. Cited by: §2.
• [7] T. Kociumaka and S. Seddighin (2021) Improved dynamic algorithms for longest increasing subsequence. In STOC, Cited by: §1, §1, §1.
• [8] K. G. Larsen and R. R. Williams (2017) Faster online matrix-vector multiplication. In SODA, pp. 2182–2189. Cited by: §2.
• [9] M. Mitzenmacher and S. Seddighin (2020) Dynamic algorithms for LIS and distance to monotonicity. In STOC, pp. 671–684. Cited by: §1, §1.
• [10] A. Tiskin (2007) Semi-local string comparison: algorithmic techniques and applications. CoRR abs/0707.3619. Cited by: §1.