Abstract 1 Introduction 2 Our first technique: Handling small ๐—Ÿ๐—œ๐—ฆ 3 Our second technique: Handling large ๐—Ÿ๐—œ๐—ฆ 4 Our third technique: Handling small cardinality colors 5 Putting all the pieces together 6 Open Problems References

Range Longest Increasing Subsequence and Its Relatives

Karthik C. S ORCID Rutgers University, New Brunswick, NJ, USA Saladi Rahul ORCID Indian Institute of Science, Bangalore, India
Abstract

Longest increasing subsequence (๐–ซ๐–จ๐–ฒ) is a classical textbook problem which is still actively studied in various computational models. In this work, we present a few results for the range longest increasing subsequence problem (๐‘…๐‘Ž๐‘›๐‘”๐‘’โข-โข๐ฟ๐ผ๐‘†) and its variants. The input to ๐‘…๐‘Ž๐‘›๐‘”๐‘’โข-โข๐ฟ๐ผ๐‘† is a sequence ๐’ฎ of n real numbers and a collection ๐’ฌ of m query ranges and for each query in ๐’ฌ, the goal is to report the ๐–ซ๐–จ๐–ฒ of the sequence ๐’ฎ restricted to that query. Our two main results are for the following generalizations of the ๐‘…๐‘Ž๐‘›๐‘”๐‘’โข-โข๐ฟ๐ผ๐‘† problem:

2D Range Queries:

In this variant of the ๐‘…๐‘Ž๐‘›๐‘”๐‘’โข-โข๐ฟ๐ผ๐‘† problem, each query is a pair of ranges, one of indices and the other of values, and we provide a randomized algorithm with running time111The notation O~ hides polylogarithmic factors in n and m. O~โข(mโขn1/2+n3/2)+Oโข(k), where k is the cumulative length of the m output subsequences. This improves on the elementary O~โข(mโขn) runtime algorithm when m=ฮฉโข(n). Previously, the only known result breaking the quadratic barrier was of Tiskin [SODAโ€™10] which could only handle 1D range queries (i.e., each query was a range of indices) and also just outputted the length of the ๐–ซ๐–จ๐–ฒ (instead of reporting the subsequence achieving that length). Subsequent to our paper, Gawrychowski, Gorbachev, and Kociumaka in a preprint have extended Tiskinโ€™s approach to handle reporting 1D range queries in Oโข(nโข(logโกn)3+m+k) time.

Colored Sequences:

In this variant of the ๐‘…๐‘Ž๐‘›๐‘”๐‘’โข-โข๐ฟ๐ผ๐‘† problem, each element in ๐’ฎ is colored and for each query in ๐’ฌ, the goal is to report a monochromatic ๐–ซ๐–จ๐–ฒ contained in the sequence ๐’ฎ restricted to that query. For 2D queries, we provide a randomized algorithm for this colored version with running time O~โข(mโขn2/3+n5/3)+Oโข(k). Moreover, for 1D queries, we provide an improved algorithm with running time O~โข(mโขn1/2+n3/2)+Oโข(k). Thus, we again improve on the elementary O~โข(mโขn) runtime algorithm. Additionally, we prove that assuming the well-known Combinatorial Boolean Matrix Multiplication Hypothesis, that the runtime for 1D queries is essentially tight for combinatorial algorithms.

Our algorithms combine several tools such as dynamic programming (to precompute increasing subsequences with some desirable properties), geometric data structures (to efficiently compute the dynamic programming entries), random sampling (to capture elements which are part of the ๐–ซ๐–จ๐–ฒ), classification of query ranges into large ๐–ซ๐–จ๐–ฒ and small ๐–ซ๐–จ๐–ฒ, and classification of colors into light and heavy. We believe that our techniques will be of interest to tackle other variants of ๐–ซ๐–จ๐–ฒ problem and other range-searching problems.

Keywords and phrases:
Longest Increasing Subsequence, Range Query, Fine-Grained Complexity
Funding:
Karthik C. S.: This work was supported by the National Science Foundation under Grant CCF-2313372 and by the Simons Foundation, Grant Number 825876, Awardee Thu D. Nguyen.
Saladi Rahul: This work supported in part by the Walmart Center for Tech Excellence at IISc (CSR Grant WMGT-23-0001).
Copyright and License:
[Uncaptioned image]โ€‚ยฉ Karthik C. S. and Saladi Rahul; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation โ†’ Data structures design and analysis
; Theory of computation โ†’ Computational geometry
Related Version:
Full Version: https://arxiv.org/abs/2404.04795
Acknowledgements:
We thank the anonymous reviewers for several helpful comments that improved the presentation of our results.
Editor:
Shubhangi Saraf

1 Introduction

In the longest increasing subsequence (๐–ซ๐–จ๐–ฒ) problem, the input is a sequence of n real numbers ๐’ฎ=(a1,a2,โ€ฆ,an) and the goal is to report indices 1โ‰คi1<i2<โ‹ฏ<itโ‰คn, for the largest possible value of t, such that ai1<ai2<โ‹ฏ<ait. The length of the ๐–ซ๐–จ๐–ฒ is then defined to be t. For simplicity of discussion, we will assume that all the real numbers in the sequence are distinct. A standard dynamic programming algorithm reports the ๐–ซ๐–จ๐–ฒ in Oโข(n2) time, which can be improved to Oโข(nโขlogโกn) by performing patience sort [51, 52, 11, 27] or by suitably augmenting a binary search tree which computes each entry in the dynamic programming table in Oโข(logโกn) time.

In many applications, such as time-series data analysis, the user might not be interested in the ๐–ซ๐–จ๐–ฒ of the entire sequence. Instead they would like to focus their attention only on a โ€œrangeโ€ of indices in the sequence. Here are a few examples to illustrate this point.

  • โ– 

    Consider a stock X in the trading market. Let the sequence represent the daily price of stock X from 1950 till 2022. Instead of querying for the ๐–ซ๐–จ๐–ฒ of the entire sequence, the user might gain more insights [38, 49] about the trends of the stock by querying for the ๐–ซ๐–จ๐–ฒ in a range of dates (or time-windows) such as Jan 2020 till March 2020 or Feb 2018 till Dec 2018.

  • โ– 

    In modern times, social media platforms are the major source for generating enormous content on the Internet on a minute-to-minute basis. Consider a time-series data with statistics at a fine-grained level (of each minute of the day) about the number of Google searches, number of Tweets posted, number of Amazon purchases, or the number of Instagram posts. Monitoring the ๐–ซ๐–จ๐–ฒ under time-window constraints on such datasets can lead to more insights in understanding the social media usage trends and can also help in detecting abnormalities.

  • โ– 

    Popular genome sequencing algorithms identify high scoring segment pairs (HSPs) between a query transcript sequence and a long reference genomic sequence in order to obtain a global alignment, and this amounts to computing the ๐–ซ๐–จ๐–ฒ in the reference genome [9, 80, 8]. Typically many queries are made (corresponding to various transcripts/proteins) w.r.t. the same reference genomic sequence, and this can be modeled as range queries to compute the ๐–ซ๐–จ๐–ฒ.

Recently, in the theoretical computer science community, there has been a lot of interest in the dynamic ๐–ซ๐–จ๐–ฒ problem [53, 43, 31], where the goal is to maintain exact or approximate ๐–ซ๐–จ๐–ฒ under insertion and deletion of elements. Interestingly, an important subroutine which shows up is the computation of ๐–ซ๐–จ๐–ฒ of a given range of elements in the sequence. For example, Gawrychowski and Janczewski [31] design a dynamic algorithm to quickly compute the approximate ๐–ซ๐–จ๐–ฒ for any range of indices in ๐’ฎ. In fact, Gawrychowski and Janczewski go further and design a dynamic algorithm which maintains the approximate ๐–ซ๐–จ๐–ฒ for a special class of dyadic rectangles where the query222Consider mapping the ith element aiโˆˆ๐’ฎ to a 2D point (i,ai), to contextualize the notion of 2D queries. is an axis-aligned rectangle in 2D and the goal is to compute the approximate ๐–ซ๐–จ๐–ฒ of the 2D points (from the above mapping) which lie inside the rectangle.

Motivated by this, in this paper we study several natural variants of the ๐–ซ๐–จ๐–ฒ problem where the 1D queries impose restriction on the range of the indices and the 2D queries impose range restriction on both the indices and the values in the sequence. For each of these variants of the ๐–ซ๐–จ๐–ฒ problem there is a data structure counterpart that can be studied as well, and these results are later listed in Table 2.

1.1 Vanilla Problem: One dimensional range ๐—Ÿ๐—œ๐—ฆ problem

The first problem is the 1D range longest increasing subsequence problem (1โขDโข-โข๐‘…๐‘Ž๐‘›๐‘”๐‘’โข-โข๐ฟ๐ผ๐‘†). In the 1โขDโข-โข๐‘…๐‘Ž๐‘›๐‘”๐‘’โข-โข๐ฟ๐ผ๐‘† problem, we are given as input a sequence ๐’ฎ=(a1,a2,โ€ฆ,an) of n real numbers and a collection ๐’ฌ of m query ranges, where each qโˆˆ๐’ฌ is a range (or an interval) [x1,x2]โІ[1,n]. For each q=[x1,x2]โˆˆ๐’ฌ, the goal is to report the ๐–ซ๐–จ๐–ฒ of the sequence ๐’ฎโˆฉ[x1,x2]=(ax1,ax1+1โขโ€ฆ,ax2โˆ’1,ax2) (i.e., the output must be the longest increasing subsequence in ๐’ฎโˆฉ[x1,x2]). The length of the ๐–ซ๐–จ๐–ฒ of the sequence ๐’ฎโˆฉq is denoted by ๐–ซ๐–จ๐–ฒโข(๐’ฎโˆฉq). Throughout the paper, we abuse notation for simplicity by using ๐–ซ๐–จ๐–ฒ to refer to both the subsequence and its length. We clarify the intended meaning wherever it may be unclear.

A straightforward approach to solve the 1โขDโข-โข๐‘…๐‘Ž๐‘›๐‘”๐‘’โข-โข๐ฟ๐ผ๐‘† problem would involve no preprocessing: for each range [x1,x2] in ๐’ฌ, we will retrieve the elements ax1,ax1+1โขโ€ฆ,ax2โˆ’1,ax2 and report their ๐–ซ๐–จ๐–ฒ. This would require ฮฉโข(mโขnโขlogโกn) time in the worst-case (for instance when many of the ranges in ๐’ฌ are of ฮฉโข(n) length). In a remarkable work, Tiskin [74, 76, 75] broke the quadratic barrier, by designing an Oโข((n+m)โขlogโกn) time algorithm, albeit for the computationally easier length version of the 1โขDโข-โข๐‘…๐‘Ž๐‘›๐‘”๐‘’โข-โข๐ฟ๐ผ๐‘† problem, in which for all qโˆˆ๐’ฌ, the goal is to only output the length of the ๐–ซ๐–จ๐–ฒ in the range q (i.e., ๐–ซ๐–จ๐–ฒโข(๐’ฎโˆฉq)). While the algorithm designed by Tiskin is tailored to handle the length version of the 1โขDโข-โข๐‘…๐‘Ž๐‘›๐‘”๐‘’โข-โข๐ฟ๐ผ๐‘† problem, in a subsequent work to the current paper, Gawrychowski, Gorbachev, and Kociumaka [29] extend Tiskinโ€™s algorithm to handle the reporting version as well by providing an algorithm which answers the reporting version of the 1โขDโข-โข๐‘…๐‘Ž๐‘›๐‘”๐‘’โข-โข๐ฟ๐ผ๐‘† problem in Oโข(nโข(logโกn)3+m+k) time.

Since the vanilla version of the range ๐–ซ๐–จ๐–ฒ problem is completely understood (up to log factors), we focus on the following three variants.

1.2 Problem-I: Two dimensional range ๐—Ÿ๐—œ๐—ฆ problem

The next problem is the 2D range longest increasing subsequence problem (2โขDโข-โข๐‘…๐‘Ž๐‘›๐‘”๐‘’โข-โข๐ฟ๐ผ๐‘†) which is a natural generalization of the 1โขDโข-โข๐‘…๐‘Ž๐‘›๐‘”๐‘’โข-โข๐ฟ๐ผ๐‘† problem. As before, we are given as input a sequence ๐’ฎ=(a1,a2,โ€ฆ,an). Consider a mapping where the ith element aiโˆˆ๐’ฎ is mapped to a 2D point pi=(i,ai). Let ๐’ซ={p1,p2,โ€ฆ,pn} be a collection of these n points. We are also given as input a collection ๐’ฌ of m query ranges, where each range in ๐’ฌ is an axis-aligned rectangle in 2D. For each qโˆˆ๐’ฌ, the goal is to report the ๐–ซ๐–จ๐–ฒ of ๐’ซโˆฉq, i.e., the points of ๐’ซ lying inside q. See Figure 1(a) for an example.

Once again the naive approach to solve the problem would take Oโข(mโขnโขlogโกn) time, where for each range qโˆˆ๐’ฌ, we will scan the points in ๐’ซ to filter out the points lying inside q and then compute their ๐–ซ๐–จ๐–ฒ. One might be tempted to use orthogonal range searching data structures [3, 5, 24, 56, 13] to efficiently report ๐’ซโˆฉq, but in the worst-case we could have many queries with |๐’ซโˆฉq|=ฮฉโข(n). In this paper, even for the 2โขDโข-โข๐‘…๐‘Ž๐‘›๐‘”๐‘’โข-โข๐ฟ๐ผ๐‘† problem, we succeed to improve on the basic quadratic runtime algorithm when m is roughly ฮฉโข(n). We obtain the following result where the O~โข(โ‹…) notation hides polylog factors.

Figure 1: (a) Each element in the sequence ๐’ฎ=(3,5,7,8,10,2,4,1,6,9) is mapped to a 2D point. For example, the element 7 is mapped to c=(3,7). The 2โขDโข-โข๐‘…๐‘Ž๐‘›๐‘”๐‘’โข-โข๐ฟ๐ผ๐‘† of the points lying inside q1 is (b,c,d). (b) The same input sequence ๐’ฎ=(3,5,7,8,10,2,4,1,6,9) is shown here. The set of colors ๐’ž={orange, yellow, red}. Points b,dโขย andย โขh have orange color, points a,cโขย andย โขe have yellow color, and points f,g,iโขย andย โขj have red color. The ๐ถ๐‘œ๐‘™๐‘œ๐‘Ÿ๐‘’๐‘‘โข-โข2โขDโข-โข๐‘…๐‘Ž๐‘›๐‘”๐‘’โข-โข๐ฟ๐ผ๐‘† of the points lying inside q2 (the shaded region) is red color realized by the sequence (f,g,i).
Theorem 1.

There is a randomized algorithm to answer the reporting version of 2โขDโข-โข๐‘…๐‘Ž๐‘›๐‘”๐‘’โข-โข๐ฟ๐ผ๐‘† problem in O~โข(nโ‹…(m+n))+Oโข(k) time, where k is the cumulative length of the m output subsequences. The bound on the running time and the correctness of the solution holds with high probability.

1.3 Problem-II: Colored 1D range ๐—Ÿ๐—œ๐—ฆ problem

In the geometric data structures literature, colored range searching [41, 57, 59, 54, 45, 40, 14, 6, 34, 37, 46, 55, 71, 33] is a well-studied generalization of traditional range searching problems. In the colored setting, the geometric objects are partitioned into disjoint groups (or colors), and given a query region q, the typical goal is to efficiently report [22, 25, 23, 47], or count [39], or approximately count [60] the number of colors intersecting q, or find the majority color inside q [21, 44].

In the same spirit, we study the colored 1D range longest increasing subsequence problem (๐ถ๐‘œ๐‘™๐‘œ๐‘Ÿ๐‘’๐‘‘โข-โข1โขDโข-โข๐‘…๐‘Ž๐‘›๐‘”๐‘’โข-โข๐ฟ๐ผ๐‘†). In addition to the sequence ๐’ฎ and 1D range queries ๐’ฌ given as input to the 1โขDโข-โข๐‘…๐‘Ž๐‘›๐‘”๐‘’โข-โข๐ฟ๐ผ๐‘† problem, in the ๐ถ๐‘œ๐‘™๐‘œ๐‘Ÿ๐‘’๐‘‘โข-โข1โขDโข-โข๐‘…๐‘Ž๐‘›๐‘”๐‘’โข-โข๐ฟ๐ผ๐‘† problem we are additionally given a coloring of ๐’ฎ using the color set ๐’ž. Each element aiโˆˆ๐’ฎ has a color chosen from ๐’ž (the corresponding 2D point pi also has the same color). For all cโˆˆ๐’ž, let ๐’ซcโІ๐’ซ denote the set of points with color c and for any qโˆˆ๐’ฌ, with a slight abuse of notation, we will use ๐–ซ๐–จ๐–ฒโข(๐’ซcโˆฉq) to denote the length of the ๐–ซ๐–จ๐–ฒ of ๐’ซcโˆฉq. Moreover, we say a subsequence is monochromatic, if all the elements in the subsequence have the same color. For each qโˆˆ๐’ฌ, the goal is then to report the longest monochromatic increasing subsequence whose length is equal to maxcโˆˆCโข๐–ซ๐–จ๐–ฒโข(๐’ซcโˆฉq). See Figure 1(b) for an example in 2D. We obtain the following result.

Theorem 2.

There is a randomized algorithm to answer the reporting version of the ๐ถ๐‘œ๐‘™๐‘œ๐‘Ÿ๐‘’๐‘‘โข-โข1โขDโข-โข๐‘…๐‘Ž๐‘›๐‘”๐‘’โข-โข๐ฟ๐ผ๐‘† problem in O~โข(nโ‹…(m+n))+Oโข(k) time, where k is the cumulative length of the m output subsequences. The bound on the running time and the correctness of the solution holds with high probability.

We complement the above result with a conditional lower bound that indicates that the above runtime for ๐ถ๐‘œ๐‘™๐‘œ๐‘Ÿ๐‘’๐‘‘โข-โข1โขDโข-โข๐‘…๐‘Ž๐‘›๐‘”๐‘’โข-โข๐ฟ๐ผ๐‘† might be (near) optimal.

Theorem 3.

Assuming the Combinatorial Boolean Matrix Multiplication Hypothesis, for every ฮต>0 and Cโˆˆโ„•, there is no combinatorial algorithm to answer the reporting version of the ๐ถ๐‘œ๐‘™๐‘œ๐‘Ÿ๐‘’๐‘‘โข-โข1โขDโข-โข๐‘…๐‘Ž๐‘›๐‘”๐‘’โข-โข๐ฟ๐ผ๐‘† problem in k/2+Cโ‹…n0.5โˆ’ฮตโ‹…(m+n) time, where k is the cumulative size of the m outputs. The lower bound continues to hold even when we are only required to report the color of the longest monochromatic increasing subsequence for each range query.

The Combinatorial Boolean Matrix Multiplication Hypothesis (๐–ข๐–ก๐–ฌ๐–ฌ๐–ง) roughly asserts that Boolean matrix multiplication of two nร—n matrices cannot be computed by any combinatorial algorithm running in time n1.5โˆ’ฮต, for any constant ฮต>0. Here โ€œcombinatorial algorithmโ€ is typically defined as โ€œnon-Strassen-like algorithmโ€ (as defined in [12]), and this captures all known fast matrix multiplication algorithms.

While ๐–ข๐–ก๐–ฌ๐–ฌ๐–ง is widely explored since the 1990s [70, 48], there is no strong consensus in the computer science community about its plausibility. In a recent breakthrough, Abboud et al. [1], have come tantalizingly close to even refuting it. All that said, ๐–ข๐–ก๐–ฌ๐–ฌ๐–ง remains a widely used hypothesis for proving conditional lower bounds [66, 2, 35]. At the very least, Theorem 3 provides evidence that any algorithm for ๐ถ๐‘œ๐‘™๐‘œ๐‘Ÿ๐‘’๐‘‘โข-โข1โขDโข-โข๐‘…๐‘Ž๐‘›๐‘”๐‘’โข-โข๐ฟ๐ผ๐‘† that is significantly faster than the runtime given in Theorem 2, must be highly non-trivial.

The proof of Theorem 3 follows as a simple consequence of a ๐–ข๐–ก๐–ฌ๐–ฌ๐–ง based conditional lower bound in [21] for computing the mode of a sequence subject to range queries.

1.4 Problem-III: Colored 2D range ๐—Ÿ๐—œ๐—ฆ problem

The most general problem that we study in this paper is the colored 2D range longest increasing subsequence problem (๐ถ๐‘œ๐‘™๐‘œ๐‘Ÿ๐‘’๐‘‘โข-โข2โขDโข-โข๐‘…๐‘Ž๐‘›๐‘”๐‘’โข-โข๐ฟ๐ผ๐‘†). The queries in ๐’ฌ will be axis-aligned rectangles. For each qโˆˆ๐’ฌ, the goal is then to report the longest monochromatic increasing subsequence which attains maxcโˆˆCโข๐–ซ๐–จ๐–ฒโข(๐’ซcโˆฉq). See Figure 1(b) for an example. We obtain the following result.

Theorem 4.

There is a randomized algorithm to answer the reporting version of the ๐ถ๐‘œ๐‘™๐‘œ๐‘Ÿ๐‘’๐‘‘โข-โข2โขDโข-โข๐‘…๐‘Ž๐‘›๐‘”๐‘’โข-โข๐ฟ๐ผ๐‘† problem in O~โข(n2/3โ‹…(m+n))+Oโข(k) time, where k is the cumulative length of the m output subsequences. The bound on the running time and the correctness of the solution holds with high probability.

We remark that the conditional lower bound of Theorem 3 continues to hold here too.

In Table 1, we have summarized the state-of-the-art upper and (conditional) lower bounds for the various variants of ๐‘…๐‘Ž๐‘›๐‘”๐‘’โข-โข๐ฟ๐ผ๐‘† discussed in this paper.

Table 1: State-of-the-art upper and lower bounds are listed for the variants of ๐‘…๐‘Ž๐‘›๐‘”๐‘’โข-โข๐ฟ๐ผ๐‘† problem considered in this paper. In the table, all upper bounds from this paper are randomized, and all lower bounds from this paper are conditional and only against combinatorial algorithms. Also, recall that n is the length of input sequence, m is the number of range queries, and k is the cumulative size of the m outputs.
Problem Upper Bound Lower Bound
1D-Range LIS Oโข(nโข(logโกn)3+m+k) ฮฉโข(m+n+k)
(Theorem 5.13 in [29]) (Trivial)
2D-Range LIS O~โข(nโ‹…(m+n))+Oโข(k) ฮฉโข(m+n+k)
(Theorem 1) (Trivial)
Colored 1D-Range LIS O~โข(nโ‹…(m+n))+Oโข(k) ฮฉโข(n1/2โˆ’oโข(1)โข(m+n)+k)
(Theorem 2) (Theorem 3)
Colored 2D-Range LIS O~โข(n2/3โ‹…(m+n))+Oโข(k) ฮฉโข(n1/2โˆ’oโข(1)โข(m+n)+k)
(Theorem 4) (Theorem 3)

1.5 Data Structure Counterpart of the Three Variants of ๐—Ÿ๐—œ๐—ฆ Problem

A natural data structure counterpart question to the aforementioned four problems is to design a data structure for these problems and measure the tradeoff in the time needed for preprocessing the input sequence versus the time needed to answer a single range query. In Table 2, we have summarized the preprocessing and query time bounds that can be derived from the proofs of Theorems 1, 2, and 4.

Table 2: State-of-the-art upper bounds are listed for the data structure variants of ๐‘…๐‘Ž๐‘›๐‘”๐‘’โข-โข๐ฟ๐ผ๐‘† problems considered in this paper. In the table, all the bounds are randomized. Also, kq is the length of the output of a single query.
Problem Preprocessing Time Query time Reference
1D-Range LIS Oโข(nโข(logโกn)3) Oโข(kq) [29]
2D-Range LIS O~โข(n3/2) O~โข(n1/2)+Oโข(kq) This Paper
Colored 1D-Range LIS O~โข(n3/2) O~โข(n1/2)+Oโข(kq) This Paper
Colored 2D-Range LIS O~โข(n5/3) O~โข(n2/3)+Oโข(kq) This Paper

Finally, we note that the proof of Theorem 3 also implies that assuming ๐–ข๐–ก๐–ฌ๐–ฌ๐–ง, for every ฮต>0, there is no data structure for the reporting version of the ๐ถ๐‘œ๐‘™๐‘œ๐‘Ÿ๐‘’๐‘‘โข-โข1โขDโข-โข๐‘…๐‘Ž๐‘›๐‘”๐‘’โข-โข๐ฟ๐ผ๐‘† problem (or the ๐ถ๐‘œ๐‘™๐‘œ๐‘Ÿ๐‘’๐‘‘โข-โข2โขDโข-โข๐‘…๐‘Ž๐‘›๐‘”๐‘’โข-โข๐ฟ๐ผ๐‘† problem) which can be preprocessed using a combinatorial algorithm in Oโข(n1.5โˆ’ฮต) time such that each query can be answered using a combinatorial algorithm in kq2+Oโข(n0.5โˆ’ฮต) time.

1.6 Related Works

๐—Ÿ๐—œ๐—ฆ in popular settings and models

To the best of our knowledge, there is not much prior work on the reporting version of ๐‘…๐‘Ž๐‘›๐‘”๐‘’โข-โข๐ฟ๐ผ๐‘†. The results of Tiskin [74, 76, 75] on the length version of 1โขDโข-โข๐‘…๐‘Ž๐‘›๐‘”๐‘’โข-โข๐ฟ๐ผ๐‘† were later adapted to the reporting version in [29], subsequent to our work. Therefore, for the rest of this subsection, we list works on the ๐–ซ๐–จ๐–ฒ problem in some popular settings/models.

In the Dynamic ๐–ซ๐–จ๐–ฒ problem we need to maintain the length of ๐–ซ๐–จ๐–ฒ of an array under insertion and deletion. The ๐–ซ๐–จ๐–ฒ problem in the dynamic setting was initiated by Mitzenmacher and Seddighin [53]. In [31], an algorithm running in Oโข(ฮตโˆ’5โข(logโกn)11) time and providing (1+ฮต)-approximation was presented (this approximation algorithm can be adapted to approximate the ๐‘…๐‘Ž๐‘›๐‘”๐‘’โข-โข๐ฟ๐ผ๐‘† problem in the dynamic setting), and in [43] a randomized exact algorithm with the update and query time O~โข(n2/3) was provided. Finally, in [30], the authors provide conditional polynomial lower bounds for exactly solving ๐‘…๐‘Ž๐‘›๐‘”๐‘’โข-โข๐ฟ๐ผ๐‘† in the dynamic setting.

In the streaming model, computing the ๐–ซ๐–จ๐–ฒ requires ฮฉโข(n) bits of space [32], so it is natural to resort to approximation algorithms. In [32] is a deterministic (1+ฮต)-approximation in Oโข(n/ฮต) space for ๐–ซ๐–จ๐–ฒ problem, and this was shown to be optimal [26, 28]. We remark here that the ๐–ซ๐–จ๐–ฒ problem has also been implicitly studied in the streaming algorithms literature as estimating the sortedness of an array [7, 50, 32, 72].

In the setting of sublinear time algorithms, the authors of [68] showed how to approximate the length of the ๐–ซ๐–จ๐–ฒ to within an additive error of ฮตโ‹…n, for an arbitrary ฮตโˆˆ(0,1), with (1/ฮต)1/ฮตโ‹…(logโกn)Oโข(1) queries. Denoting the length of ๐–ซ๐–จ๐–ฒ by โ„“, in [67] the authors designed a non-adaptive Oโข(ฮปโˆ’3)-multiplicative factor approximation algorithm, where ฮป=โ„“/n, with Oโข(n/ฮป7) queries (and also obtained different tradeoff between the dependency on ฮป and n). In [58], the authors proved that adaptivity is essential in obtaining polylogarithmic query complexity for the ๐–ซ๐–จ๐–ฒ problem. Recently, for any ฮป=oโข(1), in [10] a (randomized) non-adaptive 1/ฮปoโข(1)-multiplicative factor approximation algorithm was provided with noโข(1)/ฮป running time.

In the read-only random access model, the authors of [42] showed how to find the length of ๐–ซ๐–จ๐–ฒ in Oโข((n2/s)โขlogโกn) time and only Oโข(s) space, for any parameter nโ‰คsโ‰คn.

Range-aggregate queries

Range-aggregate queries have traditionally been well-studied in the database community and the computational geometry community. See the survey papers [5, 65, 33]. In a typical range-aggregate query, the input is a collection of points in a d-dimensional space, and the user specifies a range query (such as an axis-aligned rectangle, or a disk, or a halfspace), and the goal is to compute an informative summary of the subset of points which lie inside the range query, such as the top-k points [15, 63, 64, 4, 17], a random subset of k points [73, 36], reporting or counting colors or groups [25, 22, 61], statistics such as mode, min [16], median [18], or sum, the closest pair of points [77, 78, 79], and the skyline points [19, 20, 62].

In an orthogonal range-max problem, the input is a set ๐’ซ of n points in d-dimensional space. Each point in ๐’ซ has a weight associated with it. Preprocess ๐’ซ into a data structure, so that given an axis-parallel box q, the goal is to report the point in ๐’ซโˆฉq with the largest weight. In this work, we will use vanilla range trees from the textbook [13] to answer range-max queries (since the goal of this work is not to shave polylogarithmic factors). The preprocessing time to build a vanilla range tree is Oโข(nโขlogdโˆ’1โกn) and the query time is Oโข(logdโกn).

2 Our first technique: Handling small ๐—Ÿ๐—œ๐—ฆ

We design a general technique to obtain all our upper bounds. We note that throughout the paper, there is ample scope to shave logarithmic factors in the runtime of our various algorithms and subroutines. However, that is not the focus of this paper.

For the sake of simplicity, we provide an overview of the general technique for the simplest case of 1โขDโข-โข๐‘…๐‘Ž๐‘›๐‘”๐‘’โข-โข๐ฟ๐ผ๐‘† which is in 1D and does not involve colors. Our strategy to solve the 1โขDโข-โข๐‘…๐‘Ž๐‘›๐‘”๐‘’โข-โข๐ฟ๐ผ๐‘† problem is the following. Consider an integer parameter ฯ„โˆˆ[1,n]. For the 1โขDโข-โข๐‘…๐‘Ž๐‘›๐‘”๐‘’โข-โข๐ฟ๐ผ๐‘† problem, ฯ„ is set to n. We will design two different techniques. The first technique is deterministic and reports the correct answer if ๐–ซ๐–จ๐–ฒโข(๐’ฎโˆฉq)โ‰คฯ„. If ๐–ซ๐–จ๐–ฒโข(๐’ฎโˆฉq)>ฯ„, then correctness is not guaranteed. The second technique is randomized and reports the correct answer with high probability if ๐–ซ๐–จ๐–ฒโข(๐’ฎโˆฉq)โ‰ฅฯ„. As such, for each qโˆˆ๐’ฌ, w.h.p., the correct result is obtained by one of the two algorithms.

In this subsection, we will give an overview of the first technique for 1โขDโข-โข๐‘…๐‘Ž๐‘›๐‘”๐‘’โข-โข๐ฟ๐ผ๐‘†. In our discussion we will use the terms element and point interchangeably. As discussed before, the ith element in sequence ๐’ฎ is equivalent to the 2D point (i,ai) in ๐’ซ. Consider the special case where there is a vertical line with x-coordinate xโˆ— such that each query range in ๐’ฌ contains xโˆ— (in the full version of the paper we show how to remove the assumption).

2.1 Idea-1: Lowest peaks and highest bases

Please refer to Figure 2(i) where eighteen points are shown. Chain C1 and chain C2 are increasing sequences to the left of xโˆ— and both have length four. Our first observation is that if we are allowed to store either C1 or C2, then it would be wiser to store C2. The reason is that C2 can โ€œstitchโ€ itself with chain C3 and C4, to form an increasing subsequence of length six and eight, respectively. On the other hand, C1 cannot stitch itself with C3 or C4 to form a larger increasing subsequence. Analogously, between chains C4 and C5, we will prefer C4 since it can stitch with C2, whereas C5 cannot stitch with any chain to the left of xโˆ—. In fact, the ๐–ซ๐–จ๐–ฒ of the eighteen points is realised by the chain C2โˆชC4 with length eight. This motivates the definition of lowest peak and highest base.

Figure 2: (i) An example with eighteen points and five chains is shown. (ii) An example with ten points. The query is the range [x1,x2]. In the range [x1,xโˆ—], the sequence with the lowest peak of length one is (b), of length two is (b,c) or (a,c), of length three is (b,c,e) or (a,c,e). In the range [xโˆ—,x2], the sequence with the highest base of length one is (j), of length two is (h,j), of length three (f,h,j) or (f,i,j). The ๐–ซ๐–จ๐–ฒ of points in the range [x1,x2] is five and the corresponding compatible pair is (Lโข[x1]โข[2],Rโข[x2]โข[3]).

For an increasing subsequence Sโˆˆ๐’ฎ, we define peak (resp., base) to be the last (resp., first) element in S. The algorithm will store two 2-dimensional arrays:

Array L:

For all integers 1โ‰คx1โ‰คxโˆ— and for all 1โ‰คฮฑโ‰คฯ„, among all increasing subsequences of length ฮฑ in the range [x1,xโˆ—], let S be the subsequence with the lowest peak. Then Lโข[x1]โข[ฮฑ] stores the value of the last element in S.

Array R:

For all integers xโˆ—<x2โ‰คn and for all 1โ‰คฮฒโ‰คฯ„, among all increasing sequences of length ฮฒ in the range (xโˆ—,x2], let S be the subsequence with the highest base. Then Rโข[x2]โข[ฮฒ] stores the value of the first element in S.

For example, in Figure 2(i), for the range [x1,xโˆ—] and ฮฑ=4, the chain C2 is the subsequence with the lowest peak; and for (xโˆ—,x2] and ฮฑ=4, chain C4 is the subsequence with the highest base. Efficient computation of the Oโข(nโขฯ„) entries in arrays L and R will be discussed later.

A pair (Lโข[x1]โข[ฮฑ],Rโข[x2]โข[ฮฒ]) is defined to be compatible if Lโข[x1]โข[ฮฑ]<Rโข[x2]โข[ฮฒ], i.e., it is possible to โ€œstitchโ€ the sequences corresponding to Lโข[x1]โข[ฮฑ] and Rโข[x2]โข[ฮฒ] to obtain an increasing sequence of length ฮฑ+ฮฒ. For a query range q=[x1,x2], our goal is to find the compatible pair (Lโข[x1]โข[ฮฑ],Rโข[x2]โข[ฮฒ]) which maximizes the value of ฮฑ+ฮฒ, i.e.,

๐–ซ๐–จ๐–ฒโข(๐’ฎโˆฉ[x1,x2])=maxฮฑ,ฮฒโก{ฮฑ+ฮฒโˆฃLโข[x1]โข[ฮฑ]<Rโข[x2]โข[ฮฒ]}.

2.2 Idea-2: Monotone property of peaks and bases

For a given query q=[x1,x2], a naive approach is to inspect all pairs of the form (Lโข[x1]โข[ฮฑ],Rโข[x2]โข[ฮฒ]), for all 1โ‰คฮฑ,ฮฒโ‰คฯ„, and then pick a compatible pair which maximizes the value of ฮฑ+ฮฒ. The number of pairs inspected is ฮ˜โข(ฯ„2) which we cannot afford. However, the following monotone property will help in reducing the number of pairs inspected to Oโข(ฯ„โขlogโกฯ„):

  • โ– 

    For a fixed value of x1, the value of Lโข[x1]โข[ฮฑ] increases as the value of ฮฑ increases, i.e., for any 1โ‰คฮฑโ‰คฮฑโ€ฒโ‰คฯ„, we have Lโข[x1]โข[ฮฑ]โ‰คLโข[x1]โข[ฮฑโ€ฒ].

  • โ– 

    Analogously, for a fixed value of x2, the value of Rโข[x2]โข[ฮฒ] decreases as the value of ฮฒ increases, i.e., for any 1โ‰คฮฒโ‰คฮฒโ€ฒโ‰คฯ„, we have Rโข[x2]โข[ฮฒ]โ‰ฅRโข[x2]โข[ฮฒโ€ฒ].

See Figure 2(ii) for an example where Lโข[x1]โข[ฮฑ] values are increasing with increase in ฮฑ and Rโข[x2]โข[ฮฒ] values are decreasing with increase in ฮฒ. For each 1โ‰คiโ‰คฯ„, the largest ฮฒi for which (Lโข[x1]โข[i],Rโข[x2]โข[ฮฒi]) is compatible can be found in Oโข(logโกฯ„) time by doing a binary search on the monotone sequence (Rโข[x2]โข[1],Rโข[x2]โข[2],โ€ฆ,Rโข[x2]โข[ฯ„]). Finally, report maxiโก(i+ฮฒi) as the length of the ๐–ซ๐–จ๐–ฒ for ๐’ฎโˆฉq. Overall, the time taken to answer the m query ranges will be Oโข(mโขฯ„โขlogโกฯ„).

2.3 Idea-3: Pivot points and dynamic programming

Now the key task is to design a preprocessing algorithm which can quickly compute each entry in the two-dimensional arrays L and R. We will look at R and an analogous discussion will hold for L. Assume that we have computed the value of Rโข[x2โˆ’1]โข[ฮฒ] and would like to next compute Rโข[x2]โข[ฮฒ]. Let px2=(x2,ax2) be the point with x-coordinate x2 which is encountered when we move the vertical line from x2โˆ’1 to x2.

Formally, we claim that the value of Rโข[x2]โข[ฮฒ] is higher than Rโข[x2โˆ’1]โข[ฮฒ] if and only if there is an increasing subsequence with the following three properties: (i) the subsequence length is ฮฒ, (ii) the base of the subsequence is higher than Rโข[x2โˆ’1]โข[ฮฒ], and (iii) the last point in the subsequence is px2. Please refer to Figure 3 for an example.

Figure 3: Two sequences S1 and S2 lie to the left of the vertical line x2โˆ’1. The value of Rโข[x2โˆ’1]โข[5] is realized by the y-coordinate of point a. In (a) and (b), we have Rโข[x2]โข[5]>Rโข[x2โˆ’1]โข[5], and in (c), we have Rโข[x2]โข[5]=Rโข[x2โˆ’1]โข[5]. In case (a), point px2 stitches with S1 to obtain a subsequence of length five with with higher base than a. In case (b), by stitching point px2 with S2 and removing point a, we obtain a subsequence of length five and it has a higher base than a.

We define px2 to be a pivot point. Now to efficiently compute Rโข[x2]โข[ฮฒ], we will need the support of another two-dimensional array B defined as follows: among all increasing subsequences of length ฮฒ in the range (xโˆ—,x2] containing pivot point px2 as the last element, let S be the subsequence with the highest base. Then Bโข[x2]โข[ฮฒ] is defined to be the value of the first element in S. In Figure 3(a) and Figure 3(b), Bโข[x2]โข[5] is realized by the y-coordinate of b and c, respectively. As a result, we can succinctly encode the three properties stated above as follows:

Rโข[x2]โข[ฮฒ]โ†maxโก{Rโข[x2โˆ’1]โข[ฮฒ],Bโข[x2]โข[ฮฒ]}.

In other words, an increasing sequence of length ฮฒ in the interval (xโˆ—,x2] with the highest base will either contain the pivot element px2 or not. The first term (i.e., Rโข[x2โˆ’1]โข[ฮฒ]) captures the case where px2 is not included, whereas the second term (i.e., Bโข[x2]โข[ฮฒ]) captures the case where px2 is included. As such, the task of efficiently computing R has been reduced to the task of efficiently computing B.

2.4 Idea-4: 2D range-max data structure

The final step is to compute each entry in B in polylogarithmic time. The entries will be computed in increasing values of ฮฒ. Assume that the entries corresponding to sequences of length at most ฮฒโˆ’1 have been computed. Then the entries Bโข[x2]โข[ฮฒ]โ€™s can be reduced to entries of Bโข[โ‹…]โข[ฮฒโˆ’1]โ€™s as follows:

Bโข[x2]โข[ฮฒ]={ax2,ย ifย ฮฒ=1;โˆ’โˆž,ifย ai>ax2ย for allย xโˆ—<i<x2;maxโก{Bโข[i]โข[ฮฒโˆ’1]|xโˆ—<i<x2โขย andย โขai<ax2},otherwise.

We will efficiently compute Bโข[x2]โข[ฮฒ]โ€™s by constructing a data structure which can answer 2D range-max queries. In a 2D range-max query, we are given n weighted points ๐’ซ in 2D. Each point is associated with a weight. For each point pi=(i,ai)โˆˆ๐’ซ, given a query region of the form qโ€ฒ=(โˆ’โˆž,i)ร—(โˆ’โˆž,ai), the goal is to report the point in ๐’ซโˆฉqโ€ฒ with the maximum weight. The 2D range-max problem can be solved in Oโข(nโขlogโกn) time (via reduction to the so-called 2D orthogonal point location problem [69]).

Now with each point piโˆˆ๐’ซ, we associate the weight Bโข[i]โข[ฮฒโˆ’1] and build a 2D range-max data structure. For each point px2=(x2,ax2)โˆˆ๐’ซ, the point in ๐’ซโˆฉ(โˆ’โˆž,x2)ร—(โˆ’โˆž,ax2) with the maximum weight is reported. If point pi is reported, then set Bโข[x2]โข[ฮฒ]=Bโข[i]โข[ฮฒโˆ’1]. The correctness follows from the third case in the above dynamic programming. Since ฮฒโ‰คฯ„, the time taken to construct B is Oโข(ฯ„)ร—Oโข(nโขlogโกn)=Oโข(nโขฯ„โขlogโกn).

Therefore, the overall time taken by this technique to answer 1โขDโข-โข๐‘…๐‘Ž๐‘›๐‘”๐‘’โข-โข๐ฟ๐ผ๐‘† will be O~โข(mโขฯ„+nโขฯ„)+Oโข(k)=O~โข(mโขn+nโขn)+Oโข(k) by setting ฯ„โ†n.

2.5 Idea-5: Generalizing ๐‘ณ and ๐‘น to handle 2โข๐‘ซโข-โข๐‘น๐’‚๐’๐’ˆ๐’†โข-โข๐‘ณ๐‘ฐ๐‘บ

We briefly describe the challenge arising while handling 2โขDโข-โข๐‘…๐‘Ž๐‘›๐‘”๐‘’โข-โข๐ฟ๐ผ๐‘† where the queries are axis-parallel rectangles. The definition of highest bases and lowest peak fail to be directly useful. For example, see Figure 4, where ๐–ซ๐–จ๐–ฒโข(๐’ซโˆฉq) is equal to five, and is realized by stitching S2 and S3. However, Lโข[x1]โข[3] will correspond to the sequence S1 and Rโข[x2]โข[2] will correspond to the sequence S4, both of which lie completely outside q.

Figure 4: Four increasing subsequences lying in the range [x1,x2]ร—(โˆ’โˆž,+โˆž).

The key observation in the 2D setting is that for an increasing subsequence S and a query rectangle q=[x1,x2]ร—[y1,y2], if the first and the last point of S lie inside q, then all the points of S lie inside q. Accordingly, we generalize the definitions of L and R. Specifically, in the 2D setting, R takes two arguments, the query q and an integer ฮฒ, and is defined as follows:

Rโข(q,ฮฒ)โ†maxpi=(i,ai)โก{Bโข[i]โข[ฮฒ]โขโˆฃpiโˆˆq,i>โขxโˆ—โขย andย โขBโข[i]โข[ฮฒ]>y1}.

For example, in Figure 4, the new definition of Rโข(q,2) ensures that the sequence S3 gets captured instead of S4. We construct L analogously. Note that in the 1D setting, L and R were explicitly computed. However, in the 2D setting, the number of combinatorially different axis-parallel rectangles is significantly more than our time budget. Therefore, L and R cannot be precomputed and stored. Instead, for all 1โ‰คฮฑโ‰คฯ„ (resp., 1โ‰คฮฒโ‰คฯ„), we will compute Lโข(q,ฮฑ) (resp., Rโข(q,ฮฒ)) during the query algorithm in Oโข(ฯ„โ‹…polylogย โขn) time.

3 Our second technique: Handling large ๐—Ÿ๐—œ๐—ฆ

Now we give an overview of our second technique for the 1โขDโข-โข๐‘…๐‘Ž๐‘›๐‘”๐‘’โข-โข๐ฟ๐ผ๐‘† problem (which we show in the full version of the paper that it also extends to the 2โขDโข-โข๐‘…๐‘Ž๐‘›๐‘”๐‘’โข-โข๐ฟ๐ผ๐‘† problem). If ๐–ซ๐–จ๐–ฒโข(๐’ฎโˆฉq)โ‰ฅฯ„, then this technique will report the answer correctly with high probability.

3.1 Idea-1: Stitching elements

One challenge with the ๐–ซ๐–จ๐–ฒ problem is that it is not decomposable. Consider a query range q=[x1,x2]ร—(โˆ’โˆž,+โˆž) and an xโˆ— such that x1<xโˆ—<x2. Let qโ„“=[x1,xโˆ—]ร—(โˆ’โˆž,+โˆž) and qr=(xโˆ—,x2]ร—(โˆ’โˆž,+โˆž) such that q=qโ„“โˆชqr. Then the ๐–ซ๐–จ๐–ฒ of ๐’ซโˆฉq need not be the concatenation of the ๐–ซ๐–จ๐–ฒ of ๐’ซโˆฉqโ„“ and the ๐–ซ๐–จ๐–ฒ of ๐’ซโˆฉqr, since the rightmost point in the ๐–ซ๐–จ๐–ฒ of ๐’ซโˆฉqโ„“ might have a larger value than the leftmost point in the ๐–ซ๐–จ๐–ฒ of ๐’ฎโˆฉqr.

However, suppose an oracle reveals that point piโˆˆ๐’ซ lies in the ๐–ซ๐–จ๐–ฒ of range q=[x1,x2]ร—(โˆ’โˆž,+โˆž). Then we claim that the problem becomes decomposable. We will define some notation before proceeding. For a point pi=(i,ai)โˆˆ๐’ซ corresponding to an element aiโˆˆ๐’ฎ, define the north-east region of pi as NโขEโข(pi)={(x,y)โˆฃxโ‰ฅiโขย andย โขyโ‰ฅai}. Analogously, define the north-west, the south-west and the south-east region of pi which are denoted by NโขWโข(pi),SโขWโข(pi)โขย andย โขSโขEโข(pi), respectively. Then it is easy to observe that,

๐–ซ๐–จ๐–ฒโข(๐’ซโˆฉq)=๐–ซ๐–จ๐–ฒโข(๐’ซโˆฉqโˆฉNโขEโข(pi))+๐–ซ๐–จ๐–ฒโข(๐’ซโˆฉqโˆฉSโขWโข(pi))โˆ’1. (1)

See Figure 5 for an example. In other words, knowing that pi belongs to the ๐–ซ๐–จ๐–ฒ decomposes the original ๐–ซ๐–จ๐–ฒ problem into two ๐–ซ๐–จ๐–ฒ sub-problems which can be computed independently. In such a case, we refer to point pi as a stitching element, which is formally defined below.

Definition 5 (Stitching element).

For a range q, fix any ๐–ซ๐–จ๐–ฒ of ๐’ซโˆฉq and call it S. Then each element in S is defined to be a stitching element w.r.t. q.

The goal of our algorithm is to:

Construct a small-sized set โ„›โІ๐’ซ such that, for any qโˆˆ๐’ฌ, at least one stitching element w.r.t. q is contained in โ„›โˆฉq.

For each piโˆˆโ„›, in the preprocessing phase, the two terms on the right hand side of equation 1 can be computed in Oโข(nโขlogโกn) time for all possible queries. Therefore, the preprocessing time will be Oโข(|โ„›|โขnโขlogโกn).

Figure 5: A collection of fifteen elements. Given a query range q=[2,14]ร—(โˆ’โˆž,+โˆž), suppose an oracle reveals that p8 lies in the ๐–ซ๐–จ๐–ฒ of ๐’ซโˆฉq. Then observe that we can discard the points in SโขEโข(p8) and NโขWโข(p8) which are shown as shaded regions. The ๐–ซ๐–จ๐–ฒ of ๐’ซโˆฉqโˆฉNโขEโข(p8) will be (p8,p9,p13) and and the ๐–ซ๐–จ๐–ฒ of ๐’ซโˆฉqโˆฉSโขWโข(p8) will be (p3,p5,p6,p8). Therefore, ๐–ซ๐–จ๐–ฒ of ๐’ซโˆฉq will be (p3,p5,p6,p8,p9,p13).

3.2 Idea-2: Random sampling

By using the fact that ๐–ซ๐–จ๐–ฒโข(๐’ซโˆฉq)โ‰ฅฯ„, it is possible to construct a set โ„› of size roughly nโขlogโกnฯ„โ‰ˆnโขlogโกn via random sampling. For each 1โ‰คiโ‰คn, sample piโˆˆ๐’ซ independently with probability cโขlogโกnฯ„, where c is a sufficiently large constant. Let โ„›โІ๐’ซ be the set of sampled points. Then we can establish the following connection between โ„› and the stitching elements.

Lemma 6.

For all ranges q such that ๐–ซ๐–จ๐–ฒโข(๐’ซโˆฉq)โ‰ฅฯ„, if Sq is one of the ๐–ซ๐–จ๐–ฒ of ๐’ซโˆฉq, then with high probability |โ„›โˆฉSq|=ฮฉโข(logโกn).

This ensures that the preprocessing time will be Oโข(|โ„›|โขnโขlogโกn)=Oโข(n3/2โขlog2โกn). To answer any range q, first scan โ„› to identify the points which lie inside q. For each element piโˆˆโ„›โˆฉq, compute the right hand side of equation 1 in Oโข(logโกn) time. Finally, report the largest value computed. Therefore, the query time is bounded by Oโข(|๐’ฌ|โ‹…|โ„›|โ‹…logโกn)=Oโข(mโขnโขlog2โกn).

4 Our third technique: Handling small cardinality colors

4.1 A naive approach

The ๐ถ๐‘œ๐‘™๐‘œ๐‘Ÿ๐‘’๐‘‘โข-โข2โขDโข-โข๐‘…๐‘Ž๐‘›๐‘”๐‘’โข-โข๐ฟ๐ผ๐‘† problem is more challenging than the 2โขDโข-โข๐‘…๐‘Ž๐‘›๐‘”๐‘’โข-โข๐ฟ๐ผ๐‘† problem. Firstly, the result of Theorem 1 does not really help in answering ๐ถ๐‘œ๐‘™๐‘œ๐‘Ÿ๐‘’๐‘‘โข-โข2โขDโข-โข๐‘…๐‘Ž๐‘›๐‘”๐‘’โข-โข๐ฟ๐ผ๐‘† since it completely ignores the information about the colors. Secondly, there might be a temptation to solve the problem โ€œindependentlyโ€ for each color class. For example, consider a setting where each color class has roughly equal number of points, i.e., n/|๐’ž| points. Consider a color c and build an instance of Theorem 1 based on the points of color c. Then, for each query qโˆˆ๐’ฌ, we have the value of ๐–ซ๐–จ๐–ฒโข(๐’ซcโˆฉq). Repeat this for each color in ๐’ž. Finally, for each query qโˆˆ๐’ฌ, report the color c for which ๐–ซ๐–จ๐–ฒโข(๐’ซcโˆฉq) is maximized.

Now lets (informally) analyze this algorithm. The running time bound of Theorem 1 has three terms. For now, lets ignore the second term and the third term, which represent the time taken to build the data structure and the time taken to report the output of the m queries. The first term is the time taken to answer m queries (which is roughly n time per query). Adding the first term for each color class, we get

โˆ‘cO~โข(mโข|๐’ซc|1/2)โ‰คO~โข(|๐’ž|โขmโข(n/|๐’ž|)1/2)=O~โข(mโขnโข|๐’ž|),

which is O~โข(mโขn) when |๐’ž|=ฮ˜โข(n) and O~โข(mโขn1+ฮต2)โ‰ซmโขn when |๐’ž|=nฮต, for any 0<ฮตโ‰ค1. Therefore, in the worst-case this approach does not help achieve our target query time bound.

4.2 A technique to handle small cardinality colors

We will design a third technique which will be helpful to answer ๐ถ๐‘œ๐‘™๐‘œ๐‘Ÿ๐‘’๐‘‘โข-โข1โขDโข-โข๐‘…๐‘Ž๐‘›๐‘”๐‘’โข-โข๐ฟ๐ผ๐‘† and ๐ถ๐‘œ๐‘™๐‘œ๐‘Ÿ๐‘’๐‘‘โข-โข2โขDโข-โข๐‘…๐‘Ž๐‘›๐‘”๐‘’โข-โข๐ฟ๐ผ๐‘†. The key idea is to handle all the colors in a โ€œcombinedโ€ manner. The technique will work well when all the colors have small cardinality. Given a parameter ฮ”, assume that for each color c, the value of |๐’ซ|cโ‰คฮ”. The key observations made by the algorithm are the following:

  • โ– 

    Bounding the number of output subsequences. For a query q, let the output ๐–ซ๐–จ๐–ฒ be S of color c. Let piโˆˆ๐’ซc (resp., pjโˆˆ๐’ซc) be the first (resp., last) point on S. Call this a pair (i,j). As such, whenever color c is the output, the number of distinct pairs will be Oโข(|๐’ซc|2). Adding up over all the colors, the total number of distinct pairs will be:

    โˆ‘cOโข(|๐’ซc|2)โ‰คOโข(ฮ”โขโˆ‘c|๐’ซc|)=Oโข(nโขฮ”).

    If ฮ”โ‰ชn, then this is a significant improvement over the naive bound of Oโข(n2) distinct pairs (or distinct output subsequences).

  • โ– 

    Reduction to an uncolored problem. For each possible output subsequence S of color c with piโˆˆ๐’ซc (resp., pjโˆˆ๐’ซc) as the first (resp., last) point point on S, we construct an axis-aligned rectangle Rcโข(i,j) with pi (resp., pj) as the bottom-left (resp., top-right) corner. A weight wโข(Rcโข(i,j)) is associated with rectangle Rcโข(i,j) which is equal to ๐–ซ๐–จ๐–ฒโข(๐’ซcโˆฉRcโข(i,j)). See Figure 6. Let โ„› be the collection of Oโข(nโขฮ”) such weighted rectangles. As a result, the problem of ๐ถ๐‘œ๐‘™๐‘œ๐‘Ÿ๐‘’๐‘‘โข-โข2โขDโข-โข๐‘…๐‘Ž๐‘›๐‘”๐‘’โข-โข๐ฟ๐ผ๐‘† is now reduced to the rectangle range-max problem, where given an axis-parallel rectangle q, among all the rectangles in โ„› which lie completely inside q, the goal is to report the rectangle with the largest weight.

    It is crucial to note that the colored problem has been reduced to a problem on uncolored rectangles for which an efficient data structure exists: the rectangle range-max data structure can be constructed in O~โข(|โ„›|)=O~โข(nโขฮ”) time and the m range queries can be answered in O~โข(m)+Oโข(k) time.

Figure 6: On the left is an increasing subsequence of length four with all four points being of color c. On the right is the corresponding rectangle Rcโข(i,j). The ๐–ซ๐–จ๐–ฒ of color c inside Rcโข(i,j) is four (the other two points of color c do not participate in the ๐–ซ๐–จ๐–ฒ). Therefore, the weight associated with Rcโข(i,j) is four.

5 Putting all the pieces together

As an illustration we will consider the ๐ถ๐‘œ๐‘™๐‘œ๐‘Ÿ๐‘’๐‘‘โข-โข2โขDโข-โข๐‘…๐‘Ž๐‘›๐‘”๐‘’โข-โข๐ฟ๐ผ๐‘† problem and put together all the three techniques discussed in the previous subsections in a specific manner.

5.1 Light and heavy colors

Define a parameter ฮ” which will be set later. A color c is classified as light if |๐’ซc|โ‰คฮ”, otherwise, it is classified as heavy. We will design different algorithms to handle light colors and heavy colors. The advantage with a light color, say c, is that we can precompute the ๐–ซ๐–จ๐–ฒ for Oโข(|๐’ซc|2) 2D axis-parallel ranges and still be within the time budget. On the other hand, the advantage with heavy colors is that there can be only Oโข(n/ฮ”) heavy colors.

5.2 Handling light colors

Let ๐’ซโ„“โІ๐’ซ be the set of points which belong to a light color. We will use the third technique to answer ๐ถ๐‘œ๐‘™๐‘œ๐‘Ÿ๐‘’๐‘‘โข-โข2โขDโข-โข๐‘…๐‘Ž๐‘›๐‘”๐‘’โข-โข๐ฟ๐ผ๐‘† on ๐’ซโ„“ and queries ๐’ฌ. It follows that the running time is O~โข(m+nโขฮ”)+Oโข(k) (see the full version of the paper for details).

5.3 Handling heavy colors and small ๐—Ÿ๐—œ๐—ฆ queries

Let ๐’ซhโІ๐’ซ be the set of points which belong to a heavy color. In the full version of the paper we will prove that for an arbitrary value of ฯ„, the running time of the first technique will be O~โข(mโขฯ„+nโขฯ„). The first technique as described above only handles uncolored points. In the full version of the paper we will โ€œgeneralizeโ€ the first technique to answer ๐ถ๐‘œ๐‘™๐‘œ๐‘Ÿ๐‘’๐‘‘โข-โข2โขDโข-โข๐‘…๐‘Ž๐‘›๐‘”๐‘’โข-โข๐ฟ๐ผ๐‘† problem as well. The running time of this generalized first technique on colored pointset ๐’ซh and queries ๐’ฌ will be O~โข(mโขฯ„โขnฮ”+n2โขฯ„ฮ”)+Oโข(k), where the number of heavy colors is Oโข(n/ฮ”).

5.4 Handling heavy colors and large ๐—Ÿ๐—œ๐—ฆ queries

In the full version of the paper we will prove that for an arbitrary ฯ„, the running time of the second technique will be O~โข(mโขnฯ„+n2ฯ„)+Oโข(k) for 2โขDโข-โข๐‘…๐‘Ž๐‘›๐‘”๐‘’โข-โข๐ฟ๐ผ๐‘† problem. In fact, we will generalize this algorithm to the large ๐–ซ๐–จ๐–ฒ case of ๐ถ๐‘œ๐‘™๐‘œ๐‘Ÿ๐‘’๐‘‘โข-โข2โขDโข-โข๐‘…๐‘Ž๐‘›๐‘”๐‘’โข-โข๐ฟ๐ผ๐‘† with the same running time (ignoring polylogarithmic factors). The generalized algorithm will answer ๐ถ๐‘œ๐‘™๐‘œ๐‘Ÿ๐‘’๐‘‘โข-โข2โขDโข-โข๐‘…๐‘Ž๐‘›๐‘”๐‘’โข-โข๐ฟ๐ผ๐‘† on ๐’ซh and queries ๐’ฌ.

Combining all the three subroutines, the total running time will be:

O~โข(m+mโขnฯ„+mโขฯ„โขnฮ”)โŸquery time+O~โข(n2ฯ„+nโขฮ”+n2โขฯ„ฮ”)โŸpreprocessing time+Oโข(k)

We set the parameters ฯ„โ†n1/3 and ฮ”โ†n2/3 in the above expression to obtain a running time of O~โข(mโขn2/3+n5/3)+Oโข(k).

6 Open Problems

We conclude the paper with a few open problems.

  • โ– 

    Is it possible to extend the algorithm in [29] for the 1โขDโข-โข๐‘…๐‘Ž๐‘›๐‘”๐‘’โข-โข๐ฟ๐ผ๐‘† problem to solve the 2โขDโข-โข๐‘…๐‘Ž๐‘›๐‘”๐‘’โข-โข๐ฟ๐ผ๐‘† problem in Oโข(nโขย polylogย โขn+k) time? Or, is there a (conditional) hardness result which makes obtaining the upper bound unlikely?

  • โ– 

    Another interesting research direction is to design a deterministic algorithm which runs in sub-quadratic time. Specifically, can the construction of stitching set be efficiently derandomized?

  • โ– 

    For the ๐ถ๐‘œ๐‘™๐‘œ๐‘Ÿ๐‘’๐‘‘โข-โข2โขDโข-โข๐‘…๐‘Ž๐‘›๐‘”๐‘’โข-โข๐ฟ๐ผ๐‘† problem, can we bridge the gap between the upper bound and the (conditional) lower bound. We conjecture that the upper bound can be further improved.

  • โ– 

    Can we extend our algorithmic technique to beat the quadratic barrier for the weighted version of 1โขDโข-โข๐‘…๐‘Ž๐‘›๐‘”๐‘’โข-โข๐ฟ๐ผ๐‘†?

  • โ– 

    Finally, it would be interesting to explore the ๐‘…๐‘Ž๐‘›๐‘”๐‘’โข-โข๐ฟ๐ผ๐‘† in the dynamic model.

References

  • [1] Amir Abboud, Nick Fischer, Zander Kelley, Shachar Lovett, and Raghu Meka. New graph decompositions and combinatorial boolean matrix multiplication algorithms. In STOC, 2024. To appear.
  • [2] Amir Abboud and Virginia Vassilevska Williams. Popular conjectures imply strong lower bounds for dynamic problems. In 2014 IEEE 55th Annual Symposium on Foundations of Computer Science, pages 434โ€“443. IEEE, 2014. doi:10.1109/FOCS.2014.53.
  • [3] Peyman Afshani, Lars Arge, and Kasper Dalgaard Larsen. Orthogonal range reporting in three and higher dimensions. In Proceedings of Annual IEEE Symposium on Foundations of Computer Science (FOCS), pages 149โ€“158, 2009. doi:10.1109/FOCS.2009.58.
  • [4] Peyman Afshani, Gerth Stolting Brodal, and Norbert Zeh. Ordered and unordered top-k range reporting in large data sets. In Proceedings of the Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 390โ€“400, 2011. doi:10.1137/1.9781611973082.31.
  • [5] Pankaj K. Agarwal and Jeff Erickson. Geometric range searching and its relatives. Advances in Discrete and Computational Geometry, pages 1โ€“56, 1998.
  • [6] Pankaj K. Agarwal, Sathish Govindarajan, and S. Muthukrishnan. Range searching in categorical data: Colored range searching on grid. In Proceedings of European Symposium on Algorithms (ESA), pages 17โ€“28, 2002. doi:10.1007/3-540-45749-6_6.
  • [7] Miklรณs Ajtai, TS Jayram, Ravi Kumar, and D Sivakumar. Approximate counting of inversions in a data stream. In Proceedings of ACM Symposium on Theory of Computing (STOC), pages 370โ€“379, 2002.
  • [8] Michael H Albert, Alexander Golynski, Angรจle M Hamel, Alejandro Lรณpez-Ortiz, S Srinivasa Rao, and Mohammad Ali Safari. Longest increasing subsequences in sliding windows. Theoretical Computer Science, 321(2-3):405โ€“414, 2004. doi:10.1016/J.TCS.2004.03.057.
  • [9] Stephen F Altschul, Warren Gish, Webb Miller, Eugene W Myers, and David J Lipman. Basic local alignment search tool. Journal of molecular biology, 215(3):403โ€“410, 1990.
  • [10] Alexandr Andoni, Negev Shekel Nosatzki, Sandip Sinha, and Clifford Stein. Estimating the longest increasing subsequence in nearly optimal time. In Proceedings of Annual IEEE Symposium on Foundations of Computer Science (FOCS), pages 708โ€“719, 2022. doi:10.1109/FOCS54457.2022.00073.
  • [11] Lars Arge. The buffer tree: A technique for designing batched external data structures. Algorithmica, 37(1):1โ€“24, 2003. doi:10.1007/S00453-003-1021-X.
  • [12] Grey Ballard, James Demmel, Olga Holtz, and Oded Schwartz. Graph expansion and communication costs of fast matrix multiplication. Journal of the ACM (JACM), 59(6):1โ€“23, 2013. doi:10.1145/2395116.2395121.
  • [13] Mark de Berg, Otfried Cheong, Marc van Kreveld, and Mark Overmars. Computational Geometry: Algorithms and Applications. Springer-Verlag, 3rd edition, 2008.
  • [14] Panayiotis Bozanis, Nectarios Kitsios, Christos Makris, and Athanasios K. Tsakalidis. New upper bounds for generalized intersection searching problems. In Proceedings of International Colloquium on Automata, Languages and Programming (ICALP), pages 464โ€“474, 1995. doi:10.1007/3-540-60084-1_97.
  • [15] Gerth Stolting Brodal. External memory three-sided range reporting and top-k queries with sublogarithmic updates. In Proceedings of Symposium on Theoretical Aspects of Computer Science (STACS), volume 47, pages 23:1โ€“23:14. 2016. doi:10.4230/LIPIcs.STACS.2016.23.
  • [16] Gerth Stรธlting Brodal, Pooya Davoodi, and S. Srinivasa Rao. On space efficient two dimensional range minimum data structures. In Proceedings of European Symposium on Algorithms (ESA), pages 171โ€“182, 2010. doi:10.1007/978-3-642-15781-3_15.
  • [17] Gerth Stรธlting Brodal, Rolf Fagerberg, Mark Greve, and Alejandro Lopez-Ortiz. Online sorted range reporting. In International Symposium on Algorithms and Computation (ISAAC), pages 173โ€“182, 2009. doi:10.1007/978-3-642-10631-6_19.
  • [18] Gerth Stรธlting Brodal, Beat Gfeller, Allan Gronlund Jorgensen, and Peter Sanders. Towards optimal range medians. Theoretical Computer Science, 412(24):2588โ€“2601, 2011. doi:10.1016/J.TCS.2010.05.003.
  • [19] Gerth Stรธlting Brodal and Kasper Green Larsen. Optimal planar orthogonal skyline counting queries. In Scandinavian Symposium and Workshops on Algorithm Theory (SWAT), pages 110โ€“121, 2014. doi:10.1007/978-3-319-08404-6_10.
  • [20] Gerth Stolting Brodal and Konstantinos Tsakalidis. Dynamic planar range maxima queries. In Proceedings of International Colloquium on Automata, Languages and Programming (ICALP), pages 256โ€“267, 2011.
  • [21] Timothy M Chan, Stephane Durocher, Kasper Green Larsen, Jason Morrison, and Bryan T Wilkinson. Linear-space data structures for range mode query in arrays. Theory of Computing Systems, 55(4):719โ€“741, 2014. doi:10.1007/S00224-013-9455-2.
  • [22] Timothy M. Chan, Qizheng He, and Yakov Nekrich. Further results on colored range searching. In International Symposium on Computational Geometry (SoCG), pages 28:1โ€“28:15, 2020. doi:10.4230/LIPIcs.SOCG.2020.28.
  • [23] Timothy M. Chan and Zhengcheng Huang. Dynamic colored orthogonal range searching. In Proceedings of European Symposium on Algorithms (ESA), volume 204, pages 28:1โ€“28:13, 2021. doi:10.4230/LIPIcs.ESA.2021.28.
  • [24] Timothy M. Chan, Kasper Green Larsen, and Mihai Patrascu. Orthogonal range searching on the ram, revisited. In Proceedings of Symposium on Computational Geometry (SoCG), pages 1โ€“10, 2011. doi:10.1145/1998196.1998198.
  • [25] Timothy M. Chan and Yakov Nekrich. Better data structures for colored orthogonal range reporting. In Proceedings of the Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 627โ€“636, 2020. doi:10.1137/1.9781611975994.38.
  • [26] Funda Ergun and Hossein Jowhari. On distance to monotonicity and longest increasing subsequence of a data stream. In Proceedings of the Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 730โ€“736, 2008.
  • [27] Michael L Fredman. On computing the length of longest increasing subsequences. Discrete Mathematics, 11(1):29โ€“35, 1975. doi:10.1016/0012-365X(75)90103-X.
  • [28] Anna Gรกl and Parikshit Gopalan. Lower bounds on streaming algorithms for approximating the length of the longest increasing subsequence. SIAM Journal on Computing, 39(8):3463โ€“3479, 2010. doi:10.1137/090770801.
  • [29] Pawel Gawrychowski, Egor Gorbachev, and Tomasz Kociumaka. Core-sparse monge matrix multiplication: Improved algorithm and applications. CoRR, abs/2408.04613, 2024. doi:10.48550/arXiv.2408.04613.
  • [30] Paweล‚ Gawrychowski and Wojciech Janczewski. Conditional lower bounds for variants of dynamic LIS. arXiv preprint arXiv:2102.11797, 2021.
  • [31] Pawel Gawrychowski and Wojciech Janczewski. Fully dynamic approximation of LIS in polylogarithmic time. In Proceedings of ACM Symposium on Theory of Computing (STOC), pages 654โ€“667, 2021. doi:10.1145/3406325.3451137.
  • [32] Parikshit Gopalan, T. S. Jayram, Robert Krauthgamer, and Ravi Kumar. Estimating the sortedness of a data stream. In Proceedings of the Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 318โ€“327, 2007. URL: http://dl.acm.org/citation.cfm?id=1283383.1283417.
  • [33] Prosenjit Gupta, Ravi Janardan, Saladi Rahul, and Michiel H. M. Smid. Computational geometry: Generalized (or colored) intersection searching. In Handbook of Data Structures and Applications, CRC Press, 2nd edition, pages 1042โ€“1057, 2018.
  • [34] Prosenjit Gupta, Ravi Janardan, and Michiel H. M. Smid. Further results on generalized intersection searching problems: Counting, reporting, and dynamization. Journal of Algorithms, 19(2):282โ€“317, 1995. doi:10.1006/JAGM.1995.1038.
  • [35] 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 symposium on Theory of computing, pages 21โ€“30, 2015. doi:10.1145/2746539.2746609.
  • [36] Xiaocheng Hu, Miao Qiao, and Yufei Tao. Independent range sampling. In Proceedings of ACM Symposium on Principles of Database Systems (PODS), pages 246โ€“255, 2014. doi:10.1145/2594538.2594545.
  • [37] Ravi Janardan and Mario A. Lopez. Generalized intersection searching problems. International Journal of Computational Geometry and Applications, 3(1):39โ€“69, 1993. doi:10.1142/S021819599300004X.
  • [38] Ruoming Jin, Scott McCallen, and Eivind Almaas. Trend motif: A graph mining approach for analysis of dynamic complex networks. In Proceedings of International Conference on Management of Data (ICDM), pages 541โ€“546, 2007. doi:10.1109/ICDM.2007.92.
  • [39] Haim Kaplan, Natan Rubin, Micha Sharir, and Elad Verbin. Counting colors in boxes. In Proceedings of the Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 785โ€“794, 2007. URL: http://dl.acm.org/citation.cfm?id=1283383.1283467.
  • [40] Haim Kaplan, Micha Sharir, and Elad Verbin. Colored intersection searching via sparse rectangular matrix multiplication. In Proceedings of Symposium on Computational Geometry (SoCG), pages 52โ€“60, 2006. doi:10.1145/1137856.1137866.
  • [41] Marek Karpinski and Yakov Nekrich. Top-k color queries for document retrieval. In Proceedings of the Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 401โ€“411, 2011. doi:10.1137/1.9781611973082.32.
  • [42] Masashi Kiyomi, Hirotaka Ono, Yota Otachi, Pascal Schweitzer, and Jun Tarui. Space-efficient algorithms for longest increasing subsequence. In Proceedings of Symposium on Theoretical Aspects of Computer Science (STACS), 2018.
  • [43] Tomasz Kociumaka and Saeed Seddighin. Improved dynamic algorithms for longest increasing subsequence. In Proceedings of ACM Symposium on Theory of Computing (STOC), pages 640โ€“653, 2021. doi:10.1145/3406325.3451026.
  • [44] Danny Krizanc, Pat Morin, and Michiel H. M. Smid. Range mode and range median queries on lists and trees. Nordic Journal of Computing, 12(1):1โ€“17, 2005.
  • [45] Ying Kit Lai, Chung Keung Poon, and Benyun Shi. Approximate colored range and point enclosure queries. Journal of Discrete Algorithms, 6(3):420โ€“432, 2008. doi:10.1016/J.JDA.2007.10.001.
  • [46] Kasper Green Larsen and Rasmus Pagh. I/O-efficient data structures for colored range and prefix reporting. In Proceedings of the Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 583โ€“592, 2012. doi:10.1137/1.9781611973099.49.
  • [47] Kasper Green Larsen and Freek van Walderveen. Near-optimal range reporting structures for categorical data. In Proceedings of the Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 265โ€“276, 2013. doi:10.1137/1.9781611973105.20.
  • [48] Lillian Lee. Fast context-free grammar parsing requires fast boolean matrix multiplication. Journal of the ACM (JACM), 49(1):1โ€“15, 2002. doi:10.1145/505241.505242.
  • [49] Youhuan Li, Lei Zou, Huaming Zhang, and Dongyan Zhao. Longest increasing subsequence computation over streaming sequences. IEEE Transactions on Knowledge and Data Engineering (TKDE), 30(6):1036โ€“1049, 2017. doi:10.1109/TKDE.2017.2761345.
  • [50] David Liben-Nowell, Erik Vee, and An Zhu. Finding longest increasing and common subsequences in streaming data. Journal of Combinatorial Optimization, 11:155โ€“175, 2006. doi:10.1007/S10878-006-7125-X.
  • [51] Colin L Mallows. Patience sorting. SIAM Review, 4(2):148โ€“149, 1962.
  • [52] Colin L Mallows. Patience sorting. SIAM Review, 5(4):375, 1963.
  • [53] Michael Mitzenmacher and Saeed Seddighin. Dynamic algorithms for LIS and distance to monotonicity. In Proceedings of ACM Symposium on Theory of Computing (STOC), pages 671โ€“684, 2020. doi:10.1145/3357713.3384240.
  • [54] S. Muthukrishnan. Efficient algorithms for document retrieval problems. In Proceedings of the Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 657โ€“666, 2002. URL: http://dl.acm.org/citation.cfm?id=545381.545469.
  • [55] Yakov Nekrich. Efficient range searching for categorical and plain data. ACM Transactions on Database Systems (TODS), 39(1):9, 2014.
  • [56] Yakov Nekrich and Saladi Rahul. 4d range reporting in the pointer machine model in almost-optimal time. In Proceedings of the Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 1862โ€“1876, 2023. doi:10.1137/1.9781611977554.CH71.
  • [57] Yakov Nekrich and Jeffrey Scott Vitter. Optimal color range reporting in one dimension. In Proceedings of European Symposium on Algorithms (ESA), pages 743โ€“754, 2013. doi:10.1007/978-3-642-40450-4_63.
  • [58] Ilan Newman and Nithin Varma. New sublinear algorithms and lower bounds for LIS estimation. In Proceedings of International Colloquium on Automata, Languages and Programming (ICALP), pages 100:1โ€“100:20, 2021. doi:10.4230/LIPIcs.ICALP.2021.100.
  • [59] Manish Patil, Sharma V. Thankachan, Rahul Shah, Yakov Nekrich, and Jeffrey Scott Vitter. Categorical range maxima queries. In Proceedings of ACM Symposium on Principles of Database Systems (PODS), pages 266โ€“277, 2014. doi:10.1145/2594538.2594557.
  • [60] Saladi Rahul. Approximate range counting revisited. In 33rd International Symposium on Computational Geometry (SoCG), volume 77, pages 55:1โ€“55:15, 2017. doi:10.4230/LIPIcs.SOCG.2017.55.
  • [61] Saladi Rahul. Approximate range counting revisited. Journal of Computational Geometry, 12(1):40โ€“69, 2021. doi:10.20382/JOCG.V12I1A3.
  • [62] Saladi Rahul and Ravi Janardan. Algorithms for range-skyline queries. In Proceedings of ACM Symposium on Advances in Geographic Information Systems (GIS), pages 526โ€“529, 2012. doi:10.1145/2424321.2424406.
  • [63] Saladi Rahul and Yufei Tao. On top-k range reporting in 2d space. In Proceedings of ACM Symposium on Principles of Database Systems (PODS), pages 265โ€“275, 2015. doi:10.1145/2745754.2745777.
  • [64] Saladi Rahul and Yufei Tao. Efficient top-k indexing via general reductions. In Proceedings of ACM Symposium on Principles of Database Systems (PODS), pages 277โ€“288, 2016. doi:10.1145/2902251.2902290.
  • [65] Saladi Rahul and Yufei Tao. A guide to designing top-k indexes. SIGMOD Record, 48(2):6โ€“17, 2019. doi:10.1145/3377330.3377332.
  • [66] Liam Roditty and Uri Zwick. On dynamic shortest paths problems. Algorithmica, 61:389โ€“401, 2011. doi:10.1007/S00453-010-9401-5.
  • [67] Aviad Rubinstein, Saeed Seddighin, Zhao Song, and Xiaorui Sun. Approximation algorithms for lcs and LIS with truly improved running times. In Proceedings of Annual IEEE Symposium on Foundations of Computer Science (FOCS), pages 1121โ€“1145, 2019. doi:10.1109/FOCS.2019.00071.
  • [68] Michael Saks and C Seshadhri. Estimating the longest increasing sequence in polylogarithmic time. SIAM Journal of Computing, 46(2):774โ€“823, 2017. doi:10.1137/130942152.
  • [69] Neil Sarnak and Robert Endre Tarjan. Planar point location using persistent search trees. Communications of the ACM (CACM), 29(7):669โ€“679, 1986. doi:10.1145/6138.6151.
  • [70] Giorgio Satta. Tree-adjoining grammar parsing and boolean matrix multiplication. Computational linguistics, 20(2):173โ€“191, 1994.
  • [71] Qingmin Shi and Joseph JรกJรก. Optimal and near-optimal algorithms for generalized intersection reporting on pointer machines. Information Processing Letters (IPL), 95(3):382โ€“388, 2005. doi:10.1016/J.IPL.2005.04.008.
  • [72] Xiaoming Sun and David P Woodruff. The communication and streaming complexity of computing the longest common and increasing subsequences. In Proceedings of the Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 336โ€“345, 2007. URL: http://dl.acm.org/citation.cfm?id=1283383.1283419.
  • [73] Yufei Tao. Algorithmic techniques for independent query sampling. In Proceedings of ACM Symposium on Principles of Database Systems (PODS), pages 129โ€“138, 2022. doi:10.1145/3517804.3526068.
  • [74] Alexander Tiskin. Semi-local longest common subsequences in subquadratic time. Journal of Discrete Algorithms, 6(4):570โ€“581, 2008. doi:10.1016/J.JDA.2008.07.001.
  • [75] Alexander Tiskin. Fast distance multiplication of unit-monge matrices. In Proceedings of the Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 1287โ€“1296, 2010. doi:10.1137/1.9781611973075.103.
  • [76] Alexandre Tiskin. Semi-local string comparison: Algorithmic techniques and applications. Math. Comput. Sci., 1(4):571โ€“603, 2008. doi:10.1007/S11786-007-0033-3.
  • [77] Jie Xue. Colored range closest-pair problem under general distance functions. In Proceedings of the Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 373โ€“390, 2019. doi:10.1137/1.9781611975482.24.
  • [78] Jie Xue, Yuan Li, Saladi Rahul, and Ravi Janardan. Searching for the closest-pair in a query translate. Journal of Computational Geometry, 11(2):26โ€“61, 2020. doi:10.20382/JOCG.V11I2A3.
  • [79] Jie Xue, Yuan Li, Saladi Rahul, and Ravi Janardan. New bounds for range closest-pair problems. Discrete & Computational Geometry, 68(1):1โ€“49, 2022. doi:10.1007/S00454-022-00388-7.
  • [80] Hongyu Zhang. Alignment of blast high-scoring segment pairs based on the longest increasing subsequence algorithm. Bioinformatics, 19(11):1391โ€“1396, 2003. doi:10.1093/BIOINFORMATICS/BTG168.