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 1Dqueries, 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 socalled unitMonge matrices [10, Chapter 8]. Interestingly, both existing algorithms for dynamic approximate (global) LIS [5, 7] in fact support such 1Dqueries 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 1Dqueries. Let be the maximum weight of any element of the array of elements. Then to answer 1Dquery, 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 1Dqueries (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 lefttoright 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 1Dqueries 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 wellknown APSP problem:
Conjecture 1.
There exists no algorithm solving the allpairs shortest paths (APSP) problem in general weighted graphs in time , for any constant .
We reduce from the (max,)matrixproduct 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 matrixvector 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 nonzero 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 .

If , .

If , .

If , .

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
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
Now assume . For a maximum chain starting at , the next point in the chain must be , or . Thus, by induction its weight is
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 1Dqueries.
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:
Lemma 7.
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 1Dqueries.
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 1Dqueries 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 1Dqueries 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 tradeoffs between bounds on query and update time, as described in [1].
References
 [1] (2016) Popular conjectures as a barrier for dynamic planar graph algorithms. In FOCS, pp. 477–486. Cited by: §1, §4.
 [2] (2018) Tight cell probe bounds for succinct boolean matrixvector multiplication. In STOC, pp. 1297–1306. Cited by: §2.
 [3] (1971) Boolean matrix multiplication and transitive closure. In SWAT (FOCS), pp. 129–131. Cited by: §2.
 [4] (1975) On computing the length of longest increasing subsequences. Discret. Math. 11 (1), pp. 29–35. Cited by: §1.
 [5] (2021) Fully dynamic approximation of lis in polylogarithmic time. In STOC, Cited by: §1, §1, §1.
 [6] (2015) Unifying and strengthening hardness for dynamic problems via the online matrixvector multiplication conjecture. In STOC, pp. 21–30. Cited by: §2.
 [7] (2021) Improved dynamic algorithms for longest increasing subsequence. In STOC, Cited by: §1, §1, §1.
 [8] (2017) Faster online matrixvector multiplication. In SODA, pp. 2182–2189. Cited by: §2.
 [9] (2020) Dynamic algorithms for LIS and distance to monotonicity. In STOC, pp. 671–684. Cited by: §1, §1.
 [10] (2007) Semilocal string comparison: algorithmic techniques and applications. CoRR abs/0707.3619. Cited by: §1.
Comments
There are no comments yet.